[PD] floating point soundfiles

Richard Dobson RWD at cableinet.co.uk
Thu Jan 10 00:01:14 CET 2002


Slightly tricky question to answer solidly. Microsoft stipulate that the
larger 18byte WAVEFORMATEX structure should be used for all non-PCM and
compressed formats (which in practice includes floats); and all their
examples show this. But as with so many aspects of RIFF, documentation
is scattered and piecemeal. The floats format was developed in tandem by
Sonic Foundry and Microsoft, and much of my information actually comes
from the former.  

More to the point, most commercial applications bend over backwards to
open a file if they can - I have had files with known errors in the
header (wrong data sizes, etc) be accepted by both Microsoft and
third-party applications.  On reading, of course, you can parse for both
16byte and 18byte format chunks, and this is what I do, and the majority
of applications would do. The more interesting question thus would be if
Samplitude will accept a floats file with the 18byte format chunk, which
it should. But it is simply churlish, and no real help to the user, to
be dognmatic on reading a file, when there is actually nothing to stop
you accepting it. So the fact that an application will accept a format
is no actual guarantee that the format is 100% correct - unless that is
actually the stated purpose of the application in the first place.

So my answer is a bit Orwellian; both 16byte and 18byte chunks may be
'acceptable', but the latter is more correct than the former!




Richard Dobson


-- 
Test your DAW with my Soundcard Attrition Page!
http://www.bath.ac.uk/~masrwd (LU: 18th July 2001)
CDP: http://www.bath.ac.uk/~masjpf/CDP/CDP.htm (LU: 1st August 2001)



More information about the Pd-list mailing list