Safe Haskell | None |
---|---|
Language | Haskell2010 |
Treat a stream of MIDI events as parallel streams of MIDI controller events.
- data T key a = Cons {
- initial :: Map key a
- stream :: 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))
Documentation
(Show a, Show key) => 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 # | |
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 #
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 #