Hi I wanted to check out the hid interface, but: atte@ajstrup:~/music/chuck/examples/hid$ chuck kb.ck [chuck]: HidIn: couldn't open HID device 3:0... What am I doing wrong? This is under linux... I don't know if it's relevant, but heres what "chuck --probe" has to say: atte@ajstrup:~/music/chuck/examples/hid$ chuck --probe [chuck]: found 6 device(s) ... [chuck]: ------( chuck -- dac1 )--------------- [chuck]: device name = "hw:I82801DBICH4,0" [chuck]: probe [success] ... [chuck]: # output channels = 2 [chuck]: # input channels = 2 [chuck]: # duplex Channels = 2 [chuck]: default device = YES [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: 32-bit int [chuck]: supported sample rates: [chuck]: 8000 Hz [chuck]: 9600 Hz [chuck]: 11025 Hz [chuck]: 16000 Hz [chuck]: 22050 Hz [chuck]: 32000 Hz [chuck]: 44100 Hz [chuck]: 48000 Hz [chuck]: [chuck]: ------( chuck -- dac2 )--------------- [chuck]: device name = "hw:I82801DBICH4,1" [chuck]: probe [success] ... [chuck]: # output channels = 0 [chuck]: # input channels = 2 [chuck]: # duplex Channels = 0 [chuck]: default device = NO [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: supported sample rates: [chuck]: 48000 Hz [chuck]: [chuck]: ------( chuck -- dac3 )--------------- [chuck]: device name = "hw:I82801DBICH4,2" [chuck]: probe [success] ... [chuck]: # output channels = 0 [chuck]: # input channels = 2 [chuck]: # duplex Channels = 0 [chuck]: default device = NO [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: supported sample rates: [chuck]: 48000 Hz [chuck]: [chuck]: ------( chuck -- dac4 )--------------- [chuck]: device name = "hw:I82801DBICH4,3" [chuck]: probe [success] ... [chuck]: # output channels = 0 [chuck]: # input channels = 2 [chuck]: # duplex Channels = 0 [chuck]: default device = NO [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: supported sample rates: [chuck]: 48000 Hz [chuck]: [chuck]: ------( chuck -- dac5 )--------------- [chuck]: device name = "hw:I82801DBICH4,4" [chuck]: probe [success] ... [chuck]: # output channels = 2 [chuck]: # input channels = 0 [chuck]: # duplex Channels = 0 [chuck]: default device = NO [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: supported sample rates: [chuck]: 48000 Hz [chuck]: [chuck]: ------( chuck -- dac6 )--------------- [chuck]: device name = "hw:Modem,0" [chuck]: probe [success] ... [chuck]: # output channels = 1 [chuck]: # input channels = 1 [chuck]: # duplex Channels = 1 [chuck]: default device = NO [chuck]: natively supported data formats: [chuck]: 16-bit int [chuck]: supported sample rates: [chuck]: 8000 Hz [chuck]: 9600 Hz [chuck]: 16000 Hz [chuck]: [chuck]: ------( chuck -- 1 MIDI inputs )------ [chuck]: [0] : "Midi Through Port-0" [chuck]: [chuck]: ------( chuck -- 1 MIDI outputs )----- [chuck]: [0] : "Midi Through Port-0" [chuck]: -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
Atte wrote;
atte@ajstrup:~/music/chuck/examples/hid$ chuck kb.ck [chuck]: HidIn: couldn't open HID device 3:0...
What am I doing wrong? This is under linux... I don't know if it's relevant, but heres what "chuck --probe" has to say:
I'm not the bigggest Linux-HID expert around but I have a suspicion the post by Nescivi here might help; http://electro-music.com/forum/topic-14590.html --probe, btw, doesn't show HID devices, maybe it would be nice to have a sort of probe for those too some time. Yours, Kas.
Kassen wrote:
I'm not the bigggest Linux-HID expert around but I have a suspicion the post by Nescivi here might help; http://electro-music.com/forum/topic-14590.html
Yeah, that helped, thanks alot! In case anyone runs into the same problem, I added 'GROUP="audio"' to the end of the lines related to input in /etc/udev/rules.d/udev.rules: atte@ajstrup:~$ grep audio /etc/udev/rules.d/udev.rules KERNEL=="mice", NAME="input/%k" GROUP="audio" KERNEL=="mouse[0-9]*", NAME="input/%k" GROUP="audio" KERNEL=="event[0-9]*", NAME="input/%k" GROUP="audio" KERNEL=="js[0-9]*", NAME="input/%k" GROUP="audio" KERNEL=="ts[0-9]*", NAME="input/%k" GROUP="audio" KERNEL=="uinput", NAME="input/%k" GROUP="audio" Now, it works well (using id 1). I have two questions related to running chuck on the unmodified kb.ck: atte@ajstrup:~/semi_automate/sandbox$ chuck kb.ck here1 here2 here1 here1 here1 here1 here2 keyboard ' PC Speaker ' ready 1) What's up with the "here1" lines? Some old debug that someone forgot to remove? 2) What's my PC-speaker doing as a hid input device? Of course it doesn't work, but I'm surprised it even shows up. Did I wrongfully "enable" too many devices with my modifications in udev.rules. -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
Hi Atte, On Nov 26, 2006, at 12:16 PM, Atte André Jensen wrote:
1) What's up with the "here1" lines? Some old debug that someone forgot to remove?
Yep... I was actually embarrassed to find those still around when I was doing some linux chucking last night. So yeah, those are just debugging messages that I left in by accident. Um...
2) What's my PC-speaker doing as a hid input device? Of course it doesn't work, but I'm surprised it even shows up. Did I wrongfully "enable" too many devices with my modifications in udev.rules.
Hmm... is it a USB speaker? Linux's evdev module, which ChucK uses for its HID system, doesn't provide a reliable mechanism for telling if a device is a keyboard or a mouse or a joystick. So chuck uses a set of simple rules based on how many buttons and axes a device has to determine the type of a device. It is possible that the rules are too loose and are admitting your speaker as a HID. The strangest part is that chuck only scans /dev/input/event* for keyboard devices. On systems using evdev, these are supposed to correspond to things that claim to be HIDs (and usually only USB HIDs, in my experience). So either chuck's hid system is making some sort of grave error (most likely), or something claiming to be 'PC Speaker' is claiming to be a HID device. Either way, I would be curious to see what prints out running 'chuck -v5 kb.ck' on your system... thanks! spencer
Spencer Salazar wrote:
Hmm... is it a USB speaker?
No. The machine is an IBM laptop with no USB connected.
Either way, I would be curious to see what prints out running 'chuck -v5 kb.ck' on your system...
atte@ajstrup:~/music/chuck/examples/hid$ chuck -v5 kb.ck [chuck]:(2:SYSTEM): setting log level to: 5 (INFORM)... [chuck]:(2:SYSTEM): initializing virtual machine... [chuck]:(2:SYSTEM): | behavior: HALT [chuck]:(2:SYSTEM): | allocating shreduler... [chuck]:(2:SYSTEM): | allocating messaging buffers... [chuck]:(2:SYSTEM): | real-time audio: YES [chuck]:(2:SYSTEM): | mode: CALLBACK [chuck]:(2:SYSTEM): | sample rate: 48000 [chuck]:(2:SYSTEM): | buffer size: 512 [chuck]:(2:SYSTEM): | num buffers: 8 [chuck]:(2:SYSTEM): | devices adc: 0 dac: 0 (default 0) [chuck]:(2:SYSTEM): | channels in: 2 out: 2 [chuck]:(2:SYSTEM): initializing compiler... [chuck]:(3:SEVERE): | initializing type checker... [chuck]:(3:SEVERE): | | adding base classes... [chuck]:(3:SEVERE): | | | class 'object' [chuck]:(3:SEVERE): | | | class 'array' [chuck]:(3:SEVERE): | | | class 'string' [chuck]:(3:SEVERE): | | | class 'ugen' [chuck]:(3:SEVERE): | | | class 'shred' [chuck]:(3:SEVERE): | | | class 'event' [chuck]:(3:SEVERE): | | | class 'class' [chuck]:(3:SEVERE): | initializing emitter... [chuck]:(3:SEVERE): | loading built-in modules... [chuck]:(3:SEVERE): | | module osc... [chuck]:(3:SEVERE): | | module xxx... [chuck]:(3:SEVERE): | | module filter... [chuck]:(3:SEVERE): | | module STK... [chuck]:(3:SEVERE): | | class 'machine'... [chuck]:(3:SEVERE): | | class 'std'... [chuck]:(5:INFORM): | | initializing KBHitManager... [chuck]:(3:SEVERE): | | class 'math'... [chuck]:(3:SEVERE): | | class 'opsc'... [chuck]:(5:INFORM): starting kb loop... [chuck]:(2:SYSTEM): type dependency resolution: MANUAL [chuck]:(2:SYSTEM): initializing synthesis engine... [chuck]:(3:SEVERE): | initializing 'dac'... [chuck]:(3:SEVERE): | initializing 'adc'... [chuck]:(3:SEVERE): | initializing 'blackhole'... [chuck]:(2:SYSTEM): | initializing 'real-time' audio... [chuck]:(5:INFORM): | | initializing callback... [chuck]:(3:SEVERE): | allocating buffers for 512 x 2 samples... [chuck]:(3:SEVERE): starting compilation... [chuck]:(2:SYSTEM): starting listener on port: 8888... [chuck]:(2:SYSTEM): running virtual machine... [chuck]:(3:SEVERE): | initializing audio buffers... [chuck]:(3:SEVERE): | virtual machine running... [chuck]:(5:INFORM): initializing HID... [chuck]:(5:INFORM): | initializing joysticks [chuck]:(5:INFORM): | initializing mice here1 here2 [chuck]:(5:INFORM): | | mouse: found device Logitech USB Gaming Mouse here1 here2 [chuck]:(5:INFORM): | | mouse: found device TPPS/2 IBM TrackPoint here1 [chuck]:(5:INFORM): | | mouse: found device SynPS/2 Synaptics TouchPad here1 here1 [chuck]:(5:INFORM): | initializing keyboards [chuck]:(5:INFORM): | | keyboard: found device PC Speaker [chuck]:(5:INFORM): | | keyboard: found device AT Translated Set 2 keyboard keyboard ' PC Speaker ' ready [chuck]:(3:SEVERE): starting real-time audio... -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
This is a long shot, but does your laptop have buttons on it that control the built-in speaker volume? That could be what chuck is finding and calling 'PC Speaker'. If there are such buttons, and pressing these buttons generates output when running hid/kb.ck, that would pin them as the culprit. spencer On Nov 27, 2006, at 1:38 AM, Atte André Jensen wrote:
Spencer Salazar wrote:
Hmm... is it a USB speaker?
No. The machine is an IBM laptop with no USB connected.
Either way, I would be curious to see what prints out running 'chuck -v5 kb.ck' on your system...
atte@ajstrup:~/music/chuck/examples/hid$ chuck -v5 kb.ck [chuck]:(2:SYSTEM): setting log level to: 5 (INFORM)... [chuck]:(2:SYSTEM): initializing virtual machine... [chuck]:(2:SYSTEM): | behavior: HALT [chuck]:(2:SYSTEM): | allocating shreduler... [chuck]:(2:SYSTEM): | allocating messaging buffers... [chuck]:(2:SYSTEM): | real-time audio: YES [chuck]:(2:SYSTEM): | mode: CALLBACK [chuck]:(2:SYSTEM): | sample rate: 48000 [chuck]:(2:SYSTEM): | buffer size: 512 [chuck]:(2:SYSTEM): | num buffers: 8 [chuck]:(2:SYSTEM): | devices adc: 0 dac: 0 (default 0) [chuck]:(2:SYSTEM): | channels in: 2 out: 2 [chuck]:(2:SYSTEM): initializing compiler... [chuck]:(3:SEVERE): | initializing type checker... [chuck]:(3:SEVERE): | | adding base classes... [chuck]:(3:SEVERE): | | | class 'object' [chuck]:(3:SEVERE): | | | class 'array' [chuck]:(3:SEVERE): | | | class 'string' [chuck]:(3:SEVERE): | | | class 'ugen' [chuck]:(3:SEVERE): | | | class 'shred' [chuck]:(3:SEVERE): | | | class 'event' [chuck]:(3:SEVERE): | | | class 'class' [chuck]:(3:SEVERE): | initializing emitter... [chuck]:(3:SEVERE): | loading built-in modules... [chuck]:(3:SEVERE): | | module osc... [chuck]:(3:SEVERE): | | module xxx... [chuck]:(3:SEVERE): | | module filter... [chuck]:(3:SEVERE): | | module STK... [chuck]:(3:SEVERE): | | class 'machine'... [chuck]:(3:SEVERE): | | class 'std'... [chuck]:(5:INFORM): | | initializing KBHitManager... [chuck]:(3:SEVERE): | | class 'math'... [chuck]:(3:SEVERE): | | class 'opsc'... [chuck]:(5:INFORM): starting kb loop... [chuck]:(2:SYSTEM): type dependency resolution: MANUAL [chuck]:(2:SYSTEM): initializing synthesis engine... [chuck]:(3:SEVERE): | initializing 'dac'... [chuck]:(3:SEVERE): | initializing 'adc'... [chuck]:(3:SEVERE): | initializing 'blackhole'... [chuck]:(2:SYSTEM): | initializing 'real-time' audio... [chuck]:(5:INFORM): | | initializing callback... [chuck]:(3:SEVERE): | allocating buffers for 512 x 2 samples... [chuck]:(3:SEVERE): starting compilation... [chuck]:(2:SYSTEM): starting listener on port: 8888... [chuck]:(2:SYSTEM): running virtual machine... [chuck]:(3:SEVERE): | initializing audio buffers... [chuck]:(3:SEVERE): | virtual machine running... [chuck]:(5:INFORM): initializing HID... [chuck]:(5:INFORM): | initializing joysticks [chuck]:(5:INFORM): | initializing mice here1 here2 [chuck]:(5:INFORM): | | mouse: found device Logitech USB Gaming Mouse here1 here2 [chuck]:(5:INFORM): | | mouse: found device TPPS/2 IBM TrackPoint here1 [chuck]:(5:INFORM): | | mouse: found device SynPS/2 Synaptics TouchPad here1 here1 [chuck]:(5:INFORM): | initializing keyboards [chuck]:(5:INFORM): | | keyboard: found device PC Speaker [chuck]:(5:INFORM): | | keyboard: found device AT Translated Set 2 keyboard keyboard ' PC Speaker ' ready [chuck]:(3:SEVERE): starting real-time audio...
-- peace, love & harmony Atte
http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/ compositions _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Spencer Salazar wrote:
If there are such buttons, and pressing these buttons generates output when running hid/kb.ck, that would pin them as the culprit.
Good idea, however they produce no output :-( -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
Spencer Salazar wrote:
1) What's up with the "here1" lines? Some old debug that someone forgot to remove?
I removed them in my version. Did you also remember to remove them in the source? :-) -- peace, love & harmony Atte http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/compositions
Yeah, for sure. As soon as I noticed this I committed a change to CVS that removed them. spencer On Dec 1, 2006, at 5:05 PM, Atte André Jensen wrote:
Spencer Salazar wrote:
1) What's up with the "here1" lines? Some old debug that someone forgot to remove?
I removed them in my version. Did you also remember to remove them in the source? :-)
-- peace, love & harmony Atte
http://www.atte.dk | quintet: http://www.anagrammer.dk | compositions: http://www.atte.dk/ compositions _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
Atte André Jensen
-
Kassen
-
Spencer Salazar