Quantcast
Channel: KVR Audio
Viewing all articles
Browse latest Browse all 4522

DSP and Plugin Development • Re: Antialiasing a variable-angle sawtooth

$
0
0
I'm not sure if this really becomes a practical problem if we just enforce some minimum "good enough" length for the slope.

[...]

Now pwm1 is in range [eps, 1-eps] where the eps is a frequency dependent value that makes the minimum slopes 0.1 (or whatever) samples wide.
Yeah, I think we're saying the same thing. 😄 I just wanted to get that number from a graph (for my particular setup). I picked an example (high) frequency where the errors were obvious, and worked back from eps=0.001 to decide the more general minimum slope threshold.

In this skewed-triangle case, there's a single PWM parameter which we can limit (gently enough to not make a difference) just as you said, so that the two BLAMPs never get too close. You're right, that's probably the cleanest-code approach for this situation.

There are other situations where it's more complicated (perhaps weird multi-oscillator-sync setups?) in which case I'd be tempted to separate into two layers: one which says where the BLEPs/BLAMPs/BLetc. should be, and a second which either applies them or says "those two are too close together, I'm substituting them with a single lower-order BL?P".

That's what I was thinking of when I said "just synthesise a sawtooth instead", but I could've been clearer. 😅

Statistics: Posted by signalsmith — Tue Feb 04, 2025 6:33 am



Viewing all articles
Browse latest Browse all 4522

Trending Articles