Skip to content

Instantly share code, notes, and snippets.

@electronicwhisper
Created March 30, 2011 22:44
Show Gist options
  • Save electronicwhisper/895463 to your computer and use it in GitHub Desktop.
Save electronicwhisper/895463 to your computer and use it in GitHub Desktop.
A musical score for Gold Noise
#!/usr/bin/ruby
mp3s = `mdfind kMDItemContentType=public.mp3`
mp3s = mp3s.split("\n")
mp3s.shuffle!
count = 0
mp3s.each do |mp3|
puts "(#{count += 1}/#{mp3s.length}) #{mp3}"
system "afplay -v 0.1 \"#{mp3}\" &"
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment