Momentary button with down/up state?


    Jul 27 2008 | 2:19 am
    Certainly not difficult and perhaps asked a thousand times: how do I make a momentary button which reports mouse down and mouse up, as typical for tap tempo buttons? I don't find the right object.

    • Jul 27 2008 | 3:18 am
      You won't find a single object because this is yet another case where Max users *make* little patchlets that do tasks of precisely this variety. Max simply does not have a single object for every arbitrary task, although the fact that there are so many might suggest that to new user sometimes.
      Whenever you run into these things, your life as a Max programmer will be made simpler [in addition to searching the archives/looking at the See Also menus in the help files] if you ask yourself what it is you actually want to do, and assume that you're going to *make* something that does it using the things you know. Look more carefully at the refpages for the objects you think you know. Break down the task you want to perform into smaller units instead of thinking there's a single object, etc.
      I'm sure that lots of people here would build themselves little clicky things for tap tempo in different ways.
      I'll leave the task of figuring out how to convert ms. to tempo as an instructive dilemma for you [there may or may not be a single object that does it, of course].
    • Jul 27 2008 | 10:44 am
      Hello Peter
      here is on trick to get the mouse up and down:
    • Jul 27 2008 | 10:55 am
      Quote: Olivier Sebillotte wrote on Sun, 27 July 2008 12:44 ---------------------------------------------------- > here is on trick to get the mouse up and down: > ...
      Yeah ubutton of course. Thanks, now I can remove all my [mousefilter] objects ;-)
    • Jul 27 2008 | 12:09 pm
      yep you can clean up now.
      but you know how mousefilter works for the next time :-)
      Quote: Peter Ostry wrote on Sun, 27 July 2008 12:55 ---------------------------------------------------- > Quote: Olivier Sebillotte wrote on Sun, 27 July 2008 12:44 > ---------------------------------------------------- > > here is on trick to get the mouse up and down: > > ... > > Yeah ubutton of course. Thanks, now I can remove all my [mousefilter] objects ;-) > > ----------------------------------------------------
    • Jul 27 2008 | 5:16 pm
      > but you know how mousefilter works for the next time :-)
      Olivier's comment is spot on. The advantage of searching for solutions and trying them based on what you know is that - even if you *don't* get the result you want - you learn something useful that you'll be able to get at the next time around.
    • Jul 27 2008 | 5:26 pm
      Quote: Gregory Taylor wrote on Sun, 27 July 2008 19:16 ---------------------------------------------------- > > but you know how mousefilter works for the next time :-) > > Olivier's comment is spot on. The advantage of searching > for solutions and trying them based on what you know is > that - even if you *don't* get the result you want - you > learn something useful that you'll be able to get at the > next time around. ----------------------------------------------------
      I Agree But I am always afraid to forget what I 've learn during these long hours searching. Because the next time you will need this trick could be in a year ! Of course I save such patches with an attractive name in a special folder, but there are now so many now ...
      re-inventing the wheel is always my biggest fear when I program in max. So a quick search in this forum and www.maxobjects.com is always a good start.
    • Jul 27 2008 | 6:22 pm
      > But I am always afraid to forget what I 've learn during these long hours searching.
      I'm sure I may err in the opposite direction, but I encourage those people who I have the honor of tutoring to think of a small and saved patch as the record they have of their learning, if only to reinforce the idea that one thing that (I think) distinguishes the particularly adept Max programmer is that ability to reuse and recontextualize their ideas.
      One of the other lessons doesn't require a patch - developing the common habit of making sense of an object you either have never seen, or one you haven't used for a while, or one you *think* you know.
      I try to gracefully [and sometimes less than gracefully] suggest that the ever-popular "serial patch grovel" approach to learning Max has a false sort of economy imbedded in it. Despite its apparent "efficiency", the dependence on others for answers actually hinders the development of long-term expertise *and* can suggest that new users are supposed to cultivate knowing some imaginary single answer to any question - which runs counter to what I would say is one of Max's advantages in terms of allowing for the construction of idiosyncratic solutions. I think that working with Max is about habits of thought as much as it is about becoming familiar with imagining the flow of data and its control.
      > Because the next time you will need this trick could be in a year !
      Or more.
      > Of course I save such patches with an attractive name in a special folder, but there are now so many now ...
      And that single fact would suggest to me that you know what you're doing. And yes, my patch pile is insane, too.
      > re-inventing the wheel is always my biggest fear when I program in max.
      To the extent to which Max involves with engaging with a process or developing habits of thought, I think that your fear - while understandable - overemphasizes the "problem" rather than focusing on what else happens while you're working on a solution.
      > So a quick search in this forum and www.maxobjects.com is always a good start.
      Another sign of your good sense. Search first, *then* ask.
    • Jul 27 2008 | 9:38 pm
      Quote: Olivier Sebillotte wrote on Sun, 27 July 2008 11:26 ---------------------------------------------------- > I Agree > But I am always afraid to forget what I 've learn during these long hours searching. > Because the next time you will need this trick could be in a year ! > Of course I save such patches with an attractive name in a special folder, but there are now so many now ... > > re-inventing the wheel is always my biggest fear when I program in max. > So a quick search in this forum and www.maxobjects.com is always a good start. ----------------------------------------------------
      I did this by accident, but I think I may start doing it on purpose from now on: I was toying around with [drunk] and trying to get it to react a certain way, and accidentally saved the help file. I didn't end up using that particular implementation, but I did like it - and now whenever I think of 'How'd I do that thing with [drunk]?' all I have to do is open the help file, and there's my thing.
      It's probably a little messy (a lot messy?) but nobody says you can't add to the built-in reference materials for your own nefarious purposes.
    • Jul 27 2008 | 9:52 pm
      Hello Mushoo,
      your idea is great, many times I said to myself " this help should feature this info from Reference".
      I don't think it could arm Max behavior if we customize this.
      Maybe it could be erased by an update, if the updater overwrite the Helps.
      Thanks a lot for sharing this tip !
      olivier
      Quote: MuShoo wrote on Sun, 27 July 2008 23:38 ---------------------------------------------------- > Quote: Olivier Sebillotte wrote on Sun, 27 July 2008 11:26 > ---------------------------------------------------- > > I Agree > > But I am always afraid to forget what I 've learn during these long hours searching. > > Because the next time you will need this trick could be in a year ! > > Of course I save such patches with an attractive name in a special folder, but there are now so many now ... > > > > re-inventing the wheel is always my biggest fear when I program in max. > > So a quick search in this forum and www.maxobjects.com is always a good start. > ---------------------------------------------------- > > I did this by accident, but I think I may start doing it on purpose from now on: I was toying around with [drunk] and trying to get it to react a certain way, and accidentally saved the help file. I didn't end up using that particular implementation, but I did like it - and now whenever I think of 'How'd I do that thing with [drunk]?' all I have to do is open the help file, and there's my thing. > > It's probably a little messy (a lot messy?) but nobody says you can't add to the built-in reference materials for your own nefarious purposes. ----------------------------------------------------
    • Jul 28 2008 | 11:15 am
      Olivier Sebillotte schrieb: > Of course I save such patches with an attractive name in a special > folder, but there are now so many now ...
      That is, why I created my Max Overview. Basically to keep track with my own creations...
      > re-inventing the wheel is always my biggest fear when I program in > max.
      Don't fear it, I love it. If you want to get an idea how often I reinvent the wheel, look at my Stools collection. I have maybe 4 different ways to deal with rotary Midi controllers. I keep them all for personal compatibility reasons, but to find out what the best way is, it needs some time. Its your personal evolution. (It seems I prefer the less complete, but also less complicated solutions...) Its like learning to walk, there is no way to learn it without falling...
      Stefan
      -- Stefan Tiedje------------x------- --_____-----------|-------------- --(_|_ ----|-----|-----()------- -- _|_)----|-----()-------------- ----------()--------www.ccmix.com
    • Jul 28 2008 | 11:46 am
      On 28 Jul 2008, at 12:15, Stefan Tiedje wrote:
      >> re-inventing the wheel is always my biggest fear when I program in >> max. > > Don't fear it, I love it.
      Same here. It's odd: even though I'm really big on code reuse and common libraries in conventional software development, I hardly ever do either in MaxMSP, despite having a close-to-twenty-year development footprint. For every new project I start from scratch, maybe doing a "copying collection" and renaming of something useful from an old project, and I basically use no third-party externals. (I think in the last two or three years I have used exactly one: freeverb~.)
      I think it's partly an issue of reliability and testing (refactoring is dangerous in an unstructured realtime environment), partly to do with difficulties in specifying simple, robust APIs for components, partly burned fingers from externals which died under a change of architecture and/or OS, and partly an artist's slightly neurotic not- invented-here syndrome.
      -- N.
      Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net
    • Jul 28 2008 | 4:51 pm
      You are right gentlemen,
      I should'nt be scared. Actually, my sentence wasn't totaly true. I had this fear when I started max one year ago. Now I get more and more confident in my work, especialy since I wrote my first real patch : https://cycling74.com/forums/index.php?t=msg&goto=146990&rid=0&srch=sophocles#msg_146990
      I used Max5's objects only to ensure stability, Mac/Pc compatibility and long run evolution.
      If I had to rebuild it now, I would change some sections for sure, but the facts remains, this patch runs fine and can be updated.
      Talking about update, I updated from max 4 to 5 at the very beginning of this project, it was a real pleasure to get all the helps and references so easily.
      Life is definitly easisier for Max beginers with version 5.
      Thanks again people at cycling for this great job, Max deserved this !