midi-alsa-0.2.1: Convert between datatypes of the midi and the alsa packages
Safe HaskellNone
LanguageHaskell98

Sound.MIDI.ALSA

Synopsis

value conversions

normalizeNote :: (NoteEv, Velocity) -> (NoteEv, Velocity) Source #

Return a NoteOff if input is a NoteOn with velocity zero. This is a trick of the MIDI standard in order to allow compression of a series of note events. After normalization you can safely match on NoteOn and NoteOff.

toController :: Parameter -> Controller Source #

Controllers from 0x78 to 0x7F are special, you must assert that the controller number is in the range 0 to 0x77.

construction of event data records

accessors to event data fields

noteVelocity :: T Note Velocity Source #

This may not yield what you expect. See normalizeNote.

ctrlController :: T Ctrl Controller Source #

This is undefined, if the controller is no regular controller but a channel mode message. Better use ctrlControllerMode.

data ControllerMode Source #

Constructors

Controller Controller Int 
Mode T 

Instances

Instances details
Show ControllerMode Source # 
Instance details

Defined in Sound.MIDI.ALSA

Eq ControllerMode Source # 
Instance details

Defined in Sound.MIDI.ALSA