A command to concatenate all selected Sound objects into a single large Sound, with smooth cross-fading between the sounds.
All sounds must have equal sampling frequencies and equal numbers of channels. They are concatenated in the order in which they appear in the list of objects (not in the order in which you select them; remember: What You See Is What You Get).
Suppose we start with the following two sounds. They are both 0.1 seconds long. The first sound is a sine wave with a frequency of 100 Hz, the second a sine wave with a frequency of 230 Hz:
If the overlap time is 0.01 seconds, the concatenation of these two sounds will produce a Sound with a duration of 0.19 seconds, which is the sum of the durations of the two sounds, minus the overlap time.
The concatenation works in the following way. The last 0.01 seconds of the first sound is multiplied by a falling raised cosine (the second half of a Hann window, see the first red curve), and the first 0.01 seconds of the second sound is multiplied by a rising raised cosine (the first half of a Hann window, see the second red curve):
This figure shows how the two sounds are windowed (faded out and in), as well as how they will overlap.
Finally, the two windowed ("cross-faded") sounds are added to each other:
This example showed how it works if you concatenate two sounds; if you concatenate three sounds, there will be two overlaps, and so on.
© ppgb, February 11, 2011