Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'rubygems'
require 'midiator'
midi = MIDIator::Interface.new
midi.use("dls_synth")
#midi.autodetect_driver
midi.control_change 32, 10, 1
midi.program_change 10, 26
include MIDIator::Drums
(1..100).each do |i|
note, val = if i%15 == 0
[CrashCymbal1, "FizzBuzz"]
elsif i%5 == 0
[SnareDrum1, "Buzz"]
elsif i%3 == 0
[LowTom1, "Fizz"]
else
[BassDrum1, i]
end
puts val
midi.play note, 0.25, 10
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment