Pitch Shifting / Sample Rate Conversion

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

http://en.wikipedia.org/wiki/Sample_rate_conversion

The algorithm described here is:

1. Under or Over sample audio data.
2. Sample back to original rate spacing each sample with 0's
3. FIR Low Pass to kill high frequencies.
4. Remove 0's

Wallah!

Now they don't seem to reccomend any interpolation, rather its suggested no interpolation is used?! Or do they mean, dont use interpolation without the FIR pass?

Now I imagine this could also be used as a real-time pitch shifting algorithm???

My main question is, allong my research, I have discovered STFT pitch shifting and ring buffer pitch shifting.

I have to say, ring buffer seems more popular, however, STFT would probably produce a better result, but is it feasable for a realtime keyboard VST?

Post

How about;

Whats the real difference between spacing the samples with 0's and doing a FIR and interpolating and using an IIR?

Also, is this a nice implementation of a ring buffer?

http://vrb.slashusr.org/

Post

MrPuzzle wrote:Whats the real difference between spacing the samples with 0's and doing a FIR and interpolating and using an IIR?
I'm not an expert at this but I will try my best to explain.

"Sample rate conversion" as it's commonly known usually refers to FIR interpolation. Inserting 0s has the effect of "copying" the entire spectrum and shifting it up out of the audible band. By lowpass filtering with an FIR at nyquist, you approximate "ideal bandlimited interpolation", which in theory can reconstruct any band-limited signal perfectly using the sinc function. Since the sinc function is continuous, it must be windowed and therein lies the passband/stopband characteristics associated with FIR filter design. This method is suited to offline resampling and oversampling applications.

Polynomial interpolation (such as linear, lagrange, spline, etc) is cheap at low orders but does not fully suppress aliasing. The performance characteristics of these methods break down the higher you go, at which point FIR resampling is preferred. Low-order polynomial interpolation is suited to real-time sample playback/resampling.

You should read these links for a complete treatment of the topic:

http://src.infinitewave.ca/ (see Secret Rabit Code examples for zero-order hold and linear)
http://ldesoras.free.fr/doc/articles/resampler-en.pdf
https://ccrma.stanford.edu/~jos/resample/
http://yehar.com/blog/wp-content/upload ... 8/deip.pdf

Post

Thanks those are great :D

Post Reply

Return to “DSP and Plugin Development”