Hi,
I would like to have a button or pad to act like a computer key, to send the same CC message repeatedly as long as the button is pressed. I intended to use it for the nudge and step bar functions in cubase.
I have limited scripting skills but I'm learning every day...
Any idea how to do that?
Thanks for any help!
Fred
repeated or looped CC message on botton on
-
- Liine Staff
- Posts: 126
- Joined: 14 Dec 2011 12:12
Re: repeated or looped CC message on botton on
Ok, first create your Pad object.
Then inside the object, create an expression called 'delay' and set it to a value in seconds than represents the delay between messages while the Pad is pressed. For instance, delay=0.5 for one message every 500 milliseconds.
Inside the Pad object, create another expression called 'last_trigger', and set it to zero. This will hold the last instant the message was sent.
Last, inside the Pad object, create a script called "action', set it to "On Frame", and type the following :
Just change the parameters inside ctlout() to whatever you need : target, control number, value, channel
Then inside the object, create an expression called 'delay' and set it to a value in seconds than represents the delay between messages while the Pad is pressed. For instance, delay=0.5 for one message every 500 milliseconds.
Inside the Pad object, create another expression called 'last_trigger', and set it to zero. This will hold the last instant the message was sent.
Last, inside the Pad object, create a script called "action', set it to "On Frame", and type the following :
Code: Select all
if (x>0)
{
if (time - last_trigger > delay)
{
ctlout(0, 50, 127, 1);
last_trigger = time;
}
}
else
{
last_trigger = 0;
}
Re: repeated or looped CC message on botton on
Wow!
That just works!
Thanks for your fast response
Fred
That just works!
Thanks for your fast response
Fred
Re: repeated or looped CC message on botton on
I'm also grateful for this.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro