Guitar tuning algorithms...

S

SPG

Hi all,

I have written an app that will connect and listen to an input from my sound
card.
At the moment I just display the waveform on a realtime graph, which looks
pretty cool, but now I want to try and add a guitar tuning module just for
fun.

I have googled a bit to find out what I need to do, and a lot points to FFT
algorithms, I was wondering if there is anyone outhtere with a bit more info
on how to best implement this (I have an FFT class but not a clue what I
should do with it!)

Steve
 
R

Rhino

SPG said:
Hi all,

I have written an app that will connect and listen to an input from my sound
card.
At the moment I just display the waveform on a realtime graph, which looks
pretty cool, but now I want to try and add a guitar tuning module just for
fun.

I have googled a bit to find out what I need to do, and a lot points to FFT
algorithms, I was wondering if there is anyone outhtere with a bit more info
on how to best implement this (I have an FFT class but not a clue what I
should do with it!)

Steve
You might get an answer to your question at a more specialized
newsgroup/mailing list like this one:
http://java.sun.com/products/java-media/sound/list.html

or this one:

http://forums.java.sun.com/category.jspa?categoryID=9

Rhino
 
C

Christian Gudrian

Am Sun, 15 May 2005 23:38:50 GMT schrieb SPG:
I have an FFT class but not a clue what I should do with it!

Try to get the documentation for the class from the source you got the
class itself from.

Basically you will have to fill some sort of array with the source data
(your waveform). You will have to configure the FFT class (number of
frequency bands, window function) and transform the data. After that you
get the spectrum of the original waveform. Search for the frequency with
maximum aplitude and you have the first, rough estimation of the tone that
has been played.

Christian
 
J

Juhan Kundla

Hei!

Christian said:
Search for the frequency with
maximum aplitude and you have the first, rough estimation of the tone that
has been played.

Hm, i'm not completely sure, but i think that for tuning the lowest
frequency must be used, since this is what defines the pitch of the
tone. The higher frequencies define only the timbre of the tone.

Probably the lowest frequency has also the maximum amplitude, at least
with conventional quitar.


Juhan
 
E

Esmond Pitt

Juhan said:
Hei!




Hm, i'm not completely sure, but i think that for tuning the lowest
frequency must be used, since this is what defines the pitch of the
tone. The higher frequencies define only the timbre of the tone.

Probably the lowest frequency has also the maximum amplitude, at least
with conventional quitar.

Generally with any musical instrument the 2nd harmonic has the maximum
amplitude, and this is certainly true of bass guitars and violins (have
no info on guitars). In some cases like the clarinet it is the 3rd.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top