Endless Encoder from 128 Step input Midi dial
greetings, so I have been trying to build an endless encoder with my APC40′s knobs. The goal is to be able to morph between pattr presets (interpolate between whole numbers). The way I have done this is when a knob is at its maximum point, it resets itself to a zero value but jumps up a whole number, and vice versa when backwards. What I have done here works well when testing, but when its inside my patch at work, the amount of work max is doing doesnt enable smooth transitions and it often skips a whole number or two. Im guessing because it does not have the step resolution when running all other tasks in my patch, and part of this patch besides just scrolling through numbers is also updating the LED knob display on the APC40. I think what is causing my skipping numbers has to do with trying to update the LED display. When you update the LED display, it moves the value of the knob to that point, so when the max resolution level is low, it will reset the knob to a new number before actually updating the int objects which are holding the new float to move to, therefore sending 2 jump messages before 1 is recieved.
I really feel like there is a much more reliable, non message speed related way to accomplish what im trying to do. My patch is 22mb of pure Max, no MSP, and I have about 160 Pattr families, which is probably one reason why everything is slowing down so much. Any help would be greatly appreciated.
This is what I have done so far. Keep in mind it works when testing, but fails when Max is under heavy CPU load.
----------begin_max5_patcher---------- 1086.3oc0Y97jaaBEG+r8eELJWRm53BHg9QukIMGxzdn2axzQVhcMsRfGIbx llI+uW.IuV6FKYrsD16EIKL17de366wCz2lOyak3AZsG3WA+EX1ruMe1LSS5 Fl097LuxzGxJRqMcyKSTVR4RuEMemj9frsc9moURfT.tqPj9XG1jJyVy32+2 UzLYy.gC8WBW.BPw5aID8ULbID7o1eCeaIiWPklQD013cBtjmVRMi1aqXoEd 66tXqbW+gc5eM6+L8GgWtqYVt4OPr5edCJvS212mOWeYwEB.4ZZMETRqqSum VCRqnfzhZAnV0YMUd6e9t.n9Ca2jmJof+38+F3e4hUfbV8lhzut6OrfwoYhs by+pe+TDEannOxvODAZXZ7U.i3wDiL9lsRvcUhRPIKmYPz.ZIju1l.jtP3pn kfiID9LqRtMsv37ej+Q9q0gVrLUK0YUhBkD4d.qFrsll+SmptACMgcn.3UV2 DeNDSMXqnUClbItQCDnu07fe3X4c31VaZR90MzlQUIaUyh.uUo768dbn5x.b 3gXP34v.U9UkUMXPgI0.ILzv.SrgNNYhYPad+AovAUBmUd3UakRAe.JjzrJi JMIoImfMYFVyxyo7ts7TmG0my+TetiyQBG2ziRZ0FQQpjI3fz7bl9CCoEZBA H9PMFthYHIQmU7N8Kpe7OfgeF.WZQ.fOR6zJoOYHeFeh9LZ3.fCJ76gIwSR7 OFFYj9AQZGermxuj3+dvPxDgglr+pJLeQfgP3HFg7KpAIZoEhDrIFI.MLctd wHgnygJs0g+CXAgICvjHiFw2mrOsAJdxQxIQC7XRC7P4PChZfQnAFnaQX3Ol KstoRsANI3KqEETvq.uNasJ9k1rUj0zJ5gqzF2OA8CvMAUlJPPlZeTM59kdC CFwDKL9P6sOw3jAP2tvq1lNEcCYD4wa.niWDJN4llGgNSefTj3Ef.IZR1aJB 0rYahaKH4n6MsGHDOpEriFTUD2DlDeSqJRlj8ohZ2aZB7T1n5ktszH3zroax 0vWPinRslV.f5hmGxKaNioPiWRRF23X+A8+E6ueJZ2H7jjQKwbBSXbzKgDZQ mU4h4crudI.BZVfOwbniIAijf+Y6UpqqbVUzYLji5KMmkN9wqG1UfmaY8c8h jcFytZx0eyuqeoHeP+Z.55ileuoz6m85pL9gt8m530hsUY6F8liZcAXuujSq kLt4Tz51m3mzo8GF3NusjkuQnjes1.3SGbVvVShDagME3VSxFLQR5wlPShME ZClLrD4LNYmME5TNoVR2BIdjS0SpklsvlHtUimXqdxgZbzkD2MQZbqzSH2ZS XKron.2N24e6YS1kKv+FLW.1s5oavxBrZsESNSj6z3DaroP2xoHarojav4tH 2N2kb6oweV5vdxY537SIWRd7IxlzoCwGatC5da5nbB4daBcLaxwbxp5Btj06 TO784+O.d.voW -----------end_max5_patcher-----------
you might want to set the knob to 360 degrees, it looks better, also you can hold Shift while mousing to get fine-control, a nice feature of
Don’t know about the heavy CPU load creating issues for you. Possibly instead of a
"if $i1 < 2 || $i1 > 125 then bang else X"
endless to repeating:
for repeating to endless it is enough to chzeck for +1 and -1, it has to be initialised anyway on startup or program load so we
dont know where to start (not necessarily 0.).
to Danny, hi,
Since I am also working a lot with incremental data (from the mouse mainly), I was intrigued by your question. I found an easy way to endlessly increment while filling the decimals between the integers, without relying on message timing. It is very simple, going like:
- differentiate your data with help of the bucket object
- filter out the jumps at the wraparound of the dial/encoder with help of the split object
- divide by 127.
- integrate your values using a plus object in combination with number box (a trick I learnt from jvkr)
Of course I do not know how this method will behave under conditions like in your setup, so let me know about that if possible.
Here’s a demo:
----------begin_max5_patcher---------- 709.3ocyXssbaBCD8Y7WACuVaWjDW6a86nSlNXP1QMffAjacal7uWwJHg3HH XaL1OXvrrx5bNZ2Uq7yKLr1jefVYY9MyeXZX77BCCvTsAilmMrxhNDmFUAtY EmmkQ4Bqkp2InGDf8RZE8Uq78Y46EoTALF6FqaK2sQMUn01KMsWG5hCcPc+l 7ElOz3dQjH9QFe2OKowB03vHu5QRvA02bbpuhIcFCKA.S9lesBgaQy1btfGk QgW88RVTZGbx3svD0w8J1+.2Qxon15KKVTeY4EJRLtftqLRjWdsUJD1EjHaP o7BGToP2NkB9Q0KFsyhxj3uETE0rrFh3DfpHLPX21q5nsqVt0tDztDV6s0YP rLZUUzN5GBArmRxhBrU4CgpaqckzEomtjSbQFOcKxb5ejH3CRQUQJSXtxir1 T9Qutf6SW1llGICbZ+xmGRPv902B7GJU3TqYPlNQRxC4O84pBah36FgH3zjd DB0QcBzqBgSP8.h2TFp7EYkuSLwYrwEMkHICtYRvcWxyWk037uVZBwUEe3Mj l3b6zj91eMgscKsT9F1brGquRd7AIKDOjV4e61gsm3mUWuLpFEoY6ndTDh+c WJ0l8wOMsMi3R.8vApv3NXDBI31Ehj794PCsiSYEcSd9snLJ9IV8dNuY7rCX bg9zPptTgaZaScPYHQ1XMUcTFh24HBEQbZ5vkLzchjlNqgtJPtvlH98P.O8D X9vp5vSgpfRExQndZWDY+onEFlUJie7IHg4t196oPU99x31XilVRMeaxSnUB FORvx4c7QlVXhd0mGYIITdWdlwRJxkmqpABlOnUNmRDUmo1woqMjPiAR9yJj NRAF.Sn6KYZdW4NZUQOlvyJjvi.QNyJhbGAhPy6x1cGhbFYcx4CQgSekaYSR x1EcBU+mMNPyRG8jM7uc3Q.Gqe3BYwXJiEdA5p7gWV7ee960JB -----------end_max5_patcher-----------