[Etoys] A suggestion for inter-app communication on the OLPC: OSC

Markus Gaelli gaelli at emergent.de
Thu Sep 28 18:38:16 EDT 2006


Hi folks,

I was playing a bit with csound in the last days and - with the help  
of a nice italian multimedia artist Cesare Marilungo - got some first  
success producing some csound events from squeak using OSC (Open  
Sound Control). OSC is a light way protocol with which one can send  
messages to an ip/port combo including some strings, floats or blobs.
It exists for csound, python, squeak and lots of other systems,  
usually works on top of udp, but can be changed to work on tcp/ip too.

http://www.cnmat.berkeley.edu/OpenSoundControl/OSC-spec.html

Until now we are using the sound bank from Tamtam, so no real soft  
synthesis but sampling. It's fun to create and listen to sounds via  
scripts a la

frequency := 200.
velocity := 30000.
start := 0.
instrument := 12.
duration := 11.
(OSCMessage for: {'/squeak/osc'. frequency. velocity. start.  
instrument. duration}) sendTo:  (NetNameResolver localHostAddress)  
port: 1122.

Nothing fency yet, but much more synchronized tunes are possible, as  
you can tell csound when to trigger the events, within Squeak I  
encountered some problems there...
http://www.squeakland.org/project.jsp?http://www.emergent.de/pub/ 
smalltalk/squeak/projects/musinum.pr
(first start the midi service with the button on the left top, this  
is _not_ using csound...yet)

The tamtam people are using csound by sending python scripts through  
the ether - hoping that they will do no harm. As far as I understand  
some sandboxing is on the way for python but I wonder when it will  
arrive...

I asked Bert off list how to start another app from squeak, he told  
me that neither FFI nor OSProcess will be included for security reasons.
Makes sense. But then we need another solution to start and talk to  
other apps, ideally also fruitful for inter-app communication between  
python apps - or between Etoy Apps.

SO: I wonder what you folks think about using OSC as a general inter- 
application protocol for the OLPC?
For starting another app I'd suggest to have a server which knows  
(white lists) all securely executable apps and provides an OSC  
interface.
This server (like all OSCed Apps should) can also display all its  
executable services/apps.

Then apps like Etoys needing to start other apps (like Etoys needed  
to start csound) could ask this server to start their needed client  
apps. Each app can be reached via OSC on a different port, as soon as  
the server started the other app, it tells the starting app the port  
number of the started app so that they can talk directly to each  
other. Again no further security measures needed, as each app  
whitelists its available services.

If you have a hammer the whole world looks like a nail? Or could Open  
Sound Control fit to the "Instrument whose music is ideas"? ;-)

Very curios about your views on that.

Cheers,

Markus



More information about the Etoys mailing list