About

Metadata

  • Last updated , by AlexanderBondarenko
  • License BSD-3-Clause
  • Categories Audio
  • Maintained by: aenor.realm@gmail.com

  • Lottery factor: 0

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    executables (off by default)

Readme

PortMidi-simple 🚢🎶

Reading from MIDI controllers should not be too difficult.

{-# LANGUAGE BlockArguments #-}
import qualified Sound.PortMidi.Simple as Midi

main = Midi.withMidi do
  Just device <- Midi.findInputNamed "nanoKONTROL2"
  Midi.withInput device \stream ->
    Midi.withReadMessages stream 256 \readMessages ->
      forever do
        readMessages >>= mapM_ print
        threadDelay 1000