plan9fox/sys/man/1/dmid

85 lines
1.7 KiB
Plaintext
Raw Normal View History

2018-07-12 07:33:33 +00:00
.TH DMID 1
.SH NAME
dmid \- MIDI to OPL3 converter using GENMIDI-type instrument banks
.SH SYNOPSIS
.B dmid
[
.B -2s
2018-07-12 07:33:33 +00:00
] [
.B -i
.I bank
] [
.I file
]
.SH DESCRIPTION
.I Dmid
decodes MIDI instructions either from
.I file
or from standard input,
and produces
.SM OPL3
instructions suitable for playback by
.IR opl3 (1).
To program instruments, an OPL2 instrument bank formatted as
.SM GENMIDI
lumps from
.I doom
must be provided.
Since it is assumed that the bank is contained in a
.I doom WAD
file, its default location is
.BR /mnt/wad/genmidi .
This may be overridden with the
.B -i
command line option.
.PP
The
.B -s
flag enables streaming mode,
in which the input file is a stream of MIDI events.
The file needn't provide any timing information such as MIDI tics.
This is suitable for MIDI instruments.
.PP
2018-07-12 07:33:33 +00:00
In
.SM GENMIDI
lumps, two voices are defined per instrument.
For compatibility, the
.B -2
flag disables the second voice, reducing the number of
.SM OPL
channels needed.
It also disables
.SM OPL3
specific features and produces an IMF-format stream,
which can be used in other game engines.
.SH EXAMPLES
Play a MUS file from a
.I doom WAD
file:
.IP
.EX
% games/wadfs /sys/games/lib/doom/doom2.wad
createfile SW18_7: file already exists
% games/mus /mnt/wad/d_doom | games/dmid | games/opl3 >/dev/audio
.EE
.PP
Play a MIDI stream from a USB device (see
2018-10-27 22:05:05 +00:00
.IR usb (3)):
.IP
.EX
% games/wadfs /sys/games/lib/doom/doom2.wad >[2]/dev/null
% games/dmid -s /dev/usb/ep10.1/data | games/opl3 >/dev/audio
.EE
2018-07-12 07:33:33 +00:00
.SH SOURCE
.B /sys/src/games/dmid.c
.SH "SEE ALSO"
.IR games (1) ,
.IR mus (1) ,
.IR opl3 (1) ,
.IR audio (3) ,
.IR usb (3) ,
2018-07-12 07:33:33 +00:00
.IR wadfs (4)
.SH HISTORY
.I Dmid
first appeared in 9front (July, 2018).