tuna-dialog - dialog-based guitar tuner

Submitted scripts and programs
Forum rules
Your own work only.
machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

tuna-dialog - dialog-based guitar tuner

Unread post by machinebacon » Wed Jan 13, 2016 5:20 pm

Code: Select all

#!/bin/bash
# tuna-dialog - guitar tuner, depends on dialog and speaker-test

. /usr/share/doc/dialog/examples/setup-vars
. /usr/share/doc/dialog/examples/setup-tempfile

menu(){
dialog --backtitle "tuna" --title "Guitar Tuner" --menu "Pick a string" 7 29 0 \
        "329.63" "high E4 string" \
        "246.94" "B3 string" \
        "196" "G3 string" \
        "146.83" "D3 string" \
        "110" "A string" \
        "82.41" "low E2 string" 2> $tempfile
retval=$?
case $retval in
  $DIALOG_CANCEL)
    exit 0;;
esac
speaker-test -f `cat $tempfile` -t sine -l 1 -p 10 > /dev/null
menu
}
menu
..gnutella..

User avatar
wuxmedia
Grasshopper
Posts: 6445
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: tuna-dialog - dialog-based guitar tuner

Unread post by wuxmedia » Wed Jan 13, 2016 6:39 pm

nice. not that I can tune by ear or even have a guitar..
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: tuna-dialog - dialog-based guitar tuner

Unread post by Theo » Wed Jan 13, 2016 9:11 pm

Thanks!
I don't have a guitar, but ukelele.
So with some small changes, this should be the one to tune it (US Standard)

Code: Select all

 
#!/bin/bash
# uketune-dialog - Ukelele tuner, depends on dialog and speaker-test

. /usr/share/doc/dialog/examples/setup-vars
. /usr/share/doc/dialog/examples/setup-tempfile

menu(){
dialog --backtitle "uketune" --title "Ukelele Tuner" --menu "Pick a string" 7 29 0 \
        "392.0" "G string" \
        "261.6" "C string" \
        "329.6" "E string" \
        "440.0" "A string" 2> $tempfile               
retval=$?
case $retval in
  $DIALOG_CANCEL)
    exit 0;;
esac
speaker-test -f `cat $tempfile` -t sine -l 1 -p 10 > /dev/null
menu
}
menu


User avatar
simgin
Meme Fodder
Posts: 1167
Joined: Sun Jan 06, 2013 12:07 am
Location: Bradford-on-Avon, UK

Re: tuna-dialog - dialog-based guitar tuner

Unread post by simgin » Wed Jan 13, 2016 10:04 pm

^ Damn you are quick to adapt Theo :)
Someone told me that I am delusional, I almost fell off my unicorn.

User avatar
Theo
CLIt Licker
Posts: 394
Joined: Wed Nov 11, 2015 10:19 pm
Location: Nieuw-Buinen, Netherlands

Re: tuna-dialog - dialog-based guitar tuner

Unread post by Theo » Wed Jan 13, 2016 10:17 pm

^ I liked the idea, but I can't play the guitar (camptodactyly).. So, this one is for the uke, which I can play a little :)

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: tuna-dialog - dialog-based guitar tuner

Unread post by rhowaldt » Thu Jan 14, 2016 6:43 am

^ if Django could do it with his penguin-hand, why can't you? https://www.youtube.com/watch?v=PQhTpgicdx4 ;)

really cool adaption of the script though Theo, and really cool script in the first place, didn't know it was possible to tune guitar through Linux. personally I use an app for it because I will always have my phone at hand and don't have to depend on my crappy laptop mic and all that :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tuna-dialog - dialog-based guitar tuner

Unread post by machinebacon » Thu Jan 14, 2016 7:00 am

huh, you would not use laptop microphone to listen to a tone, would you? ;)
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: tuna-dialog - dialog-based guitar tuner

Unread post by rhowaldt » Thu Jan 14, 2016 8:16 am

aaah like that... my ear isn't good enough to tune the guitar properly i think... although maybe... ill give it a try sometime :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
Snap
Sperminator
Posts: 189
Joined: Sun Oct 05, 2014 8:11 pm

Re: tuna-dialog - dialog-based guitar tuner

Unread post by Snap » Thu Jan 14, 2016 8:25 am

That's great. Easy to adapt to open tunings also (or whatever tuning)

Would be nice having a sort of chooser to pick different tunings for those who don't stuck to the standard tuning. I will give it a try.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: tuna-dialog - dialog-based guitar tuner

Unread post by machinebacon » Thu Jan 14, 2016 8:50 am

^ fun fact, when I posted the script here I knew that people would come with "ukulele" and "bass guitar" and "drop D" and 7-th B and so on, and then I even thought about not posting it. :)

/closed
..gnutella..

Post Reply