alexanderjohnson Posted November 16, 2018 Share Posted November 16, 2018 I'm a keyboardist / amateur scripter who's been trying to write a script that prevents note on messages from being sent when a continuous controller value (1 for the Mod Wheel) is in a certain range. The problem is, when I make HandleMIDI the continuous controller, I can't affect the notes and when I make the HandleMIDI function the note, I can't read the continuous controller to do anything with it. What I would like is something like this function HandleMIDI(event) { if (event instanceof Note && ContinousController(1) < 50) { event.send()} } Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted November 17, 2018 Share Posted November 17, 2018 Here ya go var thru = false; function HandleMIDI(event) { if (event instanceof ControlChange && event.number==1) { if(event.value < 50) { thru = true; } else { thru = false; } } if(event instanceof NoteOn && !thru) { return; } event.send(); } Quote Link to comment Share on other sites More sharing options...
ValliSoftware Posted November 20, 2018 Share Posted November 20, 2018 I'm a keyboardist / amateur scripter who's been trying to write a script that prevents note on messages from being sent when a continuous controller value (1 for the Mod Wheel) is in a certain range. The problem is, when I make HandleMIDI the continuous controller, I can't affect the notes and when I make the HandleMIDI function the note, I can't read the continuous controller to do anything with it. What I would like is something like this function HandleMIDI(event) { if (event instanceof Note && ContinousController(1) < 50) { event.send()} } Any help would be greatly appreciated. There's a time to use a scripter but there's also a time to use The Environment instead. Quote Link to comment Share on other sites More sharing options...
alexanderjohnson Posted November 21, 2018 Author Share Posted November 21, 2018 Awesome. That script worked a treat. I just modified it for my needs. Thanks for the advice on the environment too. Unfortunately, Mainstage lacks the environment. Thanks everyone Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.