MatrixMixer - is a DirectShow filter to upmix any
stereo source to multiple speakers. Designed mainly for playback movies
with stereo audio track on 5.1 audio systems. Distributed absolutely for
free (FREEWARE, OpenSource). Sorry if my English is bad, but I think it
is better to have something than nothing.
This project is a branch of AC3Filter
project - AC3 format decoder for playback DVD and .AVI wich AC3 audio
track.
Main features:
Matrix mixer with ability to change the matrix.
Conversion from any input format to any output format. Supports
channel configurations from mono to 5.1 and sample formats 16bit /
24bit / 32bit / float.
Input/output levels indication.
Automatic gain control.
Dynamic range compression.
Individual gain control for each input/output channel.
Just
run setup program. During installation it will create Start menu group
with setup, documentation and uninstall shortcuts.
Uninstall.
Just run uninstaller from Start menu or Control
Panel.
! Note that all your saved
matrices will be lost !
System setup
If installation was successful then in most cases
filter is ready to work immediately and does not require any settings.
Most compatible mode of operation is stereo mode. It
should work with any Windows version and any sound card.
Some drivers (Creative!) do not update settings in 'Control
Panel->Sounds and Multimedia->Audio->Sound
Playback->Advanced' after speaker configuration change in
drivers. So it is necessary to check it.
Some audio filters do not support multichannel modes
(DeDynamic for example). Some players can use its own audio-processing
filters (equalizers for example) that again do not support multichannel.
Some filters may allow multichannel but handle it incorrectly (for
example center channel may fairly disappear). All this things may
prevent the filtler to load or it will be impossible to change speaker
configuration.
To prevent this things do not install filter-packs
and unregister unnecessary filters!
Some of the system settings can be adjusted from filter properties (how to call it read Usage):
* Filter merit
After installation filter have highest priority,
i.e. it will try to load for every opened file with almost any DirectShow player. But you can disable such behaviour with 'Do not load MatrixMixer'. In this case filter will persist in the system but will not try to autoload.
This option requires relogon in W2k/XP and system
restart in W98.
* Default audio renderer
Sound card may work in two modes: DirectSound and
WaveOut. If it is some problems when using filter (for example if SPDIF
does not work) it is possible that mode switch may help. Some media
players (BSP) have corresponding settings but most of others use system
default settings. Choose 'Use DirectSound' to make DirectSound to
be default interface; choose 'Use WaveOut' to make WaveOut to be
default interface.
This option requires relogon in W2k/XP and system
restart in W98.
* Audio/Video sync.
Sometimes it may happen that audio and video are not
in sync. Mostly it happens because of incorrect mixing, but it may be
also some hardware reasons. This option is designed to fix hardware
issues. You can use it to watch movies that was incorrectly mixed but do
not forget to change it back after! This option specifies time shift
between audio and video. If audio is played before video
you need to increase this value. If audio is played after
video you need to decrease this value. Note, that this
option allows to fix only constant time shift.
This option have immediate effect. When you change
it picture may freeze for several seconds to resync, it is normal.
* System options
Allow to connect to AC3Filter - By default MatrixMixer will not try to connect to AC3Filter's output because AC3Filter already have similar functionality.
Use WAVEFORMATEXTENSIBLE - generally for
multichannel modes it is WAVEFORMATEXTENSIBLE structure used (described
at http://www.microsoft.com/hwdev/tech/audio/multichaud.asp).
Some old drivers cannot work with it (opposite, some new drivers can
work only with this structure in multichannel).
Usage.
If everything good then after install filter is
ready to work.
To change filter's parameters player should allow
access to filter properties (WMP 6.4, BSP, Sasami, etc. WMP9 does not!).
For example in WMP 6.4 filter list can be accessed File->Properties->Advanced:
Mixer
Main control here is mixing matrix. It is in form
of matrix multiplication: S' = M S, where S = { L, C, R, SL, SR, LFE } -
input sample, S' = { L', C', R', SL', SR', SW' } - output sample.
More simple it means that next rule for each cell: we mix
input channel specified by column to output channel specified by row with gain
specifien in cell. So if we want to route left channel to right speaker
we should set 1 in cell at cross of 'L' column and 'R' row. If we don't
want to hear left channel from left speakers anymore then we set 0 at
cross 'L' column and 'L' row. If we make same operation with right and
surround channel then we fully swap left and right channel. (Note, that
in this case we fully swap 'L' and 'R' rows).
Row determines what we'll hear from corresponding
output channel. For matrix shown above from left chanel we'll hear sum
of left and right channels.
Column determines where input channel will be mixed.
For matrix shown above left channel participates in all output channels.
When Auto matrix is enabled then matrix is
automatically calculated and changed with parameters change. For example
if we change Voice level we'll see factors change in 'C' column.
* Speakers.
Input: string shows current input format.
Two comboboxes below specify output speaker configuration and sample
format. Channel format is shown in form
front_channels/surround_channels + subwoofer presence flag (SW). For
some configurations common names are given.
'Dolby Surround/ProLogic' modes mean that
that all channels presented in ac3 stream will be mixed into two
channels so Dolby Surround/Pro Logic decoder can extract surround
channel. 'Dolby ProLogic II' mode is similar to DPL but for DPL
II decoder. DPLII support is only experimental because of lack of
reliable information.
* Gains.
Master - desired gain level.
Gain - shows current gain level.
Voice - center channel gain level (dialogue channel)
Surround - surround channel(s) gain level..
Master and Gain controls are
responsible for global gain level. Master sets desired gain
level. If current sound level is too high and overflow occurs then real
gain level will be decreased. Current gain level is shown at Gain
control.
* Levels.
Levels indication before and after mixing. Note that levels here are in
logarithmic scale.
* Options
Settings description:
Enable filter - allows to enable/disable the filter on the fly
Auto gain control - automatic gain control. It controls
current gain to prevent overflow. Curent gain is shown at Gain
level. When this option is disabled high-level signal is clipped on
overflow what leads to unpleasant distortions. When this option is
enabled then current gain will be decreased and overflow does not
happen. System behavior after overflow is defined by One- pass norm
option. If One-pass norm is disabled then current gain will be
gradually restored up to Master level. In this case Master
defines mean gain level. If it is many places when overflow occurs then
this behavior can lead to unpleasant 'jumps' of audio level. In
this case do not set Master level too high. This mode is
recommended if overflow is not expected. If One-pass norm option
is enabled then gain level will not be restored after overflow. So each
overflow decreases probability and 'strength' of next overflow and after
some time gain will be stabilized to some mean value. Usually it happens
after about ~10min of film playback. In this case Master level
means initial gain for one pass normalization algorithm and may be set
to maximum. This mode can provide maximum loudness with minimal
artifacts.
One-pass norm - one pass normalizaion. See Auto gain
control.
Auto matrix - automatic calculation of mixer matrix. When
this option is enabled matrix editing direct is disabled. Gain levels
for LFE, Voice and Surround are parameters for
matrix calculation. When this option is disabled next controls loose
influence: gain levels for LFE, Voice and Surround,Normalize
matrix, Expand stereo, Voice control, Expand
stereo. Following controls are remain to work: Master, Gain,DRC
level, DRC power, One-pass norm. Direct matrix
edit is enabled.
Normalize marix - matrix normalization. When this option is
enabled matrix is normalized so it is no overflow at output (sum of
channels at output < 1). But when gain level LFE, Voice
or Surround changes other gain level will be also changed (for
example if we increase level of LFE all other channels level will be
decreased). If this option is disabled it allows to avoid this effect.
But overflow is possible in this case. So it is better to decrease Master
gain when this option is disabled.
Expand stereo - works only if it is no surround channels in
AC3 stream. In this case it allows to amplify surround information with Surround
gain control (that have no effect by default if it is not surround
channels at input). If it is surround channels specified at output
configuration then this option make it work in this modes. Techincally
it controls out-of-phase audio components (channel differences) and
routes it to surround channels if they are exists.
Voice control - works only if it is no center channel in
AC3 stream. In this case it allows to control center with Voice
gain control (that have no effect by default in absence of center
channel at input). If it is center speaker specified at output
configuration then this option make it work in this modes. With Expand
stereo option allows full stereo to multichannel upmix. I.e. make
center and surround speakers to work even if input is just stereo.
Techincally it just controls in-phase audio components (equal in both
channels) and routes it to center speaker if it is exists.
Combo-box Matrix preset allows to save and
load saved matrices.
Gains
On this page you can set input/output channel gains, channel delays and dynamic range compression.
* Input gains/Output gains
Allows to change gain level for each input/output
channel. It is current level indication on the left of each gain
control. Red indicator means that it is overflow happen on this channel.
* Delays
Delays can be used for following:
Compensate different distance to speakers. Ideally all speakers should be at equal
distance to listener so sound emitted simultaneously from all speakers
reach listener at the same time. Otherwise sound picture will be
distorted. But in practice distance to speakers may be different. To
compensate this difference sound from certain speakers should be delayed. You may choose 'meters' at Units combobox to directly specify distance to speakers.
Prevent signal cancellation. Since rear channels may reproduce
the negative comonents from front channels front and rear signals may
be cancelled.
Create Haas effect.
* Dynamic range conpression (DRC)
Sometines film may contain very loud and very quiet
sounds. And it is needed to adjust volume to hear quiet sounds and damp
down loud sounds. To avoid this annoying procedure dynamic range
compression should be used. Left control sets desired amplification in
dB. This value means level increase at -50dB. So if it is very quiet
sound with -50dB level it will be increased by 10dB and reproduced with
-40dB level. Similarly, -25dB signal will be increased by 5dB and
reproduced with -20dB level. 0dB signal will not be increased at all.
Distribution.
This program distributed under GNU General Public
Licence v2, placed in GNU_eng.txt at english language and GNU_rus.txt at
russian language. Russain language version is only for information
purpose only and english version have priority with all variant reading.
This application may solely be used for
demonstration and educational purposes. Any other use may be prohibited
by law in some coutries. The author has no liability regarding this
application whatsoever. This application may be distributed freely
unless prohibited by law.
This product distributed in hope it may be useful, but
without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose and
compliance with any standarts. I do not guarantee 24-hour (and any)
support, bug correction, repair of lost data, I am not responsible
for broken hardware and lost working time. I am not
responsible for legality of reproducted with this program multimedia
production.
Contact author.
With all questions about this program please, email
to this address: with subject MatrixMixer. This subject is used during email sorting, so mail without it may be lost! Please, respond about all errors in porgram with following information:
Speaker configuration used (stereo, quadro, 5.1...).
If you know what Graphedit is, then also screenshot (or just
description) of graph caused problem.
This will help me a much in bug fixing.
Changelog.
0.30b - 07.10.2003
* Filter is almost totally rewritten
+ Auto gain control
+ Dynamic range compression
+ Individual delays for each channel
+ Individual gains for ech input and output channel
+ Support for 16/24/32/float sample formats at input and output
+ Support for multichannel input and output
+ Support for dynamic format change at input and output
+ Vortex support
+ Time shifting
! Loading several copies of filter bug fixed
! Crash on matrix change fixed
0.21a - 02.04.2003
+ Enable/disable filter checkbox
! Settings was not saved preperly.
! Fixed video stuttering
0.2a - 01.04.2003
+ Support for dynamic format change
+ Support multichannel formats at input
+ Output levels can indicate overflow
! Crash with some decoders