MaxMSP patch as Midi Controller in Ableton
Dear community, I am trying to use Tom Hall's Max patch with FaceOSC (https://www.youtube.com/watch?v=h6JGOU5TFu0). I have already enabled the IAC Driver in the MIDI Studio on my mac. I have also changed my Ableton preferences accordingly. I have also opened a MIDI track and changed input to "Max for Live" and Monitor to "IN". My first question would be, do you know if the setting "Max for Live" as Control Surface in Ableton is correct? Also, do you know if I have to add any other function, or if I have forgotten sth? Thank you so much for your help <3



As far as I remember, Control Surfaces need to have a definition
to function as such.
Thank you for your reply. Anyone else who might have some thoughts on this?
you probably don't need IAC at all(it's overcomplicating things... Tom likely incorporates that in order to leave it as generally open, to all DAWs on all operating systems, as possible...)
...try simply choosing 'from Max 1'(or similar) for MIDI input/output port, first... that can often be the swiftest/easiest way(fall back on IAC only if the direct Max-related MIDI ports don't work on your system). here's a video that explains MIDI to Ableton directly:
Hi 👽R∆J∆ THE RESIDENT ∆LIEN👽 thank you so much for this video! That is exactly what I was looking for. I have just tested it with another patch of mine and it works perfectly. Unfortunately, it doesn't work with the patch from Tom :/. Somehow I am not able to map the data coming from the OSC route. Am I missing something? Is there a trick? Thank you!

happy to help :)
the rest should be as simple as setting the main 'MIDI OUT' menu to 'from Max 1' (or 'from Max 2'.. whichever port you choose to use in Ableton), from there it sends that through 's mididevice' to alter the port for all the 'ctlout' objects in the patch at once:

...
HA! NO!
i'm wrong...
now that i look through it, it seems Tom didn't set the proper messaging to route the appropriate port...
i think you need to add this:

by the way, in case you haven't run into these shortcuts yet, to make this easy, create the 'port $1' message first, then hold down 'option'(or 'alt' on windows), while dragging across the patch-cables right below the 'r mididevice' object so that they're selected all together, then you can just grab the green-nodes/handles and move them from one place to another:

then, connect the 'r mididevice' object to the inlet of the 'port $1' message and that should do it.
apologies if you already knew how to do the multiple-patch-chord selection... just making sure to spare you any tedium :)
with that in place, you should be able to select 'from Max 1' from the menu i was referring to at first, and you can then verify that it changed all the 'ctlout' objects to that same MIDI port by double-click-and-holding on one of the ctlout objects to see its pop-up routing menu will now show 'from Max 1' as well:

i'm pretty sure that should work for you (but i don't have Ableton and i haven't actually downloaded the 'OSC-route' objects yet to confirm the full functionality of this particular patch, so if that still doesn't work, i'd recommend trying to ask Tom or asking around on the Max Discord server... he's there sometimes... here's a server invite in case you need: https://discord.gg/jtQNTGaN)
[edit: looking even more closely... i don't think the 'r mididevice' routing is connected properly to all the 'ctlout' objects... but the jist overall is to make sure all the 'ctlout' objects in the patch, send via 'from Max 1'(or the other port), to Ableton... once you have the 'ctlout' objects sending properly it should be good to go]
🍵
midi objects don't need port $1
port name alone is enough.

IAC buss is a better choice simply because it exists
no matter which app started first, multiple max apps, standalones,
Live, or any other DAW.
but this here is NO GO with midi objects !!!!

scale 0. 0. 0 127 , look at few output examples

you don't send that to midi objects !
Hey you two, thank you both for your answers. I really appreciate your time. I think the problem lies in how the data can be mapped, because if I rebuild the path from the video above 👽R∆J∆ THE RESIDENT ∆LIEN👽 it seems to work, but because I can easily map the slide object. With the data coming from the OSC-route I can't map it. I have tried to let the data control a slide object, but that's also not possible. I don't know SOURCE AUDIO if that is what you mean with "you don't send that to midi objects!". Do you maybe have an idea on how I could use that data for mapping? Otherwise I will check out the discord channel as suggested by 👽R∆J∆ THE RESIDENT ∆LIEN👽. Again, thank you very much.
If you leave that scale objects in there and they output
illegal values (out of 0 - 127 range), you will have no midi output
that can be recognised by Live and so assign any mappings.
In worst case it might tilt IAC buss.
before going into complications, insert clip 0 127
between one scale output and ctlout, to see if that helps.
you could also replace scale with zmap, because it clips
values out of set range.

Bad in that patch is also that output range objects are not set to min max range of 0 - 127, look at this here:

very sluggish patch alltogether
one needs to capure input range of all OSC messages,
to check where to clip and scale.
zmap in this case is simpler than scale + clip,
only reason to use scale would be if reversed upsidedown
in-out scaling is needed, which zmap does not want to do...
this whole patch could be fairly reduced, one does not need adjustable
output range - mappings does that too, or ?
and in any case change object at zmap output.

why don't you make m4l device at the end ?
This patch is quite old, and tbh was cobbled together in a heartbeat, it did work despite the patching for a number of years.
But it's probably best left as is and re-written from scratch tbh. I know for sure that the FaceOSC app has changed and also some port stuff in Max.
__________
Edit:
Ok now I recall, originally OSC messages from FaceOSC couldn't be sent to Max for some reason (something on the FaceOSC side I recall), and I was using OSCulator in the middle to make it all work. Since then FaceOSC was developed further, but not the patch :/
Also, I see that I included a version just called FaceOSC.maxpat - that's the last version and tidier.
Back again - it does work straight out of the YouTube download, even in its ancient arcane state. Make sure to use the patch FaceOSC.maxpat
You need to ensure the IAC Driver Bus in Live is set to receive "Remote" midi input.
**And if you don't see the IAC Driver bus, you need to enable in your computer Audio Midi settings - it's not enabled by default**


video of it working - https://tinyurl.com/2s3ebn89
Once you have FaceOSC assigning MIDI in Live it's going to rapidly assign multiple CC to the control you have highlighted, you can either stop FaceOSC and hit undo in Live to get to the CC you would like assigned to that control or use the toggles in the Max patch to assign one CC at a time (the reason behind all the toggles ;) )
I just downloaed latest FaceOSC to check.
OSC mesages get into max without any problem.
FaceOSC consumes too much % of CPU on 2.2 GHz Intel quad Core i7 MacBook Pro with iSight Camera on very tamed MacOS system,
makes it unusable for any serious control in music environment,
maybe one needs M1 Mac machines ...
but -- it is only x86_64 no Arm support !

Then - it is very noisy, one needs to capture min-max range of input,
scale, clip and thin output, otherwise receiver of control messages might go nuts.
here is example, measured min/max range, and somewhat reduced
zmap input range for comfortable tracking of scale parameter.

I hope this few infos help a bit
Thank you so much for the info 👽R∆J∆ THE RESIDENT ∆LIEN👽, SOURCE AUDIO, TOM HALL, I will get back to you on this tomorrow as I ran into another issue which I need to fix.
CPU hog on windows as well
