|
Post by seanrs on Dec 13, 2020 14:02:55 GMT
Hi guys, I'm very new to programming and I've been reading the university information and slowly getting my head wrapped around coding, but I'm still very lost as to how to get started. It seems like you need a general understanding of coding for this to make sense. I was wondering if someone could help me out with something.
I have a midi pedal board with a certain switch programmed to transmit cc7....what I am trying to figure out is to hit the physical switch once and have the code see the incoming signal and repeat it say every 50 milliseconds for 10 times. I'm sure this probably isnt that difficult to do. I just cant see where to get started.
Thank you for your help guys. This is an amazing product and I really cant wait to dig in and use its power.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Dec 14, 2020 9:20:23 GMT
Hi seanrs , There is no getting around having some understanding of coding and also MIDI if you want to embark on writing scripts! An easy manual way of doing it using the old basic rules would be: BX 07 = XX +C +D50 BX 07 = XX +C +D100 BX 07 = XX +C +D150 BX 07 = XX +C +D200 BX 07 = XX +C +D250 BX 07 = XX +C +D300 BX 07 = XX +C +D350 BX 07 = XX +C +D400 BX 07 = XX +C +D450 BX 07 = XX +C +D500But it is a lot of typing and pretty inflexible. This example code will do it in a loop and you can change the number of iterations and the inter message delay interval. if M0 == B0 07 # set number of iterations in K0 # and delay interval in K1 assign K0 = $10 $50
# loop assign L0 = K0 0 while L0 != 0 # send the CC with a delay # (and block original) send M0 M1 M2 +DL1 block
# decrease iteration counter calc L0 = L0 - 1
# increase accumulated delay calc L1 = L1 + K1 end endYou can really get fancy by linking the CC number, iterations and delay interval to GUI widgets and dynamically control everything from the GUI or remotely via MIDI messages, but that is more advanced. Regards, Nic.
|
|
|
Post by seanrs on Dec 17, 2020 15:53:33 GMT
Thanks Nic for the help and sample codes. I could not get either one of them to work, should the code work as is, or have you left certain parameters open for me to put whatever values I would want in there? Just so you know I am running the code through the Midifire app into a Stream Byter module if that would make a difference I'm not sure.
Again thank you for your help
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Dec 17, 2020 16:46:39 GMT
Hehe - I am getting rusty. The rules were for program change 7. I will edit my original post to change for CC 7
Regards, Nic.
|
|