Hi!
I had the pleasure to hear @samaaron present and perform last week at jFokus in Stockholm and that was really awesome .
When trying Sonic PI at home I happend to see that @josephwilk is a “live coder of sound, light & poetry” Since I do stage lighting as hobby a thought struck me.
Is it possible to fire away a URL-request (or send any signal to external application) from within Sonic Pi while playing, like
live_loop :flibble do
sample :ambi_choir, rate: 0.3
sample :bd_haus, rate: 1
http://localhost:8080/trigger/105
sleep 1
end
or the other way around, trigger some part of a Sonic Pi song from another application?
I have designed a java application for stage lighting using a USB -> DMX dongle. It consist of a client based on the regular JavaFX GUI and a server based on Apache Tomcat webserver. The server calculates values for DMX channels (dimming, fading, flashing, …) and sends then to the fixtures via the dongle. The client controls the server via the REST api.
If I could send the REST api calls (like http://localhost:8080/trigger/31) from within Sonic PI I could couple lighting to the music played to Sonic PI. Or when triggering something in the lighting controler send a signal to Sonic Pi to play.
Is there a way to do this, or something similar, in Sonic PI today? I looked in the manual and forums but didn’t find any way to do it.
///Lars