need coll help - indexing w float

    Dec 13 2009 | 6:46 pm
    so, i'm using this coll jitcell config in my patch, nothing too weird. what i need to do is have the index numbers be floats. since coll won't accept that, any ideas for a work around to have the first number of the list line (the float)not repeat, or replace the line if that float has already been entered (ie, act like the index)?

    • Dec 13 2009 | 7:36 pm
      You could multiply the float you want to use as the index by 1000 and then using an integer version of the result as the index to coll... this would preserve 3 decimal places. Use greater powers of 10 for more precision.
    • Dec 13 2009 | 8:08 pm
      thanks; it's a good idea, but then the jitcel portion of my patch (through refer coll) displays the multiplied number, not the float i need.
      still brainstorming . . .
    • Dec 13 2009 | 10:05 pm
      not sure if this is what you want to do, but you can have the float be a symbol in the coll:
    • Dec 14 2009 | 1:38 am
      damn, i'm using max 4.6 and can't see you're doing. coll stores things beginning with an index, and a list of whatever and the index can't be a float. i can have my float be the first number after the index, but i need to find a way of making that float unrepeatable (no duplicates), or in the event a duplicate is made, it replaces the first instance. is there and object, similar to [urn] that filters numbers?
    • Dec 14 2009 | 3:17 am
      bbracken, i totally apologize. using [tosymbol] absolutely works. is there a way to limit the extra zeros [tosymbol] creates?
    • Dec 14 2009 | 4:55 am
      something like this?
    • Dec 14 2009 | 5:12 pm
      yep, right on the money. unfortunately, using this method, i'm now having issues deleting items from the coll. neither the remove nor delete message doesn't seem to work with the symbol. am i missing something?
      and forgive my manners, i appreciate the help - the symout worked great (thanks for that)! i wasn't familiar with it at all. makes me think how many other command phrases i'm missing. any reading to recommend?
    • Dec 14 2009 | 5:33 pm
      You have to do some rounding/symbol making before you pump it into the coll. Another sprintf will be your friend:
    • Dec 14 2009 | 5:54 pm
      my whoops. i jumped right in to combining the symout message with the remove message via [sprintf %s %s]. that's a bad argument. thanks again!