coll: [1] else/other [2] output csv

    Nov 21 2008 | 1:43 am
    Hello all,
    I have 2 questions concerning coll.
    [1] I have a set of 24 messages in coll. they output when a certain sequence of numbers triggers it. However, there are more possible sequences than there are messages, so my question is, what's the easiest way to say, 'when not one of the 24 sequence, print: Other' without having to type in each possible sequence [which i couldn't do anyways since coll has a limit on how many seq it can take store].
    [2] how/can i use coll to output a csv file? or is there another object that would work better for that?
    thanks in advance.

    • Nov 21 2008 | 3:41 am
      You could use [gate] like this. I hope it does what you need.
    • Nov 21 2008 | 4:21 am
      And this should create your comma separated values file. The left [button] parses the info in [coll]. The other one saves it with whatever name is in the [textedit] object to a folder chosen in the dialog that will open.
    • Nov 25 2008 | 1:31 am
      Hey lh,
      thanks for all the help. i still have a question though, 2 actually! [1] is there a way to set the filename so it's not always triggered to ask. that way it'll automatically save. [2] the values are saved horizontally. to use them in excel against another set of preset values, is there a way to save them vertically?
      again, thanks!'s the patch i've 'tweaked'
    • Nov 25 2008 | 5:58 pm
      You can send the "write" message to the [text] object to save it with a specified name and at a specified location, for example:
      write "Macintosh HD:/Users/username/Desktop/myfilename.csv"
      If you want to prompt for the file and/or destination each time you can use [sprintf] and the [textedit] or [opendialog fold] objects, as I illustrated in the earlier patch I sent you.
      To create new columns you need to insert a comma, which due to its special duties in max has to be escaped. Using [sprintf] and [text] sending "something","somethingelse" would be done [sprintf %s\,%s]. To create a new row you need to send the integer "13" to the [itoa] object to [text] which will create insert the ASCII new line character.