|
Post by andyplankton on Oct 6, 2017 10:20:36 GMT
I am trying to create a script that will when receiving an incoming MIDI note on send out a CC before the note on message.... I have it so that it is sending to correct CC and value based on the incoming note, BUT it seems the CC is sent after the note on message...how can I ensure that the CC gets sent first ?
Thanks
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Oct 6, 2017 11:01:41 GMT
Hi andyplankton, To reverse the order, you need to block the original and do a manual send. Something like: # match note on on any channel 9X XX 01-7F = BX 07 32 +C # clone the CC 9X XX 01-7F = XX +C # clone the note on next 9X XX 01-7F = XX +B # block original note on
Regards, Nic.
|
|
|
Post by andyplankton on Oct 6, 2017 11:56:25 GMT
Thank you 
|
|
lid55
MidiFire Beta
Posts: 68
|
Post by lid55 on Oct 8, 2017 13:13:10 GMT
Hi andyplankton , To reverse the order, you need to block the original and do a manual send. Something like: # match note on on any channel 9X XX 01-7F = BX 07 32 +C # clone the CC 9X XX 01-7F = XX +C # clone the note on next 9X XX 01-7F = XX +B # block original note on
Regards, Nic. Nic, I don't understand why this works. Shouldn't the +B on the third line block the cloned noteOn as well (since the cloned noteOn is on the second line)?
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Oct 8, 2017 13:31:16 GMT
Hi lid55, Yes, it's a little subtle. The +C clones the event and adds it to the list of events to pass on, ignoring any subsequent rules; an early exit if you like. But, a cloned event gets routed after the current event is sent on (assuming it's not blocked), so if you had: NX = B0 12 00 +Cthen the note will be passed first and then the CC which is not what is required. What my ruleset does is clone the CC, clone the note and then block the original note. That way we get CC first and note second. Regards, Nic.
|
|
lid55
MidiFire Beta
Posts: 68
|
Post by lid55 on Oct 10, 2017 14:24:56 GMT
Thanks for the clarification nic, I think I now understand the +C rules... but I still don't understand why the cloned NoteOn message on the second line doesn't get blocked as well in the third line. Are cloned events immune from being blocked somehow?
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Oct 10, 2017 14:40:20 GMT
Hi lid55, In MidiBridge if you used a +C on a port on the left hand side, then that cloned event was fed back into the port and processed as if it had been received externally. Therefore, yes, cloned notes would have been subject to a block if one existed and matched. If a +C was used on a right hand side port then the event was sent to the port immediately without any further processing. It was a quirk that came in handy for auto switching scenes. Now, in MidiFire, the +C behaves the same was as a port on MidiBridge's right hand side. As soon as a +C is seen, then this event is pushed out of that module to the next 'as is'. To do the auto-switching quirk and have a cloned event pass through the chain of command is done using the SND +I rule. These events *would* be blocked if they showed up in that module and they matched a block rule. This is done this way as MidiFire has an unlimited (almost) chain of modules whereas MidiBridge just had the two, in and out. So, when MidiFire sees a +C Stream Byter I rule, it passes it straight on, so in the example, it would never be blocked, since it goes straight out the door! Regards, Nic.
|
|