Using high pass filter to hide aliasing

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

context is subtractive synth doing "naive" stuff with oscillators that adds unwanted aliasing.

Have any of you tried using high pass filter tracked to the note to hide aliasing, works good?
I know this is how Roland implemented the classical super saw.

I was thinking this could be a way of getting away with if not skipping oversampling but at least oversample less and get good enough results. I think the aliasing is most audiable at lower frequencies than the base note anyhow.

This would be a pragmatic rather than puristic implementation of course but I'd like to play with the idea at least.
David Guda gudaaudio.com

Post

How would a high-pass filter aid in hiding aliasing? You'd only get rid of some of the aliassed content below the note's fundamental frequency. The most annoying aliassed content is in the two most upper octaves near to the sampling frequency imho...
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

BertKoor wrote:How would a high-pass filter aid in hiding aliasing? You'd only get rid of some of the aliassed content below the note's fundamental frequency. The most annoying aliassed content is in the two most upper octaves near to the sampling frequency imho...
So how about a bandpass filter? 8)

Post

cheppner wrote:So how about a bandpass filter? 8)
What about a trypass filter?

Oh you never heard of a trypass filter? Its a technique where you "try" different filters until you find one that sort of works (or seems to).

Post

Yes, you'd want a low pass, otherwise it's just 'hey, hear /my/ aliasing!'

Highpass at a lower freq to get rid of DC offset.

It's not a bad idea, but better to actually do the job as best you can at source (as Roland would have also done). Depending on the extend of the aliasing it can fold back a fair old way, esp as higher harmonics are further and further apart in freq - though they are that much quieter.
Image

Post

thevinn wrote:
cheppner wrote:So how about a bandpass filter? 8)
What about a trypass filter?

Oh you never heard of a trypass filter? Its a technique where you "try" different filters until you find one that sort of works (or seems to).
Or, inline with so many simplified computer terms and examples these days, in DSP we could have a MyPass filter. Yes, it's a filter, but it's licensed to 'me'
Image

Post

duncanparsons wrote:
thevinn wrote:
cheppner wrote:So how about a bandpass filter? 8)
What about a trypass filter?

Oh you never heard of a trypass filter? Its a technique where you "try" different filters until you find one that sort of works (or seems to).
Or, inline with so many simplified computer terms and examples these days, in DSP we could have a MyPass filter. Yes, it's a filter, but it's licensed to 'me'
You get the coefficients at YouFilter.com. I stop ehre I think everything was said ;-)

LPF just under the first harmonic is better but it still aliases above that. Oversampling helps, BLEP and minBlep helps better sometimes.

Cheers!

Post

A few answers here since I checked, nice. Gonna try to respond to all in a single post. First of all, of course I will try to avoid aliasing as much as possible in the source, I even wrote that in the first post, yeah right up there, between the lines, just look close enough! :)
The oscillators are BLEP and as far as not doing anything funky this is fine. It is when starting to do funky sync's, oscillator switching (VCS), perhaps in the future FM, ringmod etc. Theese actions will add aliasing and it will eventually fold back when reaching nyquist no matter if I oversample and as long as it is higher than the base note frequency I can do nothing about it but I can at least filter what folds further back, just as Roland did for the super saw. Psycho-acoustically it is harder to pick out unwanted frequencys close to other frequencys so the ones folding further back than base note with be more easily detected.
Oversampling will be my friend to wrestle with aliasing but it is also quite computationally expensive.
David Guda gudaaudio.com

Post

It's not that easy. Check this to learn more about aliasing

http://www.discodsp.com/highlife/aliasing/

Post

George, I know that much and some more.
How would it not be that easy that I could put I high pass filter to get rid of what is folded as far back as lower than base note? (given a "perfect" high pass filter).
David Guda gudaaudio.com

Post

davidguda wrote:George, I know that much and some more.
How would it not be that easy that I could put I high pass filter to get rid of what is folded as far back as lower than base note? (given a "perfect" high pass filter).
The problem with that is, that when you use things like RM or FM, there are a lot of wanted things unter your lowest OSCs pitch...
You could use a second set of bleps which only goes to, say 15kHz and use those when heavy FM or RM is used... But still. Oversampling helps a lot.

Post

RM and FM are a bit of bummers there indeed with wanted frequencies below base note, sync and oscillator switching however I think could be helped.
David Guda gudaaudio.com

Post

thevinn wrote:
cheppner wrote:So how about a bandpass filter? 8)
What about a trypass filter?

Oh you never heard of a trypass filter? Its a technique where you "try" different filters until you find one that sort of works (or seems to).
Try a nopass filter. That'll kill all known aliasing dead. :hihi:
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

That is great, I'll try that one. While at it I just might try anti-aliasing as well....
David Guda gudaaudio.com

Post

Notes: FM/RM etc can generate harmonics below fundamentals of the involved oscillators so high-pass just doesn't work. In case of RM it's enough to oversample by a factor 2 (or actually 1.5, but 2 is kinda easier) since it's just a multiply so the resulting bandwidth is the sum of the source bandwidths.

As far as sync goes, you can handle the most obvious case of one oscillator syncing to another in BLEP such that it just simple never cause any aliasing. If you want it perfect (eg stuff like proper handling of multiple resets during a single sampling period etc), it can certainly get a "bit" messy depending on the complexity of your oscillators but it's certainly possible for anything that can be generated by BLEPs in the first place. For external sync sources we get the problem that one should really reconstruct the continuous time wave-form to be able to solve zero-crossings, but I'd imagine (without having actually tried) that using cubic splines or something should be "good enough" for most purposes.

Also, using BLEPs there is no reason you can't generate a ring-modulated signal between two BLEP sources directly, which would save you the multiply (and hence the oversampling). In practice it's probably not worth doing (I've been meaning to try it as an exercise though; haven't found the time yet though).

Post Reply

Return to “DSP and Plugin Development”