Safe Haskell | None |
---|---|
Language | Haskell2010 |
Treat a stream of MIDI events as parallel streams of MIDI controller events.
Synopsis
- data T key a = Cons (Map key a) (T StrictTime [(key, a)])
- mapStream :: (T StrictTime [(key, a)] -> T StrictTime [(key, a)]) -> T key a -> T key a
- data Controller
- fromChannel :: C event => Channel -> Filter event (T Controller Int)
- maybeController :: C event => Channel -> event -> Maybe (Controller, Int)
- controllerLinear :: C y => Controller -> (y, y) -> y -> Filter (T y)
- controllerExponential :: C y => Controller -> (y, y) -> y -> Filter (T y)
- pitchBend :: C y => y -> y -> Filter (T y)
- channelPressure :: C y => y -> y -> Filter (T y)
- bendWheelPressure :: (C y, C y) => Int -> y -> y -> Filter (T (T y))
- checkBendWheelPressure :: (Controller, Int) -> State T (Maybe T)
- bendWheelPressureZip :: (C y, C y) => Int -> y -> y -> Filter (T (T y))
- initial :: T key a -> Map key a
- stream :: T key a -> T StrictTime [(key, a)]
Documentation
Cons (Map key a) (T StrictTime [(key, a)]) |
Instances
(Show key, Show a) => Show (T key a) Source # | |
Semigroup (T key y) Source # | |
Monoid (T key y) Source # | |
Read (T key a) Source # | |
(NFData key, NFData a) => NormalForm (T key a) Source # | |
Defined in Synthesizer.MIDI.PiecewiseConstant.ControllerSet evaluateHead :: T key a -> () # | |
Ord key => Transform (T key y) Source # | For reverse you must make sure, that all controller events have an corresponding initial value. Controllers that miss an initial value their last constant piece will be undefined. |
mapStream :: (T StrictTime [(key, a)] -> T StrictTime [(key, a)]) -> T key a -> T key a Source #
data Controller Source #
Instances
Eq Controller Source # | |
Defined in Synthesizer.MIDI.PiecewiseConstant.ControllerSet (==) :: Controller -> Controller -> Bool # (/=) :: Controller -> Controller -> Bool # | |
Ord Controller Source # | |
Defined in Synthesizer.MIDI.PiecewiseConstant.ControllerSet compare :: Controller -> Controller -> Ordering # (<) :: Controller -> Controller -> Bool # (<=) :: Controller -> Controller -> Bool # (>) :: Controller -> Controller -> Bool # (>=) :: Controller -> Controller -> Bool # max :: Controller -> Controller -> Controller # min :: Controller -> Controller -> Controller # | |
Show Controller Source # | |
Defined in Synthesizer.MIDI.PiecewiseConstant.ControllerSet showsPrec :: Int -> Controller -> ShowS # show :: Controller -> String # showList :: [Controller] -> ShowS # | |
NFData Controller Source # | |
Defined in Synthesizer.MIDI.PiecewiseConstant.ControllerSet rnf :: Controller -> () # |
fromChannel :: C event => Channel -> Filter event (T Controller Int) Source #
maybeController :: C event => Channel -> event -> Maybe (Controller, Int) Source #
controllerLinear :: C y => Controller -> (y, y) -> y -> Filter (T y) Source #
controllerExponential :: C y => Controller -> (y, y) -> y -> Filter (T y) Source #
pitchBend :: C y => y -> y -> Filter (T y) Source #
pitchBend channel range center
:
emits frequencies on an exponential scale from
center/range
to center*range
.
channelPressure :: C y => y -> y -> Filter (T y) Source #
checkBendWheelPressure :: (Controller, Int) -> State T (Maybe T) Source #