unimidi icon indicating copy to clipboard operation
unimidi copied to clipboard

output.puts doesnt product sound consistently

Open udit99 opened this issue 12 years ago • 1 comments

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".

udit99 avatar Nov 28 '13 02:11 udit99

Sorry for the late response. If you're still interested, what platform/ruby are you on? What MIDI interface are you using?

arirusso avatar Sep 02 '14 15:09 arirusso