M4L to auto map controller questions from a supernoob!

Learn about building and using Max for Live devices.
Post Reply
ttilberg
Posts: 587
Joined: Wed Oct 05, 2011 4:55 pm
Contact:

M4L to auto map controller questions from a supernoob!

Post by ttilberg » Mon Oct 14, 2013 3:19 pm

Hey guys, I spent this past weekend getting into M4L. My end goal is to build patches that will automap certain parameters of certain synths to my controller -- similar to how Blue Hands work (but being able to control more than 8 flippin parameters at a time).

Ultimately, I just acquired an old BCR-2000 and want to set up a max patch that will map my custom array of knobs to an Operator, and an Analog (separate devices will be easier, so I'm starting with that) and perhaps other instruments as I go along.

I've gone through a lot of the tutorials but am having a hard time planning and structuring, and knowing what objects to use. Does anyone know of a good resource for "Creating a m4l patch with the intent of mapping a controller?"

I found, downloaded and studied a BCR2000 one out there, but it's intended to be able to set up your own banks of presets, and frankly is way way way more feature rich than I am seeking, and just made the whole thing more confusing. I'm looking for the 'baby steps' similar to how the demo patches are presented in the main content download from Ableton.

Ultimately I'm just looking for things like "midi input from specific device:BCR2000" and translating midi CC values to control device parameters. Is this something where there would just be a giant switch, with an out for each midi cc hooked up to a live device parameter?

Later on, when I'm less of a noob, I'd like to set it up so there are various preset pages on the BCR, and I can control a few synths, and a drum machine on the various pages. It would be cool to get 808/909 style sequencing out of the two rows of buttons on top... That's down the road though.

I feel r-tarded. Any sense of direction is awesome. My google-fu is weak on this one.
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: M4L to auto map controller questions from a supernoob!

Post by Because789 » Tue Oct 15, 2013 8:21 am

I don't know the BCR2000 but on controllers like Push or the APC40 you can access 8 banks consisting of 8 parameters. So first I would make sure that there really is no way of accessing more than 8 parameters with your BCR2000. Maybe you have to watch out for custom midi remote scripts for your controller. I'd search the forum for BCR2000, there are a lot of post about it. If I understand you right a m4l solution would be pretty complicated and a lot of work.
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

ttilberg
Posts: 587
Joined: Wed Oct 05, 2011 4:55 pm
Contact:

Re: M4L to auto map controller questions from a supernoob!

Post by ttilberg » Tue Oct 15, 2013 9:15 pm

There is, the top row of 8 knobs gets automapped, and then you can change the bank of parameters you are focused on. But I really hate this. Especially on the BCR, where you have 32 knobs, 16+ buttons, etc.

I want to be able to have hands on knobs for ADSR, filter, osc ABCD etc all at once... More like using a traditional hardware synth, instead of being limited to a set of 8 at a time, hence the desire for a m4l patch.

I guess I feel like I've heard about a lot of people doing stuff like this, but can't really find beginner's examples. It also doesn't "feel" like something that should be terribly hard... I mean, from what I understand, M4L can hook up to device parameters on devices that follow it... So I should be able to do something like:

Midi In
> Filter midi CC 10, adjust parameter "13" on following device (i.e. Operator, Osc B Volume, whatever that parameter ID is).
> Filter midi CC 11, adjust parameter "14" on following device (i.e. Operator, Osc C Volume)
> Filter midi CC 20, adjust parameter "20", Filter Freq.

I know you can map "things" to device parameters, as some of the preset patches show things like "identifying what parameter you are tweaking in Operator".

Once the translations are set up, I do not need the ability to map it further, just a one-and-done situation, but one that I can move around.

The way I envision it is like this:
Patches available:
bcrMap_Operator
bcrMap_Analog
bcrMap_MrTimsDrums
bcrMap_OtherSynths

Drop a bcrMap_Operator behind any Operator object, and now my controller is more or less glued to that, regardless of what I'm looking at, have selected, etc. I can move it to another channel with another Operator object as I wish, to gain full hardware control of a different synth, without having to midi-map it all. If any changes are needed, open the m4l patch and add another CC > Device parameter filter.

Am I talking crazy talk, or does this sound feasible? I really don't know, because I don't have enough experience with M4L yet. With the limited experience I do have though, it feels like something that should be achievable.
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: M4L to auto map controller questions from a supernoob!

Post by Because789 » Wed Oct 16, 2013 8:09 am

As a general remark, m4l tasks which sound fairly simple at first glance can turn out to be ridiculously difficult, especially when it comes to control surfaces. What you try to do seems to me like one of those tasks. More on that later.

The easier part is the reference to the device parameters. For every parameter you want to control you need a [live.object] which represents the parameter. This is basically done by three objects:

- a message box with the a text like "path live_set tracks N devices M parameters L" connected to
- a [live.path] object connected to
- a the right inlet of a [live.object]

Then you can set the parameter with a message "set value x" to the left inlet of the [live.object].

The first problem you will face is, that each time you load the device you have to determine the track and the device id, because they are set dynamically in a live set. The easiest way to solve this will probably be to make use of the M4L.api.SelectDevice abstraction. Generallly you should make sure that you always check if there is an abstraction for a task you want to accomplish (press n to insert a new object, write a key word and check under name search). Even if they don't fit your needs exactly they often can give you some hints.

On the controller part the real hassle comes in to play. Because if you just read out the CC messages (which of course is possible and pretty simple), the controls will keep their automapping behaviour. Which means they still adjust the values of the blue hand device. To avoid this you probably have to somehow grab control over the knob (if you don't want to disable the midi remote script) and it depends on the controller how that is done. To make things even worse these things usually aren't documented at all. It's certainly doable but it's not a task I would recommend to a "supernoob" to begin with.

Was this the BCR2000 thingy you studied: http://www.maxforlive.com/images/screen ... pg&id=1416 ?

In your position I think I would give myself more time studying such patches. Maybe you can proove me wrong that way and your task turns out to be as simple as it sounds at first glance :)
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

mothergarage
Posts: 478
Joined: Sun Sep 06, 2009 7:41 am
Contact:

Re: M4L to auto map controller questions from a supernoob!

Post by mothergarage » Wed Oct 16, 2013 8:21 am

Maybe it would be possible to write a remote script which accesses all 8 macro banks at once? Does anyone have an idea if this is possible?
home | sound | twitter | m4l
Windows 10 64bit - Live 11.0.6 - M4L 8 - RME Babyface/iConnectAUDIO4+

Because789
Posts: 440
Joined: Thu Apr 28, 2011 1:26 pm

Re: M4L to auto map controller questions from a supernoob!

Post by Because789 » Wed Oct 16, 2013 9:19 am

mothergarage wrote:Maybe it would be possible to write a remote script which accesses all 8 macro banks at once? Does anyone have an idea if this is possible?
I can't see why it shouldn't be possible. Even though that would take a lot of time too (getting into Python and stuff) I think it would be the best way..
Live 9.5 (64bit), Max 7.0.6, Windows 10, Push 2, Korg electribe2, Bass Station II, Launch Control XL, Faderfox DJ3

M4L

ttilberg
Posts: 587
Joined: Wed Oct 05, 2011 4:55 pm
Contact:

Re: M4L to auto map controller questions from a supernoob!

Post by ttilberg » Wed Oct 16, 2013 1:39 pm

Thanks a lot for the feedback, it's extremely helpful even if it's not what I hope to hear lol :)
Because789 wrote: On the controller part the real hassle comes in to play. Because if you just read out the CC messages (which of course is possible and pretty simple), the controls will keep their automapping behaviour. Which means they still adjust the values of the blue hand device.
Yeah, I had considered this as well. Frankly, if I were able to make the max mapping patches, I would have no desire for the Control Script that comes with Live any longer, and would just disable it, only using Remote/Key IN in the midi prefs. This should get around that issue right?
Because789 wrote:Was this the BCR2000 thingy you studied: http://www.maxforlive.com/images/screen ... pg&id=1416 ?
Yes -- holy man, I got lost in the sauce quick lol. Even as a User, and not a patcher :X As a code nerd myself, I am embarrassed to have to admit that.
In your position I think I would give myself more time studying such patches
[/quote][/quote]
Yeah, that's definitely what I was kind of hoping to come across by posting in here, some recommendations of devices, but on a much simpler scale, and more examples of people who have created "more simple" 'mapping' type patches.

Given the issues of dynamic object allocations however, I do think this is won't work quite as easily. I hope what you said about the abstraction layer exists. I haven't looked into it yet (next weekend) so we shall see.

Thanks again for the feedback, it's truly appreciated.

Regarding the control scripts -- I gave that a shot for a while, but I had a hard time following the documentation for it, because it seems like most development for that stuff stopped when M4L came out. There's only really one or two sources for it, and I felt there were some big holes in making the jump between having a basic idea of how to write .py, and how to implement it into a control script. I've tried making some modifications to a few of my scripts... sometimes it works, often it doesn't. This is one of the reasons I wanted to start learning M4L as well, as a lot of the object communication appears to come from the M4L api.

I'll see if the BCR script is available decompiled and maybe take a look at that.

Dangit! lol
Tim Tilberg - Duluth, MN | SoundCloud - Arsenal
2011 13" MBP w/8GB ram | Live 9 Suite, Reason 6.5, FXPansion DCAM/Etch/Maul, Izotope Ozone 5

Post Reply