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
Pitch Shifting / Sample Rate Conversion
shLONG
KVRist
- profile
- pm
PostPosted: Sun May 15, 2011 11:24 pm reply with quote
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?
^ Joined: 25 Jan 2010  Member: #224513  
shLONG
KVRist
- profile
- pm
PostPosted: Mon May 16, 2011 1:47 pm reply with quote
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/
^ Joined: 25 Jan 2010  Member: #224513  
asomers
KVRian
- profile
- pm
PostPosted: Mon May 16, 2011 2:37 pm reply with quote
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/uploads/2009/08/deip.pdf
^ Joined: 17 Feb 2006  Member: #98700  Location: California
shLONG
KVRist
- profile
- pm
PostPosted: Wed May 18, 2011 8:20 pm reply with quote
Thanks those are great Very Happy
^ Joined: 25 Jan 2010  Member: #224513  
All times are GMT - 8 Hours

Printable version
Page 1 of 1
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