Hi list,
Im trying to read raw data files using soundfiler obj but get this unwanted
bahaviour:
The files (generated in matlab), are supposed to be 'ieee-float32' and
contain 515 32-bit floating point numbers. Im trying to read the data to an
array using soundfiler, sending read to it with the following options:
read - raw 0 1 4 l
(0 as matlab says nothing about header data
1 for one channel
4 for 32 bit
l for little endian)
this reports an error message: unknown or bad header format
When i change header size from 0 to 1, soundfiler reads the array but the
data isnŽt correct (the data in the attached file is supposed to contain the
dta for sin^2 from 0 to pi).
I get similar behaviour with headersize 2 to 99
When i set headersize to 100 (ie read -raw 100 1 4 l) the data read suddenly
becomes correct, but the first 26 floats in the file are missing in the
array.
What am i doing wrong? How can i get it to work?
If the file format is inconvenient for soundfiler to read could anyone
suggest some other format (matlab can generate a range of standard platform
independent formats.)
The data in the files is intended to be used as wavetables in pd: is there a
more convenient method for reading files it into arrays? amy other
suggestions?
PD: the attached binary file was generated in matlab for windows (with
fwrite), and is supposed to contain 515 32bit littleendianness floats
representing a sin^2 function from 0 to pi, padded with one 0 at the
beginning and two 0s at the end.
thnks.