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.

5 posts

Topic starter
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. :)
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.
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);
}
Cheers
MrCorba