Re: [ecasound] Could someone explain (me too) how chain setup works?

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Could someone explain (me too) how chain setup works?
From: Marco Ciampa (ciampix@libero.it)
Date: Fri Mar 02 2001 - 12:04:31 EET


Kai Vehmanen wrote:
>
> On Thu, 1 Mar 2001, Marco Ciampa wrote:
>
> > -a:1 -i:piano.wav -y:5
> [...]
> > start (starts with piano at 5.00 and chief at 0.00, right)
> [...]
> > setpos 0
> > start (now starts with piano at 0.00 and chief at 0.00, wrong!!!)
> > it seems that it does not read cs anymore!
> > if you do a cs-connect and cs-disconnect, pos remains untouched (why?)
> > and I have to exit (sigh!) to reset the 'master pointer' of setpos.
>
> Position information in ecasound is closely tied to the objects
> themselves. When a chainsetup is parsed, audio objects are created and
> a starting position is assigned to them. The '-y' option affects at this
> stage. When engine is started, it doesn't reset audio object positions.
> Engine does maintain its internal position, but it's not directly related
> to audio objects.
>
> When altering the current position, you have different alternatives:
> 'aio-setpos' sets the position for one specific audio object. Chains don't
> contain any position info, so 'c-setpos' affects all audio objects
> connected to the selected chain (ie. 1 input and 1 output).
>
> Then we come to 'setpos' command you used in your example. Like chains,
> chainsetups don't contain position info, so 'setpos' is equivalent to
> "c-select-all ; c-setpos x" - in other words we set the position for all
> audio objects in the current chainsetup.
>
> So in your example, "setpos 0" overrides "-y:5", because '-y' only affects
> when chainsetup is initially parsed (after 'cs-load' or 'cs-edit'). Best
> way to solve these problems is to wrap piano.wav inside a ewf-file. This
> way you can make sure that the 5sec offset is honoured in all
> circumstances. An alternative approach would be to set the 5sec offset
> manually... "setpos 0 ; aio-select-input piano.wav ; aio-setpos 5
> ; start".
Thanks this is a (clumsy you see) solution...but I really need something
easiest and more powerful than this...

If only ewf file worked like you described...
I have dowloaded from CVS ecasound 1.9dev3.
1. no segfault with ewf - ok fixed
but remains:
2. I have these:

file a.cs

>-b:1024 -sr:44100 -n:command-line-setup
>-a:1 -f:s16_le,2,44100 -i:i1.ewf,
>-a:2 -f:s16_le,2,44100 -i:i2.ewf,
>
>-a:1,2 -f:s16_le,2,44100 -o:/dev/dsp0
>
>-a:1
>-a:2

file i1.ewf

>source = piano.wav
>offset = 0
>looping = no
>start-position = 5
                    
file i2.ewf

>source = chieft.wav
>offset = 0
>looping = no
>start-position = 0

ecasound -c
cs-remove
cs-load a.cs
cs-connect
fs

- [ Controller/Audio input/output status ]
---------------------------------
Input (i1): "i1.ewf" - [Ecasound wave file]
 -> connected to chains "1": position (0.000/96.549) seconds.
                                       ^^^^^
 -> open, s16_le/2ch/44100Hz, buffer 0.
Input (i2): "i2.ewf" - [Ecasound wave file]
 -> connected to chains "2": position (0.000/163.344) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 0.
Output (o1): "/dev/dsp0" - [OSS soundcard device]
 -> connected to chains "1,2": realtime-device, processed 0 samples.
 -> open, s16_le/2ch/44100Hz, buffer 1024.

And you see i1 has a WRONG start position!
But if I do a start it really starts at 5.000 !

start
stop
fs

- [ Controller/Audio input/output status ]
---------------------------------
Input (i1): "i1.ewf" - [Ecasound wave file]
 -> connected to chains "1": position (1.741/96.549) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Input (i2): "i2.ewf" - [Ecasound wave file]
 -> connected to chains "2": position (1.741/163.344) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Output (o1): "/dev/dsp0" - [OSS soundcard device]
 -> connected to chains "1,2": realtime-device, processed 0 samples.
 -> open, s16_le/2ch/44100Hz, buffer
1024.

But in reality i1 is started at 5.000 (and it signals a lenght of 96.549
that is of 5.000 seconds longer than the real sound-object)

Bad news do not stops here... :-(

if I do a setpos 0 ...

- [ Controller/Audio input/output status ]
---------------------------------
Input (i1): "i1.ewf" - [Ecasound wave file]
 -> connected to chains "1": position (0.000/96.549) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Input (i2): "i2.ewf" - [Ecasound wave file]
 -> connected to chains "2": position (0.000/163.344) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Output (o1): "/dev/dsp0" - [OSS soundcard device]
 -> connected to chains "1,2": realtime-device, processed 0 samples.
 -> open, s16_le/2ch/44100Hz, buffer 1024.

and now :-( what I see is really corrispondant to what I ear, ewf setup
cleared and I have to do a cs-disconnect and a cs-connect to re-set the
sound-obj pointers.

.. dulcis in fundo ...

get-position now works correct but it eats the last (ms) digit...

fs

- [ Controller/Audio input/output status ]
---------------------------------
Input (i1): "i1.ewf" - [Ecasound wave file]
 -> connected to chains "1": position (2.531/96.549) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Input (i2): "i2.ewf" - [Ecasound wave file]
 -> connected to chains "2": position (2.531/163.344) seconds.
 -> open, s16_le/2ch/44100Hz, buffer 1024.
Output (o1): "/dev/dsp0" - [OSS soundcard device]
 -> connected to chains "1,2": realtime-device, processed 0 samples.
 -> open, s16_le/2ch/44100Hz, buffer 1024.

get-position

2.53

and the round operation is wrong because if fs shows respectively

3.654
3.655
3.656

get-position shows

3.65
3.65
3.66

that is NOT correct.

3. Kai Vehmanen wrote:
>
> On Thu, 1 Mar 2001, Marco Ciampa wrote:
>
> > ecasound ('h' for help)> fs
> [...]
> > -> connected to chains "1": position (10.642/96.549) seconds.
> [...]
> > ecasound ('h' for help)> rw 1.000
> [...]
> > -> connected to chains "1": position (10.000/96.549) seconds.
>
> Yup, it's a bug alright. Fixed in the CVS-tree...
No,I downloaded CVS iesterday and it works like before...truncating the
decimals

4.
The unique situation in that setpos really works is:
setpos 0 (or setpos x)
cs-disconnect
cs-connect
It works but, again, it does not re-set chains pointers
if I do a setpos x without the cs-disconnect/cs-connect cycle it wipe
out internal data read from ewf files.

bye

PS: I HAVE to do that Kay is such a kind guy!
    I do not say this because I want the bugs fixed ;-)
    Ecasound is a GREAT piece of software and Kay is doing a great work
in listening the lusers
    like me that complains about the bugs that are not able to fix by
themself...

-- 
Have the courage to take your own thoughts seriously, for they will
shape
you. -- Albert Einstein  

Marco Ciampa Open IT S.r.l | ciampix AT libero.it | openit AT libero.it

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request@wakkanet.fi>.


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Mar 02 2001 - 12:20:57 EET