Re: [ecasound] channel manipulation

From: Joel Roth <joelz@email-addr-hidden>
Date: Sat Sep 29 2012 - 11:14:19 EEST

Hi Patrick,

You mention the learning curve of Ecasound. I think it
reflects the curve of learning to think in
terms of audio streams and operators for manipulating
them. Similar difficulties dog those who would exercise
the full capabilities of ALSA using .alsarc files.

Part of the problem is the specifics of the language,
however a major part is the problems of conceptually
manipulating audio streams.

Okay, that said...

On Fri, Sep 28, 2012 at 11:23:09AM +1000, Patrick Shirkey wrote:
> - Tested output with these two chains to make sure I'm not being stupid:
>
> ecasound -a:1 -i test-out.wav -o alsa
> ecasound -a:1 -i test-out.wav -chmute:1 -chmute:2 -chmute:3 -chmute:4
> -ea:1000 -chmix:1 -o alsa

> I can see a very small waveform on channel 5,6 in audacity but there is no
> sound coming from those channels at all.

If the signal on channels 5,6 is meant to be a stereo output, I might test like this.

ecasound -i test-out.wav -chmove:5,1 -chmove 6,2

Note 1: I believe the output defaults to ALSA, equivalent to -o alsa,default.
Note 2: -chmove overwrites whatever was in the target channel
        so you don't need -chmute.
Note 3: Stuff in higher channels is lost when routing to an
        output device having stereo width.

Now I'll try interpreting your script. You didn't write
fully (or I couldn't figure out fully from reading your
previous mails) precisely what you want your script to accomplish.

> converter script:
>
> ecasound -t 5 -f:s16_be,6,48000 \
> -a:1,2,3,4,5,6 -i TEST_1-2.aif \ # each chain 1-6 gets a copy of six channel audio
> -a:1 -chmute:2 \ # chain 1, channel 2 is muted, other 5 channels alive
> -a:2 -chmute:1 \ # chain 2, channel 1 is muted, other 5 channels alive
> -a:3 -chmix:3 \ # chain 3, all six channels mixed to channel 3
> -a:4 -chmix:4 \ # chain 4, all six channels mixed to channel 4
> -a:5 -chmute:1 \# chain 5, channel 1 is muted, other 5 channels alive
> -a:6 -chmute:2 \ # chain 6, channel 2 is muted, other 5 channels alive
> -a:5,6 -o loop,1 \ # chains 5 and 6 summed to loop device loop,1
> -a:7,8 -i loop,1 \ # chains 7 and 8 each get copy of loop,1 stream
> -a:7 -ea:200 -chmix:5 \ # chain 7, all channels amplified, then
                           # summed in channel 5
> -a:8 -chmix:6 \ # chain 8, all channels summed in channel 6
> -a:all -o test-out.wav # all channels in all chains summed to test-out.wav

I think this may not be what you want to accomplish, because
you're summing lots of copies of the same channels.

 
> +++
>
> ecasound: ERROR: [ECA-SESSION] : "Invalid argument, unable to parse:
> "-chmix:5""
>
> ecasound -t 5 -f:s16_be,6,48000 \
> -a:1,2,3,4,5,6 -i TEST_1-2.aif \
> -a:1 -chmute:2 \
> -a:2 -chmute:1 \
> -a:3 -chmix:3 \
> -a:4 -chmix:4 \
> -a:5 -chmute:1 \
> -a:6 -chmute:2 \
> -a:5,6 -chmix:5 -chcopy:5,6 \
> -a:all -o test-out.wav
>
> +++
 
Not sure what differently you want to accomplish
with this second command.

HTH

Joel

-- 
Joel Roth
------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sat Sep 29 12:15:01 2012

This archive was generated by hypermail 2.1.8 : Sat Sep 29 2012 - 12:15:01 EEST