shithub: plan9front

Download patch

ref: 6468f848bc16cae5a74ec15337298e33a2ff1aae
parent: d65589c29941b16a5239f6f2e9c8f6fea5c863a2
author: qwx <qwx@sciops.net>
date: Sat Jan 21 13:15:08 EST 2023

games/dmid(1), games/opl3(1): formatting and update for streaming

clarifications and formatting; we also now include
doom's shareware, use it in the examples.

--- a/sys/man/1/dmid
+++ b/sys/man/1/dmid
@@ -20,7 +20,9 @@
 .SM OPL3
 instructions suitable for playback by
 .IR opl3 (1).
-To program instruments, an OPL2 instrument bank formatted as
+To program instruments, an
+.SM OPL2
+instrument bank in the same format as
 .SM GENMIDI
 lumps from
 .I doom
@@ -36,9 +38,11 @@
 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.
+in which the input is a
+.IR pipe (3)
+streaming MIDI events.
+It needn't provide any timing information such as MIDI timing clocks.
+This is suitable for MIDI devices transmitting in real time.
 .PP
 In
 .SM GENMIDI
@@ -58,9 +62,8 @@
 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
+% games/wadfs /sys/games/lib/doom/doom1.wad >[2]/dev/null
+% games/mus /mnt/wad/d_e1m8 | games/dmid | games/opl3 >/dev/audio
 .EE
 .PP
 Play a MIDI stream from a USB device (see
@@ -67,8 +70,8 @@
 .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
+% games/wadfs /sys/games/lib/doom/doom1.wad >[2]/dev/null
+% games/dmid -s /dev/usb/ep10.1/data | games/opl3 -s >/dev/audio
 .EE
 .SH SOURCE
 .B /sys/src/games/dmid.c
@@ -77,6 +80,7 @@
 .IR mus (1) ,
 .IR opl3 (1) ,
 .IR audio (3) ,
+.IR pipe (3) ,
 .IR usb (3) ,
 .IR wadfs (4)
 .SH HISTORY
--- a/sys/man/1/opl3
+++ b/sys/man/1/opl3
@@ -4,6 +4,8 @@
 .SH SYNOPSIS
 .B opl3
 [
+.B -s
+] [
 .B -r
 .I rate
 ] [
@@ -11,10 +13,10 @@
 ]
 .SH DESCRIPTION
 .I Opl3
-is an emulator of a single Yamaha 262 chip, also known as
+is an emulator of a single Yamaha YMF262 chip, also known as
 .SM OPL3.
 .PP
-The emulated chip is programmed by a stream of commands either from
+The emulated chip is programmed by a series of commands either from
 .I file
 or from standard in.
 It then synthesizes stereo 16-bit little-endian PCM samples
@@ -24,6 +26,13 @@
 default 44.1 kHz rate,
 and writes them to standard out.
 .PP
+The
+.B -s
+flag enables streaming mode,
+in which the input is a pipe streaming commands
+in identical format and semantics as described below,
+but in real time.
+.SS "Command format"
 Commands are 5 bytes wide, in little-endian byte order:
 .PP
 .RS
@@ -55,6 +64,7 @@
 .SH SOURCE
 .B /sys/src/games/opl3
 .SH "SEE ALSO"
+.IR dmid (1) ,
 .IR audio (3)
 .PP
 Yamaha