SuperCollider already provides us a plethora of both basic and more sophisticated waveform generators, and more are available through extension libraries and Quarks
. Yet, it also provides us the means to generate our own custom-looking ones, as we will see in this section.
The famous wavetable lookup
synthesis technique can be summarized as a repeated reading of a custom wavetable (that is, the desired waveform's cycle) according to a given frequency. Apparently we are talking about periodic waveforms, and actually this is the standard methodology in the underlying implementation of most standard oscillators. To perform custom wavetable lookup synthesis, we need to populate an instance of Buffer
with the desired wave-cycle and then use Osc
(or one of its other flavors: OscN
, VOsc
, VOSC3
, and COsc
), as shown in the following code:
( // Simple Wavetable Lookup var buffer = Buffer.alloc(Server.default, 256, 1); // allocate a Buffer buffer...