NOTE: YOU HAVE DOWNLOADED AN OLD VERSION.  See here for the latest
version:

  http://uazu.net/sbagen/#dl_ba

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

This is the procedure:

- Build the tools using 'mk'.  (They use my fidlib filter design
  library, which is in the 'fidlib' directory.)

- Extract the audio from the CD or tape at 44100Hz as a WAV or raw
  audio file (i.e. 16-bit stereo little-endian data)

- Downsample it to 2004.5Hz using 'downsample'.  The point of
  downsampling is to reduce the amount of data that needs to be
  processed later, speeding up the process.  A sampling rate of
  2004.5Hz leaves everything up to ~700Hz intact.  If you are looking
  at higher carrier frequencies, you'll need to use a higher sampling
  rate when you downsample, and it will be a bit slower to run.
  Example command-line for 2004.5Hz:

    downsample 44100 22 <in.raw >out.raw

- Get a rough idea of where the interesting frequencies are in some
  other frequency-display application.

- Edit the code in 'main2.c' to cover the range of frequencies you are
  interested in, and at the accuracy you are interested in.  You'll
  also need to adjust RATE as well, if you're using something other
  than 2004.5Hz.  E.g. current setup watches data over 140 narrow
  bands, from 138Hz in 0.1Hz steps (i.e. 138Hz->152Hz), with a
  sampling rate of 2004.5Hz.

- Rebuild it using 'mk'.

- Run it on the downsampled file.  This looks at the 140 narrow bands
  as it scans over the file, and picks out the two peaks, and
  calculates the equivalent SBaGen spec.  A line is output every
  second, so save this to a file and browse through it in 'less' once
  processing is complete.

    main2 <out.raw >log
    less log

- That's it!

The tool isn't that complex, really -- it just analyses a narrow band
of frequencies very finely.  Not all of the code in there is in use
either.  It should be easy to modify if you want.


