Many lines in a text file

I am trying to debug a Max patch that does video analysis. For some reason many of the exported text files containing the analysis results contain exactly 4314 lines. This is an odd number for a computer program to dislike, so I am currently going through the patch to figure out what is wrong.

The first thing I thought about was the text object, which is used for storing the data and write to a text file. So to check the possible limitations of the object, I have made a small patch that writes lines of 60 random values. It turns out, however, that the text object easily handles 1 000 000 lines of random values, and manage to write the file to disk (366.9 MB).

So I continue my quest for the problem. I attach a screenshot of the code below for people that may be interested in this. The code may also be useful if you want to generate huge files with random numbers.

Screen shot 2010-10-11 at 09.24.02.png

Published by


Alexander Refsum Jensenius is a music researcher and research musician living in Oslo, Norway.