|
Post by cnsgmusic on Jun 28, 2019 15:21:33 GMT
I am using a capacitive touch control strip (sending out CC33) whose behavior is what you would expect for mod wheel or other fader control -- you move along the strip, lift your finger, and CC33's velocity value remains where your finger last had contact until you place your finger back on the strip.
Is it possible to map CC33's behavior to something that would instead be momentary, such as we might expect from a capacitive touch control strip made instead for pitch bending? So we lift our finger off the strip, and after xx milliseconds it would reset to velocity = 0.
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jun 28, 2019 15:52:04 GMT
Hi cnsgmusic , Let me get back to you on this over the next couple of days. Setting the velocity back to 0 after n milliseconds is easy. The tricky bit is working out which is the final event before lift-off; I think I have a way but want to make sure. Regards, Nic.
|
|
|
Post by cnsgmusic on Jun 28, 2019 15:59:47 GMT
nic, that would be amazing -- thanks! The touch strip is sensitive enough that if a finger is on the strip, it will be receiving some info. So the only time the velocity stays constant for any extended time is if the finger is lifted. I figured if what I am after is possible, then the script would probably rely on CC33's velocity remaining at a constant for XX milliseconds.
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jun 29, 2019 8:22:35 GMT
Hi cnsgmusic , OK, I have something for you to try out. Below is a .SBR file that you can import into StreamByter or copy/paste the code below. There are 4 controls on the GUI CC Number - the number of the CC to return to zero (any channel) Detect - the time between when the CC stops and the return to zero RTZ Time - the speed at which it returns to zero Block Events - set this to 'yes' if only the RTZ CC events should be passed Regards, Nic # AutoRTZ - by audeonic if load set name AutoRTZ alias Q0 cc_number alias Q1 sensitivity alias Q2 rtz_time alias Q3 block_events define preserve +P set cc_number CC_Number +M set sensitivity Detect_(ms) $50 $2000 +S set rtz_time RTZ_Time_(ms) 0 $5000 +S set block_events Block_Events +Y set Q4 +H set Q5 +H set Q6 +H set Q7 +H set sli 1 alias L0 serial define syx_preamble F0 7D 11 assign Q0 = $33 $500 $500 0 preserve assign serial = 0 end
# handle CC if MT == B0 if M1 == cc_number # increment serial mat serial = serial + 1 if serial > 1FFF ass serial = 1 end # pack channel, value and serial into sysex mat I0 = serial / 80 mat I1 = serial & 7F send syx_preamble M0 M2 I0 I1 F7 +I +Dsensitivity end end
# handle trigger if M0 == syx_preamble # unpack sysex mat I0 = M5 * 80 mat I0 = I0 + M6 if I0 == serial # return to zero (M4 contains start value) mat P0 = M4 - 1 mat I0 = rtz_time / P0 ass I1 = 0 while P0 >= 0 send M3 cc_number P0 +dI1 mat P0 = P0 - 1 mat I1 = I1 + I0 end end block end
# handle block flag if block_events == 1 block end
Attachments:AutoRTZ.sbr (1.41 KB)
|
|
|
Post by cnsgmusic on Jun 29, 2019 9:35:37 GMT
nicOkay, I’m impressed!! It works. The GUI controls are a really nice touch (no pun intended) since others’ hardware may respond differently. I was getting pretty good success using appx 125 for Detect and appx 250 for RTZ time. Will continue playing with it. Man... how do you do it? StreamByter is seriously some sorcery.
|
|