Go Down

Topic: Sound code help please (Read 919 times) previous topic - next topic

jew29

I am working on a school project and this is my first time using an arduino and I have zero code experience.  My project involve make a wall tuner for a guitar.  I basically want individual different el wire to light up when the proper note is hit, and then a separate RGB LED to light up red or blue, depending on if the note is sharp or flat.  I have researched and researched and still feel completely lost.....I have found Goertzel's algorithm, but it looks like a foreign language to me and I do not know what to do with it.   Any and all help would be greatly appreciated.

Thanks
Jenea

johnwasser

You could measure the time between adjacent rising edges.  That gives you the cycle time which is the inverse of the frequency:

Concert A (440 Hz) would have a cycle time of 1/440 Seconds (2272 microseconds).

You could then use a table of the six desired frequencies to see which one is closest.

Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

el_supremo

Use the forum's Search to look for guitar tuner

Pete
Don't send me technical questions via Private Message.

Go Up