PortMidi-simple: Simplified PortMidi wrapper

[ bsd3, library, sound ] [ Propose Tags ] [ Report a vulnerability ]

Modules

  • Sound
    • PortMidi
      • Sound.PortMidi.Simple
      • Sound.PortMidi.SysEx

Flags

Manual Flags

NameDescriptionDefault
executablesDisabled

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

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1
Change log ChangeLog.md
Dependencies base (>=4.7 && <5), PortMidi, PortMidi-simple [details]
License BSD-3-Clause
Copyright Alexander Bondarenko
Author Alexander Bondarenko
Maintainer aenor.realm@gmail.com
Category Sound
Source repo head: git clone https://gitlab.com/dpwiz/PortMidi-simple
Uploaded by AlexanderBondarenko at 2021-06-19T09:28:37Z
Distributions NixOS:0.1.0.1
Executables channel-reader
Downloads 432 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2021-06-19 [all 2 reports]

Readme for PortMidi-simple-0.1.0.1

[back to package description]

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