control ramps using line


    Oct 25 2012 | 4:14 pm
    Hello,
    I am trying to use line to transition between two values (0 and 254) in 3 different ways:
    1. ramp up (0-254)
    2. ramp down(254-0)
    3. ramp up then down (0-254-0)
    My inputs are two ints: the first to tell the type of ramp (0 = up,1 = down,2 = up then down) and the time to for the transition.
    I kind of got it working, but I'm still a n00b and this feels a bit hacky/not very elegant
    What would be the elegant way of achieving this ?
    Thanks,
    George

    • Oct 25 2012 | 6:10 pm
      Here's a way using the coll object.
    • Oct 25 2012 | 6:47 pm
      Woow, this is pretty neat, thank you!
      Quite a few neat tricks to pick up, including the , in the coll.
    • Oct 25 2012 | 6:59 pm
      The comma in Coll is pretty handy to know but I've noticed a bug in Max 6 compared to Max 5 regarding ","
      In Max 5, I can add , in Coll via the textedit window but in Max 6, I can't. Hmmm strange...
    • Oct 25 2012 | 7:22 pm
      Hi,
      another approach:
      Cheers,
      Ádám
    • Oct 25 2012 | 8:40 pm
      Interesting approach Ádám.
      Guys, I've got another question related to this.
      Is it possible to send multiple lists simultaneously and transition numbers in parallel ?
      I've slightly modified Fora's inputs and now pressing each message at a time works as expected, but pressing all
      means the messages override each other, and since Max evaluates right to left, the leftmost message is being remains updated:
      If so, now can this be approached ?
      Cheers,
      George
    • Oct 25 2012 | 9:56 pm
      Hi George,
      if you wanted to execute all three messages in a sequence then the patch I knocked up could be tweaked to do that. But banging all three messages at once will only confuse the patch as it requires a system to deal with the influx of messages.
      One way around this is to create a simple sequencer using a counter object that's triggered via the right outlet of the line object (which outputs a bang when finished processing a message)
      Here's an example using Ádám's patch..
    • Oct 26 2012 | 9:46 am
      Thanks again Fora,
      This might actually work if the interval isn't too large.
      I was hoping to have an individual ramp for each pair of inputs,
      running multiple ramps at the same time. I was looking through the documentation
      and I'm thinking about encapsulating your solution and using JavaScript to create
      multiple instances which can run in parallel, then remove them when complete .
      Does this sound reasonable or is there a better way to handle this ?
      Thanks,
      George