I've been working on a phase vocoder program. The goal is to change the pitch of a recording of my voice. While doing research on how to change pitch, I came across this from a paper on phase vocoders written by Fischman,
"All that is required is to transpose each frame by an octave, which is done by doubling the frequency of each component i.e. multiplying it by 2."
So, I modified the DFT equation to apply this,
[NOTICE: I realized that I accidentally cropped the X subscript at the end of the modified equation. The X in X(k) is NOT the same variable as the X at the end of the equation. They have zero relation. The X at the end is supposed to be X sub 1 or X1. Sorry about the confusion] I multiplied the exponent by X1 so that the value of X1 would determine the frequency of the modified clip (ie. X1 = 2 would produce a high pitch version of original clip and X1 = 0.5 would produce a low pitched version). And it worked.. sorta.
This is the equation I used to perform the inverse DFT:
Just as a little side note, Before performing the IDFT, I removed the part of the DFT past the Nyquist limit and multiplied the remaining amplitudes by 2 in order to take care of the mirror effect.
To test my program, I set X1 = 2 (expecting a high pitched version of the audio clip). I ran the DFT and then the IDFT and the modified audio clip played a high pitch version of the original clip 2 times except when it played it the second time, it was reversed. The entire modified clip was the exact same duration as the original clip, meaning that since the original clip was played twice in the modified clip, the duration of the original clip was cut in half. The same thing happened when I set X1 to 0.5 (except that the clip was lower pitched). I tried many X1 values and they all returned the same effect (except for X1 = 1).
I feel like I'm on the right track, because I was able to successfully change the frequency, but clearly I am still doing something wrong. I'm just unsure what. Any help is greatly appreciated!