[chuck-users] i/o and networking from chuck
adamtindale at hotmail.com
Tue Nov 29 23:12:41 EST 2005
I would suggest using std.system. This will allow you to use your shell.
This will do ls in the directory you launched ChucK from.
You could do what you want by setting up curl or wget and using a
shell script to parse the text and get what you want. The problem is
getting the info into ChucK. The system() command will give you the
return code of the system call. You may have to use something else to
grab the data and send it into ChucK via OSC or MIDI.
Right now ChucK's abilities at dealing with strings is very limited.
I don't know of a way of reading a text file into ChucK. If you could
do that then you could run your shell scripts and output the data to
a file that you kept reading in ChucK periodically.
That is about all that comes to mind. I hope it helps.
On 29-Nov-05, at 3:29 PM, Tennessee Leeuwenburg wrote:
> I would like to wire up some inputs into chuck based on information
> I've scraped from (for examples) a weather website, a share trading
> website and a "new mail" notification tool. I'd like to trigger
> musical sounds based on incoming information.
> There doesn't seem to be an obvious way to do this. I don't know
> enough about chuck to know whether it's bootstrapped onto another
> language and could gain access to its libraries, or what other ways
> there might be to skin the cat. I guess I could try generating
> chuck code from another language which does have i/o libraries.
> Does anyone here have an opinion?
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
More information about the chuck-users