Max for live object that changes the input of the channel you place it in
Hej there
I'm looking for an Max for live Effect which is able to change the Input ("Audio from") of the channel, so I could midi map it. I'm working on a live performance and it would be nice to just press a button and the channels input switchs immediately, without me searching for the channel, chosing it with the mouse and loosing a lot of time while doing it. Of course I could create multiple channels with the different inputs I want and then just switch between them. But a Max for Live solution would be easier to handle.
Any Ideas if there's already something out there which does that or if not how to create such a device?
Thanks for your help!
That is very difficult to make (at least with Live 8 / M4L "5") because in a patch you can't differentiate between the different inputs from the Audio From menu.
Put differently; When I start Live I have an audio channel with the following available inputs: "Ext. In, Max, Reason, Resampling, A-Return, B-Return, Mastering, No Input".
When I try to get the value of the "input_routings" property of this track I get:
print: input_routings Ext. In Max Reason Resampling A-Return B-Return Master No Input
The major problem here is that there's no way to determine in your patch if an input consists of one or two words. Because unfortunately this isn't a list which gets you all individual audio inputs; its a symbol which puts the whole lot onto one "pile" and leaves the programmer to sort things out. If you'd use "zl iter 1" on the output you'd get:
print: input_routings
print: Ext.
print: In
print: Max
print: Reason
...cut....
print: B-Return
print: Master
print: No
print: Input
As you can see; totally unusable. To make matters worse; the current input routing ("current_input_routing" property) is also a symbol. Meaning that if you want to set the current input routing to something else you'd need to know the exact name of the input you'd want to use. Well; enter the problem I described above...
Now; this doesn't mean that your idea is totally impossible. The main problem is that all the inputs need to be hard coded into the patch. Which means that you can't deviate from what you're using; it'll need the exact same inputs to be present,otherwise it won't work.
I'm really hoping this behaviour got changed in Live 9, because as it is now its pretty useless unfortunately.
Edit / PS:
Here's some proof of concept which you can use yourself:
First of all: Thanks for your detailed explaining.
I would use that device only in one live set, and the inputs would never change. So i'm not depending on max's ability to "ask" for the available inputs, since they don't change. I'm searching for a way to set the current input routing to a specific channel. Actually I only want to switch between two different inputs.
Since I'm not an experienced Max Programmer I'm not sure how to do that but since you mentioned the "current_input_routing" property I was able to find this post with an example of the patch in the dephts of the forum, which is basically what I want. I just need to adjust the track number and redefine the Range/Enum of the live.tabs. Link to the post: https://cycling74.com/forums/how-to-modify-audio-from-track-id-n-with-n-changing-in-time
Again thank you very much for your help!
The adjusted patch from the mentioned post, I'm gonna use. In case anyone stumbles upon this thread in the future and the link above isn't working anymore (which happened to me once and made me angry ;)