Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise

Pitch Shifting / Sample Rate Conversion

shLONG
KVRist
 
89 posts since 25 Jan, 2010

Postby shLONG; Sun May 15, 2011 11:24 pm Pitch Shifting / Sample Rate Conversion

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?
shLONG
KVRist
 
89 posts since 25 Jan, 2010

Postby shLONG; Mon May 16, 2011 1:47 pm

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/
asomers
KVRian
 
646 posts since 17 Feb, 2006, from California

Postby asomers; Mon May 16, 2011 2:37 pm

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
shLONG
KVRist
 
89 posts since 25 Jan, 2010

Postby shLONG; Wed May 18, 2011 8:20 pm

Thanks those are great :D

Moderator: Moderators (Main)

Return to DSP and Plug-in Development