Re: channel manipulation

"Patrick Shirkey" <[email protected]>
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <[email protected]>
On Sat, September 29, 2012 7:25 pm, Joel Roth wrote:
> On Sat, Sep 29, 2012 at 06:54:11PM +1000, Patrick Shirkey wrote:
>
>> On Sat, September 29, 2012 6:14 pm, Joel Roth wrote:
>> > 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.
>> >
>>
>> It's more about the syntax. Being text based it is easy to make mistakes
>> in the signal flow but I am getting my head around it now. It's an
>> elegant
>> way of getting things done once you know what you are doing.
>
> Yes, elegant and yes, with syntactical requirements like
> any programming language.
>
>> The input file is a stereo track. The output file is a 6 channel track.
>
> Oops.
>
>> >> 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.
>> >
>>
>> The input track is a stereo track so I am only summing copies of the
>> left
>> and right signal input signal.  The output track is a 6 channel track. I
>> have removed all the additional processing filters to minimise confusion
>> ;-)
>
> Okay, well the comments above still apply, even if the input
> is just two channels. :-)
>

Yep. So should that result in silence on channels 5,6 ?

>
>> >> +++
>> >>
>> >> 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.
>>
>> With the first command I get silence on channels 5,6 output. With the
>> second command I am trying to chmix a:5,6 to channel 5 to see if that
>> gives me an audible signal on the output track. However it fails for
>> some
>> reason. It doesn't want to chmix chain 5 and 6 at the same time. It is
>> happy to do them individually for chain 3 and 4. I'm not sure why that
>> would be a problem though.
>
> I would try creating your setup in small pieces and testing
> each piece. If you can get a good result processing
> chains separately, I would go for that.
>

Ok, With the multi pass approach I have to do the following:

1: Create a four channel track with the correct filters
2: Create a mono track with the left signal inverted
3: Create a new mono track with the track from step 2 summed with the
right channel from the original file
4: Apply my filters on the mono track from step 3 and output a stereo track
5; Combine the 4 channel track from step 1 with the stereo track from step
4 and write a new 6 channel track

That by itself is not a problem but it will add a lot more time to my
processing task I have over 30 hours of audio to process, so I would
prefer to use a single pass solution if possible. Anyway for now I will
program the steps above and if someone has an idea on why the single pass
chain does not work then I will be happy to modify it.

> You may also find it easier (as I do) to write your commands to a file
> (e.g. Setup.ecs) and load it with
>
> ecasound -c -s Setup.ecs
>

I already have a bash script so I'm running it like this:

sh convert.sh


> That way it's more like writing and testing any other program.
>
> Have fun (and working chain setups)
>
> Joel
>


--
Patrick Shirkey
Boost Hardware Ltd

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.