One Line Guitar Tuner

Every now and then I come across something which makes me marvel at the flexibility of Linux. This is one of these things.

I play guitar, and I'd previously written a small script to act as a guitar tuner. I generated some .ogg files of the correct pitch and then wrote a script to loop through them in sequence. "Pretty good", I thought, "Clever Me."

Then a few days ago I came across this little gem of a script.

for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done

That's it. Sheer brilliance. Of course you'll need to install the sox package first.

Leave a Comment