Making A device With Auto Updating Parameters to Midi CC Controller

BeatsByBear's icon

Hello all,

I am beginning my journey with max and am wondering if I am on the right track.

There are 2 phases to the device I want to create.

1. make a virtual device to match my analogue drum computers. essentially, it would be a max device with the same number of knobs as my hardware and every knob in Max would send/update the corresponding CC to the hardware. this part i know is possible since i have seen several examples of this.

2. this part is where i may be getting into some tricky business. once i have created the max device and translated all of the physical knobs into CC knobs in max, then I would like to map speciif knobs to my midi controller in real time based on midi input notes.

so for example, i have a drum rack and each pad correlates to a single sound on my hardware. so pad C1 would be for the Kick Trigger on my hardware. on my hardware there are anywhere from 1-5 knobs / parameters that control and shape the sound. so the kick has 5 knobs, the snare has 2, etc...

what i would like is that if i press C1 then can i have all of the parameters associated with the Kick, automatically update to my midi controller which only has 8 knobs. so if i press C1, the first 5 knobs would be mapped automatically to the correlating parameters on the hardware, if i press C#1 (Snare), then my midi controller would automatically update its mappings to the midi controller. and my plan is to do this for all 5 of my hardware drum computers and have a single drum rack where my midi controller updates its mappings to the currently selected matching drum sound on the hardware.

this is the same behavior we see in the controllers like Akai APCMK2 and so on.

can this be done through Max?

Thank you so much

BeatsByBear's icon

or is this something that can only be done thru scriptinng ?

Source Audio's icon

all you describe is easy to do with max.
All you need to do is to route that 8 CC# numbers
received from external controller to the parameters of currently played sound.
No need to any complicated mapping.
It is as simple as having a gate with as many outlets as notes used
to pass received CC# to selected note's sound module.

Only trouble would be if that 8 controllers are potentiometers and not
endless rotating knobs.
That would create jumps in set parameter values, because of the missmatch
between curent pot position and recalled parameter value.

BeatsByBear's icon

firstly, thank you for the reply which will serve as my official starting point into max.

i am unclear when you say "8 CC#s received from external controller". The external controller is the Push 2. The only thing it receives is the current sound selection on the drum pad. The 8 CC's in question are the top 8 knobs on the Push 2.

let me try to see if i understand.

Starting State:
midi track drum rack selected
drum rack is midi mapped to multiple analogue drum machines, each on their own channel.

lets say i press the C0 note on the drumpad, and C0 is already mapped to the BassDrum NoteOn of external DrumComputer1.

the max device would receive note C0.

from here, max would map the 8 CC's from Push knobs sound parameters associated with C0.

then the max device would simply be as you say, a routing of

if C0, then 8CC = Sound Parameters Of C0

every note would have the same routing.

is this understanding correct?

thanks so much!

Source Audio's icon

I think you got exactly what I mean.

Sorry I don't have that push, so just talk in general.
I had a short look at that push device, the 8 pots
are rotary encoders, so you can simply go up or down from stored parameter value.
I am not usin Live, and so all that mappings are not terms I use and think.
But in any case one sends and receives midi data,
It is only a matter to pick input and route it to output

BeatsByBear's icon

wow, that's great. apologies for the jargon, i just realized that max is separate from ableton.

what a great starting point you gave.

so then my next step is to identify the 8 pot CC values. after a bit of search i beleive that these 8 pots are not easily assignable. the controller was designed by ableton for ableton and already is programmed specifically.

there is a "user mode" but then it will mess up or cut all default mappings.

so the first issue is that this is not a raw midi controller.

after some thinking, there is potential work around and perhaps someone can confirm if it makes sense.

currently, whenever midi track is selected and the controller is in device view, the first 8 parameters of ableton device are automatically mapped to the 8 pots. this is default behavior for the Push 2 controller.

so then i can use the default behavior to my advantage. inside ableton, there already exists a max device specifically for mapping 8 pots to any CC parameters.

https://maxforlive.com/library/device/2560/cc-map8

so if i use that device and make one for EVERY sound, then i would only need to "select" that device whenever the incoming note / sound is selected.

hopefully that makes sense?

thanks!

Source Audio's icon

a bit bussy today, so it will take some time to reply something usefull.
Could you post infos about live version, mac or win
and a bit about midi configuration you use.

That would help me understand the structure a bit.
push 2 is probably control surface as any other, so it shoud be possible
to gain control over it, and use it the way one wants

Source Audio's icon

had a look at push 2 midi implementation.
in user or dual mode you will be able to receive that 8 rotary encoders
in single m4live device, convert rotary movement to inc-dec values
and send them to selected key's parameters.
CC#s are 71 - 78.
documentation links:
https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#MIDI%20Mode

https://github.com/Ableton/push-interface/blob/master/doc/AbletonPush2MIDIDisplayInterface.asc#Encoders

even that terms used are confusing as usual for ableton,
at the end few words in plain text indicate that :

movement to the right, with decimal values from 1 to 63 (in practice, values above 20 are unlikely)
movement to the left, with decimal values from 127 to 64

------------

To simplify, the first one of 8 rotary encoders =
CC# 71 on midi channel 1 with values 1 - 63 is increasing in set amount
and CC# 71 on midi channel 1 with values 127 - 63 is indicating decreasing.
decreasing amount is inversed 127 = 1, 126 = 2 etc

from that infos, one can easily build inc-dec to change current parameter value

You make 8 such which only send inc $1 or dec $1 to destinations 1 - 8
of selected note's parameters.

that is the plan.

here example inc-dec module simulating push2 rotary encoder

incdec.mov
video/quicktime 1.60 MB

Source Audio's icon

8rotary-params.mov
video/quicktime 4.61 MB

Source Audio's icon

receiving part of the patch

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

BeatsByBear's icon

oh boy, we're in it now. looks like i have a deep dive ahead of me this weekend. i will use your videos as a guide and attempt to recreate it myself. what is the "pasted Max Patch?" do i plug that in or run that somewhere?

i also read up on user mode and as i feared, there are limitations while using it in that mode. the LCD does not give any feedback so i wouldn't know where the knobs are without looking at the software on the monitor which i am trying to avoid. so in addition to your method, i will also be attempting a second method where the max device simply takes an input note, and then route that to "select" an already existing max device inside ableton which then automatically routes to the pots and provides all the default LCD feedback and other device functions.

i will still proceed with your example because i believe it is a perfect first exercise into MAX.

will keep you posted on progress.

i can not thank you enough.

Source Audio's icon

You click on pasted patch, COPY TO CLIPBOARD,
open Max and in Menu File - New From Clipboard.

I dislike very much how Live ticks, and don't use it.
That is the reason I allways advice against "built in" solutions it offers.
In Push Dual Mode, you can receive push 2 data as usually
and at same time also receive as normal midi input in devices you choose.
My idea was to make a single device which would receive played note
and 8 rotay pots, convert them into inc dec values and send them
using Max forward - receive directly to destinations,
bypassing any Live's automation setup and such.
..........
But that is only the way I would go arround it.