Hello Anne,
For all currently supported file formats, except the MP3, the
conversion into floating-point is done by the open-source library
libsndfile:
http://www.mega-nerd.com/libsndfile.
The reading functions are described here:
http://www.mega-nerd.com/libsndfile/api.html#readf. Further down the
page in the notes the integer to float behavior is described:
When converting between integer data and floating point data,
different rules apply. The default behaviour when reading floating
point data (sf_read_float() or sf_read_double ()) from a file with
integer data is normalisation. Regardless of whether data in the file
is 8, 16, 24 or 32 bit wide, the data will be read as floating point
data in the range [-1.0, 1.0]. Similarly, data in the range [-1.0,
1.0] will be written to an integer PCM file so that a data value of
1.0 will be the largest allowable integer for the given bit width.
This normalisation can be turned on or off using the sf_command
interface.
Actually XBAT, through libsndfile and the sound_file_read function,
can also read the integers into MATLAB ...
opt = sound_file_read; opt.class = 'int16';
samples = sound_file_read(my_file, start, count, [], [], opt)
will read 'count' samples starting at 'start' from all channels in the
file as 16-bit integers ... the bit-depth usef in a file is obtained
through the sound_file_info function ...
Harold