increment and decrement automatically?


    Nov 13 2006 | 5:38 pm
    this seems like it should be easy, but i don't see an answer anywhere. i need to increment and decrement sliders automatically rather than using a mouse click to control it. the objects i'm working on need to monitor their own audio signal level and decrement the level when the signal clips, and then gradually increment the signal level until it clips again. IncDec works to increment and decrement, but is only activated by a user's mouse clicks. how can i use a bang or a message to increment and decrement a value? thanks!

    • Nov 13 2006 | 5:55 pm
      it sounds like you want to normalize the sound input level?
      take a look at the MSP normalize~ object.
      If ive misunderstood, you could use counter, and change the direction. Counter with no arguments will just start counting for each bang.
      v a d e //
      www.vade.info abstrakt.vade.info
      On Nov 13, 2006, at 12:38 PM, collin wrote:
      > > this seems like it should be easy, but i don't see an answer > anywhere. i need to increment and decrement sliders automatically > rather than using a mouse click to control it. the objects i'm > working on need to monitor their own audio signal level and > decrement the level when the signal clips, and then gradually > increment the signal level until it clips again. IncDec works to > increment and decrement, but is only activated by a user's mouse > clicks. how can i use a bang or a message to increment and > decrement a value? thanks!
    • Nov 13 2006 | 5:57 pm
      Accum ?
      On 13/11/06 17:38, "collin" wrote:
      > > this seems like it should be easy, but i don't see an answer anywhere. i need > to increment and decrement sliders automatically rather than using a mouse > click to control it. the objects i'm working on need to monitor their own > audio signal level and decrement the level when the signal clips, and then > gradually increment the signal level until it clips again. IncDec works to > increment and decrement, but is only activated by a user's mouse clicks. how > can i use a bang or a message to increment and decrement a value? thanks!
    • Nov 13 2006 | 6:34 pm
      yeah, i'm not sure normalize~ will work because what needs to be adjusted is often feedback or input levels, not necessarily just output. but i'll give that one a try. the [counter] idea is a good one and i think it may be the one i end up using, counting up at very small intervals and when the signal clips, dropping down a bit more quickly. thanks for the help.
    • Nov 13 2006 | 6:36 pm
      hmmm, accum also looks promising. i'll have to look more into it (i'm still a bit of a novice and don't know some of the objects very well) and try all of the above suggestions out and see which works best for this application. thanks roger.
    • Nov 13 2006 | 6:59 pm
      Collin here is an easy way to decrement - increment, adjust to your own needs...
    • Nov 13 2006 | 8:39 pm
      Don't forget you can send "inc" and "dec" messages to the inc/dec object (which is then connected to the number box or slider, and the number / slider connected back to it). This might give advantages over counter, not sure. Using a number box with appropriate limits seems the best route.
      Here's a sample patch with some ideas if you're still looking around. I think the first example is the most promising for your application, but I'm not sure.
      It's a bit more of an issue than it first seemed because of the way the counters, number boxes, and inc/dec objects work.
      --CJ
      -----------------
    • Nov 13 2006 | 9:02 pm
      Hi Collin,
      The linc object from the Lobjects is also very flexible. I use it for most of these things
      Falk
      Am 13.11.2006 um 18:38 schrieb collin:
      > > this seems like it should be easy, but i don't see an answer anywhere. > i need to increment and decrement sliders automatically rather than > using a mouse click to control it. the objects i'm working on need to > monitor their own audio signal level and decrement the level when the > signal clips, and then gradually increment the signal level until it > clips again. IncDec works to increment and decrement, but is only > activated by a user's mouse clicks. how can i use a bang or a message > to increment and decrement a value? thanks! > >
    • Nov 13 2006 | 9:06 pm
      thanks for the patch. my version of max (i'm running v. 4.3.2 on windows xp) doesn't let me send inc and dec messages to IncDec. when i click on the messages you attached to IncDec it tells me "incded doesn't understand "dec" " and the same for inc. but the counter works well and receives those messages. maybe newer versions of max let IncDec receive inc and dec messages rather than just mouse clicks. when i have the $ (i'm a poor grad student) i'll upgrade. or if there's some other reason it wouldn't work, i'd love to know.
    • Nov 13 2006 | 9:08 pm
    • Nov 13 2006 | 9:10 pm
      thanks for the reply karrrlo. for some reason, i can't get your patch to open when i save the text. Max just opens a window that shows the text. i don't really know much about the conversion from patch to text and vice versa; i normally just copy the text into notepad and save it as a .pat file. if you upload a patch, i'd love to see it. or if there's something i'm doing wrong, let me know. (by the way, are there instructions somewhere about how to make patches appear as text to be posted to the forum? i still haven't figured it out.)
    • Nov 13 2006 | 11:49 pm
      Hi Collin, just copy the "text" and in max select : file>new from clipboard and a nice little miracle will happen ;)
      best
      Quote: collin wrote on Mon, 13 November 2006 13:10 ---------------------------------------------------- > thanks for the reply karrrlo. > for some reason, i can't get your patch to open when i save the text. Max just opens a window that shows the text. i don't really know much about the conversion from patch to text and vice versa; i normally just copy the text into notepad and save it as a .pat file. if you upload a patch, i'd love to see it. or if there's something i'm doing wrong, let me know. > (by the way, are there instructions somewhere about how to make patches appear as text to be posted to the forum? i still haven't figured it out.) ----------------------------------------------------
    • Nov 14 2006 | 12:26 am
      Quote: collin wrote on Mon, 13 November 2006 10:38 ---------------------------------------------------- > this seems like it should be easy, but i don't see an answer anywhere. i need to increment and decrement sliders automatically rather than using a mouse click to control it. the objects i'm working on need to monitor their own audio signal level and decrement the level when the signal clips, and then gradually increment the signal level until it clips again. IncDec works to increment and decrement, but is only activated by a user's mouse clicks. how can i use a bang or a message to increment and decrement a value? thanks! ----------------------------------------------------
      you should not use messages for this at all, but a signal sent to a [*~] object.
      you do not even need a [line~] for interpolation when your control sognal is (probably) coming from [rampsmooth~] or [avg~] or similar.
      -110