Skip to content

Bandwidth limited sawtooth oscillator

April 2, 2012

The paper I used to create the Moog Ladder emulation posted yesterday also contains an algorithm for a simple bandlimited sawtooth oscillator known as a Differentiated Parabolic Waveform (DPW). The algorithm is quite simple: generate a ramp, square the result,  use a differential filter (IE, find the difference between the last value and the new value), then scale the results by F/SR (where F = frequency, and SR = sample rate).

The differences between this oscillator and the factory sawtooth is hard for me to hear, but it is easy to see on an FFT chart. Here’s what the factory sawtooth looks like (played at MIDI note 36 to get a clear graph):

Factory Sawtooth

And here’s what the bandwidth limited version looks like:

Bandwidth limited

As you can see, the bandwidth limited version drops to zero near the Nyquist limit, while the factory version does not. The CPU usage is of course a little bit higher but it’s still pretty cheap.

This will eventually be expanded for things such as phase modulation and the like. I’m also working on the more commonly used BLIT (bandwidth limited impulse train) oscillators, and I hope to have more on that front soon.

Download here.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: