[music-dsp] Implementing Pitch Transposition /
SampleRateConversion algorithm
alex
alex at foinc.com
Wed Dec 29 10:47:49 EST 2004
I haven't looked at the code but usually the filter is an anti-alias filter used to "smooth" out the data between samples.
alex
At 3:09 PM +0000 12/29/04, Amarpreet Basi wrote:
>thanks. so all my problems have been reduced to a mere library function call! nice!
>
>i notice that the coding for src is a lot more involving than i expected. just for my own information, could somebody let me know the general outline of the src algorithm. i'm looking through it and it seems to make calls to a low pass filter function - why is that required?
>
>as you can tell i'm a utter beginner to many of these concepts!
>
>>>> gogins at pipeline.com 12/29/04 00:11 AM >>>
>Google for secret rabbit code.
>
>----- Original Message -----
>From: "Amarpreet Basi" <A.S.Basi at warwick.ac.uk>
>To: <music-dsp at shoko.calarts.edu>
>Sent: Tuesday, December 28, 2004 6:12 PM
>Subject: [music-dsp] Implementing Pitch Transposition / Sample
>RateConversion algorithm
>
>
>Hi all,
>
>I am a newcomer to the world of DSP and I'm simeltaneously intrigued and
>confused by it!
>
>I'm currently developing a very simple soundwave editor for .wav files. I've
>been impressed with my progress and have managed to work out what now appear
>to be very trivial operations such as reversal of sound, normalisation,
>conversion to mono etc etc.
>
>What I now need is a pitch transposition algorithm. Not a fancy one that
>tries to preserve the tempo whilst alter the pitch. I want the
>unsophisticated kind that speeds up both tempo and pitch. From scanning the
>web, I've deduced that this can be done using a sample rate conversion.
>
>Here's what I have so far. Input array of samples A contains N samples. User
>specifies a pitch alteration in number of semitones X (where -12<=X<=12). I
>use the laws of equal temperament to calculate the size of the output array
>B i.e.
>
>Size of Array B = N * 2^(-1*X/12)
>
>The next part of my function (i'm writing this in C++ btw) copies samples
>from array A to array B; if we are speeding up the soundwave some samples
>are skipped and if we are slowing down then some samples are duplicated.
>
>However, I am not quite sure that my approach in the last paragraph is quite
>right. For a start in my implementation I notice that my function returns
>early particularly on "speeding up" parameters of say six semitones - it
>returns the array B with only 2/3 of it full and a 1/3 empty. Clearly I am
>somehow skipping too many samples in array A or I am not controlling the
>rate at which I should skip them correctly and forced to end the function
>because I've reached the end of A prematurely.
>
>What this means is that if I ask to increase the pitch by say 6 semitones,
>the actual result ends up increasing the pitch by 12 semitones plus an
>insertion of silence (the part of array B which was left untouched).
>
>I am currently considering to buy a good book as a reference guide - C
>Algorithms for Real time digital signal processing. In the mean time, any
>pointers or advice you could give me would be really appreciated. Thanks!
>
>aj
>--
>dupswapdrop -- the music-dsp mailing list and website:
>subscription info, FAQ, source code archive, list archive, book reviews, dsp
>links
>http://shoko.calarts.edu/musicdsp
>http://ceait.calarts.edu/mailman/listinfo/music-dsp
>
>
>--
>dupswapdrop -- the music-dsp mailing list and website:
>subscription info, FAQ, source code archive, list archive, book reviews, dsp links
>http://shoko.calarts.edu/musicdsp
>http://ceait.calarts.edu/mailman/listinfo/music-dsp
>
>--
>dupswapdrop -- the music-dsp mailing list and website:
>subscription info, FAQ, source code archive, list archive, book reviews, dsp links
>http://shoko.calarts.edu/musicdsp
>http://ceait.calarts.edu/mailman/listinfo/music-dsp
More information about the music-dsp
mailing list