Monosock Posted April 23, 2016 Share Posted April 23, 2016 Hi there, I think this is my first post over here.. I'm pretty good at programing but have absolutely no idea on how to do any JavaScript stuff... so.. can you guys helP? I reckon what I'm trying to do is fairly simple. I'm trying to come up with a script that can "multiply" all the incoming info to all 16 channels. I need this for several reasons: 1) For mainstage, so I can assign a single Button at concert level, to send the "All Controls/notes off" mesage to my Integra 7., I currently have a button that does th is, but only sends the CC to the channel I'm currently using on that mainstage patch accordingly. 2) I Also use a Seaboard and while the Native plugins in logic/mainstage work great with it in "MIDI MONO MODE ON" for my external isntrmuents is a little bit trickier, I would need to send the sam Program Change 16 times os I have in all 16 chanells of my integra 7 or else the same sound in order to be playable by the seaboard. Thanks very much for your help! Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 24, 2016 Share Posted April 24, 2016 See if this helps: function HandleMIDI(event) { if (event instanceof ControlChange) { // Duplicate for all 16 channels. var i = 1; while (i <= 16) { event.channel = i; event.send(); i++ } } else {event.send()} } Quote Link to comment Share on other sites More sharing options...
Monosock Posted April 24, 2016 Author Share Posted April 24, 2016 That works great! thanks very much, Eric! Just one last thing, you know how to delay like 5-8MS the messages for each cycle? like CH1 Realtime CH2 delayed 5ms Ch3 Delayed 10Ms CH Delayed 15Ms and so on and so forth? I know I'm abusing your kindness now! Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 24, 2016 Share Posted April 24, 2016 You're welcome Monosock! Here's a modified version with the time delay. function HandleMIDI(event) { if (event instanceof ControlChange) { var i = 1; while (i <= 16) { event.channel = i; event.sendAfterMilliseconds( (i-1) * 5 ); i++ } } else {event.send()} } Quote Link to comment Share on other sites More sharing options...
Monosock Posted April 24, 2016 Author Share Posted April 24, 2016 Legend, thanks once again. Quote Link to comment Share on other sites More sharing options...
Eric Cardenas Posted April 24, 2016 Share Posted April 24, 2016 You're welcome. Quote Link to comment Share on other sites More sharing options...
realdealpeel Posted April 14, 2018 Share Posted April 14, 2018 Eric. Eric, Eric, Eric. You are a saint. a godsend. Now I can use the sustain pedal on all 16 channels at once!! 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.