Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Midi.Interface

Description

Common interface for the MIDI drivers.

Synopsis

Documentation

data RawInterface write_message Source #

Produced by an initialize function.

Constructors

Interface 

Fields

Instances

Instances details
Show (RawInterface a) # 
Instance details

Defined in Midi.Interface

data Message Source #

Annotate a WriteMessage with additional control messages.

Constructors

Midi !Midi.WriteMessage 
AllNotesOff !RealTime

Turn off sounding notes on all devices and channels.

AllDevices !RealTime ![Midi.Message]

Emit the messages for all devices that have been used. This doesn't care if they have sounding notes because control state persists after NoteOff.

Instances

Instances details
Eq Message # 
Instance details

Defined in Midi.Interface

Methods

(==) :: Message -> Message -> Bool #

(/=) :: Message -> Message -> Bool #

Show Message # 
Instance details

Defined in Midi.Interface

DeepSeq.NFData Message # 
Instance details

Defined in Midi.Interface

Methods

rnf :: Message -> () #

Pretty Message # 
Instance details

Defined in Midi.Interface

note_tracker :: Bool -> (Midi.WriteMessage -> IO (Maybe err)) -> IO (Message -> IO (Maybe err)) Source #

Wrap a write_message and keep track of which notes are on. It can then handle reset messages which need to know current state to reset it.

This is necessary because some synthesizers do not support AllNotesOff, but also relieves callers of having to track which devices and channels have active notes.