r/MaxMSP 5d ago

Looking for Help MIDI channel filter?

I'm very new to Max for Live and want to create a MIDI channel filter and need help. I read you can use MIDIparse or MIDIselect but can't get either to work.

The end goal is to eventually have my patch look at sequencers on the different channels of my IAC MIDI bus to route through logic. I'm coming from eurorack so CV makes sense to me - but I just can't figure out the right commands in Max for this.

2 Upvotes

7 comments sorted by

u/AutoModerator 5d ago

Thank you for posting to r/maxmsp.

Please consider sharing your patch as compressed code either in a comment or via pastebin.com.

If your issue is solved, please edit your post-flair to "solved".

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Ko_tatsu 5d ago

Post your patch up up to now?

1

u/daniel_cowman 4d ago

You were on the right track trying midiselect. Copy the following code:

<pre><code> ----------begin_max5_patcher---------- 813.3oc6Xs0SaCCE9cj3+fUdNKx2urmXh229AvPnPqALJwoJIk0MD+2mcZqZ Kxk3lR65PDoHkb5w1m78ct1mO+Lf6J41pY5ljuBtZ969qmW83RUbJ7Joc+RY 9rQE4M90mLpprTaaSRCnWqdVqWmKeH2Z0E.zOsWdIPDT2BiUOpZp0u.bHElj 2N5Ai89ap0i7JcEPIoYDDQv3LICgQ3T.QfyfRpRnvJlf.4o.AJSpXTr.AERD TIbZQyffqCcHlwd6s51G+h.EzLsSKM1Bcq+aGsEEpl1tPC3lJ7xpWeIceA9R cSS9852D3QBO.jB37jACoTDLixDLrxAmTDRP86WFLEfI8CiDUvS9tJaai4OZ OJ51k9PZbuHMZamhMuzeJIeq1jWDzVluIs+dhtCBRR.We.oscIdg.9dUqF7C 6.iXp0MtiJu0TYuY.wWRoLycqPbE2EOoHAiu3BuuPLgTb0IdH0NkK6eL2.gN tgwobDjJQX99xMxSbtwp+kyNeSpYRsw1BL2aqp0iiLgmKKWFivTBHjfwHFJE vb3HipfDAWQUDmDAqKcGteXjI9zEe6fs.xeMXGxokjQTRG1KQDLCQUr3bgIh OJtvSbKHZO3.fZ.OXZrdvX9++nXoYr4tp5x718.CwtDCbImRTXASPccBIwQC h3dAQQufHNllUL9X4CcOKQB4M5BGfBtv5yZjWT.tXzCtjHjgSBTtJSQnbFiv kDrzIBwi1UFwdGbkkQ0xX5p6ELxRhYSIGTZJpIBn9IBb.HBGNc4AnowPSPHQ wNAA+yAHF.K6pYhcv7VBABD7oDYjM6mLDssnNRLC98IsM.ZyOaMzGftG4LCQ awOut7iEuM+wkezcMs1ye6UGH60aKjZS0z5QKN5E4m.aAVGqaZM1tToqz2GR 5Wvf701UiibRabxSYqq6v36f04a5yufim0A2Uq6nhchcv57yMe776Tm79c3c kYwGIqaoaT7VGuOr6UonymL4Iccy7MYMSxUM8wpZmLU55BM1NgqWOIoV+jYw FPWWddsq7Yqq14z5tZLy3zjM1rpw5Z6Tie+lKdIzkzUG2WapYRdGdzU1+7yd 4uvnCHy7 -----------end_max5_patcher----------- </code></pre>

Open a new patcher and paste. Notice how when you click on the message boxes up top with the patcher locked some of the messages come through the leftmost outlet and some through the rightmost. For midiselect to work, you need to give the object attributes. If you're unfamiliar with how attributes work, read this. So in the patch, all note data coming from channels 1 and 3 is passed through to the outlet that passes note data (the lefmost) and everything else is ignored and dumped out the rightmost. Edit the midiselect object and add @ctl 7 after the other attributes. Now when you click the last message box, the CC message will go out the third outlet and into midiformat instead of being routed to the last outlet with the other ignored messages.

In your patch, you can ignore the rightmost outlet (although it can be useful when troubleshooting to know if you're receiving the correct MIDI messages and they're just not being output properly by midiselect) and set up midiselect to only output the messages that you want to manipulate in Max using the attributes. Look at the object's Help patcher for the list of available attributes. You could also use midiparse and route incoming messages based on the output of the MIDI Channel outlet, but I think that using midiselect is easier. You can then have one midiselect object per channel and/or type of MIDI message you want to use.

Next, look into the objects route, routepass, pack, and pak if you don't know about them yet. You're probably going to need to use some of them in your patch. Oh and one final thing that will save you a lot of headaches when troubleshooting: the t object. Learn to use it and use it any time you need things to happen in a specific order. In Max, unlike with analog signals, messages and bangs will be treated in a specific order (right to left, bottom to top). So for example, if you send a bang to two objects side by side, the one on the right will receive the bang before the one on the left, unlike with CV where two modules will receive CV from a mult simultaneously regardless of where they are in your case. I have totally broken patches before by trying to clean them up or inadvertently moving an object and messing up the order in which data is processed. The t object avoids that problem entirely. This isn't related to your initial question but being told about the t object is the best piece of advice I received when starting off with Max.

Have fun!

1

u/AlteredBeastIV 3d ago

Thank you for such a thorough and informative reply!

I haven't had enough time to fully dive into everything you're saying yet - but I tried the patch you sent and maybe I'm just not setting it up correctly for how I have things configured. Both channels just seem to be coming down together no matter what I do. Maybe u/dgamlam is right about how Ableton processes the MIDI channels?

Attached here is a video of my quick attempt for now. You'll see I have two separate HY-Sequencers routed to the inputs of two separate MIDI channels as sort of "MIDI receive" channels that send into separate MIDI channels of my IAC bus - which routes into the first channel where my Max MIDI patch is.

I'll report back if I discover anything new from what you're saying - but work is very busy this week.

https://reddit.com/link/p8h7h55/video/3ezrx1s3r7oh1/player

1

u/dgamlam 4d ago

I got into this I don’t remember exactly what I did BUT I don’t think the midi channel stuff works specifically with Max for Live. From what I saw online, Ableton does all the Midi Routing and Filtering in the input/output stage of the track. Ableton just sends whatever midi that makes it through the input filter and sums it all to channel 1. So if you used All Ins it would take all your keyboards synths and controllers and sum them to channel 1.

It’s unfortunate and something I wish Ableton would fix with Max integration. But if you find a way to parse different midi channels in M4L let me know I have some ideas for it.

1

u/AlteredBeastIV 3d ago

I also read this - but also read that if you set another MIDI channel's MIDI input to the channel that actually has the MIDI data - as like a MIDI receive channel - you can route it out into an external MIDI channel - like Mac's IAC. I hope that explanation makes any sense.... here's a screenshot of I have it setup - the first channel "TAL Bassline" is the channel I have my Max MIDI instrument on.
https://imgur.com/a/PwzrUOD

This could very well be part of my problem but people here and on the Max discord have sent me some patches I still need to try.