- class C event where
- noteExplicitOff :: C event => event -> Maybe (Channel, (Velocity, Pitch, Bool))
- noteImplicitOff :: C event => event -> Maybe (Channel, (Velocity, Pitch, Bool))
- liftMidi :: (T -> Maybe (Channel, a)) -> T -> Maybe (Channel, a)
All methods have default implementations that return
This helps implementing event data types
that support only a subset of types of events.
Maybe a better approach is to provide type classes
for every type of event
C a subclass of all of them.
Warning: This returns note events as they are,
that is, a
NoteOff p 64 might be encoded as such or as
NoteOn p 0
depending on the content of
For normalized results you may use