Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: New Audio Object: polyBLEP Oscillator with bandlimited hard-sync

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    16

    New Audio Object: polyBLEP Oscillator with bandlimited hard-sync

    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

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    327
    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!

  3. #3
    Junior Member
    Join Date
    Oct 2019
    Posts
    16
    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?

  4. #4
    Senior Member
    Join Date
    Jul 2020
    Posts
    327
    Quote Originally Posted by flo View Post
    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.

  5. #5
    Tested on my Teensy 3.6 synth and this sounds good. Noticeable difference when compared with the standard oscillators.

  6. #6
    Very cool, will try it as soon as possible!
    Thanks for sharing!

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

  7. #7
    Junior Member
    Join Date
    Oct 2019
    Posts
    16
    Quote Originally Posted by MarkT View Post
    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.

  8. #8
    Junior Member
    Join Date
    Oct 2019
    Posts
    16
    Quote Originally Posted by manatee View Post
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •