midi-alsa-0.2: Convert between datatypes of the midi and the alsa packages

Safe HaskellSafe-Infered

Sound.MIDI.ALSA.Check

Synopsis

Documentation

class C event where

All methods have default implementations that return Nothing. 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 and make C a subclass of all of them.

Methods

note :: Channel -> event -> Maybe (Velocity, Pitch, Bool)

program :: Channel -> event -> Maybe Program

anyController :: Channel -> event -> Maybe (Controller, Int)

pitchBend :: Channel -> event -> Maybe Int

channelPressure :: Channel -> event -> Maybe Int

mode :: Channel -> event -> Maybe T

Instances

C T 
C Data 
C T 
C T 

note :: C event => Channel -> event -> Maybe (Velocity, Pitch, Bool)

program :: C event => Channel -> event -> Maybe Program

anyController :: C event => Channel -> event -> Maybe (Controller, Int)

controller :: C event => Channel -> Controller -> event -> Maybe Int

mode :: C event => Channel -> event -> Maybe T

pitchBend :: C event => Channel -> event -> Maybe Int

channelPressure :: C event => Channel -> event -> Maybe Int