I've found that if I try running the following loop immediately after running it once, it doesnt produce any sound:
output.open do |output|
notes.each do |note|
output.puts(0x90, note, 100) # note on message
sleep(duration) # wait
output.puts(0x80, note, 100) # note off message
end
end
But if I give it a few seconds (20-30) to "catch up"...I can make sounds again...Doing individual output.puts also seems to result in similar "silent lags".
I'm using the tutorial here: http://tx81z.blogspot.com/2011/06/unimidi-platform-independent-realtime.html
I've found that if I try running the following loop immediately after running it once, it doesnt produce any sound:
output.open do |output|
notes.each do |note| output.puts(0x90, note, 100) # note on message sleep(duration) # wait output.puts(0x80, note, 100) # note off message end
end
But if I give it a few seconds (20-30) to "catch up"...I can make sounds again...Doing individual output.puts also seems to result in similar "silent lags".