midi out from ableton playing two separate patches

drewmcm's icon

Hi there,

sorry for this fundamental question,
I'm noob to getting max to work with ableton.

Trying to have two seperate instruments I've created sequenced from ableton. I have them on separate midi tracks.
I do have them playing ok from ableton, but both instruments are being triggered in playback and from the keyboard -

I started using notein object, then have tried midiparse and midiselect, but I'm floundering trying to get them running separately.

Some of my tutorials from ableton aren't opening for some reason, they don't seem to be in the library and it's the ones I need to solve this.
I also tried to look at other max instruments, but found i couldn't open them from ableton to check out what I've missed

Can anyone point me to the right max object/tutorial, or give some advice?

thanks heaps,

drew

Bill 2's icon

Not sure of the details here, Drew, and I don't know Ableton Live at all, so here's a guess.

AFAIK the best way to get 2 MIDI tracks from another program into Max is with the 2 inter-app MIDI ports that Max automatically opens with. On Mac they're called "to Max 1" and "to Max 2". You can change the names that Max uses in Options -> MIDI Setup… I use the names a (for "to Max 1") and b (for "to Max 2") cos they're short and easy.

So if I were doing what I think you're trying to do I'd set the 2 tracks in Ableton to 2 separate MIDI channels (say, 1 and 2) on the MIDI port "to Max 1" which should appear in Ableton when Max is running. Then in Max I'd use 2 notein objects: [note a 1] and [notein a 2]. They're just for MIDI notes messages. If there are other MIDI messages in the Ableton tracks, like controllers, pitch bend, etc. you'd have to use [ctlin a 10 1] for controller 10 on Ch.1, etc. etc.

OR you can use [midiparse] to get all MIDI messages at once, but you need to use [midiin] first to get the messages that'll be parsed by [midiparse] and you need to specify a port name, i.e. a in my example. Then you need to get all the messages from the separate outlets of [midiparse]. And you have to separate them into separate MIDI channels using the MIDI channel outlet (the one on the very right) and a [gate 2] object. Does that help?

drewmcm's icon

ah great thanks - gonna give that a go now, really appreciate it

drewmcm's icon

Hi Bill, thanks for your response, just want to clarify one thing - do i specify the ports in Max i.e. set midiin to 'to Max 1', or does that just need to be set from ableton?

I'm using a [plugout~] to get back to ableton with the audio signal created in the instrument, and so the choice of routing the midiin to 'to Max 1' port isn't there - maybe thats part of my problem? Should I will try make a seperate note generator and audio instrument

thanks heaps

Bill 2's icon

Drew, I probably know less about audio in Max than just about anyone else on the forum (I only use MainStage and hardware synths) but I've done a lot of playing around with MIDI, so you might need help from someone else as well.

Yes, [midiin] needs to have a port as an argument otherwise it'll receive any MIDI that Max can receive, although if that's not a problem you can leave it out. I've always called "to Max 1" "a" to make patches neater cos that's easier on my non-programmer's brain. So I'm not sure whether you need [midiin to Max 1] or [midiin "to Max 1"] but I'm sure you'll find out pretty quickly.

My basic understanding is that MIDI and audio are kinda 2 separate things in Max, and AFAIK [plugout~] should be the perfect object to get audio back to Live.

Where exactly is it currently not working? Like, are you now getting Live's MIDI in Max? And are you able to get the 2 separate tracks/channels? And are you getting the audio of those 2 tracks in Max? (I won't be able to answer again for a couple of hours, so good luck!)

drewmcm's icon

Hi bill, i did get it to work through a mixture of your advice, finally finding an Ableton Max Patch I could open in edit mode, andthesevideos....

thanks for your response, i'm acually still unsure why my original patch didn't work but that's ok I have a template now. Might havebeen due to the fact I didn't use a poly~ object originally, but am now. Not sure.

Thanks again for your input.

drew

Bill 2's icon

No worries, Drew. Glad you found that video to make up for your missing tutorials and get it working!