Re: [ecasound] Re: pyeca questions

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Re: pyeca questions
From: Paul Winkler (pw_lists_AT_slinkp.com)
Date: Tue Aug 24 2004 - 17:27:57 EEST


On Tue, Aug 24, 2004 at 12:07:20PM +0300, janne halttunen wrote:
> On Mon, 23 Aug 2004 18:19:42 -0400
> Paul Winkler <pw_lists_AT_slinkp.com> wrote:
>
> > On Wed, Jun 30, 2004 at 08:43:28AM +0300, janne halttunen wrote:
> > > On Tue, 29 Jun 2004 18:33:33 -0400
> > > Paul Winkler <pw_lists_AT_slinkp.com> wrote:
> > >
> > > > another q:
> > > > if a command returns a string in ecasound -c, should the same
> > > > command return a string to python when invoked via .command()?
> > > > I seem to always get None from all calls to .command().
> > >
> > > You can get the result from the .last_string method of the object.
> >
> > Doesn't seem so :-(
> >
> > I am logging .last_string() after EVERY command in my script
> > and usually there is no output. So far the only command I've tried
> > that actually causes last_string() to work is cs-status.
> > For examples, cs-get-position-samples leaves an empty last_string.
>
> first get the return value type with method "last_type", then value with methods ranging from "last_float" to "last_string_list"..
>
> this is why wrappers around pyeca are recommended.

oy vey, i see what you mean. Thanks for the tip.

> > Hmm, ecacontrol seems to be pretty broken here, scripts that
> > run with pyeca.ECA_CONTROL_INTERFACE() will disconnect
> > from the engine with ecacontrol.ECA_CONTROL_INTERFACE().
> > Darn.
>
> is there simple example?

Attached is the one I've been working on.
If I run it like so:

$ tocsplitter.py agitpop_plainojars.toc /tmp/foo
found 15 tracks
****************************************************************************
* ecasound v2.3.3 (C) 1997-2004 Kai Vehmanen
****************************************************************************

Native python ECI (ecasound control interface) implementation

   Can be used to replace the C implementation 'pyecasound.so'.

by Kai Vehmanen, Eric S. Tiedemann and Janne Halttunen.

(to get rid of this message, pass zero to instance init)
Writing /tmp/foo_01.wav, starting at 00:00:00, length 02:46:21
running...
timeout: s=< >, cmd=run.
Traceback (most recent call last):
  File "/home/pw/bin/python/tocsplitter.py", line 237, in ?
    process_info(parsed, prefix, trackrange)
  File "/home/pw/bin/python/tocsplitter.py", line 182, in process_info
    e.cmd("run")
  File "/home/pw/bin/python/tocsplitter.py", line 137, in cmd
    raise EcaError, error
__main__.EcaError: Connection to the processing engine was lost.

 

-- 

Paul Winkler http://www.slinkp.com



New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Aug 24 2004 - 17:28:13 EEST