Re: ecasound interactive mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 22 May 2006, Paul Coccoli wrote:

How do you add a second chain in ecasound in interactive mode?  I can

the commands issued are correct, but...

ecasound ('h' for help)> c-add t2
(eca-control) WARNING: This operation requires that chainsetup is
... disconnected. Temporarily disconnecting...

This means you are trying to modify a chainsetup that is currently connected to the processing engine. Ecasound will check whether your modification can be done in realtime (without stopping the engine) or not. In this case (the 'c-add') command, the engine must be stopped.

But, but after the modification is done...

(eca-control-objects) Added chains: t2.
(eca-chainsetup) Unable to connect: Chain "t2" is not valid. Following errors
... were detected:
(eca-chainsetup) Chain "t2" is not connected to any input. All chains must have
... exactly one valid input. (2.1-NO-CHAIN-INPUT)
(eca-chainsetup) Chain "t2" is not connected to any output. All chains
must have
... exactly one valid output. (2.2-NO-CHAIN-OUTPUT)
ERROR: Can't reconnect chainsetup.

So adding the new chain was succesful, but then ecasound was not able anymore to reconnect your modified chainsetup to engine, and thus the error messages. You can still continue by connecting 't2' to some input and output, and then reconnect (cs-connect, or just 'start' which does an implicit cs-connect).

Well, ok, so then I quit, restart with 1 chain again, THEN create new
input and output, and try to create a second chain:

ecasound ('h' for help)> ai-add jack_auto
(eca-control-objects) Added audio input "jack_auto".
ecasound ('h' for help)> ao-add jack_auto
(eca-control-objects) Added audio output "jack_auto".
ecasound ('h' for help)> c-add t2
(eca-control-objects) Added chains: t2.
ecasound ('h' for help)> c-list
t1,t2
ecasound ('h' for help)> start
(eca-chainsetup) Unable to connect: Chain "t2" is not valid. Following errors
... were detected:

Stuart, Joel, et al already gave good answers, but to add a few comments, basicly you should first select the chain "c-select t2" and _then_ add the audio objects with ai-add/ao-add. Or if you already have all the objects, first select the chains, select an input/output (ai-select), and attach (ai-attach). To understand what is going on, see the output of "aio-status" and "cs-status", which show you all the chains and their input/outputs.

Hmm.  If a chain MUST have one valid input and output, but inputs and
outputs need to be connected to a chain, THEN ITS A PARADOX AND MY
HEAD EXPLODES!

My apologies, maybe I should add a disclaimer about possible head overheating problems. :)

What you are missing here is that the 'must have one valid input and output' rule applies only when you try to connect a chainsetup to the engine. You can always 'cs-disconnect', do any modifications you need, and then 'cs-connect' again.

Seriously, for all those wondering why this seems so complex, the ecasound setup logic has its roots in the original command-line syntax (which is much older than the interactive mode interface): the ability to specify multiple parallel processing chains, and to allow connecting input/outputs to multiple chains. So for example:

ecasound -a:1,2 -i foo.wav -a:1 -efl:1000 -o out1.wav -a:2 -efh:1000 -o out1.wav

IOW: Read audio from foo.wav, process it with a 1kHz lowpass filter and write to out1.wav, and in parallel, process with a 1kHz highpass filter and write to out2.wav.

This nicely transforms into a stream of interactive mode commands:

--cut--
c-add 1
c-add 2
c-select 1,2
ai-add foo.wav
c-select 1
cop-add -efl:1000
ao-add out1.wav
c-select 2
cop-add -efh:1000
ao-add out1.wav
start
--cut--

By combining the object creation and routing this way, it is possible to support most common scenarios [1], but still with reasonably understandable syntax.

[1] http://eca.cx/ecasound/Documentation/examples.html

--
 links, my public keys, etc at http://eca.cx/kv

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux