Re: [ecasound] Not getting it

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Thu Apr 23 2009 - 00:26:58 EEST


On Sat, 11 Apr 2009, Dave Serls wrote:

> I'm trying to replace the first few seconds of a wav file with another
> few seconds (which might be slightly longer). Is there an interactive
> way that I can use to do this -- alternatively activating the input for
> chain 1 (the patch file) as I listen, adn copying to the output file,
> then stopping the input for chain 1, then activating the input for chain
> 2, just listening and not writing output until the moment when I want
> concatenation?

there are many ways to do it, but none of them are very easy and/or
practical. First problem is that the transport operations (play/stop) are
common for all chains, so the above doesn't really work. You can change
position of each file independently, but you'll easy lose track of things
this way.

I'd do this a bit differently:

1. first check the length of clip b, e.g.

len=`ecalength -s b.wav`

2. iterate the edit point

ecasound -a:1 -i playat,$len,select,$aoffset,$alen,a.wav \
          -a:2 -i b.wav \
          -a:1,2 -o alsa \

That plays b.wav at first, and then continues with $alen of a.wav,
skipping first $aoffset of a.wav. If you set $len to be smaller than
actual size of $b, the two files will overlap in the mix. If you don't
want to listen the whole mix from the start every time, start in
interactive mode (add '-c'), jump to correct the wanted position (with
'setpos <time-in-secs' and then 'play'). If restarting seems too
slow, you can try adjusting the offsets in edit mode (issue
'cs-edit', make changes, save and exit, then 'setpos' + 'play').

3. render

Once you are happy with the edit point, replace 'alsa' with a
filename and render.

That's still not very convient, but the best that ecasound can offer

> This would seem a common editing request, right?

To be honest, this is one of the use-cases I have listed in "maybe you
should use some other tool" section at ecasound website:

...;) ... OTOH, that page is very old, and now with the additions of
'playat', 'select' et al, the situation has been improving.

Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32.
Ecasound-list mailing list
Received on Thu Apr 23 04:15:01 2009

This archive was generated by hypermail 2.1.8 : Thu Apr 23 2009 - 04:15:02 EEST