how do i print a specific line from a coll?

Sio's icon

I can't seem to figure this out. It's been a long time since I've used Max; I'm probably missing something that would have been obvious to me six months ago. Anyway:

I have a text file with several lines of text, broken up by line. (1, bob; 2, ed; etc.)

When I read the file, it prints all of the lines at once; I don't want it to do that. I would like to load the file and then print a specific line only when a bang is pressed. (i.e. nth 1 2, i think?)

What am I missing from this equation? Thank you in advance for anyone who can help me out!

ch's icon

Hi,

Max Patch
Copy patch and select New From Clipboard in Max.

to read a specific line (let's say line 2 for example), you can either send 2 to the coll, or send "goto 2" followed by a bang. (You may have a deeper look at the help file)

Sio's icon

oh! i didnt realize the coll was the text file! thank you!

Sio's icon

I have another question to this... This one seems a bit more difficult and I didn't realize it would be, but here goes:

I want to take a large chunk of text and automatically line break it after every 5 words (or some number like that). Then, I would like to add "1," "2," "3," etc. sequentially before each line. Then, i would like to add a ";" after each line. Does anyone know an easy way to do that? (Using perhaps Word, Excel, Max/Msp/Jitter or something like that)?

Sio's icon

Basically, I'm trying to make a maxpatch that will create spam text poetry! I have compiled a lot of "spam text", but it's all in big paragraphs. That won't work too well. I wish I could remember how to do this stuff, but hopefully someone can help me out on this. Thanks again!!!

Bas van der Graaff's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Something like this?

Sio's icon

oh, that's perfect! I was up all night trying to figure this out. Thank you both very much!