A terminal metronome

Open link in next tab

Woland Azel (@wolandark@mastodon.social)

https://mastodon.social/@wolandark/110925361857381396

Attached: 1 video So today I sat down to practice guitar and I realized that I left both my metronomes at my sister's room. Obviously I wasn't going to get up to go and fetch one, so I picked up a bash spell tome (man SoX) and with a little bash magic, made a basic metronome. Here is the actual code: ``` tempo () { play -n -c1 synth 0.001 sine 1000 pad $(awk "BEGIN { print 60/$1 -.001 }") repeat 999999 } ``` #bash #linux #musicproduction #coding #sox

So today I sat down to practice guitar and I realized that I left both my metronomes at my sister's room. Obviously I wasn't going to get up to go and fetch one, so I picked up a bash spell tome (man SoX) and with a little bash magic, made a basic metronome.

Here is the actual code:

tempo () 
{ 
play -n -c1 synth 0.001 sine 1000 pad $(awk "BEGIN { print 60/$1 -.001 }") repeat 999999
}