Jump to content

Need script to disable notes individually


gianluca.cello
 Share

Recommended Posts

thank you very much David, it works great!

If I want to change the active notes it would be enough for me to change the corresponding numbers in the script?

Yes exactly and if you need to include more notes just separate them with the | character. You're welcome! Glad to hear it works for you! :)

My new Logic Pro Book is out!

Link to comment
Share on other sites

ohh regular expressions... fancy!

 

If you want to use pitch names then you can use the built in function to convert it to a number automatically. Wouldn't work with David's regular expression as is though... ;-)

 

var pitch = MIDI.noteNumber("C3");

OSX 12.x (Monterey) on OpenCore - Logic Pro 10.7.4, VePro7, Mainstage3 - 5,1 MacPro 3.46ghz x 12 96gb ram

Link to comment
Share on other sites

Here's one way with note names in an easy to change place

 

var notes = ["C3", "E3", "G3"];

function HandleMIDI(event) {
   if(event instanceof Note) {
       if( notes.includes(MIDI.noteName(event.pitch))) {
           event.send();
       }
   }
   else {
       event.send();
   }
}

OSX 12.x (Monterey) on OpenCore - Logic Pro 10.7.4, VePro7, Mainstage3 - 5,1 MacPro 3.46ghz x 12 96gb ram

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...