Subject: sum-mixmode and snapshot 2.3.6-20041222 (was: Re: FYI: Re: ecasound/alsa question (fwd))
From: Kai Vehmanen (kvehmanen_AT_eca.cx)
Date: Wed Dec 22 2004 - 01:28:56 EET
Hello all,
coming back to an old issue:
On Wed, 14 Jul 2004, Kai Vehmanen wrote:
> ecasound \
> -a:1 -f:16,1,48000 -i mono-1.wav -ea:400 \
> -a:2 -f:16,1,48000 -i mono-2.wav -erc:1,2 -eac:0,1 -ea:400 \
> -a:3 -f:16,1,48000 -i mono-3.wav -erc:1,3 -eac:0,1 -ea:400 \
> -a:4 -f:16,1,48000 -i mono-4.wav -erc:1,4 -eac:0,1 -ea:400 \
> -a:all -f:16,4,48000 -o 4ch-mix.wav
>
> Now you might ask why the "-ea:400" (amplify by 400%) at the end of each
> chain. Now I regret having this feature in Ecasound more and more each
> day, but due to backwards compability issues, we just have to live with
> it. Basicly when Ecasound mixes together 'n' chains, it scales the
> amplitude to 1/n. This results in surprising results in the above case
> where each source chain has audible signal only one channel and the
> scaling doesn't make sense. Thus we scale it back up (no loss of
> information, just awkward.
I've now added a new mixmode to Ecasound CVS which implements
sum-all-inputs mixing. The old behaviour ('avg' mixing) is still the
default, but possibly the default will be changed at some point in the
future. Anyways, with sum-mixing, the above example can be turned into:
ecasound -z:mixmode,sum \
-a:1 -f:16,1,48000 -i mono-1.wav \
-a:2 -f:16,1,48000 -i mono-2.wav -erc:1,2 -eac:0,1 \
-a:3 -f:16,1,48000 -i mono-3.wav -erc:1,3 -eac:0,1 \
-a:4 -f:16,1,48000 -i mono-4.wav -erc:1,4 -eac:0,1 \
-a:all -f:16,4,48000 -o 4ch-mix.wav
You can select the mixing mode with -z:mixmode,sum (and -z:mixmode,avg
respectively), or more permanently with the 'default-mix-mode' ecasoundrc
option. See ecasound(1) and ecasoundrc(5) for more information.
A new snapshot including the mixmode changes is available at:
http://ecasound.seul.org/download/snapshots/ecasound-2.3.6-cvs-20041222.tar.gz
Btw; this is one of the major items on the 2.4.x feature roadmap [1].
That means first 2.4 release is just around the corner.
[1] http://www.eca.cx/ecasound/todo.php
-- http://www.eca.cx Audio software for Linux!
This archive was generated by hypermail 2b28 : Wed Dec 22 2004 - 01:26:45 EET