  This is my entry to Assembly 2002 MP3 Instrumental competition.
The piece, Aria.mp3, consists of five synthetic voices singing each its
tune. The development of the voice generators is still far from complete,
and I encourage you to examine the source code included in this
distribution and improve it. I plan to do so myself, and release later
better versions of the generators.

  All data and software in this release belongs to the public domain.
It means that you are free to use them in any legal way you wish and
include them in any kind of package. As the freedom of use is all
yours, so is the responsibility of it, too. I will not be liable of
any direct or indirect damage you might cause yourself by using the
data or the software.

  As far as I know, the *.EXE files have been compiled compatible
with Intel's 80386 and all later processors. However, the CPU usage
and memory requirements are very high, so I recommend that you do not
try running the software with anything less than a Pentium II and
128 MB of RAM. A gigabyte or so of free hard disk space would be
useful, too, especially if you plan to leave all the intermediate
files on your disk. The final WAV file will fit in 16 megabytes.

  This distribution contains all the code and data required to
generate the competition piece from scratch -- only standard C libraries
are required besides them. If you want to modify or recompile the data,
you must supply your own C compiler. The code has little, if any,
platform-dependent features, so you should be able to compile it without
modifications on most of the major platforms. The executables, together
with the *.BAT scripts produce Aria.wav as their final output. This is
the native format of the piece. If you want to produce a MP3 file,
you must supply your own MP3 compressor.

  The true name of the piece is "Aria in C". Because of its generation
method, the "C" should be taken to mean "C language" rather than "C Major";
the tonal scale is mostly pentatonic, even though the base key is C.

  The voices, in approximately ascending frequency order, are called
Bass, Oh, Aya, E/F, and Solo. (Listening to the generator outputs should
explain these funny names clearly enough.) Because the lower voices
are repetitive, they are generated only partially, and the parts are
duplicated to make a long chain of sounds. The Solo voice is generated
in 8 individual sections. The sections are not contiguous: the mixer
program is used to insert required amount of silence between the
sections.

  This distribution contains the following tools for producing the
sound file:

  BEATTIME.EXE   Converts beat timing into absolute timing (in seconds)
                 according to the tempo function in a *.TEM file. Outputs
                 *.T file, which contains the beat timing data and
                 facilitates variable tempo. The tempo is given in
                 beats per second, as a beat in this context is often
                 shorter than in the world of MIDI, and beats per minute
                 would be an unwieldy and somewhat misleading unit.

  B2T.EXE        Converts voice source file timing from beats to seconds.
                 Uses the *.T output of BEATTIME.EXE. The absolute-timed
                 files should have a typifier different from beat-timed
                 files. This distribution uses *.SRC for beat-timed
                 and *.CTL for absolute-timed files.

  CFI.EXE        Converts voice source entries into continuous
                 function with single-sample time resolution. Each
                 source file column produces a separate function file.
                 CFI.EXE is applied once for each column of the source
                 file with each run producing a new function file.
                 The column boundaries are given as arguments to the
                 program.

  VOC_GEN.EXE    A voice generator. Uses a glottis model feeding
                 a train of one zero filter and five pole filters.
                 The filters are controlled by the function files
                 produced by CFI.EXE.


  HVOC_GEN.EXE   A voice generator modified from VOC_GEN.EXE.
                 This version uses a hiss level parameter instead
                 of frequency modulation parameter. Used for
                 breathy or wheezy voice.

  SOLOGEN8.EXE   A voice generator modified from VOC_GEN.EXE. Has lower
                 raspiness factor than VOC_GEN.EXE, suitable for the very
                 highest notes of sopran voice.

  ASME.EXE       Produces an impulse response file of the early reflections
                 of an imaginary hall. The stereophonic impulse response is
                 saved into ASME.DAT.

  ASMD.EXE       Produces an impulse response file of the diffuse
                 reverberation of an imaginary hall. The stereophonic
                 impulse response is saved into ASMD.DAT.

  CONVOLVE.EXE   Calculates the convolution between a sound file and
                 an impulse response. This is the most time-consuming of
                 all of the tools in this distribution. This is
                 a brute force solution to the reverberation generating
                 problem, which has many nasty pitfalls. The output
                 is normalized from an intermediate floating-point value file.

  STEREO.EXE     Converts mono to stereo panned to the center (i.e.
                 duplicates one channel into two).

  MIX.EXE        Mixes sound files together according to a mix script
                 (*.MIX). The files do not need to be equally long, and they
                 do not need to have a common origin. The output is
                 normalized from an intermediate floating-point value file.

  INTERL.EXE     Combines two separate files into a single stereophonic
                 file. The input is supposed to represent the left and right
                 channels.

  REPEAT.EXE     Duplicates and concatenates sounds, possibly overlapping
                 each other.

  REPEATM.EXE    Duplicates and concatenates monophonic sounds, possibly
                 overlapping each other.

  NOTE: Even though these programs have the sample rate defined as a constant
or a variable, it is not automatically possible that the value can be changed.
Some of the programs have hardcoded features assuming that the sample rate
is 44100 Hz. If you want the code to be generalized for all sampling frequencies,
find the dependences and recode them.

  The tools display their argument templates when they are invoked without
arguments.

  The *.BAT scripts in this distribution have a two-level hierarchy.
The main script is MASTER.BAT, whose execution produces the piece.
It calls the subscripts which produce the single voices or voice groups.

  See the comments within the source code files for further details.
The source data (*.SRC) files are explained in the source files of the
programs reading them, because the *.SRC files have very restrictive
rules for comment placement and contents.

    Juha-Petri "Puti" Tyrkk

    puti@netlife.fi
    http://www.saunalahti.fi/puti2

