Re: [ecasound] Question about well-formed output

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

Subject: Re: [ecasound] Question about well-formed output
From: Kai Vehmanen (k_AT_eca.cx)
Date: Fri Oct 03 2003 - 23:12:53 EEST


On Fri, 26 Sep 2003, Nolan J. Darilek wrote:

> I'm working on my contribution to the super ecasound arena. Before I

That's nice to hear! :)

> can do that, though, I need to create an ecasound API for ruby, my
> language of choice. I have most of it functioning, but I'm running
> into a couple issues with the well-formed output, namely:
[...]
> ecasound ('h' for help)> aio-register
> 2 31
[...]
> First, why is it "2 31" and not "2 31 s"? Second, wouldn't the lists
> be better as type S?

Because the level is not 256 (i.e. not an EIAM return value message).
If you check the wellformed output syntax:

--cut--
<message> = <loglevel><sp><msgsize>(<genmsg> | <returnmsg>)

<loglevel> = <integer> ; loglevel number
<msgsize = <integer> ; size of content in octets
<genmsg> = <contentblock> ; generic log message
<returnmsg> = <sp><returntype><contentblock>
                            ; EIAM return value message
<contentblock> = <crlf><content><crlf><crlf>
                            ; actual content of the message
<returntype> = ``i'' | ``li'' | ``f'' | ``s'' | ``S'' | ``e''
                            ; type of the return value (see ECI/EIAM docs)
<content> = *<octet> ; zero or more octets of message content

<sp> = 0x20 ; space
<octet> = 0x00-0xff ; 8bits of data
<crlf> = <cr><lf> ; new line
<cr> = 0x0d ; carriage return
<lf> = 0x0a ; line feed
<integer> = +<digit> ; one or more digits
<digit> = 0x30-0x39 ; digits 0-9
--cut--

... message with loglevel!=256 is a <genmsg> and does not
contain a <returntype> element.

As for your second question, yes, 'aio-register' would
be more useful as a list of strings, but it would still not be quite
optimal. The correct solution would be to add a "map-aio-list"
command, but that's still on the todo-list. The same is true
for other type lists (for example 'cop-register' and 'map-cop-list';
if you want to parse the results, the latter one is much easier).

-- 
 http://www.eca.cx
 Audio software for Linux!


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

This archive was generated by hypermail 2b28 : Fri Oct 03 2003 - 23:17:06 EEST