Hi v4hn,
I had a similar issue, stdin/stdout doesn't really work well in ChucK.
However, I gave OSC (http://en.wikipedia.org/wiki/Open_Sound_Control) a try
for ChucK/Python communication. This works really good. Check out pyOSC
(https://trac.v2.nl/wiki/pyOSC) for the Python part and the OSC examples in
the ChucK examples folder.
Greetings,
Tom
-----Oorspronkelijk bericht-----
Van: chuck-users-bounces@lists.cs.princeton.edu
[mailto:chuck-users-bounces@lists.cs.princeton.edu] Namens v4hn
Verzonden: dinsdag 1 juni 2010 23:52
Aan: chuck-users@lists.cs.princeton.edu
Onderwerp: [chuck-users] input | chuck
./compose | chuck play_composition.ck
RTFM and RTFS got me to ConsoleInput and FileIO with the second not being able to connect to stdin. At the moment the only - quite hacked - way (AFAICS) to read /anything/ from stdin looks like this: <<< ConsoleInput in; while(true){ in.prompt(); line= in.getLine(); ... }
This doesn't realize EOFs, but keeps waiting, does it? And since FileIO provides a readInt() function, it would be nice to use it in this case... Is there a way, to read from stdin through some IO-Interface of ChucK or anything else 'official' - aka not stating in the source that it's just something hacked? If not, are there any ideas on implementing this in Version 1.2.1.4 ? Well, that's for now, regards, v4hn