midi-0.0.5: Handling of MIDI messages and files

Sound.MIDI.Event

Description

Datatype for MIDI events as they can be sent to a synthesizer. That is, no timing is handled here.

Taken from Haskore.

Synopsis

Documentation

data Controller Source

Types of predefined MIDI controllers.

Constructors

BankSelectMSB 
ModulationMSB 
BreathControlMSB 
Controller03 
FootControlMSB 
PortamentoTimeMSB 
DataEntryMSB 
MainVolumeMSB 
BalanceMSB 
Controller09 
PanoramaMSB 
ExpressionMSB 
Controller0C 
Controller0D 
Controller0E 
Controller0F 
GeneralPurpose1MSB 
GeneralPurpose2MSB 
GeneralPurpose3MSB 
GeneralPurpose4MSB 
Controller14 
Controller15 
Controller16 
Controller17 
Controller18 
Controller19 
Controller1A 
Controller1B 
Controller1C 
Controller1D 
Controller1E 
Controller1F 
BankSelectLSB 
ModulationLSB 
BreathControlLSB 
Controller23 
FootControlLSB 
PortamentoTimeLSB 
DataEntryLSB 
MainVolumeLSB 
BalanceLSB 
Controller29 
PanoramaLSB 
ExpressionLSB 
Controller2C 
Controller2D 
Controller2E 
Controller2F 
GeneralPurpose1LSB 
GeneralPurpose2LSB 
GeneralPurpose3LSB 
GeneralPurpose4LSB 
Controller34 
Controller35 
Controller36 
Controller37 
Controller38 
Controller39 
Controller3A 
Controller3B 
Controller3C 
Controller3D 
Controller3E 
Controller3F 
Sustain 
Porta 
Sustenuto 
SoftPedal 
Controller44 
Hold2 
Controller46 
Controller47 
Controller48 
Controller49 
Controller4A 
Controller4B 
Controller4C 
Controller4D 
Controller4E 
Controller4F 
GeneralPurpose5 
GeneralPurpose6 
GeneralPurpose7 
GeneralPurpose8 
Controller54 
Controller55 
Controller56 
Controller57 
Controller58 
Controller59 
Controller5A 
ExtDepth 
TremoloDepth 
ChorusDepth 
CelesteDepth 
PhaserDepth 
DataIncrement 
DataDecrement 
NonRegisteredParameterLSB 
NonRegisteredParameterMSB 
RegisteredParameterLSB 
RegisteredParameterMSB 
Controller66 
Controller67 
Controller68 
Controller69 
Controller6A 
Controller6B 
Controller6C 
Controller6D 
Controller6E 
Controller6F 
Controller70 
Controller71 
Controller72 
Controller73 
Controller74 
Controller75 
Controller76 
Controller77 
Controller78 
Controller79 
Controller7A 
Controller7B 
Controller7C 
Controller7D 
Controller7E 
Controller7F 

zeroKey :: PitchSource

A MIDI problem is that one cannot uniquely map a MIDI key to a frequency. The frequency depends on the instrument. I don't know if the deviations are defined for General MIDI. If this applies one could add transposition information to the use patch map. For now I have chosen a value that leads to the right frequency for some piano sound in my setup.

maximumVelocity :: Num quant => quantSource

The velocity of an ordinary key stroke and the maximum possible velocity.

normalVelocity :: Num quant => quantSource

toFloatVelocity :: (Integral a, Fractional b) => a -> bSource

64 is given as default value by the MIDI specification and thus we map it to 1.