Filtering MIDI CC data ?
Posted: Fri Jun 21, 2013 7:18 am
Here's a new situation I'm needing to find a way to handle.
With a KNOB, I'm sending out some MIDI CC data [Vol #7], and everything is working fine ...
but when I look at the MIDI analyzer display, I'm noticing quite a few duplicates of identical CC commands and value.
Using the CNTRL and mouse click on the knob sends it to its zero default position, and the CC data is just a single value [correct]. It seems that [even though the knob is 'stepped'], the manual movement of the knob is send all the data generated.
My question ... even though there is not a lot of data that needs sending, I'm still thinking that I should look for a way to strip out this duplication in the data stream.
First, does this make sense? Second ... trying to figure out the cleanest way to do this? RUBY is still fairly new to me, but I've had some [small] success with it. I also looked at several of the green prims, but still not sure how to put this logic together
Thinking out loud, it would seem I need to get the first value and hold it. Get the 2nd value, compare it. If the same, throw it out and get the next value ... if different ... pass it on to the MIDI OUT.
This is a crude explanation ... but I can't seem to get the concept into code
Anybody have a suggestion/idea to kick start me ???
Thanks!
With a KNOB, I'm sending out some MIDI CC data [Vol #7], and everything is working fine ...
but when I look at the MIDI analyzer display, I'm noticing quite a few duplicates of identical CC commands and value.
Using the CNTRL and mouse click on the knob sends it to its zero default position, and the CC data is just a single value [correct]. It seems that [even though the knob is 'stepped'], the manual movement of the knob is send all the data generated.
My question ... even though there is not a lot of data that needs sending, I'm still thinking that I should look for a way to strip out this duplication in the data stream.
First, does this make sense? Second ... trying to figure out the cleanest way to do this? RUBY is still fairly new to me, but I've had some [small] success with it. I also looked at several of the green prims, but still not sure how to put this logic together
Thinking out loud, it would seem I need to get the first value and hold it. Get the 2nd value, compare it. If the same, throw it out and get the next value ... if different ... pass it on to the MIDI OUT.
This is a crude explanation ... but I can't seem to get the concept into code
Anybody have a suggestion/idea to kick start me ???
Thanks!