comma problem

    Jan 27 2010 | 1:10 pm
    Is there any way to insert a comma into a list for a message box?
    If you have a list: 2000 0 100
    Can you insert a comma after 2000 (2000, 0 100) so you can send it from a messagebox as a ramp for line~ ?
    This is a problem I have come across many times In this case I wanted to store a bunch of ramp messages in a coll object
    0, 2000 0 100 1, 100 0 300 2, 4000 0 100 3, 2000 0 700 4, 300 0 600 5, 7000 0 400 6, 1500 0 200 etc
    But coll lists can only take one commas pr line(after the indexnr), so I need to insert it after I have sent one list from coll

    • Jan 27 2010 | 1:41 pm
      try something like this :
    • Jan 27 2010 | 1:43 pm
      You can do it like this with sprintf. I've heard that combine is better to use for efficiency reasons, but I couldn't get it to work with a comma. Anyway, there is nothing to worry about at all unless you're using loooads of them. You could modify the patch by storing the chosen list for line in [zl reg ] and banging it when you want to trigger the ramp instead of every choice triggering it.
    • Jan 27 2010 | 1:44 pm
      Ahh, go with GE's method. Much more elegant solution.
    • Jan 27 2010 | 2:10 pm
      oh, sorry for not mentioning. Im using 4.5 :( Any chance of posting in old format? (or short explanation)
    • Jan 27 2010 | 2:13 pm
      About your suggestion with zl reg. Sometimes it can be desirable to constantly generating 3 random values (startpoint, endpoint, ramptime) Then you need to be able to format it with comma on the fly. Thats another example of the comma problem with messagebox ..... but I will look into sprintf (or your patches in old format...)
    • Jan 27 2010 | 2:19 pm
      here is the max 4 format :
    • Jan 27 2010 | 2:29 pm
      Solved it with sprintf, argument %c sending it asci nr 44 (comma) from a messagebox. Thanks (Evrard, still curious about yours) ....... oh there it came while I was typing.... Ok, then I learned something new about coll formating. Thanks for that as well
      Speaking of that: What is the asci nr for (backslash) Key object showed 92, but sprintf translated that into "
    • Jan 28 2010 | 1:26 am
      You could just store them as normal lists and then use [zl rot 2], [zl slice 2] and patch both outlets to the [line] object. The comma in a message box simply sends the contents one after another.