Befaco modules development blog

Lol, I may use this for the Lich panel for use with HVCC (once I get the vcv rack wrapper functional. got thumbs up for using the panel from befaco already :wink: )

Oh cool - we’d looked at doing Lich for VCV but decided it was too big a job (for the time being). What’s HVCC?

A way to build Pd patches into binary plugins. Used in OWL/Lich and Daisy for euro stuff. I’d use it for a kind of “default gui” option, and then change the colors for each build based on the uri, or something.

Not anywhere close to functioning DSP in rack yet, though :slight_smile:

1 Like

Hi - I"m working on the recently announced TZFM oscillator Pony by Befaco, and had a quick question to run by interested parties/experts. Basically the module includes a pretty aggressive (sharp edged?) wavefolder (Timbre) which, even when rounded off somewhat, aliases (as we would expect).

While other methods might be possible [1], my gut reaction is to oversample for this. If I were to oversample, am I right in thinking there is no longer any additional benefit of using minBLEP for the core waveforms that require it (i.e. just generate them naively at higher sampling rates, then they will be bandlimited after downsampling)? Certainly this appears to be the case from my experiments, but just want to check if there is any additional benefit to using both methods.

[1] BLAMPS https://www.dafx17.eca.ed.ac.uk/papers/DAFx17_paper_82.pdf

5 Likes

Don’t have an answer for you—just a vote of gratitude that you’re taking aliasing into account with the design. For me aliasing-free modules are something I really appreciate when working in the digital realm. Helps my sound be closer to what I’m looking for. Really appreciate all the work you put into this.

2 Likes

Yeah, that’s exactly what I do. First in my ancient waveshaper “Shaper”, then in my fairly old VCO “Kitchen Sink”. As I’ve noted, I think Kitchen Sink does more or less everything that Pony does: TZFM, waveshaping, different waveform outputs, sync. It, too, uses oversampling only, and no minBLEP.

You might also look at the new super saw copy. He uses a different technique that looks interesting. There’s a good video there that explains why that technique is better than mine. Here’s the thread about that: FLAG (free) Prodigal Son (Band Limited Super-Saw Oscillator with Noise and Amplitude Envelope)

5 Likes

We fought aliasing in the wavefolders and rectifiers we added in surge by using a first order adaa which, if your wave shaping function has a reasonable analytic form, is quite tractable computationally and works quite well. Happy to point at links or code if you need.

1 Like

what’s an adaa?

1 Like

Anti derivative anti aliaser

Basically outout the numerical derivative of the integral of the waveshaper.

https://ccrma.stanford.edu/~jatin/Notebooks/adaa.html

There’s a notebook from jatin that shows it. In the surge waveshapers we generalize it to any waveshaper where you know f and Integral of f as a sse operator over voice.

“Clearly, the aliasing artifacts are significantly more supressed than with no anti-aliasing, however they are still of significant magnitude. One option would be to use first-order ADAA in tandem with a modest amount of oversampling, maybe 2x:”

Is this more or less the same as applying a one pole lowpass filter before they non-linearity?

And sst-waveshapers/ADAA.h at main · surge-synthesizer/sst-waveshapers · GitHub and sst-waveshapers/Rectifiers.h at 983e7e1fd367d72be1f784a2ae60f9df5642074b · surge-synthesizer/sst-waveshapers · GitHub show you our prod rectifier code

If you want to hear those and know how to get the new surge xt modules we are developing you can try them in the waveshaper module today.

2 Likes

Oh and in surge proper we run at 2x in the entire pre-fx pipeline. The modules have a slightly different strategy because they are modules and right now the waveshaper and filter only have a zero latency 1x mode (but i might add an 8 block latency oversample mode as we go as an option in both)

For most pitches I’m doing exactly what “WT VCO” using pre-calculated tables. Only difference is that I have more tables. For Oscillators, we have the luxury to just not create the aliasing in the first place. For effects it’s a bit trickier…

If the wave-folding is a part of the osc. you can view it as a wave-table-oscillator where you generate the waves and filter one cycle using FFT just in time as parameters change… but as you imagine it can become complicated very fast.

This is almost what I did many years ago: audjoo helix tutorial 02 shaper - YouTube

2 Likes

I would oversample it and use band-limiting, I’d also use minBLEP or table-based oscillators to minimize the aliasing without use of the wavefolder, and to reduce aliasing produced from FM.

I’d also use what I like to call an “anti-aliasing detrebler” which I use in PureData to reduce aliasing. It involves a very gentle hi-shelf that pulls off some higher frequencies past around 15k, alongside a few splayed shelves and LPFs of varying magnitude (I generally used a steeper hi-shelf at 15k, a 1-pole lowpass at 18.5k, a 2-pole at 19k, and a 4-pole at 19.5k, all non-resonant.)

It helps to reduce some of the grosser hi-end produced by digital synthesis and cuts back on the amount of aliasing. I don’t know how well it would work here, but it’s been my go-to add-on method to reduce waveform aliasing in PureData.

1 Like

Some interesting ideas in this thread, thanks all! @baconpaul I took a look at ADAA, very appealing idea. I got it working for the first folding stage, but there are actually two in series. As ADAA introduces “memory” through filtering, I don’t know if doing this multiple times causes issues? I need to think about it a bit…

So if you look at the surge folder code you can see we have a couple of folders and a generalized ADAA for a set of linear connected segments. This is (following a paper cited in the code) how we do the buchla style multi-folder. I wonder if your “two in series” can actually be a “one more complicated”. Of of course you can have two state registers also. That would work fine.

1 Like

I always wear a belt and suspenders.

Thanks for the info, I don’t know how I slept on Surge for Rack for so long, it’s awesome!

I’ve implemented it as two ADAA stages (I can’t work out how to do a single one due to the slightly odd way the folder works). Some results with a 2k sine being folded

  • No ADAA, No OS - 0.5% CPU, lots of aliasing (green trace)
  • ADAA, No OS - 0.8% CPU, reduced aliasing (pink trace)
  • No ADAA, x2 OS - 0.9% CPU, some reduced aliasing, but a few bands left (orange trace)
  • ADAA, x2 OS - 1.2% CPU, very little aliasing at all (blue trace)

So for lower oversampling rates it definitely looks beneficial. Once you get up to x4 OS though (not shown) it’s diminishing returns.

5 Likes

Yeah 4x oversampling is a nice big hammer. But you can think of it all just as filters right? The adaa is a particular form of filter on the integral of the transform and the 4x oversampling is an explicit filter up and down.

Adaa is super nice on waveform generation also - it’s how the modern oscillator in surge instrument and the new surge modules (not yet done and not yet in library) work and it just sounds really good. A useful technique

Glad it helped!

3 Likes