reading 1 text byte at a time from a file

Dan Nigrin's icon

I have a large text file, that consists of 1's and 0's, with no spaces, line breaks or other characters in it. I cannot modify this file. I would like to read it into Max, and be able to read its contents one byte at time (i.e. either a 1 or 0). How to do this? The text object doesn't seem to work properly with my file, as I believe the "line" length in my file exceeds 256 characters. I've also tried jit.textfile, but once I have the data in the jitter matrix, I'm too much of a jitter noobie to know how to get the integer values out, one byte a time!

Thanks...

FRid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Filein? Although i'm kinda assuming you've already looked at it?

Dan Nigrin's icon

Ugh - feel silly now! I *did* try filein, but I was thrown by the data output format -- I forgot the itoa missing piece.

Thanks!

FRid's icon

Right under your nose :)

Must admit i was actually suprised it worked. I was expecting some type of header in the .txt-format somehow.

FRid