3

Why does this USB MIDI device (Korg Nanokontrol) produce data that can be read from /dev/snd/midiC2D0 when a knob is turned

enter image description here

But this one doesn't? (Egosys MIDIMATE II)

enter image description here

The arrow indicates a led which is flashing as midi data comes in. The type of the MIDI messages in this case are "midi clock" that I'm trying to use to tell a tempo of a song which is being played elsewhere to this computer.

It can also be confirmed with Wireshark USB sniffing that the correct kind of data is being transmitted through USB to the computer (at least I think it's correct).

enter image description here

I'm also sure that the device midiC1D0 is the right device because it appears and disappears when I plug and unplug the device.

So why is the data never reaching /dev/snd/midiC1D0 even though there is data coming in?

I've also tried using alsa functions directly as shown in this code example but the result is the same: the read function reads nothing.

4

1 回答 1

2

CL的评论是正确的。Amidi 显示了正确的数据。所以现在我只需要编写与amidi 相同的代码即可。谢谢!

apaksi@extruder:/dev/snd$ amidi -l
Dir Device    Name
IO  hw:0,0,0  nanoKONTROL MIDI 1
IO  hw:1,0,0  MIDIMATE II MIDI 1
IO  hw:1,0,1  MIDIMATE II MIDI 2
apaksi@extruder:/dev/snd$ amidi -d -p hw:1,0,1 

F8
F8
F8
F8
F8
F8
F8
F8
于 2013-08-30T21:47:45.303 回答