RtMidi: Haskell wrapper for RtMidi, the lightweight, cross-platform MIDI I/O library.

[ library, mit, program, sound ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/riottracker/RtMidi#readme

[Skip to Readme]


Automatic Flags

Enable ALSA sequencer api on Linux


Enable JACK api on Linux or OSX


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,,,,,,,,,
Dependencies base (>=4.14 && <5), deepseq (>= && <2), pretty-simple (>= && <5), RtMidi, vector (>= && <1) [details]
License MIT
Author kohlrabi, Eric Conlon
Maintainer ejconlon@gmail.com
Category Sound
Home page https://github.com/riottracker/RtMidi
Source repo head: git clone https://github.com/riottracker/RtMidi
Uploaded by ejconlon at 2023-08-14T18:42:16Z
Reverse Dependencies 1 direct, 0 indirect [details]
Executables rtmidi-report, rtmidi-poll, rtmidi-playback, rtmidi-callback
Downloads 2714 total (39 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for RtMidi-

[back to package description]


Haskell wrapper for RtMidi, the lightweight, cross-platform MIDI I/O library.


The version of this library does not correspond to the RtMidi version (sorry). You can look at the justfile to see that we vendor sources from version 6.0.0.

How to use

See Hackage for the latest released version and add RtMidi and vector to your library build-depends.

Follow the callback example to receive messages.

Follow the playback example to send messages.


This project is tested with Cabal (latest versions of last two compiler lines) and Stack (latest LTS).

You can get started with development like so (if you have just installed):

# Build and test on OSX CoreMIDI support or Linux with ALSA support.
# (You can also manually invoke stack and pass `--flag RtMidi:jack` for Jack support.)
just test

# Print information about all accessible MIDI devices and all compiled APIs.
just example-report


  • See if there is a way to autodetect Jack in the Cabal file.
  • See if there is a way to make OSX not take 3 seconds when initializing the MIDI subsystem.