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.
How to have a specific Velocity output from a Switch
Re: How to have a specific Velocity output from a Switch
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.
Cheers
MrCorba
Code: Select all
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);
}
MrCorba
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
https://soundcloud.com/mrcorba
Re: How to have a specific Velocity output from a Switch
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.
Re: How to have a specific Velocity output from a Switch
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
Re: How to have a specific Velocity output from a Switch
Wow, that IS way easier..... How did I miss that...
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
https://soundcloud.com/mrcorba