Subject: /dev/music weirdness
To: <>
From: Gavan Fantom <>
List: tech-kern
Date: 01/26/2001 01:33:02
I'm playing about with /dev/music to do (eventually) some pretty heavy

Firstly, a small gripe. /dev/music seems to be rather lacking in
documentation. I've been relying so far on <sys/midiio.h> and the source
for midiplay. Have I missed something blatantly obvious?

Now, the problem: When I write data to /dev/music (having practially
cut+pasted code out of midiplay), the last MIDI event seems to get lost.

My simple test case is:

Send MIDI reset
Send 2 second delay
Send Note On event
Send 1 second delay
Send Note Off event
Send 1 second delay
Send Note On event
Send 1 second delay

The MIDI reset, Note On and Note Off events arrive at the synthesizer, but
the second Note On never arrives.

If I stop at any point in that sequence, the last Note On or Note Off
event never arrives.

After opening /dev/music for read/write, I'm querying SEQUENCER_NRMIDIS,

Before I close the device I'm calling SEQUENCER_SYNC.

Am I doing anything wrong, or is this a bug?

Gillette - the best a man can forget