Superposes two sounds, so that they are played simultaneously.
superpose(s1, s2[, t[, α1[, α2]]])
tis a non-negative number
α2are real numbers
superpose(s1, s2, t, α1, α2) returns a sound with
s2 superposed. Specifically, it returns a copy of
s2 starting at time
s1. The result runs until both
s2 have ended.
In the result,
s2 are scaled by factors
α2, respectively, so that a resulting sample is of the form
α1⋅s1(τ) + α2⋅s2(τ − t).
Samples that do not exist in
s2 are treated as
t defaults to
s2 must have the same bit depth and sample frequency.
l ≔ SineTone(100, 0.5, 1); h ≔ SineTone(400, 0.5, 1); superpose(l, h)