"ctlout" in max for live

Egor P.'s icon

Is there any way to receive MIDI-control messages sand from "ctlout" object in max for live patch? Internal mapping of ableton can't receive this signal but strangely it works perfect with fabfilter plugins via build-in midi mapping function.
Can somebody help?
You can reproduce it making a simple patch with "ctlout" object, send some messages through and trying to map it with abletons MIDI-map menu.

cblomert's icon

Looks to me right now that ctlout does not work within max4live. I created a little device that converts the OSC messages i receive from my phone to midi. Exact same code - as a native max5 patcher it works, as part of a device in max4live it does not.

Max Patch
Copy patch and select New From Clipboard in Max.

Maybe someone can try to reproduce the error?

Cheers

Oh, and is there any easy way to call an external maxpatch within a m4l device?

Chris

Andrew Pask's icon

If I send values to ctlout in a Max MIDI effect I can see them coming in to an instrument placed right after it. So I think your problem might be something else.

and

If your "external maxpatch" is in the max search path, or in the same folder/directory as your device, you can load it by typing its name into an object box in the device. They're called abstractions in MaxMSP.

-A

cblomert's icon

Hi Andrew, thanks for your reply. I just tried out the same thing and the track on the device is receiving midi.

However i am not able to send this data to an internal Bus like IAC Driver Bus 1 to use it with a user remote midi script. If i use the same patch as an external maxpatch instead of a m4l device it works perfectly.

All the patch does is get OSC packets, put them together as midi-CCs and notes and then put them out ctlout / noteout to an internal Bus. I also noticed one difference in patching mode: In the external maxpatch i can doubleclick the ctlout object to specify an output port. This is not possible in the same patch as a max4live device. The ctlout and the noteout objects don't react to my clicks.

Could this have anything to do with my issue?
Well, guess using the external maxpatch as an abstraction is good enough of a workaround anyways :-)

Cheers
Chris

Max Patch
Copy patch and select New From Clipboard in Max.

Here's the compressed patch incase someone wants to try:

Andrew Pask's icon

ok.

MIDI can only be sent to the Live track from an MFL device. External MIDI devices are not available from inside devices.

I now see this is what you mean by "external max patch". If you wish to distribute the MIDI generated from your OSC on system MIDI ports you'll need to do it from a max patch running in the max runtime or MaxMSP itself.

-A

cblomert's icon

Hehe, was starting to get the feeling this was working as intended :-) Thanks for the heads up!

Chris

Damon's icon

But is it possible at all to send control data from a Max for Live patch? All the examples I've seen just send note data and any attempts to send from ctlout have been unsuccessful.

Damon

broc's icon

"But is it possible at all to send control data from a Max for Live patch?"

Yes, I can confirm that it's possible (as Andrew has mentioned earlier).
BUT the channel is ignored, ie. messages are always sent on channel 1.

Damon's icon

How do you set up a Live device to receive the control message? Nothing happens when I send values when in MIDI map mode (the patch is routing values from a non-MIDI external controller). I tried setting the same control number and channel with another device to set up the mapping, but that didn't work either (I mean the controller channel/# was mapped in the MIDI mappings browser, but the controllers values I send on the same channel and controller number in the M4L patch are ignored).

Damon's icon

Ah ha! I think I figured it out. Apparently the MID controller messages will send fine to VSTs with their own mapping settings but will not work with an Ableton device through the MIDI mapping feature.

Can someone confirm that that is the full story and if so, is this something that's likely to change any time soon?

broc's icon

The MIDI mapping feature is designed to receive control messages from en *external* controller. So it doesn't work for messages that are sent internally within Live.

In theory, from an internal message you can generate an external message by sending it over a virtual MIDI port (eg. IAC on Mac) back into Live. But I'm not sure if that's a reasonable solution in practice.

Andrew Pask's icon

If you want to control device parameters and things that you would normally control with MIDI or key mapping, use the API. The API examples included in the Max install cover most use cases.

-A

i snor's icon

ok, so it should be possible to do with devices within Live using the API - which sounds like an ok solution - but impossible to send Midi CCs to an external MIDI device, unless we use Max itself. Right? Then is it possible to use Max and M4L at the same time? That is very unpractical but if it can be done I'll do it anyway...

Andrew Pask's icon

You can send out Live's MIDI ports.

-A

Damon's icon

Yeah, I could do it with the API but i was hoping to be able to have a second version that would work outside of M4L with a minimum of duplicated work. If I could use MIDI CCs then it would be fairly genericisable.

Thanks.

jin's icon

Can you really get the data from ctlout in max device using live API and send it to instrument device which located next to map a parameter?
I can't get it working.
Can someone give me a hint.

Thank you
jin

broc's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Just insert a little M4L device that receives CC and sends it as API data, basically like this

taylortronic's icon

This has been a very helpful thread, but in a case where using the API doesn't give you the same behavior as using the MIDI control...
the looper device responds VERY erratically to the M4L API, when I control it with MIDI or use the mouse I don't have a problem. Is there a workaround for this?

Evan's icon

How are you controlling the Looper (I am assuming you mean the multi-function transport button)?
A patch would be helpful.

It's hard to say because I don't know how you are trying to control the Looper, but it doesn't behave as a parameter knob or on/off switch would.

taylortronic's icon

this is my basic patch. whenever i send a 0 it triggers a stop, 1 triggers a rec, 2 a play and 3 triggers an overdub. but the quantization settings are wrong and the pitch is messed up! can you help?

Reese Tyra's icon

if you are using a max audio effect in windows, the midi information will not be sent from ableton. to get around this I used MIDI-OX for routing and LoopMIDI for virtual midi channels.