[LAD] Communicating between python UI and C++ engine for real time audio?

Joel Roth joelz at pobox.com
Fri Nov 4 22:17:28 UTC 2011


On Wed, Nov 02, 2011 at 10:09:34AM -0700, Iain Duncan wrote:
> I looked into this about five years ago, but didn't get too far. Wondering
> if anyone on here has experience splitting apps up into:
> 
> - realtime low latency engine in C++ using per sample callback audio (
> either RTAudio or Jack or PortAudio )
> 
> - user interfaces and algo composition routines in python that either
> communicate with the engine by shared memory or over a queue
> 
> Basically I want to be able to do the gui and data transforming code in
> Python whenever possible and allow plugins to be written to work on the
> data in Python
> 
> I'm hoping to arrive at some sort of design that ultimately lets the engine
> act as an audio server with multiple user interface clients, possibly not
> even on the same machines, but definitely not on the same cores. If anyone
> has tips, war stories, suggestions on reading or projects to look at, I'd
> love to hear them.
 
For controlling audio engines by Python, you can use 
Ecasound, which has a JACK-capable realtime audio engine
implemented in C++.[1]

You can use the sample python code in 'ecamonitor', to 
send commands over a pipe using Ecasound's NetECI interface.

One limitation of Ecasound you cannot reconfigure the engine
while it is running. However you could manage multiple
Ecasound engines as individual Jack clients.

Python plugins would need to be JACK or LADSPA
compatible for Ecasound to use them.

MIDI might be suitable output for compositional algorithms. 

Integrating Ecasound with a MIDI interface is something
Julien Claassen has done via scripts and utilities that
provide a suitable environment for the text-based and
script-friendly Midish (MIDI shell) to run.[2]

For connecting multiple machines, there is Netjack[3].

If you would consider crossing the tracks WRT
scripting languages, there is Nama[4] :-)

Cheers,

Joel

1. http://eca.cx/ecasound/features.php

2. http://caoua.org/midish/

3. http://trac.jackaudio.org/wiki/WalkThrough/User/NetJack2

4. http://freeshell.de/~bolangi/cgi1/nama.cgi/00home.html

> Thanks
> Iain

> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-dev


-- 
Joel Roth



More information about the Linux-audio-dev mailing list