← 返回命令列表

Linux command

pw-midiplay 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Play a MIDI file

pw-midiplay [path/to/file.mid]

Play with a specific volume

pw-midiplay --volume [0.5] [path/to/file.mid]

Play to a specific target node

pw-midiplay --target [node_id] [path/to/file.mid]

Play with verbose output

pw-midiplay -v [path/to/file.mid]

说明

pw-midiplay plays MIDI files through a PipeWire server. It is a convenience wrapper for pw-cat --playback --midi, making MIDI events available to the PipeWire audio graph. The tool does not render MIDI into audible audio by itself. It sends MIDI events into the PipeWire graph where they must be routed to a MIDI synthesizer (such as qsynth, fluidsynth, or timidity) or hardware MIDI device to produce sound. When - is given as the file, data is read from stdin.

参数

--volume _level_
Stream volume (default 1.0).
--rate _hz_
Sample rate in Hz (default 48000).
--channels _num_
Number of audio channels (default 2).
--channel-map _map_
Channel layout (e.g. stereo, surround-51, or custom FL,FR mapping).
--format _fmt_
Sample format: u8, s8, s16, s24, s32, f32, f64 (default s16).
--target _value_
Target node: auto, 0, or a specific node ID.
--latency _value_
Node latency (default 100ms).
-q, --quality _level_
Resampler quality (0-15, default 4).
-R, --remote _name_
Connect to a specific PipeWire instance.
-P, --properties _json_
Extra stream properties as a JSON object.
-v, --verbose
Enable verbose output.
-h, --help
Display help information.
--version
Show version details.

FAQ

What is the pw-midiplay command used for?

pw-midiplay plays MIDI files through a PipeWire server. It is a convenience wrapper for pw-cat --playback --midi, making MIDI events available to the PipeWire audio graph. The tool does not render MIDI into audible audio by itself. It sends MIDI events into the PipeWire graph where they must be routed to a MIDI synthesizer (such as qsynth, fluidsynth, or timidity) or hardware MIDI device to produce sound. When - is given as the file, data is read from stdin.

How do I run a basic pw-midiplay example?

Run `pw-midiplay [path/to/file.mid]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --volume _level_ do in pw-midiplay?

Stream volume (default 1.0).