![](https://secure.gravatar.com/avatar/01008bcd22c6531082dea9a11032c585.jpg?s=120&d=mm&r=g)
Hi Chuckers Well, the quality of free software, depends on the mailing lists ;-) I am on a Macbook using miniaudicle, for some reason KBHit does not produce any output. Nobody wants to answer ??? Please !!! Luigi
![](https://secure.gravatar.com/avatar/064d9ee85e24f87d406cf9bcc7419d05.jpg?s=120&d=mm&r=g)
Luigi, Typically KBHit takes keyboard input from the "console" from which chuck, Audicle, or miniAudicle was started. Since normally on OS X, miniAudicle is not started from the Terminal but from clicking on it in the Finder/etc., so there is no console, and thus no way for KBHit to get input. Ideally, the console monitor in miniAudicle could send keystrokes to KBHit, but this hasn't been implemented yet. One alternative would be to the Hid API, which can recognize keystrokes no matter where they are typed, and is more versatile in general. If you wanted to stay with KBHit, you could start miniAudicle from the command line and use the Terminal window to enter keystrokes (to do this, open up Terminal.app and type /path/to/ miniAudicle.app/Contents/MacOS/miniAudicle, then hit enter (where "/ path/to" is typically "/Applications")). Or you could use regular command line chuck. spencer On Sep 10, 2007, at 10:37 AM, Luigi Rensinghoff wrote:
Hi Chuckers
Well, the quality of free software, depends on the mailing lists ;-)
I am on a Macbook using miniaudicle, for some reason KBHit does not produce any output.
Nobody wants to answer ???
Please !!!
Luigi _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
![](https://secure.gravatar.com/avatar/fa5a8de5c6e6c5838fc8106b390c7a6d.jpg?s=120&d=mm&r=g)
On 9/10/07, Spencer Salazar
Ideally, the console monitor in miniAudicle could send keystrokes to KBHit, but this hasn't been implemented yet.
The main strength of this would be that in this case one could make sure that actions like typing a email or editing a softsynth while the the Mini is listening for events don't accidentally affect the Mini (I myself tend to find this amusing and to result in "happy accidents" but I could imagine it being unwanted). So, if we know this and know the HID approach is more powerful another take on this matter might be something like this; Machine.hasFocus(int) //returns 1 is the mini/Audicle/console window has the OS focus, 0 otherwise This would allow programmers to use the more powerful implementation while having the option to use the KBHit style behaviour, even on a per-device basis. Sadly this feature would require a different implementation for our three platforms which could be a drawback but aside from that it seems win/win. Luigi; I would have loved to help you but feel unqualified to talk about such details of OSX behaviour because iI don't have a OSX install. KBHit seems to me like a prime canidate for system dependant behaviour. Yours, Kas.
![](https://secure.gravatar.com/avatar/01008bcd22c6531082dea9a11032c585.jpg?s=120&d=mm&r=g)
Am 10.09.2007 um 20:53 schrieb Kassen: Thanks a lot, thats an easy "workaround" Idea: there is alittle app called Platypus. It should be possible to writte alittle scriptstarter and include the command-line starting script. So doubleclickers should still be able to use KBHIT I'll try this later.. I like writing e-mails with funny sounds too ;-) especially the smiley makes a nice sound ;-)
On 9/10/07, Spencer Salazar
wrote: Ideally, the console monitor in miniAudicle could send keystrokes to KBHit, but this hasn't been implemented yet. The main strength of this would be that in this case one could make sure that actions like typing a email or editing a softsynth while the the Mini is listening for events don't accidentally affect the Mini (I myself tend to find this amusing and to result in "happy accidents" but I could imagine it being unwanted).
So, if we know this and know the HID approach is more powerful another take on this matter might be something like this;
Machine.hasFocus(int) //returns 1 is the mini/Audicle/console window has the OS focus, 0 otherwise
This would allow programmers to use the more powerful implementation while having the option to use the KBHit style behaviour, even on a per-device basis. Sadly this feature would require a different implementation for our three platforms which could be a drawback but aside from that it seems win/win.
Luigi; I would have loved to help you but feel unqualified to talk about such details of OSX behaviour because iI don't have a OSX install. KBHit seems to me like a prime canidate for system dependant behaviour.
Yours, Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
![](https://secure.gravatar.com/avatar/fa5a8de5c6e6c5838fc8106b390c7a6d.jpg?s=120&d=mm&r=g)
On 9/10/07, Luigi Rensinghoff
I like writing e-mails with funny sounds too ;-)
especially the smiley makes a nice sound ;-)
You can also write a bit of code to have the mini make a sound every time you press a key, then while it plays those write the code to resample these sounds (dac => LiSa l => dac; etc;). Nicely self-referential... Kas.
participants (3)
-
Kassen
-
Luigi Rensinghoff
-
Spencer Salazar