Making a harmonizer problem on FPGA

Status
Not open for further replies.

teddybear211

Newbie level 5
Joined
Mar 18, 2013
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,357
Hi I have a problem making a harmonizer.

So I have an 256 sample FFT which outputs a real and imaginary magnitude output of the frequency at each bin.

I was wondering how can I compute the frequency from the magnitude in order to multiply the frequency so I can get a pitch shift? I'm not sure how to go about this Help would be appreciated!
 

Ouput Frequency of FFT is read with respect to the bins or index output of FFT. Suppose the sampling frequency is 256KHz.
Since your FFT is 256 point, each index will correspond to 256/256 ie 1 KHz.Zeroth index represents 1 Khz, 1st index corresponds to 2 Khz and so on.
One more thing, the index output from block depends on FFT mode i.e Decimation in time and Decimation in Frequency.
If DIT is chosen, index won't be in same order, If DIF is chosen, index will increase from 0 to 255. Consult a DSP book for index arrangement for DIT and DIF.
 

I understand the bins and how the binsize is the SampleRate/Samplesize.

I was wondering how can I use these bins to find the frequency? I'm confused to what you just stated.

I was wondering if I can somehow find the bin with the maximum magnitude, and then multiply that bin number by the bin size in order to find my frequency...

IE: Bin number x binsize = frequency..

My problem is if there is a way to find this bin number?
 

Find square of magnitude by using the eqn m^2 = real_part^2 + imag_part^2 for every bin.

- - - Updated - - -

Choose the bin with the max value of square of magnitude by using some sorting algorithm.

- - - Updated - - -

I believe in the FFT core, bin index is output along with magnitude of FFT.
 

My FFT core does not output a bin index. It stores it into memory. I was wondering how can I read it from that memory module?
 

As a first comment, classical harmonizer design did not use FFT. The first models used tape recorders with rotating heads, later this principle - replaying sound snippets with different speed - has been created electronically.

Now, spectral processing using FFT, sound modelling and feature extraction is widely used e.g. in MP3 encoding and also available for digital audio effects. A brief overview is given in Digital Audio Effects by Udo Zölzer, Wiley 2002.

My FFT core does not output a bin index. It stores it into memory. I was wondering how can I read it from that memory module?
The first step would be peak extraction and spectrum interpolation.
 

So I've found the bin and output a 16-bit frequency ranging from 0 to 48000 based on the formula f=bin number * bin size

where bin size= samplerate/samplenumber

I was wondering how can I input this frequency into my IFFT? My IFFT core takes in a real and imaginary input.
 

As long as you don't care for phase relations, you can use real only and zero the imaginary part.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…