Making a mix from multiple WAVs faster

View: New views
10 Messages — Rating Filter:   Alert me  

Making a mix from multiple WAVs faster

by Tomás Arribas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I've made on online Flash-based sequencer, and I'm using Ecasound for
building the MP3 mixdown of the song the user makes.

http://www.aftertheice.com/mixer/

The way I'm doing it now, the mixdown it's working perfectly (not so
much the mixer itself, but that's a Flash issue), but it is very slow.

What I do is to mix each sample of each track, one at a time. Then I
mix all the tracks together, and finally I convert to MP3.

This is an example of the list of commands executed for a very short
song: 4 tracks with a total of 23 samples, amounting to ~25 seconds of
sound.

http://www.aftertheice.com/mixer/mixdump.txt

It takes around 55 seconds to generate the final MP3 file. The server
is a dedicated Athlon64 3800+ (2.1ghz) with 1GB RAM running Fedora
Core 6 with Ecasound 2.4.6.1. The song name is "Strange Attractor" in
the mixer's top songs list, in case you want to test it by yourself.

Any idea on how to make this better? The only thing I need is to mix
samples at exact millisecond positions in a track, and be able to cut
them at the beggining and end, as the user can trim the samples in the
mixer. I don't need effects or any fancy stuff.


Thanks!

-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Julien Claassen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Tomás Arribas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>:

> 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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Tomás Arribas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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/Acoustic
Guitar 10.wav"
-a:19 -i playat,10.2050153644481,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acoustic
Guitar 11.wav"
-a:20 -i playat,12.2575098528248,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acoustic
Guitar 14.wav"
-a:21 -i playat,14.3004281616289,select,0,2.043,"samples/Gurthrond/wav/Guitar/Acoustic
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@...>:

> 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@...>:
>> 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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Stuart Allie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@... [mailto:ecasound-list-
> bounces@...] On Behalf Of Tomás Arribas
> Sent: Monday, 4 August 2008 1:23 PM
> To: julien@...
> Cc: ecasound-list@...
> 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@...>:
> > 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@...>:
> >> 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@...
> 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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Tomás Arribas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>:

> 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@... [mailto:ecasound-list-
>> bounces@...] On Behalf Of Tomás Arribas
>> Sent: Monday, 4 August 2008 1:23 PM
>> To: julien@...
>> Cc: ecasound-list@...
>> 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@...>:
>> > 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@...>:
>> >> 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@...
>> 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@...
> 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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Kai Vehmanen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Mon, 4 Aug 2008, Stuart Allie wrote:

[example of loop device use in user's guide]
> 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

wow, that's pretty bad. The example in the user's guide is now
fixed (online plus in the git tree).

> 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.

Actually this is a special case that only applies to loop devices.
Normally, whenever you have a "-i:foo" or "-o:foo" option, a new object is
created. If you specify "-o:foo" twice, two separate objects are created.
The only exception to this is the loop device. The loop id number is a
global value, and for a given ID (e.g. '1', all loop input/outputs (e.g.
'-i:loop,1' and '-o:loop,1') will point to the same to same object
instance.

I guess ecasound should detect this specific case and give a proper
error message. In theory ecasound could also "fix up" the chainsetup
so that:

  ecasound -a:1 -i foo -o loop,1 \
   -a:2 -i foo2 -o loop,1

... would be automatically converted to the correct syntax:

  ecasound -a:1 -i foo -a:2 -i foo2 \
           -a:1,2 loop,1

But this is a bit dangerous, as with other input/output types the above
two commands really are different. E.g.:

  ecasound -a:1 -i foo -o jack \
   -a:2 -i foo2 -o jack
  ecasound -a:1 -i foo -a:2 -i foo2 \
   -a:1,2 jack

Both commands will work, but cause different things to happen: the first
one will create two JACK client objects ("foo" and "foo2" not mixed),
while the latter will create just one (the files are mixed).

--

-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

feature request: please allow alphanumeric names for loopback devices

by Sergei Steshenko-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Kai, All,

ecasound allows chains to have alphanumeric names, and it is good, as least
to my taste, since intuitively I associate numbers with channels.

However, loopback devices can have only numbers as names at the moment.

I suggest to implement the same rules for loopback devices as for chains,
I think it will make complex command lines look more understandable and
intuitive.

Thanks,
  Sergei.


     

-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: Making a mix from multiple WAVs faster

by Dubphil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kai Vehmanen a écrit :

> But this is a bit dangerous, as with other input/output types the above
> two commands really are different. E.g.:
>
>   ecasound -a:1 -i foo -o jack \
>    -a:2 -i foo2 -o jack
>   ecasound -a:1 -i foo -a:2 -i foo2 \
>    -a:1,2 jack
>
> Both commands will work, but cause different things to happen: the first
> one will create two JACK client objects ("foo" and "foo2" not mixed),
> while the latter will create just one (the files are mixed).
>  
Like the loops, perhaps you could add a number to the output so the
problem should be solved :

ecasound -a:1 -i foo -o jack,1 \
   -a:2 -i foo2 -o jack,1
=

ecasound -a:1 -i foo -a:2 -i foo2 \
   -a:1,2 jack,1


Regards

Philippe


-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: feature request: please allow alphanumeric names for loopback devices

by Kai Vehmanen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Tue, 5 Aug 2008, Sergei Steshenko wrote:

> ecasound allows chains to have alphanumeric names, and it is good, as least
> to my taste, since intuitively I associate numbers with channels.
>
> However, loopback devices can have only numbers as names at the moment.

that's a good idea and easy to implement. This is now done and related
code+documentation updated and pushed to the git tree.

So now you can do:

ecasound -a:c1 -i foo.wav -o loop,vocals \
          -a:c2 -i loop,vocals -o null

--

-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list
LightInTheBox - Buy quality products at wholesale price!