NAME
|
pplay – PCM audio player and editor |
SYNOPSIS
|
audio/pplay [ –bc ] [ pcmfiles.. ] |
DESCRIPTION
|
Pplay is an interactive audio player and editor for PCM files
(16–bit stereo audio at 44.1 kHz sampling rate, see audio(3)),
displaying each channel's waveform and the current playback position.
Playback loops forever between two positional markers, initially
the beginning and end of the data (see section Loop points and
selection below). Command line parameters Graphical interface Time information is displayed on the bottom left, with T the sample period (stereo samples per pixel), @ the current playback position, ↺ the starting loop point, – the ending loop point, and ‡ the cursor (last left click). The last 4 timestamps are displayed in [hh:mm:ss.tt] format (see tmdate(2)), or the number of stereo samples so far if toggled.
When the selected range is the entire data and only the @ timestamp
is displayed. The ‡ timestamp is displayed if a cursor has been
set see section "Loop points and selection" below). Loop points and selection
Middle–clicking either left or right of the current playback position
cursor sets respectively the start or end loop point. Left–clicking
within the range sets the current playback position. The last
left click is stored as another positional marker ("cursor") for
some commands. Reseting the loop points selects the entire
data again and removes the cursor. Loop points may also be set
to a specific sample number or timestamp via commands (see below). Keyboard and mouse commands Any other key opens up a command prompt (see Commands section below).
Mouse buttons: Editing commands
c Copy selection (sets hold buffer) Some of the cut/copy commands set the contents of a "hold" buffer which may be later inserted or pasted over the current selection any number of times. Note that if a cursor (last left click) has been set, some commands will use its position alone instead of the entire range. Setting a cursor thus allows one to insert data at a position rather than paste over an entire range. Shell commands are passed verbatim to rc(1) and may be any valid expression including function definitions. Each of them runs concurrently in the background and updates the then selected range once done. Upon exit, pplay will wait for subcommands to end and exit first.
Undo is infinite. |
EXAMPLES
Use play(1) to decode any known audio format and pass it on standard
in:
|
SEE ALSO
|
audio(1), play(1), rc(1), audio(3) |
HISTORY
|
Pplay first spawned on 9front (October, 2017), beyond the environment. |
BUGS
|
An external command that never exits will freeze pplay forever
on exit due to the reliance on thread(2). Subprocess abnormal
exits are completely unhandled. Edits in a range while a shell
command affecting it is running, or the case of multiple shell
commands on intersecting ranges, are not serialized or protected
in any way. The front may fall off if attempting to load data which cannot entirely fit in available memory. The maximum size of a single buffer is bound by the limits of malloc(2).
Undo/redo don't restore the previous selection correctly, and
most editing operations don't do set the new selection well enough. |