← 返回命令列表

Linux command

pw-midirecord 命令

文件

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

常用示例

Record MIDI input to a file

pw-midirecord [path/to/output.mid]

Record with verbose output

pw-midirecord -v [path/to/output.mid]

Record from a specific source node

pw-midirecord --target [node_id] [path/to/output.mid]

Record with custom latency

pw-midirecord --latency [50ms] [path/to/output.mid]

说明

pw-midirecord captures MIDI events from the PipeWire graph and writes them to a file. It is a convenience wrapper for pw-cat --record --midi, recording MIDI data from connected MIDI controllers, software instruments, or other MIDI sources available through PipeWire. The tool records raw MIDI events only. It does not capture rendered audio from MIDI synthesizers. To record the audio output of MIDI playback, use pw-record instead. When - is given as the file, data is written to stdout.

参数

--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_
Source 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-midirecord command used for?

pw-midirecord captures MIDI events from the PipeWire graph and writes them to a file. It is a convenience wrapper for pw-cat --record --midi, recording MIDI data from connected MIDI controllers, software instruments, or other MIDI sources available through PipeWire. The tool records raw MIDI events only. It does not capture rendered audio from MIDI synthesizers. To record the audio output of MIDI playback, use pw-record instead. When - is given as the file, data is written to stdout.

How do I run a basic pw-midirecord example?

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

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

Stream volume (default 1.0).