Hi,
to make handling and using incoming midi information (’ noteoff_1_53_64’) easier, I would like to see the following variables containing parts of $(generic-midi:lastMessage):
$(generic-midi:lastType), e.g. ‘CC’
$(generic-midi:lastChannel)
$(generic-midi:lastNumber)
$(generic-midi:lastValue)
And would it be possible to get a ‘generic’ send MIDI action, that has variable enabled fields for type, channel, number, value?
At the moment you have to decide beforehand which kind of message type, channel and note/cc number you want to use and can’t easily change it afterwards.
Since - I think - version 3.3 Companion has basic support for arrays…or kind of simulates arrays.
You can now use split($(generic-midi:lastMessage), “_”) to split the message in its 4 parts.
Then you can access the data with $(internal:custom_yourarray)[ x ] with x in the range 0-3.
So you can now make the single message elements available with 1 instead of 6 actions.
I was still reaching out to you for 2 reasons:
The arrays were not working properly when I wrote you, this has been fixed just an hour ago, but is so far only available in the 3.4.0 beta.
It will probably be very convenient for people to avoid working with arrays and have the single data elements delivered by the module itself.
Concerning the “generic” MIDI action:
I don’t have a “I need it know!” use case, but what comes to my mind would be
forwarding certain incoming MIDI messages. Put the 4 variables we talked about above in the 4 fields of one generic action, SHOOT. At the moment I would have to set up seperate triggers and actions for all kinds of message types, MIDI channels, CC numbers, etc as only the sent value can be a variable.
altering the MIDI channel certain messages are sent to
“transposing” MIDI notes that are remote controlling some device. Send note 10 when a button in Companion is deactivated, send note 20 when it is activated to trigger something else.
This would be kind of the same as the ‘Send message with multiple arguments’ action in generic OSC module. There are dedicated OSC send actions for each argument type, but with this action you can just throw in ANY data type (int, float, string) in ANY number and it will just work.
In fact you don’t really need any dedicated send actions anymore unless you feel insecure with this flexibilty and don’t know enough about OSC or MIDI in this case.