Muting a Specific MIDI note in a MIDI Clip?

Questions and discussion about building and using Max for Live devices
Post Reply
Blankman8503
Posts: 55
Joined: Thu Dec 10, 2009 1:03 am

Muting a Specific MIDI note in a MIDI Clip?

Post by Blankman8503 » Sun Feb 06, 2011 7:26 pm

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?
Korg EMX-1, Korg KP3, Korg KM-2, Korg Radius-R, Korg R3, Akai APC40, Akai APC20, Edirol UA-101, Cakewalk UM-2G

Surreal
Posts: 560
Joined: Wed May 17, 2006 1:18 am

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

Post by Surreal » Sun Feb 06, 2011 11:00 pm

whoa...

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

broc
Posts: 1148
Joined: Mon Jul 26, 2004 8:37 am

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

Post by broc » Mon Feb 07, 2011 2:00 am

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.
Last edited by broc on Mon Feb 07, 2011 11:28 am, edited 2 times in total.

Blankman8503
Posts: 55
Joined: Thu Dec 10, 2009 1:03 am

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

Post by Blankman8503 » Mon Feb 07, 2011 6:32 am

Can you please be more specific about what you mean by replace the note with a muted note?
Korg EMX-1, Korg KP3, Korg KM-2, Korg Radius-R, Korg R3, Akai APC40, Akai APC20, Edirol UA-101, Cakewalk UM-2G

broc
Posts: 1148
Joined: Mon Jul 26, 2004 8:37 am

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

Post by broc » Mon Feb 07, 2011 11:24 am

For the basics you may look at the "10-MIDI Note Operations Lessons".
Open the example device and subpatches to see how it works.

Blankman8503
Posts: 55
Joined: Thu Dec 10, 2009 1:03 am

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

Post by Blankman8503 » Mon Feb 07, 2011 6:01 pm

Thanks. I'll look at that in the next couple of days when I get time.
Korg EMX-1, Korg KP3, Korg KM-2, Korg Radius-R, Korg R3, Akai APC40, Akai APC20, Edirol UA-101, Cakewalk UM-2G

Post Reply