Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Solved

Posted on 2006-04-04

I've been assigned a project to make a bass guitar tunner using matlab simulink and a TI 6713 DSK. Can anyone help me at all.

I've tried several things like pre-recording the input of each string, then compare them with the input in real time, and if they are the same then is tuned. But it didnt work.

Any other suggestion?

I've tried several things like pre-recording the input of each string, then compare them with the input in real time, and if they are the same then is tuned. But it didnt work.

Any other suggestion?

4 Comments

You will generate a program for the 6713 DSK.

You wind up with a stand alone system with your program and the Starter Kit Board.

There is always a pretty steep learning curve for new hardware and software tools,

but the project seems fairly reasonable.

You probably want to set the DSP up to record one second from the guitar string.

Then you FFT the data and fugure out what string it's supposed to be, and if it's too high,

too low or within limits. The you could adjust the tension and try again.

You would probably want to set it up with six two color LED's:

RED ==> Too High ORN ==> Too Low (Both LED's On) GRN ==> Just Right.

When you have the guitar properly tuned, you would hit each string, and see six green lights

come on in sequence.

1. Roughly find the fundamental frequency, using FFT or a user-entered setting. (look for the lowest & largest peak in the FFT)

2. Using the fundamental frequency, figure out which string this is supposed to be, and look up the exact nominal frequency for that string.

3. Use a high-order digital filter based on the nominal frequency, to reject harmonics and noise.

4. Count the number of samples it takes to make N cycles (N = 20?), and use the sample frequency to calculate the string's frequency.

1) First of all, find the frequency response of the pre-recorded data. (You can use FFT as suggested by others, or any other transform)

2) Then find the frequency response of the input signal.

3) Correlate both the frequency responses. The coefficient of correlation will be somewhere in the range -1 to +1

4) Depending upon how perfectly you need to tune, set a range, say 0.05 or 0.1

5) If |r| < 0.1 then the guitar is tuned. Otherwise, it is not..

Correlation is explained here:

http://en.wikipedia.org/wiki/Correlation#The_sample_correlation

A pseudocode for finding Correlation is given here:

http://en.wikipedia.org/wiki/Correlation#Computing_correlation_accurately_in_a_single_pass

You can use the fft function in MATLAB to find the FFT...

freq_resp_orig = fft(prerecorded_signal, no_of_points);

freq_resp_data = fft(input_signal, no_of_points);

corr_matrix = corrcoeff(freq_resp_orig, freq_resp_data);

corr_coeff = det(corr_matrix);

Now, check the corr_coeff and decide whether the guitar is tuned... :)

---

Harish

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a research brief on the potential colonization of humans on Mars.

Course of the Month13 days, 23 hours left to enroll

Join the community of 500,000 technology professionals and ask your questions.