General
repeated or looped CC message on botton on
Started by BFred on .
Sign in or create an account to join the conversation.
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
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
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 :
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 :
if (x>0)
{
if (time - last_trigger > delay)
{
ctlout(0, 50, 127, 1);
last_trigger = time;
}
}
else
{
last_trigger = 0;
}
Just change the parameters inside ctlout() to whatever you need : target, control number, value, channelWow!
That just works!
Thanks for your fast response
Fred
That just works!
Thanks for your fast response
Fred
I'm also grateful for this. 