← 返回命令列表

Linux command

timidity 命令

文件

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

常用示例

Play a MIDI file

timidity [path/to/file.mid]

Play with ncurses interface

timidity -in [path/to/file.mid]

Convert MIDI to WAV

timidity -Ow -o [output.wav] [input.mid]

Convert MIDI to WAV on stdout

timidity -Ow -o - [input.mid]

Play with increased volume

timidity -A [150] [path/to/file.mid]

Run as ALSA sequencer client

timidity -iA

Play multiple files

timidity -U [file1.mid] [file2.mid]

说明

TiMidity++ is a software MIDI synthesizer that converts MIDI files to audio using SoundFont or GUS patch instruments. It can play MIDI files in real time through an audio device or convert them to audio formats like WAV, AIFF, or raw PCM. The program supports Standard MIDI files (.mid), Recomposer files (.rcp, .r36, .g18, .g36), and module files (.mod). It uses Gravis Ultrasound-compatible patch files or SoundFonts (.sf2) to synthesize audio from MIDI data. TiMidity++ offers multiple interfaces including a dumb terminal interface, ncurses-based interface, GTK+ GUI, and can run as an ALSA sequencer client or MIDI server. This flexibility makes it useful for both playback and as a system-wide MIDI synthesizer.

参数

-A _n_
Set master volume amplification to n%. Default is 70%, range is 0-800.
-a
Enable anti-aliasing. Runs samples through a lowpass filter to reduce aliasing noise.
-B _n_,_m_
Set buffer fragments to n and fragment size to 2^m bytes for audio driver.
-i _mode_
Interface mode: d (dumb), n (ncurses), g (GTK+), r (MIDI server), A (ALSA sequencer).
-o _file_
Output to file. Use - for stdout.
-O _mode_
Output mode: d (audio device), w (RIFF WAVE), a (AIFF), r (raw), u (Sun audio), v (Ogg Vorbis), F (FLAC), l (list MIDI events), M (MOD to MIDI conversion).
-s _freq_
Set sampling frequency in Hz. Default is 44100.
-F
Enable fast panning, allowing panning adjustments to affect notes already playing.
-f
Enable fast envelopes, improving performance at the cost of shorter note release times.
-p _voices_
Set maximum number of simultaneous voices (polyphony). Default is system-dependent.
-U
Unload instruments from memory between files to reduce memory usage.
-c _file_
Read additional configuration file.
-L _path_
Add path to search for patch files.
-E _mode_
Set TiMidity++ extension modes for effects and reverb.
-Q _channels_
Ignore MIDI channels. Comma-separated list of channel numbers (1-16) to mute.
-T _n_
Adjust tempo by n%. Default is 100.
-h
Display help message and list of available output modes and interfaces.

FAQ

What is the timidity command used for?

TiMidity++ is a software MIDI synthesizer that converts MIDI files to audio using SoundFont or GUS patch instruments. It can play MIDI files in real time through an audio device or convert them to audio formats like WAV, AIFF, or raw PCM. The program supports Standard MIDI files (.mid), Recomposer files (.rcp, .r36, .g18, .g36), and module files (.mod). It uses Gravis Ultrasound-compatible patch files or SoundFonts (.sf2) to synthesize audio from MIDI data. TiMidity++ offers multiple interfaces including a dumb terminal interface, ncurses-based interface, GTK+ GUI, and can run as an ALSA sequencer client or MIDI server. This flexibility makes it useful for both playback and as a system-wide MIDI synthesizer.

How do I run a basic timidity example?

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

What does -A _n_ do in timidity?

Set master volume amplification to n%. Default is 70%, range is 0-800.