You don't really have to do that. A comma in a message box separates the contents into discrete messages. So "0, 1 2000 0 2000" sends the message "0" then immediately sends the message "1 2000 0 2000".
So, you could either use two separate indices:
1, 1 2000 0 2000;
or go to 0 immediately in one:
1, 0 0 1 2000 0 2000;
I am not sure whether line~ would accept 1, 0 0 1 2000 0 2000;. I need these to drive an FM synth. I preferably would like to be able to use this data to clear and reset a function object but can't figure that one out (posted in another post). I did find this example that seems to do the trick.
it seems that coll does not accept a 0 (or integers ) as a first element of a list, when followed by comma. (maybe I am wrong).
With line~ we need sometimes to go to 0 first, in deed. To bypass this, here a solution; there are for shure more elegant ways.
Comma is a character that has special meaning in max. Either in a message box (where it divides two messages) or in a coll (where it separates the index from the data) it is treated differently than regular ascii characters. In order for the comma to pass through these objects without the special treatment, it is "escaped". In this case, it is escaped by putting a backslash in front of it. Backslash is also a special character, and it means "treat the next character as a normal ascii character".
I'm guessing these are line~ values generated from function? I highly recommend the "list" output mode option for function, and personally treat "normal" mode as deprecated since it also introduces more inconsistencies in timing.
I also recommend zl.slice and zl.lace/delace can also be useful for manipulating these sorts of lists.
Thanks mzed. That makes sense. I was not aware of that.
Peter, I would like to use function but the problem I am running into is clearing function so I can then send new values to it. I have another post up about it but no one has responded to it. Perhaps you have an idea as how to do that.
Thanks, Chris. Interesting solutions. Love that max is flexible in this way that you can solve a problem multiple ways.