good ev'ning everyone,
some time ago I showed ChucK to my girlfriend
and she has been quite enthusiastic about it since then.
So thanks for providing this interpreter!
Well, right now she's coding a automatic composition
tool(in python), which generates some (midi) numbers and
prints them on the screen.
Since this will be an any-time algorithm,
the (actually quite simple) task for the audible back-end
- which (she insists) should be written in ChucK -
is to read the numbers from standard input and generate
matching sounds. So the use-case would look like this:
> ./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