Re: [ecasound] ecasound and lua?

From: Joel Roth <joelz@email-addr-hidden>
Date: Tue Jul 27 2010 - 05:29:14 EEST

On Mon, Jul 26, 2010 at 04:47:17PM +0200, Philipp ??berbacher wrote:
> Excerpts from Joel Roth's message of 2010-07-26 10:43:34 +0200:
> > On Mon, Jul 26, 2010 at 12:59:21AM +0200, Philipp ??berbacher wrote:
> > > The features I have planned at this time are:
> > > 1) A fast 'takes' system
> > > 2) simple recording
> > > 3) simple playback
> > >
> > > 1) No major problems here, it should be a matter of a couple of string
> > > operations. One thing I have yet to figure out is how to specify the
> > > location of the file it records, it seems the home directory is the
> > > default.
> >
> > If you specify "-o:foo.wav", I believe Ecasound will record
> > foo.wav to whatever is the current directory in the shell
> > where the Ecasound process is started up.
> >
> > If you specify "-o:/some/path/foo.wav", Ecasound will
> > record exactly there.
> >
> > (As Ecasound IAM, probably "ao-add /some/path/foo.wav".)
>
> Thanks, this seems to work fine, as long as the path already exists :)

No problem then, since you're a master of your own system. :-)
 
> > The Examples and User Manual docs are your best
> > reference for common tasks. :-)
>
> One thing I couldn't find: How do I quit ecasound via net-eci?
> 'quit' quits only the connection, that much it did tell me :)

Why do you need to close Ecasound? If you issue
cs-disconnect, Ecasound will stay there quietly and happily.

If you need it, how about the lua equivalent to
system('killall ecasound') ?
 
> > > 2) I have a hard time figuring out what's needed to prepare a chain
> > > setup for recording.
> > >
> > > - a chain setup, selected
> > > - a chain, selected
> > > - input and output for the chain
> > > - engine-launch
> > > - start
> >
> > A chain needs to be selected only for adding/removing chain
> > operators, adjusting chain operator parameters, etc.
> >
> > A newly created or loaded chain setup is automatically
> > selected.
> >
> > Starting the engine automatically launches the engine
> > if necessary.
>
> I think I'll try to be verbose for now. At some point it may give more
> control over what happens.
>
> > > And for shutdown?
> > > - stop
> > > - and then? It seems my file wasn't properly closed.
> >
> > I believe stop should be enough for Ecasound to close
> > the file.
>
> A subsequent start seems to be able to continue with the same file
> though.

Okay, then what about stop, then cs-disconnect?
 
> > > I do record from jack, but the bitdepth was set to 16bit. I couldn't
> > > figure out how to change that.
> > >
> > >From the command line (or in a chain setup file):
> >
> > -i:jack,system -f:f32_le,1,44100 -o:foo.wav
> >
> > This records in 32-bit floating point format (same as JACK input)
> >
> > As an Ecasound IAM command, I believe the equivalent is:
> >
> > cs-set-audio-format f32_le,1,44100
>
> Ah, yes, that works too :)
> I most likely missed the _le part

I believe that little-endian (_le) is the default, and
can be omitted.

> I would have expected it to default to the input format, and I think I
> read some piece of documentation somewhere that says it does.
>
I believe that the specified format applies to all
subsequent inputs or outputs. So the command order
might be:

add chain
specify format 1
create input
specify format 2
create output

> > > There's also this line, from aio-status, which doesn't tell me a lot:
> > > -> closed, audio format not available until object is opened.
>
> This is still a bit confusing for me, no idea what it tries to tell me.

Perhaps you'll see something after engine-launch.

And if you have specified it yourself, you don't
really need an answer :-)
 
> > > I don't have it in git or anything yet, that may happen after the
> > > current deadline is reached. I attach the current version of the code
> > > though, in case someone is interested.
> >
> I spent most of today to hunt and squash a single bug. Almost
> frustrating :/
> I did find the problem and a rather ugly solution that I don't fully
> understand.
> The issue I have is ecasounds response when I send it a String
> containing nothing but "\r\n".
> It seems to send two responses, first:
> 256 0 -
>
> And then an empty string as a separate response. It may just be an
> additional <crlf><crlf>. Anyway, the response is different from others.
> My program assumes a single response in order to correlate the sent
> message with the response, so this additional response confused it.
> Well, did you experience something similar? Other responses work fine.

I haven't observed this. Maybe just dumb luck on my part.
 
> I guess those are the fine subtleties that make programming fun :)

Yes! You will be facing all these issues so that others
after you won't have to. :-)

Cheers,

Joel
 
> Regards,
> --
> Philipp
>

-- 
Joel Roth
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Tue Jul 27 08:15:02 2010

This archive was generated by hypermail 2.1.8 : Tue Jul 27 2010 - 08:15:02 EEST