Re: [ecasound] independent L/R channel access

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] independent L/R channel access
From: Kai Vehmanen (k_AT_eca.cx)
Date: Sat Feb 09 2002 - 19:10:03 EET


On Sat, 9 Feb 2002, Jesse Chappell wrote:

> I need independent control of the L and R channels within ecasound. I'm
> using an ens1371 and I need one chain's input to be only the left and
> another chain's input to be only the right channel. I can't seem to find
> the right params to -f or -i (using OSS or ALSA) to make this happen. It

No problem, you just need to do the deinterleaving manually:

ecasound -a:left_chain,right_chain -i stereo_file.wav \
         -a:left_chain -eac:0,2 \
          -a:right_chain -rc:2,1 -eac:0,2 \
         -a:left_chain -f:16,1,44100 -o mono_file1.wav \
         -a:right_chain -f:16,1,44100 -o mono_file2.wav

1. copy data from 'stereo_file.wav' to two chains
2. left_chain: mute the right ch, write to 'mono_file1.wav'
3. right_chain: copy from left to right ch (2->1) and
                then mute ch 2, write to 'mono_file2.wav'

Muting the second chain is not really necessary (even if the
chains contained >2 channels of audio, only the first one would be written
to the mono output files), but if you want to add your own plugins in the
chains, then you may want them to only see audio on the first channel
(plugins/chainops always have access to all audio data on the chain).

I'm open to suggestions on how to make this easier. The current mechanisms
a bit clumsy, but it has proven to be usable and flexible enough. The
worst case scenario is deinterleaving an input with huge number of
channels.

One possibly solution is adding a new audio object type that could handle
the deinterleaving. Something like:

ecasound -a:1 -i deileave,4ch_file.wav,1 \
         -a:2 -i deileave,4ch_file.wav,2 \
         -a:3 -i deileave,4ch_file.wav,3 \
         -a:4 -i deileave,4ch_file.wav,4 \
        ...
        
Deileave would select only one channel from a multichannel object. This
could be implemented quite efficiently (data is read/written only once).

-- 
 http://www.eca.cx
 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Feb 09 2002 - 19:00:45 EET