Csound Csound-dev Csound-tekno Search About

Re: using 'scale' with floating point wave files...

Date1998-09-30 10:49
FromRichard Dobson
SubjectRe: using 'scale' with floating point wave files...
This is really just for background;

Is this writing the new Microsoft type-3 (floats) file? I added the code in
Csound (PC) to support Type-3. This format nominally requires data to be
normalized; I made an (I think reasonable) 'executive decision' to assume that
people wanted compatibility with conventional scores which write to +- 32767 (to
do anything more flexible would need an extra flag, and there are a lot of these
already...). Amplitudes in this range will come out correctly normalized in
Type-3. A larger range will generate overflowed values in the WAVE file, which
are allowed by the format, 'and must be bound by the rendering device'.


Richard Dobson

Tobiah wrote:
> 
> All of the binaries are from v3.485  I generated the file
> 'test' from csound using a stereo orc, and -W with -f for
> floating point wave file.  Is this correct usage?  If so
> then why:
> 
> toby:~/music/floats> sndinfo test
>         WAVE soundfile
>         srate 44100, stereo, 32 bit floats, 10.00 seconds
>         headersiz 58, datasiz 3528000 (441000 sample frames)
> toby:~/music/floats> scale test
> WARNING: /big/sf/test sr = 44100, orch sr =     0.0
> audio sr = 44100, stereo, reading both channels
> scaling 441000 sample frames (10.0 secs)
> Max val 41427 at index 9230 (time 0.1046, chan 0) 1 times
> Min val -36787 at index 8975 (time 0.1017, chan 1) 1 times
> Max scale factor = 0.791
> toby:~/music/floats> scale -o test.scale -F0.791 test
> WARNING: /big/sf/test sr = 44100, orch sr =     0.0
> audio sr = 44100, stereo, reading both channels
> scaling 441000 sample frames (10.0 secs)
> unknown sound format 0(0x0)
> toby:~/music/floats>
> 
> Thanks,
> 
> Toby
>