> The following script demonstrates a method of determining when a key is
> pressed (keyDown) as well as when a key is released (keyUp). The line
> "sleep(1);" makes the script a bit clunky but is there merely to slow
> things down so you can see what's happening.

Yeeikes!  No, actually, that's pretty cool.  The downside is that my 
lighting setup, which was previously completely stable apart from getting 
occasionally off-tempo -- which was why I wanted key control -- has now 
become, well, chaotic.  The lights start moving vaguely independently, 
though I've built in some recovery logic that eventually rights them.  And 
every once in a while, there's a panic, which will be completely 
disastrous in a real-time setting.  I can't see why this should happen, 
due merely to the addition of event-trapping logic that seems relatively 
self-contained...yet happen it does.  I suspect I may need to heave a sigh 
and accept that what I used to be able to accomplish with a simple "GET 
A$" in my good ol' Commodore 64 days has become a Herculean challenge in 
the Apple era.  Yea, progress!

Well, heck.  My dancers can accept a few sync problems.  Better that than 
absolute darkness...

s/(w)hee/$1ah/;
Ethan

Reply via email to