64-bit file reader
Mar 23, 2012 at 3:44pm
64-bit file reader
I am new to Max and still trying to find my way around.
I am trying to find information on how to read a binary file into Max 6. Now, the “problem” is that the file I am trying to read in is structured as 8 doubles. The file is generated by software called BioTrace+ and contains physiological signals.
“filein” seems to be unable to read this file because it can only read up to 32-bit words.
Does anyone know how to get either the file reader to read the information or another way to achieve this?
Any help would be much appreciated!
Mar 24, 2012 at 9:05am
maybe i dont see the point, but reading 2 words from [filein] should give you what you want, no?
you could make a little abstraction yourself with a command for “read w64 at” this way.
Mar 24, 2012 at 9:10am
ah, i know notice where the problem is. :D
of course in maxmsp you can not use 64 bit numbers, only signals, and filein wont read to buffer~
depending on what the structure is like and what you need to do with it you might try to open it as audio and process it on the signal domain. you might need to change or add a wave or aifc header to the files to be able to open them with buffer~.
Apr 13, 2012 at 1:42pm
Thanks for the response, Roman.
I will try what you suggested and open it as audio.
As a small clarification, I am trying to use live biodata to drive hardware. So, I need to be reading from the binary file continuously. The biodata is structured in “channels” (i.e. heart rate is one channel, respiration rate another etc.). In the binary file, each channel is represented as a 64-bit word. So, reading out two words still leaves me with having to combine them and make sense of the data…
On top of that, I would like to read out more than 1 channel from this binary file.
I hope this clarified what I am trying to do.
I really appreciate your help!!!
Apr 14, 2012 at 1:57am
hm, maybe a combination of both? with filein you could search for where the next track begins, then use that for readin from the buffer … probably too complicated …
one of our java gurus should chime in and tell you if there is a convenient way of reading 64 bit binary data via java.
You must be logged in to reply to this topic.