Algosim documentation: FadeSounds


Returns a sound consisting of two sounds played after each other, except for a period of overlap in which the first sound fades into the second sound.



If s1 and s2 are sounds with the same bit depth and sample frequency, then FadeSounds(s1, s2, d) returns the sound of duration equal to the duration of s1 plus the duration of s2 minus d seconds with s1 at the beginning, s2 at the end, and the overlap consisting of a d second linear fade from s1 to s2.

If omitted, d defaults to 1 second.


l ≔ SineTone(100, 0.5, 1); h ≔ SineTone(400, 0.5, 1); FadeSounds(l, h)

l ≔ SineTone(100, 0.5, 2); h ≔ SineTone(400, 0.5, 2); w ≔ WhiteNoise(.1, 2); FadeSounds(FadeSounds(l, w), h)

See also