Inc/Dec object Float Conversion ?


    Feb 27 2006 | 10:06 pm
    I did a search and found some previous posts regarding storing a number and returning it to a inc/dec object. Is there anyway of getting it to increase by say 0.01 and have it store in inc/dec object?

    • Feb 27 2006 | 10:22 pm
      what do u want from pressing inc ?
      1.01 or 0.02 ?
    • Feb 27 2006 | 10:28 pm
      Yes - multuply the output of inc/dec by 0.01, if that is the
      resolution you want.
      L
      Lawrence Casserley - lawrence@lcasserley.co.uk
      Lawrence Electronic Operations - www.lcasserley.co.uk
      Colourscape Music Festivals - www.colourscape.org.uk
    • Feb 27 2006 | 11:17 pm
      In this patch the left configuration will store the int from the inc/dec object. I can then click and drag on top number box to change the value and then when click on inc/dec again it will increase/decrease from new int in float numbox.
      The right configuration is set up the same but using float but doesnt seem to work this is what I am trying to get.
      max v2;
    • Feb 27 2006 | 11:33 pm
      Quote: Will Pickersgill wrote on Mon, 27 February 2006 15:06
      ----------------------------------------------------
      > I did a search and found some previous posts regarding storing >a number and returning it to a inc/dec object. Is there anyway >of getting it to increase by say 0.01 and have it store in >inc/dec object?
      [110.ATC]
      max v2;
      [110.ATC.help]
      max v2;
      -110
    • Feb 27 2006 | 11:38 pm
      Thanks Roman,
      But how do I get the patch to load properly. It cant find the object 110.ATC. Do I have to save the first patch as an abstraction ??
    • Feb 27 2006 | 11:41 pm
      > > I did a search and found some previous posts regarding storing a
      > > number and returning it to a inc/dec object. Is there anyway of
      > > getting it to increase by say 0.01 and have it store in inc/dec
      > > object?
      well, or ... well that is all what inc/dec does; storing a
      number, and sending (number+1) out again when you click or
      bang it.
      you can reproduce that youself, as seen in 110.ATC, very
      easily with only two objects: [i] and [+].
      -110
    • Feb 27 2006 | 11:43 pm
      But it only stores ints, is there a way of getting it to recall floats even when the numbox is dragged to a new value (as in the int example of the patch I posted) ?
      Or would it just be best to reproduce it myself?
    • Feb 27 2006 | 11:48 pm
      Quote: Will Pickersgill wrote on Mon, 27 February 2006 16:38
      ----------------------------------------------------
      > Thanks Roman,
      >
      > But how do I get the patch to load properly. It cant find the object 110.ATC. Do I have to save the first patch as an abstraction ??
      ----------------------------------------------------
      i suppose that one has to save patches from the forum
      first before opening them with MAX, yes. :)
      to be able to find the helpfile from the abstraction or
      the abstraction from the helpfile you have to place both
      files somewhere in your search path as you might know.
      otherwise sorry if it is my fault that it does not work ..
      -110
    • Feb 27 2006 | 11:51 pm
      > But it only stores ints, is there a way of getting it to >recall floats even when the numbox is dragged to a new value >(as in the int example of the patch I posted) ?
      if you replace [i] with [f] you will be able to save
      and recall floats, too.
      let me know if you need support with the computerkeyboard
      or the coffeemachine, i?ll be here to help!
      -110
    • Feb 27 2006 | 11:55 pm
      I have tried that but it doesnt seem to recall it properly.
      Keyboard and coffemachine are fine thanks.
      max v2;
    • Feb 28 2006 | 1:41 am
      > I have tried that but it doesnt seem to recall it properly.
      not sure what your patch is doing, i dont get it. :)
      here is how to replace indec with custom programierski.
      with this example it will be easy for you to make your
      own indec stuff with any numbers you want.
      i also do not like indec s limitations, would a better
      version of it be useful for you?
    • Feb 28 2006 | 11:05 am
      What I am basically trying to do is use the incdec to alter the bpm, but I want to also be able to drag on the number box to increase it more rapidly but then use the incdec for minute increments. The problem is incdec doesnt accept anything other than inc so its not recalling the number (when numbox is dragged).
      > here is how to replace indec with custom programierski.
      > with this example it will be easy for you to make your
      > own indec stuff with any numbers you want.
      ? Did you mean to post a patch?
      > i also do not like indec s limitations, would a better
      > version of it be useful for you?
      Well it would be useful but what I am trying to do is not essential just think it would be good to have a (int) incdec and a (float) incdec.
    • Feb 28 2006 | 8:35 pm
      > ? Did you mean to post a patch?
      yes, it came with the next mail.
      > > i also do not like indec s limitations, would a better
      > > version of it be useful for you?
      >
      > Well it would be useful but what I am trying to do is not essential just think it would be good to have a (int) incdec and a (float) incdec.
      it is always essential to solve problems as it kills
      some time (time = enemy)
      try this:
      very alpha but works.
      to feed the arguments by inlets just make the bpatcher
      object bigger.
    • Feb 28 2006 | 8:40 pm
      Will Pickersgill wrote:
      > I have tried that but it doesnt seem to recall it properly.
      If you look at this patch, you'll understand why Roman is proposing to
      help you with the coffee ;-)
      You have to feed the Inc/Dec with the same sized ints as it expects.
      Unfortunatly this doesn't work until you round the result correctly,
      thats why my rounding int object from the abhaXions is included in the
      patch.
      This is an updated version of rint, which also rounds negative numbers
      correctly.
      A second solution just prevents feedback:
      Stefan
      --
      [][] [][][] [][] [][][]
      [][][][][][][][][][][][][][][]
      Stefan Tiedje
      Klanggestalter
      Electronic Composition
      &
      Improvisation
      /~~~~~
      \ /|() ()|
      ))))) )| | |( \
      /// _/)/ )))))
      ___/ ///
      -------------------------x----
      --_____-----------|-----------
      --(_|_ ----|-----|-----()----
      -- _|_)----|-----()-----------
      ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt,
      94320 Thiais, France
      Phone at CCMIX +33-1-49 77 51 72
    • Feb 28 2006 | 9:13 pm
      Thanks.
      Maybe I am not explaining properly what it is I want it to store. I want to be able to increment the numberbox by 0.01 per click, if the number box is altered by dragging on it I want that number to be stored and then when the incdec object is used again it just increments from the stored number.
      If I put a * 0.01 after the incdec object the number doesnt store and just increments to 0.01 or 0.00.
      I am confused and having a cold isnt helping. :(
      Plus I still dont get the significance of the coffee..?
      Will
    • Feb 28 2006 | 9:40 pm
      This is exactly what Stefan's first solution does.
      On Feb 28, 2006, at 4:13 PM, Will Pickersgill wrote:
      > I want to be able to increment the numberbox by 0.01 per click...
    • Feb 28 2006 | 9:55 pm
      Maybe I have been connecting it incorrectly then..? As I have it here it doesnt work.
      max v2;
    • Feb 28 2006 | 10:27 pm
      Yes - this is wrong. Go back and look at Stefan's patch without
      altering it first. You might want to take a nap first, that cold seems
      to be getting the better of you.
      On Feb 28, 2006, at 4:55 PM, Will Pickersgill wrote:
      > Maybe I have been connecting it incorrectly then..?
    • Feb 28 2006 | 11:53 pm
      Well I have had a look at it again and still cant get it to do what I want it to do. If it is being rounded down and stored then surely it will never recall the numbers after the decimal point, it just returns it to the closest whole number.
    • Mar 01 2006 | 12:12 am
      > Maybe I am not explaining properly what it is I want it to store. I want to be able to increment the numberbox by 0.01 per click, if the number box is altered by dragging on it I want that number to be stored and then when the incdec object is used again it just increments from the stored number.
      this is exactly what all three examples i gave
      you are doing.
      did you try them?
    • Mar 01 2006 | 12:33 am
      Yes I have tried them but they only seem to store ints and dont recall the numbers after the decimal point. Sorry for being a pain but it just isn't working.
    • Mar 01 2006 | 1:17 am
      Quote: Will Pickersgill wrote on Tue, 28 February 2006 17:33
      ----------------------------------------------------
      > Yes I have tried them but they only seem to store ints and dont recall the numbers after the decimal point. Sorry for being a pain but it just isn't working.
      ----------------------------------------------------
      then your CPU is kaputt mister.
      when [110.bp.incdec.help] is not displaying floats
      for you, then your CPU is kaputt.
    • Mar 01 2006 | 9:24 am
      On around Mar 1, 2006, at 1:33, Will Pickersgill said something like:
      > Yes I have tried them but they only seem to store ints and dont recall
      > the numbers after the decimal point. Sorry for being a pain but it
      > just isn't working.
      Sorry, I don't see the problem.
      The following solution does what you want. Hide-on-lock those
      components you don't want users to see.
      It uses lp.scampi for the float-to-int conversion between flonum and
      incdec, but you could write a subpatch to do the same. It is
      *essential* that numbers are rounded before going to incdec. If you
      don't understand why this is so, than trust us on this. If you don't
      round, the patch won't work. Period. Going from incdec to the flonum is
      easier, a simple multiplication will suffice.
      -- P.
      -------------- http://www.bek.no/~pcastine/Litter/ --------------
      Peter Castine | ^
      | Litter Power & Litter Bundle for Jitter
      pcastine@gmx.net |
      pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
      4-15@kagi.com | for Max/MSP
      | Extremely cool
      | http://www.dspaudio.com
      | http://www.dspaudio.com/software/software.html
    • Mar 01 2006 | 1:43 pm
      I understand why it needs to be rounded etc, but just in all cases I have tried it didnt seem to recall the numbers after the decimal point.
      Peter I cant get that patch you post to work, dont text patches need "max v2;" as a header ? I saved it as a text file but it doesnt open in max.
    • Mar 01 2006 | 1:59 pm
    • Mar 01 2006 | 2:09 pm
      Thanks for that, will have a look at the patch when i get home.
    • Mar 01 2006 | 2:42 pm
      On around Mar 1, 2006, at 14:43, Will Pickersgill said something like:
      > Peter I cant get that patch you post to work, dont text patches need
      > "max v2;" as a header ? I saved it as a text file but it doesnt open
      > in max.
      Copy&Paste since Max 4.5.5.
      If you've got an earlier Max/MSP, you can recreate the patch from the
      TIFF that was attached (not avail. on the forum, sorry, beyond my
      control).
      -- P.
      -------------- http://www.bek.no/~pcastine/Litter/ --------------
      Peter Castine | ^
      | Litter Power & Litter Bundle for Jitter
      pcastine@gmx.net |
      pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
      4-15@kagi.com | for Max/MSP
      | Extremely cool
      | http://www.dspaudio.com
      | http://www.dspaudio.com/software/software.html
    • Mar 01 2006 | 3:15 pm
      Not available to users of certain e-mail clients either (eg. Entourage)
      because, as I think has been mentioned here before, attached .tiff's appear
      with a black background, obscuring any patch cords,
      Cheers
      Roger
      On 1/3/06 14:42, "Peter Castine" wrote:
      > If you've got an earlier Max/MSP, you can recreate the patch from the
      > TIFF that was attached (not avail. on the forum, sorry, beyond my
      > control).
    • Mar 02 2006 | 5:03 am
      > That's sort of beyond my control. The certain e-mail client users will
      > have to either
      >
      > - modify the TIFF in Graphics Editor of choice,
      thanks guys for hjacking the thread.
      that was the only chance it had to become useful.
    • Mar 02 2006 | 6:59 am
      Will Pickersgill wrote:
      > Well I have had a look at it again and still cant get it to do what I
      > want it to do. If it is being rounded down and stored then surely it
      > will never recall the numbers after the decimal point, it just
      > returns it to the closest whole number.
      Did you see the part which multiplies by 100 again? I did not see it in
      your broken version. The second solution I posted is even simpler and
      works... Anyway, proper encapsulated versions for both solutions are
      attached.
      Stefan
      --
      [][] [][][] [][] [][][]
      [][][][][][][][][][][][][][][]
      Stefan Tiedje
      Klanggestalter
      Electronic Composition
      &
      Improvisation
      /~~~~~
      \ /|() ()|
      ))))) )| | |( \
      /// _/)/ )))))
      ___/ ///
      -------------------------x----
      --_____-----------|-----------
      --(_|_ ----|-----|-----()----
      -- _|_)----|-----()-----------
      ----------()------------x-----
      14, Av. Pr. Franklin Roosevelt,
      94320 Thiais, France
      Phone at CCMIX +33-1-49 77 51 72
    • Mar 02 2006 | 7:11 am
      > works... Anyway, proper encapsulated versions for both solutions are
      > attached.
      >
      > Stefan
      >
      >
      note that this patch will only open properly
      when the font "sans serif" is installed on your system.
      - patient 110