110 likes | 457 Views
Oscillator. Sawtooth/ramp wave Band-limited to avoid aliasing: “Naïve” sawtooth aliases badly, especially at high frequencies Audio example: [from wikipedia.org/wiki/Aliasing]. Wavetable Oscillator. Pre-generate band-limited waveforms, then upsample on the fly.
E N D
Oscillator • Sawtooth/ramp wave • Band-limited to avoid aliasing:“Naïve” sawtooth aliases badly, especially at high frequencies • Audio example: [from wikipedia.org/wiki/Aliasing]
Wavetable Oscillator • Pre-generate band-limited waveforms, then upsample on the fly A1 A2 A3 … A9 Wavetables F2 F2 F2 Oscillator output block
Envelopes • ADSR: Attack, Decay, Sustain, Release Attack time Release time level Decay time Sustain level time
Expression Control • Intensity • Articulation + Envelope * Oscillator * output
Double Buffering (Batching) • More efficient to synthesize in blocks • Introduces 64 samples of latency (2 ms) • Block error averages to another 32 samples. Playback Buffer Synthesis Buffer (to be filled) Synthesis Buffer (full) Playback Buffer
Note Sequences • Big array of bytes – each byte is a note. • 0 means “no change”, 1 means “stop note” • 12 – 127 are C0 through G9 by halfsteps • Merry Had a Little Lamb: