Getting rid of some unwanted characters and how to get values in an array (buffer?)?

Jan 27, 2009 at 10:26pm

Getting rid of some unwanted characters and how to get values in an array (buffer?)?

dear reader

I am reading a text file into max with numbers in it. The first value I would like to use is the first string in every newline. It is a 12 digit string which represents time.

1, Now I am trying to get rid of the first 6 character, with no success so far, tried zl and sprintf.

2, I am trying to have these values in an array or something which would be connected to a metro. When the metro’s value reaches a value in the array or buffer, it sends a bang or perhaps a specific number (line number)…

Any help appreciated,
al the best
Krisztian

ps.: I attached the project file and the text file.

#41965
Jan 27, 2009 at 11:10pm

First, investigate regexp; this may provide you with some answers to string parsing. Have a look at this forum topic:

http://www.cycling74.com/forums/index.php?t=msg&goto=159909&rid=0&srch=regexp#msg_159909

For putting the text into arrays there’s also an “ascii-to-data” object, I think.

#149891
Jan 28, 2009 at 11:55pm

very helpful!

thank you.

#149892

You must be logged in to reply to this topic.