In my comment to the question (please see), I claimed that that writing code from scratch would be easier than even the effort you would need to pay to adopt someone else's solution to your project.
Indeed, this modulation is nothing but multiplication of two functions, high-frequency "carrier" sinusoidal waveform
c(t)
, and some low-frequency signal
m(t) + 1
; that low-frequency signal which is usually, in most typical interpretation, the one used for transmitting some information, so the resulting function is
c(t)*(m(1) + 1)
:
https://en.wikipedia.org/wiki/Amplitude_modulation[
^].
—SA