hmidi-0.1: Binding to the OS level MIDI services

System.MIDI.Base

Description

The hardware-independent part of the MIDI binding.

Synopsis

Documentation

data MidiMessage' Source

A "regular" MIDI message.

Remark: NoteOff not having a velocity field is a design decision, and a questionable one. According to the MIDI standard, NoteOff also has a velocity. However, most keyboards do not use this feature (send the default value 64), and there are keyboards which do not send NoteOff messages at all, but send NoteOn messages with zero velocity instead (for example the EMU Xboard series). I don't know what would be a good solution. At the moment, the code auto-translates NoteOn messages with zero velocity to NoteOff messages, and the NoteOff velocity is ignored. This behaviour can be inverted with the Cabal flag NoNoteOff.

Constructors

NoteOff !Int

Note Off (key)

NoteOn !Int !Int

Note On (key, velocity)

PolyAftertouch !Int !Int

Polyphonic key pressure (key, pressure)

CC !Int !Int

Control Change (controller, value)

ProgramChange !Int

Program Change (program)

Aftertouch !Int

Global aftertouch (pressure)

PitchWheel !Int

Pitch wheel (value, from -8192..+8191)

data MidiMessage Source

The type representing a MIDI message.

Constructors

MidiMessage !Int !MidiMessage'

first argument is the MIDI channel (1..16)

SysEx [Word8]

not including the bytes 0xf0, 0xf7

SongPosition !Int 
SongSelect !Int 
TuneRequest 
SRTClock 
SRTStart 
SRTContinue 
SRTStop 
ActiveSensing 
Reset 
Undefined 

data MidiEvent Source

The type representing a timestamped MIDI message. Time is measured in milisecs elapsed since the last call to System.MIDI.start.

type ClientCallback = MidiEvent -> IO ()Source

Type of the user callback function.

data ShortMessage Source

Low level stuff.

Constructors

ShortMessage 

Instances