Return home ⟐ Computers home ⟐ UNIX home
Outside of Windows, most operating systems don't offer out-of-the-box support for software synthesis of MIDI (Musical Instrument Digital Interface) files.
TiMidity++ is an open-source solution to that problem, supporting MIDI playback on UNIX (including macOS) and Linux/*nix operating systems — as well as Microsoft Windows. While it can be ran directly from the command line in Terminal, many graphical user interfaces also exist for TiMidity++, including its Windows version.
However, MIDI playback isn't the only feature of TiMidity++. It can also play MOD (module) files. MIDI and MOD files can be rendered to an output file in either AIFF, WAV or Ogg/Vorbis formats. There are built-in effects, along with various other settings that can be changed for playback. Other SoundFonts can be installed and used with TiMidity. During playback, TiMidity++ will also scroll lyrics or other text embeded in the file. TiMidity++ can even expand and play files from an archive, such as zip, tar and tar.gz archives, along with being able to download and play files directly from the internet and FTP servers.
If using a *nix operating system, you can usually download TiMidity++ directly from your Linux/BSD/System V distribution's package manager. In most cases, TiMidity++ is completely ready to go once installed by the package manager. No need to adjust settings, or find and install a SoundFont sample bank.
Installation methods vary based on your operating system. To install on OpenIndiana, an Illumos distribution based on System V Revision 4:
First, search for the package in the OpenIndiana package repository. You can do this on the OpenIndiana Hipster package repository or by issuing the following command in Terminal:
pkg -r timidity
Once identifying the correct package and noting its "name" (location on the server, in this case "multimedia/timidity++"), then install the package. You must be a privileged or superuser to install the package. (In other words, use the sudo command. Once you enter the command, it will prompt you for your password. Installation will not proceed if the incorrect password is entered.
sudo pkg install multimedia/timidity++
Installation may take some time, and the computer may not show progress as the package is installed.
To play a local file, simply enter this command:
timidity path/to/file.mid
To play a file from the internet:
timidity http://www.website.com/path/to/midi.mid
Similarly, you can also play MIDI files on ftp and newsgroup servers. But what about a bunch of MIDI files compressed into a zip archive?
timidity path/to/zip/file.zip
You can also specify a certain MIDI file in the archive to play. For instance, with a tar archive:
timidity path/to/tar/file.tar#midi.mid
Archive playback works with tar, tar+gzip, zip and lzh archives.
TiMidity++ can export audio from playback of a MIDI, MOD or other supported file to an audio file. Supported output formats include AIFF, AU, Ogg/Vorbis and WAV.
To export a file, enter the following command. Substitute "f" with the format you would like to export to.
timidity -Of path/to/file.mid
Variable "f" can be replaced by: a (-Oa) for AIFF; u (-Ou) for Sun Audio (au); v (-Ov) for Ogg/Vorbis; and w (-Ow) for WAV. Note: If export of WAV files are unsuccessful, sound utility "sox" can be used to read and convert failed files.
The output file has the same name and is placed in the same directory as the source file. (For instance, the exported AIFF file from the above sample would be at path/to/file.aiff.)
To export to a different name or directory, add the "-o" command following the source file name, followed by the location or name for the output file. For instance:
timidity -Ov path/to/midi.mid -o path/to/export/vorbis.ogg
In the above example, the MIDI file playback will be exported to an Ogg/Vorbis file in the "export" directory.
Return home ⟐ Computers home ⟐ UNIX home
Last updated: November 3, 2024