expand

Reference > mult

Wave
Spectrum

    

mult is a function associated with the Wave class that lets you multiply a wave by a number, or multiply a wave by another wave.

wave.mult(0.1) creates a new wave whose entries are those of the first wave multipled by 0.1. This is typically used at the end of loop to scale down the amplitude (gain) of the output wave, so that it isn’t too loud.

Multiplying a wave by another wave is also called convolution, and is typically used to create an envelope effect.

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