Re: [ecasound] ecasound and lua?

From: Joel Roth <joelz@email-addr-hidden>
Date: Mon Jul 26 2010 - 11:43:34 EEST

On Mon, Jul 26, 2010 at 12:59:21AM +0200, Philipp ??berbacher wrote:
> What I have so far is a simple NET-ECI client that can send commands to
> ecasound and read the replies. No parsing or anything fancy is done yet.
> It is enough to control ecasound from CLI, and I'm very proud that I've
> come this far.
> I do have a clear goal for the next few days; I want to use it to record
> a little CD.
> The problems I face at the moment are related to ecasound itself. I try
> to figure out the commands necessary to set ecasound up the way I need
> it for this specific recording. It's going to be a rather static setup
> for now, but I have to start somewhere.
> The features I have planned at this time are:
> 1) A fast 'takes' system
> 2) simple recording
> 3) simple playback
> I did manage to find the magical incantations to get it to record, so it
> seems like the goal is reachable. I met some stumbling blocks however.
> 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".)

The Examples and User Manual docs are your best
reference for common tasks. :-)
> 2,3) I think I could create two chain setups, one for recording, one for
> playback, and switch between those.
> 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

Starting the engine automatically launches the engine
if necessary.
> 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.
> 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
> There's also this line, from aio-status, which doesn't tell me a lot:
> -> closed, audio format not available until object is opened.
> 3) playback should be relatively straight-forward, provided I can figure
> out how to specify the correct path.

See above
> I think I'll keep CLI I/O for the moment. Even if it means some parsing
> or pattern matching, it's likely easier than learning gtk. I don't
> intend to stick with CLI though, Joel seems to have covered that pretty
> well.
> 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 am, lua (with your commenting :) is quite easy to read.
> It's a lot of fun :)
> Best 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:;226879339;13503038;l?
Ecasound-list mailing list
Received on Mon Jul 26 12:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 26 2010 - 12:15:03 EEST