hmidi: Binding to the OS level MIDI services

[ bsd3, library, music, system ] [ Propose Tags ] [ Report a vulnerability ]

Partial implementation of the MIDI 1.0 standard to communicate with physical or virtual MIDI devices, eg. MIDI keyboards and synths. Supported operating systems are MacOS and Windows. See also the alsa-midi library for similar functionality under Linux. Please note that there was no effort made (yet) to be compatible with the other existing Haskell MIDI libraries.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
nonoteoff

Translates NoteOff events to NoteOn events with velocity=0.

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.2.1, 0.2.3.1
Dependencies base (>=3 && <=5), stm, Win32 [details]
Tested with ghc ==8.6.5
License BSD-3-Clause
Copyright (c) 2008-2020 Balazs Komuves
Author Balazs Komuves
Maintainer bkomuves (plus) hackage (at) gmail (dot) com
Category Music, System
Home page http://moire.be/haskell/
Source repo head: darcs get https://hub.darcs.net/bkomuves/hmidi
Uploaded by BalazsKomuves at 2020-12-26T11:50:04Z
Distributions NixOS:0.2.3.1
Reverse Dependencies 5 direct, 0 indirect [details]
Downloads 4262 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-12-26 [all 1 reports]

Readme for hmidi-0.2.3.1

[back to package description]

hmidi: Haskell bindings to the OS level MIDI services

Partial implementation of the MIDI 1.0 standard to communicate with physical or virtual MIDI devices, eg. MIDI keyboards and synthesizers.

Supported operating systems are MacOS and Windows. See also the alsa-midi library for similar functionality under Linux.

Installation & Usage

It should install with cabal without problems on Mac OS X and Windows. Linux is not supported.

As usual, just run the command:

cabal install 

When using the library, you have to link against the threaded runtime (otherwise random crashes will occur); for example:

ghc --make -threaded -O monitor.hs

Example applications

There are some example command line applications in the examples subdirectory:

  • monitor.hs - very basic MIDI monitor
  • chords.hs - convert NoteOn messages to simple chords
  • playmidi.hs - play simple .mid files on General MIDI compatible synths
  • osx_host.hs - create a MIDI host (as opposed to connecting to existing host). Only works on MacOs.

You can build them with ghc --make -threaded like above.

Differences between Windows and MacOS

We tried to create a unified Haskell API, but there are still differences between the Windows and Mac implementations. In particular, you cannot create MIDI hosts on Windows.