ChucK with RESTful APIs
Hi all, I'm new to ChucK and looking for a little advice. I'm currently working on a "podcast" bot which will generate new sounds/episodes nightly. I currently have a Ruby script organizing everything and handling the logistics of uploading the MP3 and updating the RSS feed. It runs asynchronously on a Raspberry Pi (Cron > Ruby > Chuck). Anyhow, I'd eventually like this little guy to be able to reach out on the web and have its sounds influenced by data it finds. So I was wondering if you all had any suggestions pulling things in from REST APIs like Twitter or news feeds or whatever. Is there a function for this in ChucK? Or would it be better to handle this stuff in Ruby and pass it to ChucK via a temporary text file or runtime arguments or something? Thanks, Dave
Hi Dave,
I’d be curious about this as well.
So far I have always used external Python scripts to get the data and transform it before using either arguments, file or Open Sound Control (OSC) to contact ChucK. Occasionally I’ve written rules within ChucK to then map or create the sound.
All best,
Iain
Iain Emsley
Research Associate
Oxford e-Research Centre
University of Oxford
On 4 Jun 2016, at 05:09, David MacDonald
Echoing Iain here on his note about Python.
In the Chuck spirit of really hacky ways of doing things, you can always
create for yourself a little shell API and use std.system() to make calls.
You'd probably have to dump the results into a file and then read those but
I've done worse things to get data to Chuck. (FIFO pipes come to mind.... ;)
Good luck!
Mike
On Sat, Jun 4, 2016 at 7:58 AM Iain Emsley
Hi Dave,
I’d be curious about this as well.
So far I have always used external Python scripts to get the data and transform it before using either arguments, file or Open Sound Control (OSC) to contact ChucK. Occasionally I’ve written rules within ChucK to then map or create the sound.
All best,
Iain
Iain Emsley
Research Associate Oxford e-Research Centre University of Oxford
On 4 Jun 2016, at 05:09, David MacDonald
wrote: Hi all,
I'm new to ChucK and looking for a little advice. I'm currently working on a "podcast" bot which will generate new sounds/episodes nightly. I currently have a Ruby script organizing everything and handling the logistics of uploading the MP3 and updating the RSS feed. It runs asynchronously on a Raspberry Pi (Cron > Ruby > Chuck).
Anyhow, I'd eventually like this little guy to be able to reach out on the web and have its sounds influenced by data it finds. So I was wondering if you all had any suggestions pulling things in from REST APIs like Twitter or news feeds or whatever. Is there a function for this in ChucK? Or would it be better to handle this stuff in Ruby and pass it to ChucK via a temporary text file or runtime arguments or something?
Thanks,
Dave
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
David MacDonald
-
Iain Emsley
-
mike clemow