| This is more of a UNIX question then a Csound
question, but I am interested in furthering
the discussion about handling floating point
wave files.
Now that .wav floats are supported, I am trying
to put together a couple of shell wrappers that
will make manipulating and playing them a bit
easier to handle.
I came up with this script as a cheap floating
point sound player:
SCALE_AMOUNT=`scale $1 | grep 'Max scale factor' | cut -d'='
-f2`
scale -W -s -o/dsp -F$SCALE_AMOUNT $1 &
vplay /dsp
where '/dsp' is a fifo which is world r/w-able.
When I attempt this, scale dies with 'error writing Wave header'.
I don't understand why, because I can do this:
cp sound.wav /dsp &
vplay /dsp
This plays the sound. I don't like the idea of temp files as much,
because of the disk space requirements, and the lack of a
synchronization
between the processes such as the fifo provides.
What might be nice would be the filename trick that csound uses to
pipe to a process (-o '|vplay'). Any other suggestions?
Thanks
Toby
|