Package details
For decades, MIDI files have been the lingua franca of electronic
musicians. Representing music at the level of a musical score, as
opposed to a performance as do audio files such as MP3, they allow
compositions to be manipulated in ways creative musicians do
orchestrated, assigned to different instruments, transposed to
different keys, and adjusted in tempo, just to name a few. Most
musicians work on MIDI files using special-purpose music editing
programs called (for historical reasons) sequencers. These programs
are ideally suited for capturing music as it is played and editing
it into a final composition, but often lack the ability to easily
apply transformations in bulk to large collections of music files
(for example, changing instrument assignments for a set of files
from those of one studio to another), algorithmically transforming
music, or programmatically generating new music.
MIDI files are stored in a compact binary form intended to optimise
speed (and hence reduce latency) on limited speed MIDI channels,
while not overly taxing the processing power of the humble
microcontrollers employed by instruments in the epoch when MIDI
was developed. While well-suited to its intended purposes, MIDI
files are somewhat difficult to read and write without a
special-purpose library, particularly in commonly used text
processing languages such as Perl and Python which are otherwise
ideally suited to the kinds of transformations one often wishes
to apply to MIDI-encoded music.
The midicsv and csvmidi programs allow you to use text processing
tools to transform MIDI files or create them from scratch. midicsv
converts a MIDI file into a Comma-Separated Value (CSV) text file,
preserving all the information in the original MIDI file. The
format of the CSV file is deliberately designed to facilitate
processing by text manipulation tools. The csvmidi program reads
CSV files in this format and creates an equivalent MIDI file.
Processing a MIDI file through midicsv and then csvmidi will result
in a completely equivalent (although, for technical reasons
relating to options in MIDI file compression, not necessarily
byte-for-byte identical) MIDI file.
This package has no releases.