diff options
author | qwx <qwx@sciops.net> | 2023-01-21 18:15:08 +0000 |
---|---|---|
committer | qwx <qwx@sciops.net> | 2023-01-21 18:15:08 +0000 |
commit | 6468f848bc16cae5a74ec15337298e33a2ff1aae (patch) | |
tree | 9bf5a35d4596fcac0e1c35228c89bc211667a005 /sys/man/1 | |
parent | d65589c29941b16a5239f6f2e9c8f6fea5c863a2 (diff) |
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.
Diffstat (limited to 'sys/man/1')
-rw-r--r-- | sys/man/1/dmid | 22 | ||||
-rw-r--r-- | sys/man/1/opl3 | 14 |
2 files changed, 25 insertions, 11 deletions
diff --git a/sys/man/1/dmid b/sys/man/1/dmid index eb148ef42..521e80b73 100644 --- a/sys/man/1/dmid +++ b/sys/man/1/dmid @@ -20,7 +20,9 @@ and produces .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 @@ command line option. 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,17 +62,16 @@ Play a MUS file from a 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 .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 @@ Play a MIDI stream from a USB device (see .IR mus (1) , .IR opl3 (1) , .IR audio (3) , +.IR pipe (3) , .IR usb (3) , .IR wadfs (4) .SH HISTORY diff --git a/sys/man/1/opl3 b/sys/man/1/opl3 index 280a3196f..5a783408e 100644 --- a/sys/man/1/opl3 +++ b/sys/man/1/opl3 @@ -4,6 +4,8 @@ opl3 \- OPL3 chip emulator .SH SYNOPSIS .B opl3 [ +.B -s +] [ .B -r .I rate ] [ @@ -11,10 +13,10 @@ opl3 \- OPL3 chip emulator ] .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 @@ resamples them to 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 @@ sets the input sampling rate. .SH SOURCE .B /sys/src/games/opl3 .SH "SEE ALSO" +.IR dmid (1) , .IR audio (3) .PP Yamaha |