Hi to all!
I'm building my little sampler, with a nice interface, mapping and so...
Now I'm going to face the big problem of ALIASING!
The sampler can open sample files from different sample rates and everything works fine, but I have some problems in downsampling that happens when pitching up sounds.
I have an cubic interpolator to handle the problem of non integer incremental values between samples.
If I put a Lowpass filter after the interpolator I get the nice effect of masking the sound of the samples and enlight the aliasing...!
So I thought: I need to put the filter BEFORE the interpolator..!
But how can I put the filter before the interpolator?
For example:
MY SAMPLES: 12 20 30 21 10 -5 -13 -30 -25 -10 -2 6 17 20
Usually if I jump every 3.5 samples, the interpolator will pick something like
20 30 21 10 and compute the middle value. If I need to prefilter do I need to filter all those 4 values?
This can be really CPU consuming...
Since interpolation is a kind of filter according to this site:
http://www.dspguru.com/dsp/faqs/multirate/interpolation
How can I design a kind of interpolation filter that can limit the bandwidth according to the frequency difference between the new samplerate and the original sample samplerate? (the whole thing will obviously output at the host sample rate).
I'm not a matemagician, I'm a musician with some deep experience about programming.
Thank you in advance,
Paolo
Wavetable Synthesis, Interpolation and Aliasing.
- KVRist
- 92 posts since 24 Jan, 2012
- KVRAF
- 8511 posts since 12 Feb, 2006 from Helsinki, Finland
You could just use band-limited interpolation. The idea here is that you build the low-pass into the interpolator itself. It's a bit messy to explain, so I'll provide a link instead: https://ccrma.stanford.edu/~jos/resample/resample.html
There's the important theory there, as well as one possible implementation. You can probably get away with somewhat cheaper variations once you understand the basic idea.
There's the important theory there, as well as one possible implementation. You can probably get away with somewhat cheaper variations once you understand the basic idea.
- KVRist
- Topic Starter
- 92 posts since 24 Jan, 2012
Thank you so much!
