How do I use the presence of just CC messages as a condition?
-
I am trying to filter MIDI message types but have encountered a problem.
At the moment I am trying to filter just CC messages, so that certain things happen only when a CC message is present (and not a PC, PB etc.).
When using “onController” callback, I can filter PC and Aftertouch messages with:if
Message.isProgramChangeor
Message.isMonophonicAftertouch
Message.isPolyphonicAftertouchbut how do I filter other messages?
I see no:
Message.isController
Message.isControlChange
Message.isPitchBendHow do I isolate the presence of just the CC messages?
-
@VirtualVirgin you can use
If (Message.getControllerNumber() = ?)
Replace ? with the cc number you're interested in.
I think pitch is 128 or 129
-
Thanks :)
This worked to select all CC messages by checking for >= 0 && <=127.
I can confirm that controller #128 is Pitch Bend here.
I'm working on a MIDI monitor and getting some readings:
Is there a way to direct all console prints to a text field label in the GUI?
I can figure out how to do a label that gives one readout at a time,
but what about text field like the console where there is a history of the recent messages? -
You could use a panel, or a multi-line label.
Add each line to a variable (use the
+
operator to stick strings together). Then set the text of the label to this variable.reg myText = "some text"; myText += " Some more text"; // myText is now "some text Some more text" myLabel.set("text", myText);