Forums > MaxMSP

beginners question – trying to create .txt data

Jul 12 2012 | 4:21 am

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?

Jul 12 2012 | 4:27 am

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!

Jul 12 2012 | 5:04 am

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…

Jul 12 2012 | 5:24 am

got this working……. thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP