|
Post by hartsteins on Oct 27, 2022 19:08:22 GMT
Is there a built in way to detect a long press on a midi controller in streambyter? Thanks
|
|
|
Post by redheronmusic on Nov 6, 2022 21:31:22 GMT
# Detect long button press # Red Heron Music, Nov 6, 2022
# Notes # delays do not work in MDP2 version of SB # see post on problems with delays below 150 ms in SB on Mac
# Example uses # Cc 01 on Ch1 is monitored button # i0 to store button state # i1 to store delay time # F0 58 10 - synthetic SysEx message for time tick
If Load Ass i0 = 0 # initialize button to off Ass i1 = $200 # Default delay time in ms End
If M0 == B0 01 # Detected button action If M2 > 0 # Button is on Ass i0 = 1 Snd F0 58 10 F7 +I +Di1 # Any non-delayed button on actions here (optional) Else # Button is off Ass i0 = 0 # Any button off actions here (optional) End End
If M0 == F0 58 10 If i0 == 0 # Button now off, no action # No Action Else # Button still on, take delayed action # Example action Snd B1 20 20 End Block # Block synthetic message End
|
|