hmidi-0.2.1.0: Binding to the OS level MIDI services

Safe HaskellSafe-Infered

System.MIDI.Base

Description

The hardware-independent part of the MIDI binding.

Synopsis

Documentation

data MidiMessage' Source

A "regular" MIDI message.

Remark: 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). At the moment, the code auto-translates NoteOn messages with zero velocity to NoteOff messages with velocity 64. This behaviour can be inverted with the Cabal flag noNoteOff, which translates all NoteOff messages to NoteOn messages with velocity 0.

Constructors

NoteOff !Int !Int

Note Off (key, velocity)

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

measured in MIDI beats (1/16th notes).

SongSelect !Int 
TuneRequest 
SRTClock

clock is sent 24 times per quarter note

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 start.

type ClientCallback = MidiEvent -> IO ()Source

Type of the user callback function.

data ShortMessage Source

Low level stuff.

Constructors

ShortMessage 

Instances