Matlab Tuner

Started coding the tuner today. One of the main problems with this was deciding how to present it to the user in a way which would be a close to realtime as possible. The method we decided on was recording in 2secs of a sample, converting that into a vector to be analysed in matlab and then return the result to java.

The matlab method simply finds the first note played in the sample as this will be the fundemental frequency, the function file we have created also finds the frequency of this note according to the formula ((position in fft/ length of sample)*sample rate)

I made an attempt to begin the integration into the GUI. This again caused a problem. I created a tuner thread which would constantly send the requests to matlab once the start tuning button was pressed. This caused a major problem in that I couldnt press anyother button in the GUI while this thread was running, so i couldnt stop the tuner.

To overcome this i found the SwingWorker thread class. This enabled me to run the thread in the backround and then send an interrupt which would stop the thread.

More on this tomorrow when I start creating the graphical representation of the Tuning needle…tricky

~ by conormullen on March 12, 2008.

Leave a Reply