[ecasound] mix two wav file

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

[ecasound] mix two wav file

by gunz () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all ,

i must mix two wav audio file with ecasound.

Example :

file1 : 01.wav (lenght 200 sec)
file2 : 02.wav (lenght 300 sec)
mix_time : 5 sec

file1 start playing and at 195sec start playing also file2

for this 5 sec (195->200) the two file are "mixed" , after that file1 stop and file2 continue playing to the end

I think that its simple , but i'm a newbie !

Can you help me ?


Thanks

Gunz

Re: mix two wav file

by Julien Claassen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!
   It's simple, but you have to know how.
   You want to create .ewf-files. First let me get it clear: file1 from
195-200secs, and file2 195-300secs.
   OK: Use your favourite editor to create
the_first.ewf:
source = file1.wav
offset = 195.0

the_second.ewf:
source = file2.wav
offset = 195.0

ecasound -a:1 -i the_first.ewf -ea:50 -a:2 -i the_second.ewf -ea:70
-a:all -o jack_alsa -z:mixmode,sum -c
   NOTE: -c enables interactive mode, -z:mixmode,sum says that overall
amplitude will be at 100%, -ea:50 -ea:70, amplify sound to 50% and 70%, Ok
that adds up to 120, but I assumed one of the files may rather quiet at the
end. Output result to jack_alsa, you can use anything you like (OSS, alsa,
another file...)
   Tipp: If you defintely want to limit processing time (overall length of the
output) to a time shorter than 105 (file2 plays from 195-300), then use the
option: -t:time_in_seconds (decimal values allowed).
   HTH!
   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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list

Re: mix two wav file

by gunz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Julien Claassen wrote:
First let me get it clear: file1 from 195-200secs, and file2 195-300secs.
No , I must obtain this result :

file1 = 200s
file2 = 300s

- file1 start at 0 and playing to the end (200s)
- at 195s start playing also file2 (mix with file1 for 5sec)
- file2 continue playing to the end


Thanks

Re: mix two wav file

by Julien Claassen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!
   No problem. I don't know if this is the shortest route, but it works:
# ecasound -i file2.wav -y:195 -o tmp2.wav
# edit 2.ewf
source = tmp2.wav
offset = 195

# ecasound -a:1 -i file1.wav -a:2 -i 2.ewf
   You may add -ea effects for both chains and a mixmode, like in the earlier
examples I sent you.
   HTH.
   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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@...
https://lists.sourceforge.net/lists/listinfo/ecasound-list
LightInTheBox - Buy quality products at wholesale price