ICA '99 SYNTHETIC BENCHMARKS

horizontal line
 

The synthetic benchmarks include a set of source signals, source signal generators and code for various mixing procedures.  All of the code provided is for MATLAB 5.x.  Due to the advanced data structures required for making FIR matrices MATLAB 4.x. will not run this code.

The code and filters you need for doing mixing is bundled in this archive (2722662 bytes).  You can get some sample sources from the sources directory (the archive does not include sources).  Following is an explanatory list of all the files included in the archive plus the sources.
 

Source Signals

The source signals are all WAVE format files sampled at 22.05 kHz with a duration of roughly 9 seconds.  The samples are 16-bit, 2's complement in little endian format.  To load a source to a MATLAB workspace you use: s = wavread( filename);  All samples are found in the sources directory.  I expect to be dumping random contributions to the sources directory every now and then, so check back occasionally.

Source Signal Generators

In addition to the source signals we provide a number of signal generators to generate sources with well known features.  There is a script that will generate all of these sources and place them into the sources directory as WAVE files with the aforementioned format.  The script is in the code directory and it is called maketones.m.  The generates signals are sine, sawtooth and square waves with variable frequency, as well as Gaussian noise and Cauchy noise.  Each source is generated in two instances, one with constant amplitude and another where the source fades in and out periodically in order to test the robustness of an algorithm in the temporary absence of a source.

Mixing Code

Finally we provide code to perform mixing with varying degrees of complexity.  All of the mixing code resides in the code directory.  Following is a list of the mixing functions and a short description (detailed information on the usage of each function is obtained by typing "help function" in the MATLAB prompt):
instamix.m
Performs instantaneous N by N  mixing of a user-specified set of sources with a mixing matrix with a custom condition level.  For detailed instructions type "help instamix" in the MATLAB prompt.
mfilter.m
Generates various types of mixing FIR filters.  The type of the filter could be either a dense filter (no zero values coefficients), a sparse filter (a varying degree of zero values coefficients), or just a simple delay by a random amount of time.  For the dense and sparse filters the coefficient values are generated from an exponentially decaying Cauchy noise generator with a user-specified decay slope.  Decaying Cauchy noise was used since it resembles the impulse response of a room.  For detailed instructions type "help mfilter" in the MATLAB prompt.
staticmix.m
Performs N by N static mixing by using any type of filters that the mfilter.m routine can construct and a user-specified set of sources.  For detailed instructions type "help staticmix" in the MATLAB prompt.
headmix.m
Performs 2 by 2 mixing, using the Head Related Transfer Functions (HRTFs) of a dummy head.  The output of this process generates sounds as they would reach each of our ears, by performing filtering based on the shape of a human shaped head.  The user needs to specify the two sources and their angle of position in relation to a human head (the generated mix heard through headphones should give the sensation of a 3D sound).  The HRTFs used were measured by Bill Gardner and Keith Martin (relevant page).  For detailed instructions type "help headmix" in the MATLAB prompt.
simroommix.m
Performs N by N mixing using filters derived from a theoretical room simulation.  The room is assumed to be a 10m x 10m x 10m cube.  The user provides the sources and the coordinates of each sensor and source in the room.  The simulation performed is using the source image model.  Wall reflections are computed up to the fifth order, and an attenuation by a factor of two is assumed at each wall bounce.  For detailed instructions type "help simroommix" in the MATLAB prompt.
roommix.m
Performs a N by N mixing using filters measured off a real room.  The user specifies the sources and the position of the sensors and the sources (using 8 preset positions).  The room measurements were made by Alex Westner (relevant page).
dynamix.m
Not done yet ... will eventually generate dynamicaly changing mixtures.

Additional code files are simod.m (used to compute source image model), roomi.m (used to load appropriate impulse responses for real room data) and dconv.m (for dynamic convolution).  Their use is internal, you do not need to run them.

Data

There are two data directories, room and hrtf containing the room and head impulse responses respectively.  The room data are stored in big endian 16-bit integer format normalized to 32767, the file lengths are 32766 samples (65532).  The HRTF data are stored in the same format only that the impulse responses are stereo and the samples are interleaved with a left/right ear order.  The length of the HRTF filters is 128 stereo samples (512 bytes).  All files are raw data.

Example

Here's a sample session, making various mixtures of two sounds.

>> cd synthetic-bench/code                     % Change to the code subdir to have things working
>> s1 = wavread( '../sources/mike.wav');       % Read one sound
>> s2 = wavread( '../sources/street.wav');     % Read another one
>> [out,w,wi,rc] = instamix( [s1,s2]', .01);   % Do an instantaneous mix
>> sound( out( 1, :), 22050)                   % Listen at one mix
>> w                                           % Check out mixing matrix
w =
    1.0200    1.0000
    1.0000    1.0200
>> wi                                          % Peek at it's inverse
wi =
   25.2475  -24.7525
  -24.7525   25.2475
>> iout = wi * out;                            % Unmix
>> sum( sum( [s1,s2]' - iout))                 % Checkout results
ans =
   1.0498e-11
>>
>>
>> [out,f] = headmix( [s1,s2]', [40, -10]);    % Do a dummy head mixture
>> plot( f{1}')                                % Check out the mixing filters
>> plot( f{2}')
>>
>>
>> [out,f] = roommix( [s1,s2]', [1 2], [5 4]); % Do a mix with real room filters
>> f                                           % Nasty filters ...
f =
    [16383x1 double]    [16383x1 double]
    [16383x1 double]    [16383x1 double]
>>
>>
>> [out,f] = simroommix( [s1,s2]', ...
    [1 1 1;9 6 5], [6 7 4;3 5 9]);            % Do a simulated room mix
>> rotate3d                                   % Click on the figure and you can rotate the room
>>                                            % and see where the sources and mikes are
>>
>>
>> fd.s = 'sparse';                           % Make a sparse filter description
>> fd.o = 128;                                % The filter length is 128 taps
>> fd.n = 1;                                  % Factor of tap amplitude decay
>> fd.m = 10;                                 % Number of non-zero taps
>> [out,f] = staticmix( [s1,s2]', ...         % Make a static mix
        {fd,fd;fd,fd});                       % All four filters are described from fd
>>
>>
>> [out,f] = dynamix( [s1,s2]', ...           % Make a dynamix mixture
         {fd,fd;fd,fd}, ...                   % Description of starting filters
         {fd,fd;fd,fd});                      % Description of ending filters
>> sound( out(1,:), 22050)                    % Good luck ...
 

horizontal line

To: ICA '99 Test Sets
To: ICA '99

horizontal line
 

If you have problems let me know.