This directory provides automatic testing of the audio output BSE synthesis
networks produce. Since changing algorithms might result in subtle differences
in the resulting audio files, 1:1 comparision of audio files (such as storing
an md5 hash) is not a good choice for an automated testing framework.

Thus, the tests are based on comparing features of audio files that are not
as fragile as a bytewise comparision, but still provide a good similarity
measure, such as the spectrum or the average signal energy. To see in detail
which features are supported, call bsefextract --help.

To run the currently available tests, there is a Makefile rule, so you can
type:

   make test

To add a new audio test, lets call it foo, you need to perform the following
steps:

1) create a foo.bse file with beast, which will generate appropriate output;
   ensure that the bse file terminates after some time (using the song
   sequencer is a good way to ensure this)

   save foo.bse in this directory (add it to the CVS)

2) add a new target to Makefile.am, which runs featuretest.sh with

   - the .bse filename
   - the name of the .reference file for the test reference data
   - the features you want to compare (see ../../tools/bsefextract --help)
   - the desired threshold

   an example for the target test-foo would be:

   test-foo: beastconf.sh
      @$(FEATURETEST_SH) foo.bse foo.reference \
                      --avg-spectrum --avg-energy \
                   -- --threshold=99.99

3) add the target to the FEATURE_TESTS line in Makefile.am

4) run make test-foo once, the test will fail, but you will be given instructions
   how to make the results of this test run the test reference data

5) do this (and add newly created foo.reference to CVS)

6) run make test, the newly added test should be executed and succeed now

Note, that if you need multiple tests for the same .bse file (for instance
because you want to set a different threshold for different features), you
can do so by adding multiple targets test-foo1, test-foo2,... using difference
reference file names for the tests, like foo1.reference, foo2.reference,...
