Solved

DSP + MatLab + Bass Guitar Tunner + TI C6713

Posted on 2006-04-04
Medium Priority
1,083 Views
Last Modified: 2016-02-10
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?
0
Question by:carlospzx
4 Comments

LVL 27

Expert Comment

ID: 16370048
I am not an expert in these things but I know music. Each string/note has a tone and overtones based on the instrument. I guess if you take the lowest tone and find if it is within range then you can tell if it's tuned.
0

LVL 27

Expert Comment

ID: 16371899
I am assuming that you will be using Matlab/Simulink as a development platform.
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.

0

LVL 22

Expert Comment

ID: 16372259
I think the algorithm would go like this:

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.
0

LVL 37

Accepted Solution

Harisha M G earned 1500 total points
ID: 16374689
Hi, you need to use CORRELATION in this case..

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
0

Featured Post

Question has a verified solution.

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

Introduction On a scale of 1 to 10, how would you rate our Product? Many of us have answered that question time and time again. But only a few of us have had the pleasure of receiving a stack of the filled out surveys and being asked to do somethi…
This is a research brief on the potential colonization of humans on Mars.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses
Course of the Month13 days, 23 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

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