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.
hi,
yes, as it seems open_soundfile() routine treats headersize==0 as an indication that a caller wants to deduce the header from a file. Thus -raw flag does not mean a headerless file, but a file with a header format known only to the user. But since you have prepended one zero at the beginning of the data, then just skip this zero with '-raw 4 1 4 l' (the header size is in bytes, not in samples).
Krzysztof
(checked your sin2.wvt, it's loading ok that way)
Gregorio García wrote: ...
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.
...
Hi,
I want to be able to have users other than root run Pd with r-t scheduling. It looks like it can be done with setuid, but can anyone tell me how?
cheers, Nick
Nick Fells hat gesagt: // Nick Fells wrote:
I want to be able to have users other than root run Pd with r-t scheduling. It looks like it can be done with setuid, but can anyone tell me how?
As root:
$ chmod 4755 /usr/bin/pd or $ chmod +s /usr/bin/pd
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
Yes, but please download 0.33patch2 or later -- earlier versions aren't airtight against people getting root privelige accidentally...
cheers Miller
On Thu, Aug 23, 2001 at 05:42:07PM +0200, Frank Barknecht wrote:
Nick Fells hat gesagt: // Nick Fells wrote:
I want to be able to have users other than root run Pd with r-t scheduling. It looks like it can be done with setuid, but can anyone tell me how?
As root:
$ chmod 4755 /usr/bin/pd or $ chmod +s /usr/bin/pd
bye,
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______ / __// __ /__/ __// // __ \ / / __ \ ___\ / / / ____/ / / / // ____// /\ \ ___\____ \ /_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
I read:
Yes, but please download 0.33patch2 or later -- earlier versions aren't airtight against people getting root privelige accidentally...
and maybe consider the shell object from guenthers ggee ;)
lg
x
Yes, not to mention netreceive...
Supposedly this should actually be OK though; Pd uses setuid to promote its priority to realtime, then immediately sheds root privelige ala seteuid(getuid()) so that there shouldn't be any way to exploit it. Anyone figures out an exploit, maybe you should just send me private mail so I can close it and update Pd again.
cheers Miller
On Thu, Aug 23, 2001 at 06:36:32PM +0200, CK wrote:
I read:
Yes, but please download 0.33patch2 or later -- earlier versions aren't airtight against people getting root privelige accidentally...
and maybe consider the shell object from guenthers ggee ;)
lg
x
-- chris@lo-res.org Postmodernism is german romanticism with better http://pilot.fm/ special effects. (Jeff Keuss / via ctheory.com)
Thanks; unix (read 'gnu', apologies Saint IGNUcius) is an ever expanding world of wonder.
(read 'go and read a unix primer')
Nick
Frank Barknecht wrote:
Nick Fells hat gesagt: // Nick Fells wrote:
I want to be able to have users other than root run Pd with r-t scheduling. It looks like it can be done with setuid, but can anyone tell me how?
As root:
$ chmod 4755 /usr/bin/pd or $ chmod +s /usr/bin/pd
bye,
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______ / __// __ /__/ __// // __ \ / / __ \ ___
/ / / ____/ / / / // ____// /\ \ ___\____
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\
Hi all,
after many months of not quite having the IRIX version of Pd together, I've managed to compile 0.34 test 6 for IRIX. It compiled and seems to work in both o32 ("pd") and n32 ("pd-n32") versions.
Thanks to Fernando at CCRMA for making an up-to-date IRIX machine available!
cheers Miller