shithub: pplay

Download patch

ref: d0a1ce234992b233df513abe9c2eb84d95b9a33e
parent: a10e87d9ff26a01039f9d92e62b0650881244a84
author: qwx <qwx@sciops.net>
date: Tue Feb 4 15:43:21 EST 2020

use default man target from /sys/src/cmd/mkone

--- a/man/1/pplay
+++ /dev/null
@@ -1,96 +1,0 @@
-.TH PPLAY 1
-.SH NAME
-pplay \- visual PCM audio player
-.SH SYNOPSIS
-.B pplay
-[
-.B -cfs
-] [
-.B pcmfile
-]
-.SH DESCRIPTION
-.I Pplay
-is a PCM audio player which shows a time-domain graphical plot of the data.
-It operates on the same format used by the audio device (see
-.IR audio (3)).
-.PP
-At startup, the program loads the audio data in its entirety into memory,
-unless the
-.B -f
-option is given, in which case the input file must be seekable.
-Data is read either from the file provided as argument, or from standard in.
-By default,
-.I pplay
-writes audio data back to
-.BR /dev/audio .
-With the
-.B -c
-option, it writes to standard out instead.
-.PP
-The graphical plot shows a time-domain representation of the audio data's left channel.
-The
-.B -s
-option enables plotting its right channel below the left.
-.PP
-The current position in the buffer is shown by a vertical line.
-It can be set using the left mouse button.
-.PP
-.I Pplay
-loops a section of the audio data indefinitely.
-At start up, this section is set to the entire file.
-The section's beginning and end are shown by vertical markers of the same color.
-Both are set by using the middle mouse button,
-relative to the current position in the buffer:
-clicking to the left of the position marker will set the loop start position, and vice versa.
-The
-.B r
-key resets both loop positions to their default values.
-.PP
-By default, the graphical plot spans the dimensions of the window.
-It can be zoomed in or out with the
-.L +
-and
-.L -
-keys, and reset with the
-.L z
-key.
-The
-.L _
-and
-.L =
-keys zoom in by greater increments.
-The view can then be moved by holding the right mouse button,
-and moving the cursor horizontally.
-.PP
-The space key pauses playback.
-The
-.L b
-key resets the position to that of the loop start position.
-.PP
-The
-.L w
-key prompts the user to enter a file path to write the looped section to.
-.SH EXAMPLES
-Load and play an mp3 file (see
-.IR audio (1)):
-.IP
-.EX
-% audio/mp3dec <file.mp3 | pplay
-.EE
-.PP
-Use
-.IR play (1)
-to decode any known audio format:
-.IP
-.EX
-% play -o /fd/1 file | pplay
-.EE
-.SH "SEE ALSO"
-.IR audio (1),
-.IR play (1),
-.IR audio (3)
-.SH HISTORY
-.I Pplay
-first appeared in 9front (October, 2017).
-.SH BUGS
-Most mouse actions redraw the entire plot.
--- a/mkfile
+++ b/mkfile
@@ -1,5 +1,6 @@
 </$objtype/mkfile
 BIN=$home/bin/$objtype
+MAN=/sys/man/1
 TARG=pplay
 OFILES=\
 	draw.$O\
--- /dev/null
+++ b/pplay.man
@@ -1,0 +1,96 @@
+.TH PPLAY 1
+.SH NAME
+pplay \- visual PCM audio player
+.SH SYNOPSIS
+.B pplay
+[
+.B -cfs
+] [
+.B pcmfile
+]
+.SH DESCRIPTION
+.I Pplay
+is a PCM audio player which shows a time-domain graphical plot of the data.
+It operates on the same format used by the audio device (see
+.IR audio (3)).
+.PP
+At startup, the program loads the audio data in its entirety into memory,
+unless the
+.B -f
+option is given, in which case the input file must be seekable.
+Data is read either from the file provided as argument, or from standard in.
+By default,
+.I pplay
+writes audio data back to
+.BR /dev/audio .
+With the
+.B -c
+option, it writes to standard out instead.
+.PP
+The graphical plot shows a time-domain representation of the audio data's left channel.
+The
+.B -s
+option enables plotting its right channel below the left.
+.PP
+The current position in the buffer is shown by a vertical line.
+It can be set using the left mouse button.
+.PP
+.I Pplay
+loops a section of the audio data indefinitely.
+At start up, this section is set to the entire file.
+The section's beginning and end are shown by vertical markers of the same color.
+Both are set by using the middle mouse button,
+relative to the current position in the buffer:
+clicking to the left of the position marker will set the loop start position, and vice versa.
+The
+.B r
+key resets both loop positions to their default values.
+.PP
+By default, the graphical plot spans the dimensions of the window.
+It can be zoomed in or out with the
+.L +
+and
+.L -
+keys, and reset with the
+.L z
+key.
+The
+.L _
+and
+.L =
+keys zoom in by greater increments.
+The view can then be moved by holding the right mouse button,
+and moving the cursor horizontally.
+.PP
+The space key pauses playback.
+The
+.L b
+key resets the position to that of the loop start position.
+.PP
+The
+.L w
+key prompts the user to enter a file path to write the looped section to.
+.SH EXAMPLES
+Load and play an mp3 file (see
+.IR audio (1)):
+.IP
+.EX
+% audio/mp3dec <file.mp3 | pplay
+.EE
+.PP
+Use
+.IR play (1)
+to decode any known audio format:
+.IP
+.EX
+% play -o /fd/1 file | pplay
+.EE
+.SH "SEE ALSO"
+.IR audio (1),
+.IR play (1),
+.IR audio (3)
+.SH HISTORY
+.I Pplay
+first appeared in 9front (October, 2017).
+.SH BUGS
+Most mouse actions redraw the entire plot.