Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Playing around with SoX
#!env ruby
# brew install sox
def play(note, octave=1)
"play -q -n synth sq #{note}#{octave} remix - fade 0 .6 .1 norm; "
song_notes = %w(B A G A B B B A A A G D D B A G A B B B B A A B A G)
song = ""
song_notes.each do |note|
song << play(note, 5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment