dial is active?
Is it possible to determine when a dial is active (ie, is currently being turned) or inactive (ie, is not being turned)? I want something to be triggered when the dial starts being turned, and then again when it stops being turned. Any advice most appreciated.
Does this work for you?
----------begin_max5_patcher---------- 683.3ocwV1sbhCBFF933UAaN15DvjpYOam1C5A6cPamNXBFYk.YHjQc6z68k PBZ7mXhZ21S.yG+8xCueHuOvwclXMI2E7Svy.Gm2G33XBUFvo9aG2T75HFN2 zM2HQZJgqbGV0lhrVYh+jHCP4JAHSRx0c.qnBNHUDS.5fo3k55EzbvJgbo9W DvJ7FvFQgtlqFA.OJwqzSfooe+vik+LRO36Jmgg.gDDKwIlVioXVYyGsPirh hQ4jHQA2nr6qCNWvU4z+RJiAQi7pCmgUQKn7j2jjHUEHlDnaEfPlJXfWY0zv QdfWqGCM1rkEy9ycnI1EkWjR4LhxfIXiEkiSMKp6ujZk2n6hBks+dkA+Xvfx hg23IwCKHZlvS.FZyiIx4Ere7B+E9Sz3XB2fWs106W.CuormZ.pzmeh4aA7o YouEZMP+ac2icnEEbB1dOpAa6+wj+3p4Jn04poHZdpz77y+a67SIRRXD67UM YpMYjpcmKsDnuddbBmZ1zPjoxGZK2Mtiw13Z68jVGSOnF5rTae1.uB1vIqzq yQV6BdFNZIvC3cVrM7.50eOUMUP9UloPyGdsj568oXcPWAdRI443DxQ7IhQv xVQyM.DeimY7Diaa5o4AL7j7.cg73ZrKrn3V20LZtwQXqqMHcmag1K2BYK2N tYBo9tUS1uMRhRh44YXIo51PXmfMrZQBGWsVAWVdHb6sWLQjFnMzRORL8ulD yhzYDYWYeyv7javsMtxtUcidaoe9eaYewMlsiHvbl.qtTy01xycws8tooAsM ldXXtx6sMqg4s.G7XQiNKiuOuxEExHKRrNU.ZqTiI45mnrUoOu6uU.61OKLO WoooNkFmIzdrZQ.d8jmd8USkWfCfcnI3WpjLXxqKL480povdnoCD9+cM0CIc KJR+wGC9GvpTgvD -----------end_max5_patcher-----------
It should technically be possible to make circular dials work like this too, but someone better than me would have to figure out the math behind making the LCD output the correct values.
I would do something like that :
----------begin_max5_patcher---------- 476.3ocyVtraCBCDEcM7UX40oQf4c20uipnJd3j3JvFANpoMJ+6EafDHJ7Hh .sarECF668LCCbRUAFvNhygfWAuCTTNopnHCIBnTcsBLw+XXretbYPJ9KVvm vUk2hiOxkgSyHTdcT5gDBMFykOgdUvsLJOm7CVFCsV65ZYG30KtNJIRtqEmz Kn5cM0mGtmP28QFNjWJYGqh8AXXVMIFQZq0.aZblT+D4YBeKi3GCE23rppXX 0zrLGP.AS2xnpnkg3emhK8FTBT.LvmtCdwQM.ioSOjwVS.Ccjbxxcs0rPFNa 2tXbuLnsY06yr2yjFNCl9QdRSZ3VOB177Rx520bnGIA+3d1sGOqqIcKxprlG MSY1NvAihE0ifm.V5rtWVv2Wgug2H3CRxGamktmP.PaF6ITyltJcLMFtmfq1 eQ2xB6ki2Rh43roymNek59PwbXnXImr8lInDIdtmPaxswL+Nx71CZxxQyKis 5SJ2SXLgd6uCH2NQ711KmcHKrVV0uUBtxsHbNmP84DFs4hbasn8jnHLs4G9S HQorhp6JQzQq7wpIwmHA5CoIukUSFigSdsD9hnoA4jyxxIyQvoaf4hTOMnlL WVMYOFMsr4tadM+eQ8jwXxcnIHohKNq9KH0RJjN -----------end_max5_patcher-----------
Thank you both for your responses, but I’m obviously a total newbie because even though I copy the text from the forum posts, the "paste" command is not available in Max 5, and if I choose "New from clipboard" it simply pastes the text itself as text, not as a patcher or object. What am I doing wrong?
From the sticky:
"Opening patches posted to the forum
Max can create objects from text on the clipboard in the old Max 4 text format, the Max 5 format, or the compressed format.
Because there may be a lot of text involved in the patcher data, the easiest technique for selecting all of the data is select a line at the beginning of the text, then scroll to the end of the message and Shift-click to select the end of the text.
Once all of the text is selected, choose Copy from the Edit menu in your browser. If you are manually selecting all the data, be sure to include the begin_max5_patcher and end_max5_patcher lines in their entirety.
Switch to Max. If you want to create a new patcher window with the patcher data you’ve received, choose New From Clipboard from the File menu. A new patcher window will appear with the objects from the forum post.
If you want to paste the objects in the forum post into an existing unlocked patcher, choose Paste from the Edit menu."
Here’s a method that can tell you when the output of the [dial] is changing rather than just when the mouse is released. It triggers a 1 when movement starts and a 0 when the mouse is released. It also outputs a 0 if no movement data is received in the time specified in the number box.
----------begin_max5_patcher---------- 545.3ocwV1saiBCDE9Z3ovhqYirMl.YuaeNppp3GmDWA1QfQMsU8cew1gDZj H3Dnza.4Ayv2Y7Yv9SWGuTwQZsG3ufm.NNe553nCoB3bZriWYxwrhjZ8z73z 2Dou54adjjdTpCWJZpoaYERZU2yNjHy1y36dohlIMehnfUPe.BST2VuQcECW AAOe5U1J3RdRIUmx+UwRJ5RFuojwKnRMDnKAEMxqipRRM6CcRP31ugILKWm0 V3+CF0kVyqKe+.0.nmG3Y0S9x0Ucw2xhhTraWAcbguYcmjuR32g75oCT7f5f wkOlTFX88PkJiiIPLJVcKfLuqrPqWYQgdymly1mv2YwpZjVtgv4UzA1KZxv1 YeiUve9cDR.b7RCwziS9s5zQ3EqCQB1BRAnQqIazkDz5feM6BbvZx1BQh1rj 157mloooL8laEfIvKUi4t2AacwH7l9itJwb5SxoEIu2p0a08fHg82n7gsJ3I 19DLX04wKK48fcvljvH0UiEgLCaTNhi+aBQ+s7JX7qOXjlVU7uqtZQSUVW9N 4o.WHNmVKY7DISv6Mm1JK.cdN6Y44Td+s5JY4GDsVv5ttkMqBUFBj4bDwmGM vZfsrpNJznvp9KZuIMJsSjofe.jPgDcIinOAVL97fIxp5mo.7XvRtOXw30Z9 hP8fMBMOvNVk8JGwO8hslIjEcKKHR13+fKKRw1vT3xxDwFlhWVlv1vDYBL0N 3K2+CPNO2EB -----------end_max5_patcher-----------
(Doh, I forgot to include the "begin" and "end" blocks when I copied.)
Thanks very much for both these example patches – the mousefilter is definitely the kind of functionality I was after, but I was hoping there was a similar functionality built in to (or able to be tacked on to) the dial itself, since ultimately it will be controlled by an actual physical dial, not a mouse.
In the meantime, I can build the software model using mousefilter, and hope I can emulate that behaviour later on when using a physical dial.
Thanks again for the help (and patience with my irritating newbie problem), most appreciated!
This will work with a physical dial input. I’ve thrown in some [change] coolness as well.
----------begin_max5_patcher---------- 1135.3oc0Y1sbahCEG+Z7SgFtp6rtcjDfMduqOGc1Iivn3nt70.hzz1ou6KH AXIaP.1NXmKhRhPB8+7iiNbzgeuxxNH8MZgM3e.eCXY86UVVhtp6vp4+sriI usOhTHFlcYLMozds7JIkwok7HJWbMmldkcw+YFUdisYIb60.awOf+sYTOmlv KX+RLFD9KvltYbZbyJk0tLjH1gDw3Z5nVCwogh4ha5Kiv2+BK4vS4z8b4Bif dU2Wf+l51Mn5VL7KvNITKwFiuqOVnXwSC99mc1nXmrjVyDoX.IjXgHr+ZNiD YWeg+rZUcy5IxyD5OpVq1EhSeSnc6bPYVX5OR5mzngH8n38EVXHUikCysMvi sZbSkQN8xH3RvnLiLBZFD8Y1dBSEsSZ8NFsa7b8MTWWZdi01XtUSfEQeklWv RUe3XYeTcdt05YmnEs0SpT+ipqBhGhR2+ezPEq2xNj97btGoYzjiiWvCsF8Q xRxxoEzDNg2Hb00kTFwepe7qe8mI6oCN4dwnk8gbVXZRsHzlYc2sKW8STgI5 opawHRHY8LYdZZT.I+UVAKHhp8bnxAkjvhIbJmI0CF1MOVbVdcLN06ULkSBI bhd3kSB3p3AnsIPqeSaFz2PTnugX3MEF1XL7lCIJkwDvmt23r8GvSDwY6QLE evpMFg7OVe6QUkea0S+Pf70MCxKUsNbv1KGmXAN82NFNw6drwIGX1uyHGES8 JX4NADkstaFEk9O5nrKwm4BxpId0tjRL5fFEiaerw39WHIGn.H3yCCSGi6tW 2k3pH1905e1jM03a0c+f.1+9tCVjRZpagiBVmG.vJVyKb68yQojS3kgWTKvQ W6fumFMHTTg+9z3pybIc.5CGGyuIhkLT9MBwVe894TQZY99Vas8kd.ckGRK3 rjtrM+1wjMNYfGOmipYDyByRqb55Nz2jdxNac6OQc2iAdW081On51Yp5d6ik tcmpt8enzccLiooamOn518Fp6lNqL.YA.JHuRCepZYphX+DgyyYAkbYHS0BB TcV9.RTS0B5deT2we68XyuWm01vkF5X9qNRgaSwdJ+ECffvYV4wfpbUpSzn8 2pIbLmJCIOmFV99T2clpLDt+JCgWhJhUkfPXLsnnt3D25JG1GV7UwhumIrf7 Wfho1llxYUSkVP4f5J2.9TbwecqJXH1UZ+dxSNgLZ+KRwjKiCn48ad3QpNuX KxU3DHgfmwpEifK.D3oGNDQmo6uVfggi.335c73w0s8YkC3oe61lyAvqw7lw yVXi4J2Z6Z5Y6c7ikDRiH+7Bh4cwt7RrfkQ71YDKd2u2FvAnExMAqFBvrah6 8yMgCB.AyL3nVBDWtqRy2TxwHZvK.ZBU9TTSzoPurClLxlOaHpss2WALZvQw rzqifzxNMe+F667770N1wP0LXi1fN+6h1at8mQ6opIzTjDd.IAeWjDFOAM4t rRpZ0PinHLdwkzXPxaQUDxeBRBAWVMAmHlPKlj7lfh1rrPZBJZYct2LAE4un Jx8cVQU+yeV8+LOG.vB -----------end_max5_patcher-----------
Well, wait. Is the physical dial similar to the ones found on the protools ICON boards, where they are actually touch-sensitive? If that’s the case then it’s just a matter of figuring out how to pick up the touch sensor output from within max.
Thankyou Timlloyd, this works perfectly.Analysing the patch, am I right in saying that basically the uzi is firing 100 ’1′s to the toggle for every message it receives from the dial, which prevents the ’0′ from being noticed until 200ms after the last message from the dial?
The physical dials will be plain vanilla potentiometers, without touch-senisitivity.
Yes, the uzi will fire 100 bang messages as fast as possible for each bang in its input, preventing the [t 0] from turning off the toggle.
Not 100% sure if it’s necessary, the patch will probably work just as well if you replace the [t b b] with a [t b 1] (connected straight into the toggle), its just the way I happened to do it. But I suspect that using uzi will make it more reliable.
Another thing you might find useful is giving each dial a mouse-over function, for example a toggle is turned on whenever the mouse is over the dial, and off when it’s not. Could be used to distinguish between mouse-control or hardware-control of the dial .
You could do this easily by giving each dial a unique scripting name (using the inspector) and using the [hover] object. It will work using hover, sel and trigger. Remember that sel can select messages as well as ints and floats.
IF you don’t get it working I’ll post an example.
I had an example ready to post, but for some reason any vigorous movement on my MIDI keyboard controls crashes max……..very odd…..I think I need to check that my search path is all in order. hmm
The [uzi] isn’t really needed. See the patch I posted above, it is very similar and will do the job for mouse input or not. Be careful of overloading [ctlin], it’s a bit buggy. Using [midiin] and [midiparse] is better and might stop the crashes you’re getting.
You’re right, the uzi isn’t needed. I just tried your patch though and with the control change value from midiparse connected to the dial the toggle flickers rather than staying on.
Also just managed to crash max again by using midiin > midiparse with vigorous midi input.
It may be a bug with my keyboard or with max, not sure how to find out.
I’ve been having issues with max for a few days though, It is really unresponsive for a few minutes after startup, and I keep getting the harvesting metadata load-screen nearly every time I start up. I made a thread about it hoping someone could tell me why it might be happening, but It must be to do with the search path. I may have some duplicates of things in different locations that are confusing max….gotta fix that
Try increasing the [delay] time until it reaches a level you’re happy with. With regards to general max problems try quitting and then trashing your preferences, that seems to sort out most little problems although it could be something else entirely.
Ah, okay, thanks lh, I didn’t realise your example worked independently of the mousefilter. Thank you very much for this, it is very instructive, especially as I am very new to MAX/MSP, I am learning a lot from these examples. Thanks again all, I really appreciate your time.
Its entirely possible that I’m being really stupid (need some sleep) but I still can’t get your mousefilter example to work without being mouse-controlled.
With a metro at 10ms counting between values 20 and 100 of the dial or with midi input, the toggle still flickers and prints alternating 0 and 1 regardless of the delay time.
----------begin_max5_patcher---------- 839.3ocyXsriaBCEcM4q.w5oi70lWo652QUUEI3jwsDSDXTmoil+8B13oLoP hIXr5h.BGi04dtuNWdciWvtxmo0A9e1+q9ddutwyStT2Bd8O6EbJ648EY0xs Evo+pb2OBdP8WB5yB4xmqXbgd0CkbAO6DU9OeohkUn+GdyIFufJjmEzuHKWt w1i8S3jA6rrQn2JZvIWy9s7jA7i5kOWQqobQlfUx+dEcuPYQgc6vmDmzcC0e w+a5WJSr+IF+3vWHR9BH4dIgcWwxWo6MdayltKOXHQIJOdrfZrgGOtgq2pZI wKmoJjFzQ2WyTvQRaAhzFwBLkI74mnhpRe.MS2NdDqO75V+Dt8+gT1kwOZBq n7yQoqAqrurgKnU931StkblK6DMB6PFmcBmI6HyP8Cz+LLBJQEGg.GlMjZ4j Ak+FGpxqA8Ua51E9nkW9ChsSdvs3Chpd.ntEtFoA4zhrWZOUKTc.RbT0AEs. oxaaWEZQ3uyGrPeRz3TB9dnjGLMfAhrQiwIXlF94r8+b4TSrcXl9hk2hX.zf hjgaWk1rrb14rpZ5x4lIZylLSt4xtHid6ZrVxftv.JcsXMF2BYZtohbx.0ZJ YqVmPJapoGXEsZSr.q.1gVtdtEgHIkXYZU7VGJ.ArsBjdaAGBqmdbKMCFDce yfMlQaw4olRt8SssvrPoQXhZij6n1no8N5iI.YjcDZczaXCYoNpHnNguW50J I.6fcjfAH6DvbnnLSFtXpVLMKEFppNRVFM0bZmM5HDYUYWFHUGMfDVmbGKNB CwUeeCkbTcKykEZjOmrgY1uTE0aRXNRpFRM5d3klh7.BJX7K+HlxCra8OZe0 kMU60XPOHkO7NNxo0BFW9cDGroVw.9+86F9DKOmxG1QrUq44x1H2dLLAYOKH gtAj5lI1gXBL.RWf6UGRolPSQt00QLAStERgl35HtESwlfoPmhoXCpC3VOGX BK41RSWT0YBVJ1oXpKLAeCH4VDgMfjbavMXBj.GiISJLAo+20lCbbaNSDnPb OjtY4av8XBa4HbbZ7iQcCnGql0.+9SKDsFIS.OSvBgcvC1BC.q7okVNCVAzt PLEY.jHeHw4lHhf1JYrXoyFGk99SWLwwl217Grv.StJ -----------end_max5_patcher-----------
Cheers Tim, you’re absolutely right, my bad. Remove the [mousefilter] and use the simple delay technique for non-mouse controlled objects. I didn’t test it with any other form of input. However if you do want to use this method with a mouse then its A-OK!
Its actually really odd that the mousefilter stops the previous 1 and bang message from working properly.
It doesn’t really make sense to me that it doesn’t work.
edit – actually does make sense to me now – mouse button is up when using metro+counter or midi therefore letting the values through constantly.
Hmm, not sure I understand – I’ve completely removed the mousefilter from this patch and it still works perfectly. Mind you, I’m still using the mouse to control the dial. Are you saying that it wouldn’t work if I controlled the dial with, for example, a pot on my midi keyboard?
It’s because when the mouse button is up, such as when using MIDI rather than clicking on the dial, the mousefilter lets the values through constantly, and each of those values triggers the [t 0] object really quickly, turning off the toggle and making it flicker.
It will work with midi, as long as you don’t use mousefilter, because it is using only the output of the dial to turn the toggle on and off, not relying on anything else, if that makes sense.
----------begin_max5_patcher---------- 611.3ocyVssbaBCD8Y7WwN7bZGD2ZnukuiLY5fg0XkBRdfkI1MS92qPBRI0W hnf8zGrvZ0JMmyQ6E85JG20x8XiK7c3Qvw40UNNZScFb5m63VktOqLsQ6lal rpBEj6cl0HbO0aWzPoBp7.P07hBrFyGbZiTPhzJT63C07zxgUDsUbQIR5yl0 ajmqcTt94uvhF4orkFb0azI2v+k9jY9ecv7tTJaKWT7iZLiLrKwSsJ3GE08g wze7U1fm51xaqV0Mbmkhv5VhjBqIQvoIwfqFSzgcnAptqSEEtvSmmLwiIiu2 r3h.eQAxitOIXCrFXKvUn2oYevkuBORT1TJSUgc8pi5KWEEZgH4qEov3YIRm KpWgxcsTCHEp39W1hBPQwFDLAH.uAZ2MroRt.yjsB8N8mstlrTYFrHsPwRLo FlYAgKrRQs0BkLAzVDpPpVBohbHqjm8S0+NnztZD3l00f7JIaeawjMSdWfQ7 hhmkpUgMMoE3QpVbvDS.8Olw9Wt5is4eWLWKYbHTXhdx8KaAIch0FdIg0KPQ ojafnXJ.wh0hRbxrJ.kOExwlX+FSoUKnhIjO78w+IpPxhhRzVx3GOQxXWag. uqWqSS4s+z2aFotgKSXpkOnvLFc+0PTzkvwZvWcxJsYphSzIDmy7rpvIJNcA LpmSL7yt3m9BddrSpU58q6b8WusVedc1+n.1HaqyFvyvil.u2gQN1PbQJwUO 5bjSAevos77bTLtYVEOemTwmdPblqSqwThMXx6+OLoZ.BraGjX1HSI2TYpqN xmKS21votB6eNlBusXJvl6N1LvjZxaq9MLgYVBD -----------end_max5_patcher-----------
Forums > MaxMSP