[PD] writing table values as raw floating point
Roman Haefeli
reduzierer at yahoo.de
Mon Mar 27 22:19:57 CEST 2006
hi
"Matthias Blau" <blau_m at web.de> wrote
> I didn't find a possibility to write table values as floats to a binary
> file, although I am almost sure this should exist in standard pd.
> I know I could use soundfiler but I don't want the header, just raw
> floats.
what do you mean by raw floats? bytes as numbers from 0 to 255? if i
understand you right, i had once a similar problem: i wanted to write a
binary file byte by byte. finally i did it with soundfiler, because i
couldnt find a better solution. since you cannot write 8-bit files with
soundfiler, i had to convert two values (0-255) into one value (0-65536),
scale it to -1 - 1, write it into an array, then save it as a 16bit
wav-file. to get rid of the 44 byte long wav-header, i used the command:
dd if=input.wav ibs=44 skip=1 of=output
the disadvantage of this method is, that you can only write files that have
an even number of bytes, and that you need a command outside of pd. please
let me know, if you find a better solution.
roman
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
More information about the Pd-list
mailing list