Re: [ecasound] Making a mix from multiple WAVs faster

From: Tomás Arribas <Tomas@email-addr-hidden>
Date: Mon Aug 04 2008 - 06:48:13 EEST

Ah, I see. Now the errors make sense. An update on that in the User
Guide will be great, as it is the only example in the User Guide for
the Loop Device and it can be quite misleading!

In any case, I love to tinker and think different ways to solve stuff,
so I had fun while figuring out the alternative method. And I learnt
more about Ecasound in the proccess. So no prob! Thanks for the
explanation on the logic behind it.

Tomás

2008/8/4 Stuart Allie <Stuart.Allie@hydro.com.au>:
> Hi,
>
> Sorry I didn't see this before - might have save you some time. The documentation is wrong. When you assign chains to an output, it disconnects any chains already assigned to that output and then connects only the currently selected chains. I don't think the documentation spells that out explicitly anywhere.
>
> So:
> -a:1 -o:loop,1
> -a:2 -o:loop,1
> will result in only chain 2 being connected to loop 1; chain 1 will have no output connected, hence the error message 'Chain "1" is not connected to any output'.
>
> As you have discovered; this will work:
> -a:1,2 -o:loop,1
> as there are 2 selected chains (1 and 2) and they will both be connected to the loop output. Ecasound has worked this way for a long time; unfortunately, the doco is incorrect.
>
> Cheers,
> Stuart
>
>
>> -----Original Message-----
>> From: ecasound-list-bounces@lists.sourceforge.net [mailto:ecasound-list-
>> bounces@lists.sourceforge.net] On Behalf Of Tomás Arribas
>> Sent: Monday, 4 August 2008 1:23 PM
>> To: julien@c-lab.de
>> Cc: ecasound-list@lists.sourceforge.net
>> Subject: Re: [ecasound] Making a mix from multiple WAVs faster
>>
>> Solved, I did it!
>>
>> Finally I had to group all the chains into each loop device output,
>> instead of assigning the loop output to each chain. Like this:
>>
>> ecasound -a:1 -i
>> playat,0,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums 3.wav"
>> -a:2 -i
>> playat,2.04291830880413,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 3.wav"
>> -a:3 -i
>> playat,4.08264455775075,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 3.wav"
>> -a:4 -i
>> playat,6.12237080669737,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 3.wav"
>> -a:5 -i
>> playat,8.17167323521651,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 6.wav"
>> -a:6 -i
>> playat,10.2050153644481,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 6.wav"
>> -a:7 -i
>> playat,12.2575098528248,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 6.wav"
>> -a:8 -i
>> playat,14.3004281616289,select,0,2.043,"samples/Gurthrond/wav/Drums/Drums
>> 6.wav"
>> -a:1,2,3,4,5,6,7,8 -o loop,1
>> -a:9 -i playat,0,select,0,4.086,"samples/Gurthrond/wav/Piano/Piano 6.wav"
>> -a:10 -i
>> playat,4.08264455775075,select,0,4.086,"samples/Gurthrond/wav/Piano/Piano
>> 6.wav"
>> -a:11 -i
>> playat,8.17167323521651,select,0,4.086,"samples/Gurthrond/wav/Piano/Piano
>> 7.wav"
>> -a:12 -i
>> playat,12.2575098528248,select,0,4.086,"samples/Gurthrond/wav/Piano/Piano
>> 8.wav"
>> -a:9,10,11,12 -o loop,2
>> -a:13 -i
>> playat,6.12237080669737,select,0,2.043,"samples/Gurthrond/wav/Piano/Piano
>> 5.wav"
>> -a:14 -i
>> playat,8.17167323521651,select,0,2.043,"samples/Gurthrond/wav/Bass/Bass
>> 6.wav"
>> -a:15 -i
>> playat,10.2050153644481,select,0,2.043,"samples/Gurthrond/wav/Bass/Bass
>> 6.wav"
>> -a:16 -i
>> playat,12.2575098528248,select,0,2.043,"samples/Gurthrond/wav/Bass/Bass
>> 5.wav"
>> -a:17 -i
>> playat,14.3004281616289,select,0,2.043,"samples/Gurthrond/wav/Bass/Bass
>> 5.wav"
>> -a:13,14,15,16,17 -o loop,3
>> -a:18 -i
>> playat,8.17167323521651,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acous
>> tic
>> Guitar 10.wav"
>> -a:19 -i
>> playat,10.2050153644481,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acous
>> tic
>> Guitar 11.wav"
>> -a:20 -i
>> playat,12.2575098528248,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acous
>> tic
>> Guitar 14.wav"
>> -a:21 -i
>> playat,14.3004281616289,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acous
>> tic
>> Guitar 11.wav"
>> -a:18,19,20,21 -o loop,4
>> -a:22 -i loop,1 -ea:100
>> -a:23 -i loop,2 -ea:100
>> -a:24 -i loop,3 -ea:100
>> -a:25 -i loop,4 -ea:63.9
>> -a:25,24,23,22 -o "downmix/Strange Attractor202646.mp3"
>>
>> Now it's working INCREDIBLY faster. It now takes less than 10 seconds
>> to make this MP3, and before it took 55 seconds! Incredible
>> improvement.
>>
>> But that's not the best thing. There's a long song in the mixer, made
>> of around 200 samples, 2 minutes long. Before, it took around 8
>> minutes to downmix (no kidding). Now it takes... 30 seconds!! I can't
>> belive it. What an amazing difference!
>>
>> But I don't know why the first method failed. There is an example in
>> the Ecasound User Guide which does it exactly like that.
>>
>> Extracted from "7.1.1 Example of use" [of the Audio loop devices] of
>> the User Guide:
>>
>> ecasound -a:1 -i:some.mp3 -o:loop,1
>> -a:2 -i:another.mp3 -o:loop,1
>> -a:3 -i:loop,1 -o alsa -ea:200
>>
>> But if you do that, it fails. Is this a bug in the pre4 or a syntax
>> change?
>>
>> In any case, I'm really happy about how this is working. Ecasound
>> 2.5.0 is going to be a truly magnificent piece of software.
>>
>> 2008/8/3 Tomás Arribas <Tomas@cactilio.com>:
>> > Julien, thank you for your answer.
>> >
>> > I have installed the v2.4.7pre4_2.5.0 for testing the method that you
>> > suggested and I'm making some progress so far.
>> >
>> > This is the command I'm generating for a song of 3 samples, one after
>> > the other, in one track:
>> >
>> > ecasound -a:1 -i playat,0,select,0,2.414,"samples/Balin's
>> > Tomb/wav/Bass/Bass 1.wav" -o loop,1
>> > -a:2 -i playat,2.41436547457371,select,0,2.414,"samples/Balin's
>> > Tomb/wav/Bass/Bass 1.wav" -o loop,1
>> > -a:3 -i playat,4.82873094914743,select,0,2.414,"samples/Balin's
>> > Tomb/wav/Bass/Bass 1.wav" -o loop,1
>> > -a:4 -i loop,1 -o loop,6 -ea:100
>> > -a:5 -i loop,6 -o "downmix/untitled407123.mp3"
>> >
>> > But at execution, I meet this error:
>> >
>> > (eca-session) Note! Unable to create a valid chainsetup from the
>> command-line
>> > ... arguments.
>> > (eca-chainsetup) Unable to connect: Chain "1" is not valid. Following
>> > errors were
>> > ... detected:
>> > (eca-chainsetup) Chain "1" is not connected to any output. All chains
>> must have
>> > ... exactly one valid output. (2.2-NO-CHAIN-OUTPUT)
>> > (eca-chainsetup) Unable to connect: Chain "2" is not valid. Following
>> > errors were
>> > ... detected:
>> > (eca-chainsetup) Chain "2" is not connected to any output. All chains
>> must have
>> > ... exactly one valid output. (2.2-NO-CHAIN-OUTPUT)
>> > (eca-chainsetup) WARNING: Output "loop,1" is not connected to any chain.
>> > ... (3.2-DISCON-OUTPUT)
>> > (eca-chainsetup) WARNING: Output "loop,1" is not connected to any chain.
>> > ... (3.2-DISCON-OUTPUT)
>> >
>> > But, if I use only 1 sample, like this:
>> >
>> > ecasound -a:1 -i playat,0,select,0,2.414,"samples/Balin's
>> > Tomb/wav/Bass/Bass 1.wav" -o loop,1
>> > -a:4 -i loop,1 -o loop,6 -ea:100
>> > -a:5 -i loop,6 -o "downmix/untitled407123.mp3"
>> >
>> > It works!
>> >
>> > Why is this? All the sample-filled chains definitely have an output
>> > (loop,1), so why the error of chain 1 and 2 not having outputs set
>> > when I use more than one sample?
>> >
>> > Thanks!
>> >
>> > Tomás
>> >
>> > P.S I'm routing loop,1 through loop,6 at the end so I can change the
>> > full track volume (with -ea:). This will make sense when I mixdown the
>> > 5 tracks of the mixer.
>> >
>> >
>> >
>> >
>> > 2008/8/1 Julien Claassen <julien@c-lab.de>:
>> >> Hi!
>> >> 1. You could directly ouput the downmix to an mp3 file:
>> >> ecasound -a:1 -i ... -a:2 -i ... ... -a:all -o output.mp3
>> >> 2. You can probably trim all files with one command as well:
>> >> ecasound -a:1 -i file1.wav -o out1.wav -y:2.3 ... -a:2 -i file2.wav -o
>> >> out2.wav -y:0 ... -a:N -i fileN.wav -o outN.wav -y:3.1 ...
>> >> I guess you can do the full process in one command. Using the latest
>> >> ecasound snapshot the pre4-2.5.0.
>> >> There are the playat and other nice audio ops.
>> >> If you can manage there are a lot of advantages:
>> >> 1. Storage minimisation
>> >> 2. Only one ecasound command
>> >> 3. Which means: all the initialisation phases are reduced to one.
>> >> PLEASE all have a look at this, for I'm not 100% sure:
>> >> ecasound -a:1 -i playat,play_time,file1.wav -y:start_trim -gc:... -
>> ea:...
>> >> (the other chains) -a:all -o output.mp3
>> >> Just noticed again: Playat just moves the sample along the time of the
>> >> complete song. thus:
>> >> ecasound -i playat,2,file.wav -o output.wav
>> >> will play file.wav completely, but with 2 seconds silence at the start
>> of
>> >> the output.wav.
>> >> Where the syntax:
>> >> ecasound -i file.wav -y:2.0 -o output.wav
>> >> will play file.wav 2seconds in, no silence gap in front. If you get
>> what I
>> >> mean. I know it can get fuzzy around here.
>> >> Kindest regards
>> >> Julien
>> >>
>> >> --------
>> >> Music was my first love and it will be my last (John Miles)
>> >>
>> >> ======== FIND MY WEB-PROJECT AT: ========
>> >> http://ltsb.sourceforge.net
>> >> the Linux TextBased Studio guide
>> >> ======= AND MY PERSONAL PAGES AT: =======
>> >> http://www.juliencoder.de
>> >>
>> >
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Ecasound-list mailing list
>> Ecasound-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ecasound-list
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecasound-list
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Mon Aug 4 08:15:03 2008

This archive was generated by hypermail 2.1.8 : Mon Aug 04 2008 - 08:15:03 EEST