Skip to content
browning edited this page Sep 13, 2010 · 2 revisions

This is where the author and contributers can added tutorials and links to screencasts showing and teaching others how to use the software applications we have all Designed.

ruby_tunes

I built ruby_tunes.rb on top of what Gabriel and others already did in music.rb
My main goal was to build a REALLY simple syntax for playing songs.
Right now it is very basic, but I think it is good like that. There are many things I would like to add to this, and I welcome all contributions.

here is how you play a note

require ‘ruby_tunes’

play 44

here is how you play a sequence of notes

require ‘ruby_tunes’

play [44,45,46]

here is how you play a chord

require ‘ruby_tunes’

play [ [44,45,46 ] ]

here is how you change the instrument

require ‘ruby_tunes’

instrument 25

play 44

threads

If you are playing some sequences in seperate threads you should probably create a new TunePlayer

player = TunePlayer.new channel

player.play 44