beginners question - trying to create .txt data

lem's icon

i have a list of numbers in a txt file, with each new number on a new line. call those values x, and the row n.

i am trying to create a new txt file, so that if n is odd it writes x 1s, and if n is even then it writes x 0s. each 1 and 0 is on a brand new line.

really struggling to express myself here :D

here's a patch?

4171.maxinsteadofexcel.maxpat
Max Patch
lem's icon

no sorry i already say what i was doing - the counter doesn't reset when it has x number of bangs but x+1. not sure yet how to fix it tho :??

edit no i kinda did but the whole thing seems really erratic - sometimes pressing clear works, sometimes it doesn't clear... sometimes numbers are added to the second txt, sometimes now. i'm confused!

lem's icon

hi hope this is ok to post like this...

i figured out that you can't change the text while the window is open. that's one problem out the way. and i realized that the patch was not as light as it could be. but it's still not working... i set the metro that cycles through the rows very slow to be sure, but it's not working and i can't understand why because if i substitute some parts with equivalents that do not read from txt it works. very confused...

4172.maxinsteadofexcelpart.maxpat
Max Patch
lem's icon

got this working....... thanks.