[chuck-users] ChucK and STDIN
Joe McMahon
mcmahon at ibiblio.org
Wed Jul 12 16:53:59 EDT 2006
On Jul 12, 2006, at 1:41 PM, DANIEL MAGNUSZEWSKI wrote:
> Where can I look at the actual code that makes up the KBHit event?
> Is it
> written in C or in ChucK? I'd like to see what that class is actually
> doing (behind the scenes) to watch for the keyboard being pressed.
>
> This is not really what I'm looking for, because I'd like to have
> other
> programs send data into the ChucK program, and not have to send
> data in
> via keyboard.
>
> I'm thinking that OSC may be the best way to get around this- but I'm
> not sure. Are there any good intro docs/examples for using OSC
> (besides,
> the docs on OSC's homepage)?
Check out http://search.cpan.org/~crenz/Net-OpenSoundControl-0.05/ -
it's a Perl module for doing OSC that specifically has an OSC client
class:
use Net::OpenSoundControl::Client;
my $client = Net::OpenSoundControl::Client->new(
Host => "192.168.3.240", Port => 7777)
or die "Could not start client: $@\n";
# This is a very slow fade-in...
for (0..100) {
$client->send(['/Main/Volume', 'f', $_ / 100]);
sleep(1);
}
Dunno if this helps you out or not ...
--- Joe M.
More information about the chuck-users
mailing list