adnrod Posted March 6 Share Posted March 6 Hi, Is there a midi script to get an arpeggio to run through its step with a trigger from another midi channel? eg play a chord with one hand on one zone of the keyboard and get it to arpeggiate in step with something played by the other hand. Thanks Quote Link to comment Share on other sites More sharing options...
Dewdman42 Posted March 6 Share Posted March 6 sure it could be done Quote Link to comment Share on other sites More sharing options...
adnrod Posted March 7 Author Share Posted March 7 I've never scripted before but would like to give it a go if this one is not available. looking at the Simple Arpeggiator script, it looks like anything to do with timing would not be needed. I would need to define a note range from which any note pressed are added to array of notes to be arpeggiated. Another note range should be defined from which the note on and off would be assigned to the notes in the array. Any guidance or scripts that have some of these elements would be really welcome! How would i restrict the array bit of the script (below) to a portion of the keyboard? function HandleMIDI(event) { if (event instanceof NoteOn) { // add note to array activeNotes.push(event); } else if (event instanceof NoteOff) { // remove note from array for (i=0; i < activeNotes.length; i++) { if (activeNotes.pitch == event.pitch) { activeNotes.splice(i, 1); break; } } } // pass non-note events through else event.send(); // sort array of active notes activeNotes.sort(sortByPitchAscending); } 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.