New Audio Object: polyBLEP Oscillator with bandlimited hard-sync

Status
Not open for further replies.

flo

Member
Hello there :)

I have been digging deep into the rabbit hole of anti-aliasing lately and have succeeded to finish an oscillator object for my Teensy synth, which I want to share with you.
Since there are not many poly-BLEP implementations for Teensy, this object could be helpful for the ones of you which are building software synths.

The object consists of three individual oscillators. All of them have bandlimited variable slope triangle(can also be a sawtooth) and bandlimited pulse wave, which can be frequency modulated, as well as pulse-width modulated. Oscillator 2 and 3 also have a slave-mode, which provides a sawtooth synced up to the frequency of oscillator 1 (the hard sync is also bandlimited).
The object uses about 4 per cent of CPU on the Teensy 4, maybe I will optimise it a bit in the future, but probably not.

You can access the code here at my gitlab: https://gitlab.com/flojawi/teensy-polyblep-oscillator
Most of the functions are self-explanatory parameter setters, the readme and header file contain additional information.

The Arduino sketch in the github repo is an already-build "demo" which sounds a bit over the top but you can tweak it to your like liking ^^

Greetings,
flo
 
I had a play with this (took a while to figure out the amplitudes were all tiny out the box!) - sounds great at
the low frequencies involved.

Have you tried each oscillation mode at 4 or 5kHz kind of range and checked on the aubility of any spurs?

When I was experimenting with my BLEP code I was looking for -70 to -80dB spur level if possible, which
pretty much forces a brick-wall bandlimit on the step function. Whether that's overkill I don't know!
 
Hello MarkT,

my implementation is only a two-sample polyBLEP, so it will only reduce the aliasing. What exactly do you mean with spurs? Spikes in the Frequency spectrum?
 
Hello MarkT,

my implementation is only a two-sample polyBLEP, so it will only reduce the aliasing. What exactly do you mean with spurs? Spikes in the Frequency spectrum?

Yes, standard terminology for RF signals, no reason not to use for audio! Short for "spurious peak" I believe, but slightly
punning with it as spurs are covered in nasty spikes!

The ear is much less fussy than a spectrum analyzer of course, the polynomial approach is probably fine for most uses.
 
Very cool, will try it as soon as possible!
Thanks for sharing!

Maybe this object could be updated to the teensy audio library?
 
Yes, standard terminology for RF signals, no reason not to use for audio! Short for "spurious peak" I believe, but slightly
punning with it as spurs are covered in nasty spikes!

The ear is much less fussy than a spectrum analyzer of course, the polynomial approach is probably fine for most uses.

I've already run into some light performance issues, so I don't want to "bloat" to code any more by moving to proper bleps. When using lots of polyphony (currently I'm at 16 voices for my synth), the CPU time even on Teensy 4 is quite limited.
 
Very cool, will try it as soon as possible!
Thanks for sharing!

Maybe this object could be updated to the teensy audio library?

I don't think it would fit the fixed-point, optimized style of the library. All the calculations are in float (and I feel not competent enough to implement the BLEPs and sync in integer math).
But let's see what Paul thinks of it.
 
Status
Not open for further replies.
Back
Top