mmmt-tools / Synthesis / virtual analog
on-device · nothing leaves this page

Virtual analog & aliasing

A digital oscillator that just draws a sawtooth's hard jump sounds wrong up high: the harmonics above half the sample rate fold back as inharmonic aliasing tones. Flip band-limit off and play near the top of the keyboard to hear the grit; flip it on and PolyBLEP rounds off each discontinuity so only real harmonics remain. Both oscillators are hand-written in an AudioWorklet — the browser's built-in oscillator is already band-limited, so it couldn't show you the problem. PWM sweeps the pulse width; unison detune stacks copies for a supersaw.

+1
waveform
spectrum

Oscillator

0.50
off

Unison

1
14

Amp envelope

0.01
0.3
0.7
0.35

play with your keyboard (a s d f …) or click the keys · try the top notes with band-limit off