- toChannel :: Word8 -> Channel
- fromChannel :: Channel -> Word8
- toPitch :: Word8 -> Pitch
- fromPitch :: Pitch -> Word8
- toVelocity :: Word8 -> Velocity
- fromVelocity :: Velocity -> Word8
- normalizeNote :: (NoteEv, Velocity) -> (NoteEv, Velocity)
- normalNoteFromEvent :: NoteEv -> Note -> (NoteEv, Velocity)
- toController :: Word32 -> Controller
- fromController :: Controller -> Word32
- toProgram :: Int32 -> Program
- fromProgram :: Program -> Int32
- noteChannel :: T Note Channel
- notePitch :: T Note Pitch
- noteVelocity :: T Note Velocity
- ctrlChannel :: T Ctrl Channel
- ctrlController :: T Ctrl Controller
- data ControllerMode
- = Controller Controller Int
- | Mode T
- ctrlControllerMode :: T Ctrl ControllerMode
- ctrlValue :: T Ctrl Int
- ctrlProgram :: T Ctrl Program
Documentation
fromChannel :: Channel -> Word8Source
toVelocity :: Word8 -> VelocitySource
fromVelocity :: Velocity -> Word8Source
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 :: Word32 -> ControllerSource
Controllers from 0x78
to 0x7F
are special,
you must assert that the controller number is in the range 0
to 0x77
.
fromProgram :: Program -> Int32Source
noteVelocity :: T Note VelocitySource
This may not yield what you expect.
See normalizeNote
.
ctrlController :: T Ctrl ControllerSource
This is undefined, if the controller is no regular controller
but a channel mode message.
Better use ctrlControllerMode
.