Thoughts on macros to return to zero
-
Tall-Timber
- Posts: 24
- Joined: Mon Jan 07, 2013 9:21 pm
Thoughts on macros to return to zero
For a while now I've been wishing there was a way to turn a macro up any amount and then have it snap back to zero value after you're done turning the knob for momentary-like effects and so on. I've had no luck finding info on how to do this, no idea what to even type into a search bar to get good results.. so I'm hoping someone with knowledge on m4l may have a suggestion or a device that already does this. Lemme know if you've got info or had the same idea! Thanks!!
-
chapelier fou
- Posts: 6358
- Joined: Mon May 15, 2006 12:15 pm
Re: Thoughts on macros to return to zero
sounds like a good idea, but you should define exactly what should cause the value to return to zero : if the value didn't change for x ms, manual action, etc ...
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1
MacStudio M1Max 32Go OS 12.3.1
-
regretfullySaid
- Posts: 8913
- Joined: Thu Apr 22, 2010 5:50 pm
Re: Thoughts on macros to return to zero
It should be easier if it's specifically for the mouse, then you can use an object that bangs when the mouse button is released. There's also the 'selected parameter' in the LOM and that could help with the mouse recognition switch (if you don't want the mouse to poll all the time but I doubt it's an expensive resource to keep on)
If you'd like it with any macros from a controller that would be trickier, but at least with the 'selected parameter' element it's mouse dependent anyway so I would go that route.
'Selected Parameter'---observe 'value' --- when the value !=0 (or 'min', or 'default') ---turn on mouse polling---when mouse btn is released---set 'value' back to 0 (also considere using the' line' object if you want some smoothing so it doesn't go straight to 0 instantly) --- turn off mouse polling
If you'd like it with any macros from a controller that would be trickier, but at least with the 'selected parameter' element it's mouse dependent anyway so I would go that route.
'Selected Parameter'---observe 'value' --- when the value !=0 (or 'min', or 'default') ---turn on mouse polling---when mouse btn is released---set 'value' back to 0 (also considere using the' line' object if you want some smoothing so it doesn't go straight to 0 instantly) --- turn off mouse polling
-
regretfullySaid
- Posts: 8913
- Joined: Thu Apr 22, 2010 5:50 pm
Re: Thoughts on macros to return to zero
Thought I'd give it a go a little bit ago. The mouse way would only work on a patch, so you'd have to mimic the macro and that seemed like an extra step a user shouldn't have to take, so I went with the timing route.
I was going to wait to finish and do a little polish (and add a springiness option) but here's where I'm at:
Open an Max Audio effect and paste it in there, then you can save the patch right next to a rack. Don't forget to right click on the patcher itself so it will save in Presentation Mode. Then you can just save it and close the Edit window.
The main problem I'm having is with live.remote~. I've never felt the need to use it before and have had great, fast results just using a live.object, but this time using a live.object is making a slow, choppy return to default (or min or max, depending on which one you want it to go to.
Technically it seems to be working most of the time, but the macro will grey out and the ID will end up as 0. wtf?
You guys having any problems with it?
I was going to wait to finish and do a little polish (and add a springiness option) but here's where I'm at:
Code: Select all
<pre><code>
----------begin_max5_patcher----------
2110.3oc0bs0iiZCE94rR6+ATdNMBeEnOToV0G5KUpuupJhIwSFVw.ofyryt
q59au9B4BYHfmPL1Mq1Ahg.e9yGet4C78O9gYyen7UV87feN3SAyl8cQKyTs
IaY1gFlM+4zWWmmVqNw4EruT9vmmun4Xb1qbU66pX6XEaBx1b7Xk644LN+q6
X5aw74A+8gisKku9orhsqpXq45CCo3kjEAX.TtgBWFtH.DuL7zOpX+yYEhKo
BIfCs9XYAuN6apaBHT7qNq8hzmUsO+WqxRyC9sx7SvSb0zHr8kSzAj+.Qm7m
.34pF+2O9A4VwlEilm9V9xMr7z0rdnoECRUHfjiPT0FxPTE79RUvtnJz8mp1
ksiEPBCGo.EJAH4GBXZYoNEnf2NK8LqtNcK6szT1lfalhPHhjUvwTEEEpnH5
4TjXdcMqfmxyJKZ0s5l6N+zOen.uLRLT.PW89XORO49KYlm8BaYE64RN6Gy6
SBDnUoEgkcXZxzJAF1AYPNdt0ouv1rRzl.sqR47prG1y0VClchOlMe0NVUcV
MmUrViG8AZny6Jstg8HqJu7K2pzLHQoODjDojx7.KHiv.hXzfKlxcUp3gzhs
8SGXhRfCAPxMvvC+cH5vDCiQVPQFEsjbyJxRTi1Hb70TvL455wj6uhGdviAO
dcN5w7xTtz8A8N8acDqYLHUuQMyYxlrzoODXa3DQieo0LdvKo46Y2rDFQMMp
wahDpO3dJzRl1zVEFIS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m having is with live.remote~. I've never felt the need to use it before and have had great, fast results just using a live.object, but this time using a live.object is making a slow, choppy return to default (or min or max, depending on which one you want it to go to.
Technically it seems to be working most of the time, but the macro will grey out and the ID will end up as 0. wtf?
You guys having any problems with it?
-
Beni Shoga
- Posts: 5
- Joined: Mon Oct 29, 2012 12:06 pm
Re: Thoughts on macros to return to zero
It isn't in M4L, but Touchable for iPad allows you to do this with it's lock feature. You can configure the time taken to snap back to the original value in 1/16s, bars etc. one of the most helpful features of Touchable.
-
Tall-Timber
- Posts: 24
- Joined: Mon Jan 07, 2013 9:21 pm
Re: Thoughts on macros to return to zero
Totally forgot about this post. I saved the code in an audio effect device but don't really know a thing about Max and I gotta run out the door in a minute so I'll give it a go later today. This is super cool.

