Page 1 of 1

Muting a Specific MIDI note in a MIDI Clip?

Posted: Sun Feb 06, 2011 7:26 pm
by Blankman8503
I am trying to find a way to mute a specific MIDI note in real time while it is sequencing my Korg EMX-1 and am new to M4L. I have found 2 ways to successfully do this but have not been able to find a way that can me mapped to the Part Mute CC messages sent by the EMX-1. The two ways I have found to mute individual notes have been 1)by right clicking the specific note in the MIDI Clip I can Activate/Deactivate the note and 2)by creating a MIDI effects rack with a chain of External Instruments for each note and then I can Enable/Disable each specific instrument in the chain to Mute the corresponding notes. The problem I have is that the EMX-1 sends out Part Mute information as 2 different CC#s, one for Mute and one for Unmute, while the Activate/Deactivate parameter is a toggle on a single CC# with value 0-63 being OFF and value 64-127 being ON. I also have not found a way to map to the Activate/Deactivate Note function within a MIDI Clip though this would be the preferable parameter to map to. In my head it seems that a simple device that receives a specified CC# and translates that message into a toggle that will send either an ON or OFF message to a toggle switch, and then that toggle switch would be mapped to either the Enable/Disable parameter of the External Instruments or, if possible, to the Avivate/Deactivate Note parameter within a MIDI Clip. Is this line of thinking correct? If not is there a different way to go about this? If so how would I map the toggle in my Max patch to the toggle of the parameter in live?

Re: Muting a Specific MIDI note in a MIDI Clip?

Posted: Sun Feb 06, 2011 11:00 pm
by Surreal
whoa...

I think the easiest way through M4L would be to actually replace the note with a muted note of otherwise equal values.

Re: Muting a Specific MIDI note in a MIDI Clip?

Posted: Mon Feb 07, 2011 2:00 am
by broc
In fact, replacing the notes is easy since you can use predefined M4L abstractions.

Here are the basic steps.

- With M4L.api.GetSelectedNotes read the clip notes into jit.matrix.
- Iterate through the matrix and change the mute value of note(s) with specified pitch.
- With M4L.api.ReplaceSelectedNotes write the matrix back into the clip.

And you can use 2 different cc#s triggering the operations for setting mute to 1 or 0.

Re: Muting a Specific MIDI note in a MIDI Clip?

Posted: Mon Feb 07, 2011 6:32 am
by Blankman8503
Can you please be more specific about what you mean by replace the note with a muted note?

Re: Muting a Specific MIDI note in a MIDI Clip?

Posted: Mon Feb 07, 2011 11:24 am
by broc
For the basics you may look at the "10-MIDI Note Operations Lessons".
Open the example device and subpatches to see how it works.

Re: Muting a Specific MIDI note in a MIDI Clip?

Posted: Mon Feb 07, 2011 6:01 pm
by Blankman8503
Thanks. I'll look at that in the next couple of days when I get time.