perl-MIDI-Music - Perl interface to /dev/music
||ALT Linux Sisyphus
MIDI::Music is a high-level interface to /dev/music, and is designed to
function on any *NIX system supported by Open Sound System v.3.8 or higher.
Playback through internal and external MIDI devices is supported, as is
the "recording" of events from an external device. Additional goals in
designing MIDI::Music were:
to provide an API with as few methods necessary to satisfy 99% of MIDI
to provide easy integration with Sean M. Burke's MIDI-Perl suite by means
of a common event specification.
There are, at present, essentially three things you can do with MIDI::Music:
Play a MIDI file.
Play a series of events defined in an event structure, which is a LoL
as described in the the MIDI::Event manpage documentation.
Read a series events from an external device. These events are returned as
the same type of event structure as in .
It is important to remember that MIDI::Music is not a "realtime" synthesizer
interface in the strictest, unbuffered sense of the term. :) Rather, a series
of events are written to an internal buffer (in playback-related methods,
anyway) which is flushed periodically. The "playevents" function may have,
for example, long since returned, while the user continues to hear notes
FWIW: The readevents() method is fast to be sure, but the time involved in
the interpretation of data from the external synthesizer should be taken
into account. This time will of course depend on how many messages are being
processed at any given read, the speed of the machine doing the processing,
- Add the following line to /etc/apt/sources.list:
rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus x86_64 autoimports
rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
- Update the package index:
# sudo apt-get update
- Install perl-MIDI-Music rpm package:
# sudo apt-get install perl-MIDI-Music