Additive Synthesis in SuperCollider
Multichannel Expansion
The following example implements simple additive synthesis in SuperCollider, suited as a starting point for more elaborate designs. Arrays can be helpful for using single UGens multiple times, which is the very idea of additive synthesis. The multichannel expansion allows the use of arrays as arguments for UGens, resulting in an array of objects with the initialization parameters given in the arrays. The following example will create five oscillators, sending their outputs to the buses 0...4:
Mixing
The single partials can be easily summed by wrapping them
inside a Mix.ar()
UGen. They are now all sent to the first
output bus:
Dynamic Allocation
For more partials and dynamic sizes, it makes sense to use the fill()
method of the array class: