[PlanetCCRMA] Experiences with FC2, Audigy2ZS, and Keystation Pro 88 (advice welcome!)

David O'Toole dto@irrationalgames.com
Tue Dec 7 18:30:02 2004


--=-=-=


Hello everyone. This is my first post to the list so I'll give a bit
of background on my growing setup, and the challenges that have come
up in my transition to making music with Pd. It'll be part blog, part
tech-support request, and part product review...

I'm using Planet CCRMA on Fedora Core 2. The uname -a command prints:

Linux home 2.6.7-1.437.1.ll.rhfc2.ccrma #1 Thu Jun 17 10:45:42 PDT 2004 i686 i686 i386 GNU/Linux

This was installed on an HP Media Center 854n PC. The included audio
card was replaced with a SB Audigy 2 ZS Platinum Pro (USD $250) before
installation; FC2 configured the Audigy for ALSA without any trouble.

For those who don't know about it: this card connects your PC to a
nice big external I/O box with guitar/microphone/line-in/digital
plugs. The box can be positioned away from the interference of your
PC. It also includes optical I/O, MIDI ports (can't get these to work
yet, that's another post) and FireWire. The nifty infrared remote
control supposedly works under linux using the LIRC library but I
haven't tried this yet.

The audio works fine as long as I use JACK; I get a nice clear signal
and can record into Pure Data without problems. I have weird issues
when using the native ALSA output of PD, periodic breakdowns in the
signal. Perhaps I'll address this at a later time. . . 

This week I purchased an M-Audio Keystation Pro 88 MIDI controller.
(see http://www.m-audio.com/products/en_us/KeystationPro88-main.html)
It's actually quite a nice machine. I don't like the feel of most MIDI
controllers, but these are hammer-action keys and offer a fair amount
of resistance to the fingers. I'd read some positive reviews of the
Keystation Pro 88 and had been intrigued by the wealth of assignable
controls it offered (32 knobs, 9 faders, transport controls and pitch
bend / modulation, and tons of buttons for use as drum pads, event
triggers, or value toggles.)

The thing seemed tailor-made for an environment like Pd, and once I'd
felt the keys I bought it on the spot for USD $500. I also got an
M-Audio sustain pedal ($30) and a 15-foot USB2 cable to connect it to
the linuxbox with ($30). The USB cable has brilliant blue LED's in
each end of the cable, which light up whenever the cable is plugged
into a USB socket. It matches the blue LED's on the Keystation itself,
and those on HP's Media Center pc's (In a dimly-lit room, the full
setup looks pretty trippy.)

As a side note: the Keystation is huge and extremely heavy. The case
is cold metal instead of plastic, and it's bolted together visibly in
the back. The overall impression is of a solidly built, heavy-duty
piece of hardware.

I've been able to get it working with Pd reasonably well, but the
process isn't reliable. Perhaps someone will know what's wrong with
my setup. 

Sometimes I can do the following:

1. Boot up with the keyboard connected via USB, but not powered on
2. Start watching /proc/asound/cards and /proc/asound/devices
3. Turn on the keyboard's power switch
4. Watch "Keystation Pro 88" pop up instantly as Alsa Card 1 in /proc/asound/cards
5. Watch the Keystation's "ctl" and "raw midi" recognized in /proc/asound/devices
6. Create a snd-virmidi device for Pd to read from
7. Use aconnect to route the keyboard's MIDI to virmidi
8. Open Pd and use the keyboard to control Pd

It's quite exciting. All the knobs work, and you can tie them into any
control onscreen! Here is the output of my watch command, while the
keyboard is working with Pd:

-----------------------------------------------------------------------------------------
Every 2s: cat /proc/asound/cards /proc/asound/devices; aconnect -lio 
 
0 [Audigy2        ]: Audigy2 - Sound Blaster Audigy2
                     Sound Blaster Audigy2 (rev.4) at 0xc000, irq 5
1 [K88            ]: USB-Audio - Keystation Pro 88
                     Evolution Electronics Ltd. Keystation Pro 88 at usb-0000:00:1d.2-1, full
 speed
2 [VirMIDI        ]: VirMIDI - VirMIDI
                     Virtual MIDI Card 1
  0: [0- 0]: ctl
  4: [0- 0]: hardware dependent
  9: [0- 1]: raw midi
  8: [0- 0]: raw midi
 19: [0- 3]: digital audio playback
 26: [0- 2]: digital audio capture
 25: [0- 1]: digital audio capture
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
  1:       : sequencer
  6: [0- 2]: hardware dependent
 10: [0- 2]: raw midi
 11: [0- 3]: raw midi
 33:       : timer
 32: [1- 0]: ctl
 40: [1- 0]: raw midi
 64: [2- 0]: ctl
 75: [2- 3]: raw midi
 74: [2- 2]: raw midi
 73: [2- 1]: raw midi
 72: [2- 0]: raw midi
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
        Connecting To: 63:0
client 64: 'Audigy MPU-401 (UART) - Rawmidi 0' [type=kernel]
    0 'Audigy MPU-401 (UART)'
   32 'Audigy MPU-401 #2'
client 65: 'Emu10k1 WaveTable' [type=kernel]
    0 'Emu10k1 Port 0  '
    1 'Emu10k1 Port 1  '
    2 'Emu10k1 Port 2  '
    3 'Emu10k1 Port 3  '
client 72: 'Keystation Pro 88 - Rawmidi 1' [type=kernel]
    0 'Keystation Pro 88 MIDI 1'
        Connecting To: 80:0
    1 'Keystation Pro 88 MIDI 2'
client 80: 'Virtual Raw MIDI 2-0' [type=kernel]
    0 'VirMIDI 2-0     '
        Connected From: 72:0
client 81: 'Virtual Raw MIDI 2-1' [type=kernel]
    0 'VirMIDI 2-1     '
client 82: 'Virtual Raw MIDI 2-2' [type=kernel]
    0 'VirMIDI 2-2     '
client 83: 'Virtual Raw MIDI 2-3' [type=kernel]
 
-----------------------------------------------------------------------------------------

But it doesn't always work; sometimes the keyboard is recognized, but
/proc/asound/devices only lists the "ctl" port and not the "raw
midi". That stops the whole thing from working, but no amount of
fiddling (rmmod/modprobe, turning the keyboard off and then on again)
will get the keyboard to be recognized again until you reboot. 

Furthermore, any process that touches USB after that will hang, and
you can't kill -9 them even as root! Their status in the process
listing is "D" which means "uninterruptible I/O".

Other times, you turn on the keyboard and nothing at all happens. 

I've also attached system logs from today, when the keyboard shows up
in /proc/asound/cards but the "raw midi" doesn't show up in
/proc/asound/devices...

So, this thing definitely can work with Pd, I just can't set it up
reliably yet. Anyone else had similar issues? 


--=-=-=
Content-Disposition: attachment; filename=usbmidi-log.txt
Content-Description: Excerpt from /var/log/messages dealing with turning on the K88

Dec  7 18:14:00 localhost udev[3396]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 15 applied, 'controlC0' becomes 'snd/%k'
Dec  7 18:14:00 localhost udev[3396]: creating device node '/udev/snd/controlC0'
Dec  7 18:14:01 localhost udev[3407]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 19 applied, 'timer' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3407]: creating device node '/udev/snd/timer'
Dec  7 18:14:01 localhost udev[3429]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 16 applied, 'hwC0D0' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3429]: creating device node '/udev/snd/hwC0D0'
Dec  7 18:14:01 localhost udev[3436]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midiC0D1' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3436]: creating device node '/udev/snd/midiC0D1'
Dec  7 18:14:01 localhost udev[3465]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midiC0D0' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3465]: creating device node '/udev/snd/midiC0D0'
Dec  7 18:14:01 localhost udev[3490]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 17 applied, 'pcmC0D3p' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3490]: creating device node '/udev/snd/pcmC0D3p'
Dec  7 18:14:01 localhost udev[3497]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 17 applied, 'pcmC0D2c' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3497]: creating device node '/udev/snd/pcmC0D2c'
Dec  7 18:14:01 localhost udev[3446]: creating device node '/udev/amidi'
Dec  7 18:14:01 localhost udev[3507]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 17 applied, 'pcmC0D1c' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3456]: creating device node '/udev/admmidi'
Dec  7 18:14:01 localhost udev[3515]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 17 applied, 'pcmC0D0p' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3507]: creating device node '/udev/snd/pcmC0D1c'
Dec  7 18:14:01 localhost udev[3520]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 17 applied, 'pcmC0D0c' becomes 'snd/%k'
Dec  7 18:14:01 localhost udev[3472]: creating device node '/udev/midi'
Dec  7 18:14:01 localhost udev[3481]: creating device node '/udev/dmmidi'
Dec  7 18:14:01 localhost udev[3515]: creating device node '/udev/snd/pcmC0D0p'
Dec  7 18:14:01 localhost modprobe: FATAL: Error running install command for sound_slot_1 
Dec  7 18:14:01 localhost udev[3520]: creating device node '/udev/snd/pcmC0D0c'
Dec  7 18:14:01 localhost udev[3539]: creating device node '/udev/mixer'
Dec  7 18:14:30 localhost modprobe: FATAL: Error running install command for sound_slot_1 
Dec  7 18:17:00 localhost kernel: CSLIP: code copyright 1989 Regents of the University of California
Dec  7 18:17:00 localhost kernel: PPP generic driver version 2.4.2
Dec  7 18:17:00 localhost pppd[3672]: pppd 2.4.3 started by root, uid 0
Dec  7 18:17:00 localhost pptp[3682]: anon log[main:pptp.c:243]: The synchronous pptp option is NOT activated 
Dec  7 18:17:00 localhost pppd[3672]: Using interface ppp0
Dec  7 18:17:00 localhost pppd[3672]: Connect: ppp0 <--> /dev/pts/1
Dec  7 18:17:00 localhost udev[3681]: creating device node '/udev/ppp'
Dec  7 18:17:00 localhost pptp[3699]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 1 'Start-Control-Connection-Request' 
Dec  7 18:17:00 localhost pptp[3699]: anon log[ctrlp_disp:pptp_ctrl.c:721]: Received Start Control Connection Reply
Dec  7 18:17:00 localhost pptp[3699]: anon log[ctrlp_disp:pptp_ctrl.c:755]: Client connection established.
Dec  7 18:17:01 localhost pptp[3699]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 7 'Outgoing-Call-Request' 
Dec  7 18:17:01 localhost pptp[3699]: anon log[ctrlp_disp:pptp_ctrl.c:841]: Received Outgoing Call Reply.
Dec  7 18:17:01 localhost pptp[3699]: anon log[ctrlp_disp:pptp_ctrl.c:880]: Outgoing call established (call ID 0, peer's call ID 10631). 
Dec  7 18:17:02 localhost pppd[3672]: local  IP address 192.168.100.60
Dec  7 18:17:02 localhost pppd[3672]: remote IP address 192.168.100.50
Dec  7 18:17:02 localhost pppd[3672]: primary   DNS address 192.168.100.4
Dec  7 18:17:02 localhost pppd[3672]: secondary DNS address 192.168.100.4
Dec  7 18:18:01 localhost pptp[3699]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 5 'Echo-Request' 
Dec  7 18:18:01 localhost pptp[3699]: anon log[logecho:pptp_ctrl.c:659]: Echo Reply received.
Dec  7 18:18:32 localhost udev[3801]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 20 applied, 'seq' becomes 'snd/%k'
Dec  7 18:18:32 localhost udev[3801]: creating device node '/udev/snd/seq'
Dec  7 18:18:32 localhost udev[3825]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 16 applied, 'hwC0D2' becomes 'snd/%k'
Dec  7 18:18:32 localhost udev[3825]: creating device node '/udev/snd/hwC0D2'
Dec  7 18:18:32 localhost udev[3828]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midiC0D2' becomes 'snd/%k'
Dec  7 18:18:32 localhost udev[3828]: creating device node '/udev/snd/midiC0D2'
Dec  7 18:18:32 localhost udev[3831]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midiC0D3' becomes 'snd/%k'
Dec  7 18:18:32 localhost udev[3831]: creating device node '/udev/snd/midiC0D3'
Dec  7 18:18:32 localhost udev[3858]: creating device node '/udev/sequencer'
Dec  7 18:18:32 localhost udev[3860]: creating device node '/udev/sequencer2'
Dec  7 18:18:43 localhost su(pam_unix)[3963]: session opened for user root by dto(uid=500)
Dec  7 18:19:01 localhost pptp[3699]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 5 'Echo-Request' 
Dec  7 18:19:01 localhost pptp[3699]: anon log[logecho:pptp_ctrl.c:659]: Echo Reply received.
Dec  7 18:19:43 localhost kernel: usb 4-1: new full speed USB device using address 5
Dec  7 18:19:43 localhost kernel: midi: probe of 4-1:1.0 failed with error -5
Dec  7 18:19:43 localhost kernel: usb-midi: Found MIDISTREAMING on dev 0a4d:00b5, iface 1
Dec  7 18:19:43 localhost kernel: usb-midi: Found MIDIStreaming device corresponding to Release 1.00 of spec.
Dec  7 18:19:43 localhost kernel: usb-midi: Found IN Jack 0x01 EMBEDDED
Dec  7 18:19:43 localhost kernel: usb-midi: Found IN Jack 0x02 EXTERNAL
Dec  7 18:19:43 localhost kernel: usb-midi: Found IN Jack 0x05 EXTERNAL
Dec  7 18:19:43 localhost kernel: usb-midi: Found OUT Jack 0x03 EMBEDDED, 1 pins
Dec  7 18:19:43 localhost kernel: usb-midi: Found OUT Jack 0x06 EMBEDDED, 1 pins
Dec  7 18:19:43 localhost kernel: usb-midi: Found OUT Jack 0x04 EXTERNAL, 1 pins
Dec  7 18:19:43 localhost kernel: string descriptor 0 found (length = 4)
Dec  7 18:19:43 localhost kernel: usb-midi: langid(0) 0x0409
Dec  7 18:19:43 localhost kernel: usb-midi: langid(match) 0x0409
Dec  7 18:19:43 localhost kernel: usb-midi: fetchString(2)
Dec  7 18:19:44 localhost kernel: usb-midi: fetchString = 17
Dec  7 18:19:44 localhost kernel: usbmidi: found [ Keystation Pro 88 ] (0x0a4d:0x00b5), attached:
Dec  7 18:19:44 localhost kernel: usbmidi: /dev/midi01: in (ep:81 cid: 0 bufsiz: 0) out (ep:02 cid: 0 bufsiz:64)
Dec  7 18:19:44 localhost kernel: usbmidi: /dev/midi02: in (ep:81 cid: 1 bufsiz:00)
Dec  7 18:19:44 localhost kernel: usbcore: registered new driver midi
Dec  7 18:19:44 localhost kernel: usbcore: registered new driver snd-usb-audio
Dec  7 18:19:44 localhost kernel: usbcore: registered new driver audio
Dec  7 18:19:44 localhost kernel: drivers/usb/class/audio.c: v1.0.0:USB Audio Class driver
Dec  7 18:19:45 localhost udev[4224]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midi1' becomes 'snd/%k'
Dec  7 18:19:45 localhost udev[4224]: creating device node '/udev/snd/midi1'
Dec  7 18:19:45 localhost udev[4225]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 18 applied, 'midi2' becomes 'snd/%k'
Dec  7 18:19:45 localhost udev[4225]: creating device node '/udev/snd/midi2'
Dec  7 18:19:45 localhost udev[4226]: configured rule in '/etc/udev/rules.d//50-udev.rules' at line 15 applied, 'controlC1' becomes 'snd/%k'
Dec  7 18:19:45 localhost udev[4226]: creating device node '/udev/snd/controlC1'
Dec  7 18:19:45 localhost udev[4227]: creating device node '/udev/mixer1'
Dec  7 18:20:01 localhost pptp[3699]: anon log[ctrlp_rep:pptp_ctrl.c:243]: Sent control packet type is 5 'Echo-Request' 
Dec  7 18:20:01 localhost pptp[3699]: anon log[logecho:pptp_ctrl.c:659]: Echo Reply received.
Dec  7 18:20:34 localhost su(pam_unix)[4381]: session opened for user root by dto(uid=500)
Dec  7 18:20:53 localhost udev[4446]: removing device node '/udev/mixer1'
Dec  7 18:20:53 localhost udev[4457]: removing device node '/udev/snd/controlC1'
Dec  7 18:20:53 localhost kernel: usb 4-1: USB disconnect, address 5
Dec  7 18:20:53 localhost kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000010
Dec  7 18:20:53 localhost kernel:  printing eip:
Dec  7 18:20:53 localhost kernel: 02116f10
Dec  7 18:20:53 localhost kernel: *pde = 00000000
Dec  7 18:20:53 localhost kernel: Oops: 0000 [#1]
Dec  7 18:20:53 localhost kernel: PREEMPT 
Dec  7 18:20:53 localhost kernel: Modules linked in: audio snd_usb_audio usb_midi snd_seq_oss snd_seq_midi snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_event snd_seq_midi_emul snd_seq ppp_async ppp_generic slhc snd_mixer_oss snd_emu10k1 snd_rawmidi snd_pcm snd_timer snd_seq_device snd_ac97_codec snd_page_alloc snd_util_mem snd_hwdep snd soundcore parport_pc lp parport autofs4 sunrpc 8139too mii ipt_REJECT ipt_state ip_conntrack iptable_filter ip_tables microcode floppy sg sd_mod usb_storage scsi_mod joydev dm_mod uhci_hcd ehci_hcd button battery asus_acpi ac ipv6 ext3 jbd
Dec  7 18:20:53 localhost kernel: CPU:    0
Dec  7 18:20:53 localhost kernel: EIP:    0060:[<02116f10>]    Not tainted
Dec  7 18:20:53 localhost kernel: EFLAGS: 00010002   (2.6.7-1.437.1.ll.rhfc2.ccrma) 
Dec  7 18:20:53 localhost kernel: EIP is at __wake_up_common+0x10/0x54
Dec  7 18:20:53 localhost kernel: eax: 00000010   ebx: 035ea000   ecx: 00000001   edx: 00000003
Dec  7 18:20:53 localhost kernel: esi: 00000001   edi: 00000010   ebp: 035eaee8   esp: 035eaed0
Dec  7 18:20:53 localhost kernel: ds: 007b   es: 007b   ss: 0068
Dec  7 18:20:53 localhost kernel: Process khubd (pid: 27, threadinfo=035ea000 task=21e01130)
Dec  7 18:20:53 localhost kernel: Stack: 022f1e80 00000206 00000003 035ea000 00000000 00000202 035eaf04 02116f72 
Dec  7 18:20:53 localhost kernel:        00000000 00000000 10180ccc 0db85314 00000000 00000000 22cd52e2 00000000 
Dec  7 18:20:53 localhost kernel:        00000000 1e02a938 22cd75a0 1e02a948 022216d9 1e02a948 22cd75c0 021e6d0c 
Dec  7 18:20:53 localhost kernel: Call Trace:
Dec  7 18:20:53 localhost kernel:  [<02116f72>] __wake_up+0x1e/0x40
Dec  7 18:20:53 localhost kernel:  [<22cd52e2>] usb_midi_disconnect+0x9e/0xde [usb_midi]
Dec  7 18:20:53 localhost kernel:  [<022216d9>] usb_unbind_interface+0x2c/0x50
Dec  7 18:20:53 localhost kernel:  [<021e6d0c>] device_release_driver+0x3c/0x46
Dec  7 18:20:53 localhost kernel:  [<021e6e0c>] bus_remove_device+0x47/0x80
Dec  7 18:20:54 localhost kernel:  [<021e6176>] device_del+0x66/0x87
Dec  7 18:20:54 localhost kernel:  [<02226507>] usb_disable_device+0x62/0xc1
Dec  7 18:20:54 localhost kernel:  [<02222018>] usb_disconnect+0xa7/0xd3
Dec  7 18:20:54 localhost kernel:  [<02223a8f>] hub_port_connect_change+0x6e/0x293
Dec  7 18:20:54 localhost kernel:  [<02223dbf>] hub_events+0x10b/0x2a4
Dec  7 18:20:54 localhost kernel:  [<02223f76>] hub_thread+0x1e/0xd0
Dec  7 18:20:54 localhost kernel:  [<02116ef4>] default_wake_function+0x0/0xc
Dec  7 18:20:54 localhost kernel:  [<02223f58>] hub_thread+0x0/0xd0
Dec  7 18:20:54 localhost kernel:  [<021041d9>] kernel_thread_helper+0x5/0xb
Dec  7 18:20:54 localhost kernel: 
Dec  7 18:20:54 localhost kernel: Code: 8b 00 8b 10 39 f8 89 55 ec 74 31 8d 58 f4 8b 55 f0 8b 40 f4 
Dec  7 18:20:54 localhost kernel:  <6>note: khubd[27] exited with preempt_count 1
Dec  7 18:20:54 localhost kernel: updfstab: Using deprecated /dev/sg mechanism instead of SG_IO on the actual device
Dec  7 18:20:54 localhost udev[4489]: removing device node '/udev/snd/midi1'

--=-=-=



-- 
David O'Toole
Irrational Games
617.269.0424 x335
dto@irrationalgames.com

--=-=-=--