WAV_reader
==========

This application allows you to read details from a Wave file.
It will report the details of the Wave header, and let you
examine a portion of the waveforms defined by the file payload.

The application expects Wave files to have the common 44 byte
header. If you wish to examine a file whose header contains
other chunks of metadata you should use !WAV_Cleaner to create
a version of the file with the basic header so it can be
handled by !WAV_Reader.


Before use.
===========

You should alter the contents of the 'Settings' file inside
the application directory. This contains one line of text
that names the full pathname of the directory which holds
the Wave file(s) you wish to examine with WAV_Reader.


Use
===

Run the application in the usual way. It will then ask you
for the name of the file to read. Type in the input file's
name and press <Return>.

If the application can file the file it will read the file's
Wave header and report what it finds. This allows you to 
check the file details and determine the sampling rate, etc.


The application than asks you to give a 'start time' in
seconds. Type in a value and press <Return>. This represents
the time, measured from the start of the file, of a chunk
of the audio data to read.

The application will check to make sure that the requested
time is within the duration of the file. If it is, then a
100 millisecond chunk starting at the specified time will
be read.

Note that since sampled data is taken at a series of discrete
instants the start time is also quantised to the closest
actual sample timing instant.


The application will then write two output files to your 
ramdisc.

  ram:waveout_<filename>
  ram:values_<filename>


Where <filename> is the name of the input file.

The contents of these represent the data from the specified
part of the Wave file. So you can use the output to examine
the waveforms and their details, or load the values into
some other program for analysis or display purposes.

ram:waveout_<filename> will provide the waveforms in the form
of a series of sample pairs as a text/csv info with each line
having the form

<time milliseconds>, <left level>, <right level>

Where <time milliseconds> indicates the relative timing of
each sample pair, in milliseconds, from the specified start
time. <left level> and <right level> are floating point
values in the range from -1 to +1 scaled such that the maximum
amplitude corresponds to the largest integer values provided
by the number of bits per sample. The application can
read data in 2 bytes per sample (16 bit samples) and 3 bytes
per sample (24 bit sample) formats.

ram:values_<filename> represents the same data, but in the form

<sample number>, (left int>, <right int>

Where <sample number> simply counts sample (pairs) from the stated
start time and the left and and right sample values are given
as integers in the relevant 16 or 24 bit range.

The application will process Wave files at sampling rates of 48k/sec
or less. For mono files the output left and right values will be
duplicate.

Jim Lesurf
April 2010
