[linux-audio-dev] reminder about Ecasound Control Interface

Kai Vehmanen kai.vehmanen at wakkanet.fi
Fri Dec 12 02:50:49 UTC 2003


Hello,

for those new to the API, Ecasound Control Interface (ECI) is a _simple_
API for controlling the Ecasound engine. It certainly is not, and is not
meant to be, a general purpose API, but it suits nicely to many
small-to-medium-size tasks. General info about ECI can be found at:

	http://www.eca.cx/eci

I'm writing this because the recently released Ecasound-2.3.2 added
support for Ruby (contributed by Jan Weil). Prior versions already
provided support for C, C++, elisp, Perl, PHP and Python. So quite a few
in other words. :)

Another thing to remember is that ECI apps can interact with JACK
(including full transport support!), use LADSPA plugins for effect
processing, and perform native ALSA audio i/o. 

Second reason I'm writing this now is that I just wrote a small app to 
monitor JACK transport position (very much like jack_showtime that comes 
with JACK), and it turned out to be an easy thing to do:

--cut--
#!/usr/bin/env python
from pyeca import *
from time import sleep

e = ECA_CONTROL_INTERFACE()
e.command("cs-add jackmon")
e.command("c-add jacmon")
e.command("ai-add jack")
e.command("ao-add null")
e.command("cs-connect")
e.command("start")

while e.last_type() != 'e':
    e.command("get-position")
    curpos = e.last_float()
    if e.last_type() == 'e': break
    sys.stderr.write('JACK system pos %6.2f secs\r' % e.last_float())
    sleep(0.2)
--cut--

Converting the above to your favorite language is left as an exercise. :)

PS If you replace 's/null/jack/' and add the line 
   'e.command("cop-add -el:djFlanger,0,5,0.5,50")' ... you've 
   turned the script into a small JACK-Rack style app
   that uses Steve's DjFlanger LADSPA plugin.

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




More information about the Linux-audio-dev mailing list