Troubleshooting
How to have a specific Velocity output from a Switch
Started by D Junk on .
Sign in or create an account to join the conversation.
I'm really new to Lemur ( Using Android ) and have been struggling to grasp Scripting.
I'd like to set up a Switch to output specific velocities, e.g. one switch to output exclusively velocity 64 when pressed , another switch to output velocity 127 etc
I've tried a few of my own feeble scripting attempts, but can't seem to get anywhere.
Anybody care to show me the way.
Much appreciated.
I'd like to set up a Switch to output specific velocities, e.g. one switch to output exclusively velocity 64 when pressed , another switch to output velocity 127 etc
I've tried a few of my own feeble scripting attempts, but can't seem to get anywhere.
Anybody care to show me the way.
Much appreciated.
If you create a script set to On expression x, this script will check which button is pressed and send the midi message with the corresponding velocity. If you release a pad it sends out the midi note with velocity 0.
MrCorba
decl size = getattribute(Pads,'row')*getattribute(Pads,'column');
if(firstof(x)!=size){ //firstof(x) is equal to size when no pads are pressed
decl vel = {0,64,127}; //Change this to all the velocities you want to send.
noteout(1,1,vel[firstof(x)],1); //noteout(target,note,vel,chan)
}else{
noteout(1,1,0,1);
}
CheersMrCorba
Thank you MrCorba.
Looking at the script, I doubt I would have gotten anywhere near that for quite some time.
I'll try and incorporate into my layout.
Thanks again.
Looking at the script, I doubt I would have gotten anywhere near that for quite some time.
I'll try and incorporate into my layout.
Thanks again.
Nice script Cobra.
I think it's easier to get the size with the sizeof the x array though than with the attribute functions.
decl size = sizeof(x);
Cuz I lazy
I think it's easier to get the size with the sizeof the x array though than with the attribute functions.
decl size = sizeof(x);
Cuz I lazy
Wow, that IS way easier..... How did I miss that...