Closed christiangenco closed 12 years ago
@christiangenco
[corrected]
@christiangenco
(disregard my last message)
I'll need to know a little more about your setup. What exactly are you doing with the output?
You may need to instantiate an input eg.
@i = UniMIDI::Input.first
Then you can inspect the buffer directly on that object
@i.buffer
=> [144, 36, 100]
Ahh hah! That fixes my problem - thanks :D
Is there a good reason why UniMIDI::Output can't have a buffer method as well?
@christiangenco Great, glad to help.
The output itself doesn't have a buffer. The fact that you can see the input buffer associated with the output buffer (as in the example you posted) is a peculiarity of how OSX CoreMIDI organizes MIDI ins and outs.
I'm more than happy to consider anything if you have a compelling argument
but (to my knowledge) Linux and Windows wouldn't natively accomodate that functionality, and Unimidi is cross-platform...so it could be impossible or a ton of trouble to implement, for what I would currently consider not a lot of gain
Reason enough for me!
Thanks for your work on this gem - it's absolutely perfect for turning things into MIDI keyboards via MaKey MaKey.
I have an imperfect method of sending notes to be played to UniMIDI (javascript/ajax) and sometimes the signal to stop playing the note isn't sent, so the note keeps going on indefinitely.
I need a way to view which notes are currently playing, but can't find it in the documentation or demos. When I inspect my
Output
object, however, I see this:That
@buffer
array is exactly what I need (it's currently showing two notes, 36 and 40, that haven't been stopped), but after several minutes pouring through the docs and poking each ofOutput
's public methods, I can't seem to get at it. Is there a correct way to do this?