BSD-3-Clause licensed
Maintained by Paul H. Liu
This version can be pinned in stack with:PortMidi-,2262

Module documentation for

Depends on 1 package(full list with versions):
Used by 1 package in lts-6.35(full list with versions):
This is a Haskell module for PortMidi audio library, which supports
real-time MIDI input and output.


Please see CHANGELOG.txt.


The usual cabal installation steps apply, either:

runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install

or simply:

cabal install

This will install a PortMidi package that contains a Sound.PortMidi module.

Contact Information

You may send your bug report and feature request to the package
maintainer: Paul H. Liu <>.

Last Update: Mon Sep 21 PDT 2015


Sun Apr 3 20:57:17 PDT 2016
* Bump version to

Sun Apr 3 00:46:02 PDT 2016
* PMEvent uses CLong as message type to better handle SysEx.
- This is a breaking change. Use encodeMsg or decodeMsg to work with PMMsg.

Sun Apr 3 00:40:29 PDT 2016
* Use LANGUAGE pragma instead of OPTIONS_GHC

Sun Apr 3 00:40:09 PDT 2016
* Detect freebsd OS

Mon Sep 21 22:17:09 PDT 2015
* Add CHANGELOG.txt to package, and bump version to

Mon Sep 21 11:29:09 PDT 2015
* Update README and bump version to

Mon Sep 21 11:17:37 PDT 2015
* Bump version to 0.1.5

Mon Sep 21 11:16:04 PDT 2015
* On some systems, Int is not the same size as CInt.

- Added hidden module Sound.PortMidi.DeviceInfo, moving DeviceInfo and peekDeviceInfo there
- this allowed it to be a hsc2hs module, enabling peekDeviceInfo to use C generated structure offsets and sizes
- FFI declarations for C calls that take and return PmError and PmDeviceID have been changed to take and return CInt rather than Int
- Haskell functions interfacing with C calls have had fromIntegral calls added as needed
- toPMError convenience function added, which replaced many calls to toEnum
- FFI declaration for Pm_CountDevices added, countDevices became a Haskell function
- PMError's toEnum function produces a more useful error message when the "impossible" happens

Mon Sep 21 11:15:00 PDT 2015
* Add strictness annotation when necessary

Wed May 6 00:33:40 PDT 2015
* Update cabal file, and bump version to 0.1.4

Wed May 6 00:33:10 PDT 2015
* Use withCAString for writeSysEx

Wed Sep 16 11:06:11 PDT 2009
* remove conflicts in cabal file

Wed Sep 16 11:01:59 PDT 2009
* fix compilation problem on OS X

Thu Jul 30 14:32:59 PDT 2009
* make cabal work for ghc 6.10.* on OS X

Thu Sep 4 18:59:02 PDT 2008
* PortMidi-0.1 initial release