Subject: kern/32694: MIDI: "Use the native interface" - there isn't one
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <nbgnats@anastigmatix.net>
List: netbsd-bugs
Date: 02/02/2006 00:20:00
>Number:         32694
>Category:       kern
>Synopsis:       MIDI: "Use the native interface" - there isn't one
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 02 00:20:00 +0000 2006
>Originator:     Chapman Flack
>Release:        2.0 (there isn't one in current, either)
>Organization:
>Environment:
NetBSD lundestad.anastigmatix.net 2.0 NetBSD 2.0 (lundestad) #118: Sat Jan 28 19:46:11 EST 2006  xxx@xxx:/usr/src/sys/arch/i386/compile/lundestad i386
>Description:
As has been earlier reported (http://mail-index.netbsd.org/tech-userlevel/2003/07/11/0000.html),
the MIDI/sequencer API is purportedly OSS-compatible at the level of
message structures, but does not have any of the OSS macros for
generating those structures; the documentation says to "use the
native API" and there isn't one of those either. So now there is
(attached). It also contains some documentation for obscure points
in OSS operation that seem hard to find documented elsewhere.

I've successfully built a version of audio/rosegarden that sequences
MIDI output using this API.

sys/soundcard.h (the OSS compatibility header) could be extended to
supply the OSS event-constructor macros, defining them in terms of
these.

I have not changed sequencer.c and midiplay.c to use these
structures and macros in the code, but that would be a sensible
thing to do.
>How-To-Repeat:
man 4 midi. Follow the See Also to man 3 ossaudio. Read "Use the
native interface." Try to find one.
>Fix:
http://www.anastigmatix.net/cvsweb.cgi/NetBSD/midiapi.pat