Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » DSP and Plug-in Development
Thread Read
Using high pass filter to hide aliasing
Goto page 1, 2, 3  Next
davidguda
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 4:53 am reply with quote
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
^ Joined: 28 Feb 2011  Member: #251491  
BertKoor
KVRAF
- profile
- pm
PostPosted: Tue Apr 17, 2012 7:02 am reply with quote
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 back online!!
^ Joined: 08 Mar 2005  Member: #60794  Location: Utrecht, Holland
cheppner
KVRist
- profile
- pm
PostPosted: Tue Apr 17, 2012 7:14 am reply with quote
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? Cool
^ Joined: 20 Aug 2010  Member: #237880  
thevinn
KVRian
- profile
- pm
- www
PostPosted: Tue Apr 17, 2012 7:15 am reply with quote
cheppner wrote:
So how about a bandpass filter? Cool


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).
^ Joined: 30 Nov 2008  Member: #194779  
duncanparsons
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Apr 17, 2012 7:16 am reply with quote
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.
----
^ Joined: 11 Apr 2003  Member: #6706  Location: now on the flat
duncanparsons
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Apr 17, 2012 7:19 am reply with quote
thevinn wrote:
cheppner wrote:
So how about a bandpass filter? Cool


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'
----
^ Joined: 11 Apr 2003  Member: #6706  Location: now on the flat
cheppner
KVRist
- profile
- pm
PostPosted: Tue Apr 17, 2012 7:35 am reply with quote
duncanparsons wrote:
thevinn wrote:
cheppner wrote:
So how about a bandpass filter? Cool


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 Wink

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

Cheers!
^ Joined: 20 Aug 2010  Member: #237880  
davidguda
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 9:42 am reply with quote
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! Smile
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
^ Joined: 28 Feb 2011  Member: #251491  
George
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Apr 17, 2012 9:46 am reply with quote
It's not that easy. Check this to learn more about aliasing

http://www.discodsp.com/highlife/aliasing/
----
discoDSP — Home of CoronaDiscovery ProVertigo
^ Joined: 17 Jul 2002  Member: #3353  
davidguda
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 9:52 am reply with quote
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
^ Joined: 28 Feb 2011  Member: #251491  
cheppner
KVRist
- profile
- pm
PostPosted: Tue Apr 17, 2012 11:14 am reply with quote
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.
^ Joined: 20 Aug 2010  Member: #237880  
davidguda
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 11:21 am reply with quote
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
^ Joined: 28 Feb 2011  Member: #251491  
Sendy
KVRAF
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 11:29 am reply with quote
thevinn wrote:
cheppner wrote:
So how about a bandpass filter? Cool


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
----
Livin' la diva loca Wink

http://soundcloud.com/sendy
^ Joined: 20 Jul 2010  Member: #236000  
davidguda
KVRist
- profile
- pm
- e-mail
PostPosted: Tue Apr 17, 2012 11:31 am reply with quote
That is great, I'll try that one. While at it I just might try anti-aliasing as well....
----
David Guda gudaaudio.com
^ Joined: 28 Feb 2011  Member: #251491  
mystran
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Tue Apr 17, 2012 4:51 pm reply with quote
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).
----
<- my plugins | my music -> @Soundcloud
^ Joined: 11 Feb 2006  Member: #97939  Location: Helsinki, Finland
All times are GMT - 8 Hours

Printable version
Page 1 of 3
Goto page 1, 2, 3  Next
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012