Using high pass filter to hide aliasing
-
- KVRian
- 623 posts since 28 Feb, 2011 from Sweden
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.
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
- KVRAF
- 16799 posts since 8 Mar, 2005 from Utrecht, Holland
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. 
My MusicCalc is served over https!!
My MusicCalc is served over https!!
-
- KVRist
- 172 posts since 20 Aug, 2010
So how about a bandpass filter?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...
- KVRian
- 775 posts since 30 Nov, 2008
What about a trypass filter?cheppner wrote:So how about a bandpass 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).
My Open Source:
Beast, rippled, DSPFilters, LayerEffects, SimpleDJ
Beast, rippled, DSPFilters, LayerEffects, SimpleDJ
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
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.
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.
-
- KVRAF
- 8389 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
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'thevinn wrote:What about a trypass filter?cheppner wrote:So how about a bandpass 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).
-
- KVRist
- 172 posts since 20 Aug, 2010
You get the coefficients at YouFilter.com. I stop ehre I think everything was saidduncanparsons wrote: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'thevinn wrote:What about a trypass filter?cheppner wrote:So how about a bandpass 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).
LPF just under the first harmonic is better but it still aliases above that. Oversampling helps, BLEP and minBlep helps better sometimes.
Cheers!
-
- KVRian
- Topic Starter
- 623 posts since 28 Feb, 2011 from Sweden
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.
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
-
- KVRAF
- 5632 posts since 18 Jul, 2002
It's not that easy. Check this to learn more about aliasing
http://www.discodsp.com/highlife/aliasing/
http://www.discodsp.com/highlife/aliasing/
-
- KVRian
- Topic Starter
- 623 posts since 28 Feb, 2011 from Sweden
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).
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
-
- KVRist
- 172 posts since 20 Aug, 2010
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...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).
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.
-
- KVRian
- Topic Starter
- 623 posts since 28 Feb, 2011 from Sweden
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
- KVRAF
- 5223 posts since 20 Jul, 2010
Try a nopass filter. That'll kill all known aliasing dead.thevinn wrote:What about a trypass filter?cheppner wrote:So how about a bandpass 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).
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!
-
- KVRian
- Topic Starter
- 623 posts since 28 Feb, 2011 from Sweden
That is great, I'll try that one. While at it I just might try anti-aliasing as well....
David Guda gudaaudio.com
- KVRAF
- 8476 posts since 12 Feb, 2006 from Helsinki, Finland
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).
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).

