Programming a "pickup" function (automatic midi mapping for my midicontroller)
i try to build an auto mapping patch for my controller (bitstream3x). its not a big deal, but i don
t 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.
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.
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?
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.
You are my king! Thanks a lot
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).