Programming a "pickup" function (automatic midi mapping for my midicontroller)

Oct 22, 2010 at 8:30pm

Programming a "pickup" function (automatic midi mapping for my midicontroller)

Hi guys,
i try to build an auto mapping patch for my controller (bitstream3x). its not a big deal, but i dont know how to program something like the integrated pickup mode in Live. When i try the same inside of max its no problem, like you can see in the attached file. anyway, when i try the same to control, lets say the volume fader from live it doesnt work. it must be, because of the latency o. i thought a pipe object would solve the problem, but it dont. i attached a mini version of my patch, maybe somebody can help me out.
sorry for my bad english, i hope its understandable.

Attachments:
  1. pickupproblem.amxd
#52895
Oct 23, 2010 at 3:07pm

This is an interesting problem. I had to make a much more complex device to get it working, but this one at least does the job. I hope someone comes up with a simpler solution.

I changed the live.remote to a live.observer. Now I can change the dial on live with my mouse and see if it is picked up correctly. The gate is replced by a gswitch just for visual feedback.

Comparing floating point numbers with == is error prone. Comparing with >= and < = does work. The last value of the midi controler is saved with in a message. The old version is applied when the value changes. The old value and the new one define the region for a pickup. When the controlled dial is within this region the gate opens and all actions of the midi controller are sent through. The live.observer wille echo this value after some time.

When the dial within Live is changed with the mouse the gate must close again, waiting for the next pickup. This is where the counter comes in. Each time when the midi controller changes the counter is reset to zero. It will be incremented to one by the live.observer, but this will not reach a count of 2. Only when the dial in Live is changed there is no reset and the counter reaches 2 and higher figures. This causes the gate to close.

[attachment=144294,1279]

#190267
Oct 24, 2010 at 9:08am

hi xanadu,
thanks for your work, but for any reason your patch is not working for me.
i don`t find the bug, everything seems to work (gate is opening and closing at the right time) but the live.object doesnt send the value. i tried to change the live.object to a live.remote~ again, but no luck. any ideas?

#190268
Oct 24, 2010 at 12:24pm

Hi Stoersignal,

It is a mistake I made in the send and reveive pair for path1. I renamed the senedr to —path1. This means it won’t send to other devices, but I did not change the receiver. It is fixed in the pickupproblem.3amxd download.

Sorry for this.

#190269
Oct 24, 2010 at 7:44pm

You are my king! Thanks a lot

#190270
Dec 3, 2013 at 11:50am

I know this is an old thread but I’ve got a more global solution for this which can make life easier. Connect the knob’s right outlet (raw data) or other UI object with 0. to 1. range to the left outlet, and send the parameter Id to the right inlet (to get its min-max values for scaling). The abstraction outputs a scaled value only when the parameter and the knob values are matching (i.e pickup takeover mode).

Attachments:
  1. RP_pickUp.maxpat
#274584

You must be logged in to reply to this topic.