Skip to content

Instantly share code, notes, and snippets.

@switz
Created July 17, 2012 06:48
Show Gist options
  • Save switz/3127682 to your computer and use it in GitHub Desktop.
Save switz/3127682 to your computer and use it in GitHub Desktop.
#!/bin/bash
function synth {
play -n synth 3 $(
for note in $(echo "$1"); do
echo square $note
done
) tempo "$2"
}
synth 'A C D C F A G' 1
synth 'C' 1
synth 'D' 1
synth 'C' 1
synth 'F' 1
synth 'A' 1
synth 'G' 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment