A
A
Aricce2017-08-08 02:47:17
Programming
Aricce, 2017-08-08 02:47:17

How to determine the frequencies of playing strings?

People, can someone explain how to get the frequency of a sounding note? And if not one? I initially know what notes should be played, and in fact I need to compare the sounding note with the original one, I +- figured out FFT, well, I have a working algorithm (although I don’t understand how it works in detail), in the resulting array of complex numbers how to calculate the frequency of a note, but most importantly how to calculate multiple notes? suppose I played a chord, I know the frequencies of these notes separately from the tables, but how can I get them mathematically, for verification?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2017-08-08
@Aricce

After the FFT, you get a complex array, where each element is the amplitude of a certain frequency.
The frequency is essentially an array index.
But there can be more than one frequency in an element - the number of frequencies in an array element depends on the signal sampling rate and on the FFT length: freq_length = sampling_rate / fft_length;
If sampling_rate == fft_length, then there is only one frequency in the array element.
freq_length - array element frequency resolution.
You can analyze only half of the array (see about the Nyquist frequency), the rest of the readings are the conjugation of the first half. Accordingly, it is realistic to get frequencies up to sampling_rate / 2 - 1.
In your case, apparently, you need to find the energy spectrum: add the squares of the real and imaginary parts of all frequencies. Find the highs - these will be your chord frequencies - it's better to build a graph and see visually what happens.

S
s_panfilov, 2017-08-17
@s_panfilov

dspace.nbuv.gov.ua/bitstream/handle/123456789/6025...
The article describes the algorithm for determining the pitch of a note. There, it is not the value of a specific coefficient in the spectrum that is checked, but the total amplitude in the band (the bands are determined on a musically tempered scale - by notes).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question