news‎ > ‎

[qaac] release 1.07

posted Nov 25, 2011, 2:56 AM by nu 774   [ updated Dec 14, 2011, 1:36 AM ]
  • Added configurable matrix mixer.
  • Now DSP options are usable on refalac (--rate, --lowpass, --normalize, --delay, --matrix-preset, --matrix-file). These are not usefull for ALAC encoding, but you might want to use with refalac -D. Please not that --rate, --lowpass, --normalize and remixing will all produce 32bit float PCM.
  • Fixed automatic wave ignorelength detection. It was not working as intended.

About matrix mixer

You can use mixer either by --matrix-preset or --matrix-file option. In both cases, you have to prepare a text file containing matrix spec.

You can directly pass the pathname of matrix file with --matrix-file. On the other hand, --matrix-preset searches from pre-defined directories. As the name implies, this is designed so that you can create your own preset files, and specify with their name.

"--matrix-preset=foo" searches the following files, in the following order.

  1. %HOME%\.qaac\matrix\foo.txt (%HOME% is environment variable. Be careful a dot before qaac)
  2. %APPDATA%\qaac\matrix\foo.txt (%APPDATA% is Application Data directory for the login user. Be careful a dot is not here)
  3. (path to qaac directory)\matrix\foo.txt

The file format is very simple, and is like the following:

1 0 0.7071
0 1 0.7071

This a 2x3 matrix, and can be used for 3ch to 2ch downmix. Each row corresponds to output channels (L and R). Similarly, each column corresponds to input channels (L, R, and C). You have to separate each column by one or more space/tabs.

With this matrix, each output channel will be calculated from input as following:

L = 1 * L + 0 * R + 0.7071 * C
R = 0 * L + 1 * R + 0.7071 * C

Actually, each element in the matrix will be automatically "normalized" to prevent clipping. However, you are usually encouraged to use --normalize anyway, when you do remixing.

The following is one more example.

1 0 0.7071 0 -0.87178j -0.4899j
0 1 0.7071 0 0.4899j 0.87189j

This is 2x6 matrix, therefore can be used for downmixing 6ch to 2ch.

Here, imaginary value with "j" is used. You can use real value, or pure imaginary value like this(with j), for each matrix element. Real value means gain of the channel. Imaginary value means 90 degree phase shifting, and it's real coefficient means gain of the channel.

If you want to achieve the pure effect of phase shift, try something like this:

1j

This 1x1 matrix transforms mono input to mono output, applying 90 degree phase shift, known as Hilbert transform.

Comments