Ukulele Physics

I was in class last week and there was a discussion about how excited a very experienced player was when he discovered a new chord.  Which got me wondering about some of the relationships between finger positions and the sounds you get.  Each string has it’s own resonance frequency and when they are played open you get the chords G, C, E and A which in the science world correspond to the frequencies 392 Hz, 261.63 Hz, 329.63 Hz and 325.6 Hz respectively.

The speed of a sound wave is equal to the wavelength over time which if you solve for frequency, you learn that that the resonant frequency is the speed of sound in the string over 2 * length of the string.  The velocity of the sound wave propagating through a string is the square root of the strings tension over the linear density of the string.  In this case we don’t really care what the tension or the linear density is because we are assuming the instrument is in tune.  (Though imagine what kinds of new chords could be found with an out of tune instrument!!!)

I measured my strings from the bridge to the bridge to the nut and then computed out the square root of tension over linear density for the G, C, E and A strings.  With these values I could then measure out each fret’s distance to the bridge and then compute it’s respective resonant frequency.

Now I could do the rest of the math by hand, or make an Excel sheet to compute each fret but that doesn’t factor in that the sound we are really interested in is the combination of strings on frets that are humanly possible to press at the same time.  What humans are terrible at, computers are great at.

The easiest way to go forward was a simple command line application but to really share this with the nerd musician community I thought I could turn this into an app.  The app would take in the string lengths and fret locations and then start computing out the potential chords.  Find the physically possible fret combinations, compute their sounds and find all of the chords that actually work.  I haven’t figured out the best way to present them to the user or how to hide the already well known chords but I haven’t built apps for any of the modern platforms and this would be a good exercise.  Once that’s out, I would like to build a cloud database for the users to upload their instruments and share with others.  But that involves having an identity and security for a central database.

But it’s time to go back outside because it’s finally a nice day in spring and it’s going to pour all day tomorrow.  Perfect weather for coding.


Leave a comment