|
Post by mrcrappypants on Jul 4, 2018 1:37:58 GMT
I had a gander at the manual. Although I’m no MIDI noob, I’m kinda lost. Could anyone give me an example of CC to sysex? I’d like to control Roland D05 parameters with a midi fighter twister. I’ll check out the videos in the meantime. Thank you !
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jul 4, 2018 6:17:22 GMT
Hi mrcrappypants, Sure. Here is an example: # look for CC7 on channel 1, ON IF M0 == B0 07 7F # send sysex with CC value inside (M2) SND F0 41 12 34 M2 56 78 9A F0 ENDObviously you need to know the correct format for constructing the sysex for the hardware, but that's the gist of it. Regards, Nic.
|
|
|
Post by mrcrappypants on Jul 6, 2018 3:31:21 GMT
Ok, I’m not a coder so please bear with me.
“# look for CC7 on channel 1, ON IF M0 == B0 07 7F”
IF M0 == THIS I don’t quite understand. B0 is CC message on channel 1 07 is Controller#7 7F is value 127 but how does it apply? Max value?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jul 6, 2018 6:10:54 GMT
Hi mrcrappypants , The incoming message is available to the Stream Byter in the M array. This is an array (list) of bytes starting from index 0. M0 means first byte of message, M1 is second byte and M2 is third byte. IF M0 == B0 07 7F ENDmeans if the first byte is equal to B0 (controller type on channel 1) and if the second byte is equal to 07 (controller number 7) and if the third byte is equal to 7F (7F is hex for 127 which means fully on). This is the same as writing, but the first version is more concise and easier to read: IF M0 == B0 IF M1 == 07 IF M2 == 7F END END ENDin practice you probably want to check just if you got the controller you are interested in (ie. don't check the value in the message) and then use the controller value in your sysex message: # if we have a controller 7 message (any value) # on channel 1 IF M0 == B0 07 # M2 will contain the controller's value # which we plug into the sysex message SND F0 41 12 34 M2 56 78 9A F0 ENDLet's say we receive a CC7 on channel 1 with a value of 64 (this is hex 40), the message (in M0 to M2) would look like: B0 07 40And the resulting sysex message sent out would be F0 41 12 34 40 56 78 9A F0 ^^
See how the M2 specified in the SND rule has its value replaced with 40 (marked with ^^), the value of the CC. Regards, Nic.
|
|