|
Post by gurbz on Jul 23, 2019 20:43:47 GMT
Hi all,
not a question but a simple script that works for my trusty old art x-15 midi footcontroller. The art x-15 uses, when using effect mode, toggle switches instead of momentary.
Toggle switch means: press ON (127 or 7F), second press OFF (000) Momentary means: press ON/OFF. So one press instead of two.
when using software like MDP2 you can run in a lot of things so I decided to create a script that transforms toggle switching into momentary control.
I need to transform every OFF into an ON and generate automatically an OFF message afer the ON.
#all CC 70-84 OFF (00) become ON (7F)
B0 46-54 00 = XX XX 7F
# all cc 70 - 84 send an OFF message after sending ON, which is typically momentary (127-000/7F-00)
IF M0 == B0
IF M1 > 45
IF M1 < 55
IF M2 == 7F
SND M0 M1 00
END
END
END
END
if you have any suggestions to optimize this I am glad to hear from you.
cheers,
gurbz
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jul 24, 2019 7:56:34 GMT
Hi gurbz , If it ain't broke, don't fix it! However, you can do both with pattern match rules: B0 46-54 00 = XX XX 7F B0 46-54 = XX XX 00 +CThe '+C' rewrites to a clone which gets sent after the original (sometimes remapped) event. We can omit '7F' as the third byte on the left in the second rule since from the rule above, it will always be 7F anyway. In fact you can also omit the '00' in the top rule too. Regards, Nic.
|
|
|
Post by gurbz on Jul 24, 2019 15:57:28 GMT
Yeah, that works, same results! Wouldn’t have dreamed this up. It is less code, thanks!
|
|
|
Post by gurbz on Jul 24, 2019 16:12:16 GMT
|
|