expand

Reference > modulate

Wave
Spectrum

    

modulate is a function associated with the Wave class that lets you modulate the amplitude (i.e. the loudness) of one wave using another wave.

wave1.modulate(wave2) creates a new wave whose entries are wave1[i] * (1 + wave2[i]). This is used in Amplitude Modulation.

Note that wave1 and wave2 must be the same length for this to be properly defined.

You can find the code for modulate in the synthesine library.