function from pair(frequency, duration) to Sound
frequency of the first harmonic
duration of the produced Sound, in seconds
– list of envelopes, which are functions from Sound to Sound
Sound resulting Sound
stacking_adsr(sine_sound, 300, 5, list(adsr(0.1, 0.3, 0.2, 0.5), adsr(0.2, 0.5, 0.6, 0.1), adsr(0.3, 0.1, 0.7, 0.3)));
Returns a Sound that results from applying a list of envelopes to a given wave form. The wave form is a Sound generator that takes a frequency and a duration as arguments and produces a Sound with the given frequency and duration. Each envelope is applied to a harmonic: the first harmonic has the given frequency, the second has twice the frequency, the third three times the frequency etc. The harmonics are then layered simultaneously to produce the resulting Sound.