Safe Haskell | None |
---|
Convert MIDI events of a MIDI controller to a control signal.
- type Signal s v y signal = AmpSignal s (Dimensional v y) signal
- type AmpSignal s amp signal = T (Phantom s) amp signal
- newtype Filter event s u t a = Filter (Filter event (T s u t a))
- runFilter :: C event => T StrictTime [event] -> Filter event s u t a -> T s u t a
- piecewiseConstant :: Write sig y => T rate amp (T y) -> T rate amp (sig y)
- controllerLinear :: (C event, C y, Ord y, C u, C v) => Channel -> Controller -> (T v y, T v y) -> T v y -> Filter event s u t (Signal s v y (T y))
- controllerExponential :: (C event, C y, Ord y, C u, C v) => Channel -> Controller -> (T v y, T v y) -> T v y -> Filter event s u t (Signal s v y (T y))
- pitchBend :: (C event, C y, Ord y, C u, C v) => Channel -> y -> T v y -> Filter event s u t (Signal s v y (T y))
- channelPressure :: (C event, C y, Ord y, C u, C v) => Channel -> T v y -> T v y -> Filter event s u t (Signal s v y (T y))
- bendWheelPressure :: (C event, Write sig q, Transform sig q, C q, C q, C q q, C u) => Channel -> Int -> T (Recip u) q -> q -> q -> Filter event s u q (Signal s Scalar q (sig q))
- type LazyTime s = T (Phantom s) Abstract T
- type Instrument s u v q signal = ModulatedInstrument s u q (Signal s v q signal)
- type ModulatedInstrument s u q signal = q -> T (Recip u) q -> T s u q (LazyTime s -> signal)
- type Bank s u q signal = Program -> ModulatedInstrument s u q signal
- chunkySizeFromLazyTime :: LazyTime -> T
- renderInstrument :: C q => Bank s Time q signal -> Note -> T s Time q signal
- makeInstrumentSounds :: C q => Bank s Time q signal -> T time [Note] -> T s Time q (T time [signal])
- sequence :: (C event, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> Instrument s Time v q (T y) -> Filter event s Time q (Signal s v q (T y))
- sequenceModulated :: (C event, Transform ctrl, NormalForm ctrl, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q (AmpSignal s amp ctrl -> Signal s v q (T y)) -> Filter event s Time q (AmpSignal s amp ctrl -> Signal s v q (T y))
- sequenceModulated2 :: (C event, Transform ctrl0, NormalForm ctrl0, Transform ctrl1, NormalForm ctrl1, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q (AmpSignal s amp0 ctrl0 -> AmpSignal s amp1 ctrl1 -> Signal s v q (T y)) -> Filter event s Time q (AmpSignal s amp0 ctrl0 -> AmpSignal s amp1 ctrl1 -> Signal s v q (T y))
- sequenceMultiModulated :: (C event, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q instrument -> Filter event s Time q (Modulator instrument (Signal s v q (T y))) -> Filter event s Time q (Signal s v q (T y))
- prepareTones :: (C event, RealFrac q, C q) => Channel -> Program -> Bank s Time q signal -> Filter event s Time q (T StrictTime [signal])
- applyModulation :: (Transform signal, NormalForm signal) => AmpSignal s amp signal -> Modulator (AmpSignal s amp signal -> body) body
- applyModulator :: Modulator a b -> T StrictTime [a] -> T StrictTime [b]
- renderSequence :: (Storable y, C q y, C u, C q) => ChunkSize -> T u q -> T StrictTime [Signal s u q (T y)] -> Signal s u q (T y)
- advanceModulationChunky :: (Transform signal, NormalForm signal) => LazyTime -> State (AmpSignal s amp signal) LazyTime
- advanceModulationChunk :: (Transform signal, NormalForm signal) => StrictTime -> State (AmpSignal s amp signal) StrictTime
- sequenceMultiProgram :: (C event, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> Program -> [Instrument s Time v q (T y)] -> Filter event s Time q (Signal s v q (T y))
Documentation
type Signal s v y signal = AmpSignal s (Dimensional v y) signalSource
newtype Filter event s u t a Source
This type ensures that all signals generated from the event list share the same sample rate.
Functor (Filter event s u t) | |
Applicative (Filter event s u t) |
piecewiseConstant :: Write sig y => T rate amp (T y) -> T rate amp (sig y)Source
controllerLinear :: (C event, C y, Ord y, C u, C v) => Channel -> Controller -> (T v y, T v y) -> T v y -> Filter event s u t (Signal s v y (T y))Source
controllerExponential :: (C event, C y, Ord y, C u, C v) => Channel -> Controller -> (T v y, T v y) -> T v y -> Filter event s u t (Signal s v y (T y))Source
pitchBend :: (C event, C y, Ord y, C u, C v) => Channel -> y -> T v y -> Filter event s u t (Signal s v y (T y))Source
pitchBend channel range center
:
emits frequencies on an exponential scale from
center/range
to center*range
.
channelPressure :: (C event, C y, Ord y, C u, C v) => Channel -> T v y -> T v y -> Filter event s u t (Signal s v y (T y))Source
bendWheelPressure :: (C event, Write sig q, Transform sig q, C q, C q, C q q, C u) => Channel -> Int -> T (Recip u) q -> q -> q -> Filter event s u q (Signal s Scalar q (sig q))Source
type Instrument s u v q signal = ModulatedInstrument s u q (Signal s v q signal)Source
type Bank s u q signal = Program -> ModulatedInstrument s u q signalSource
chunkySizeFromLazyTime :: LazyTime -> TSource
makeInstrumentSounds :: C q => Bank s Time q signal -> T time [Note] -> T s Time q (T time [signal])Source
Instrument parameters are: velocity from -1 to 1 (0 is the normal pressure, no pressure aka NoteOff is not supported), frequency is given in Hertz
sequence :: (C event, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> Instrument s Time v q (T y) -> Filter event s Time q (Signal s v q (T y))Source
sequenceModulated :: (C event, Transform ctrl, NormalForm ctrl, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q (AmpSignal s amp ctrl -> Signal s v q (T y)) -> Filter event s Time q (AmpSignal s amp ctrl -> Signal s v q (T y))Source
sequenceModulated2 :: (C event, Transform ctrl0, NormalForm ctrl0, Transform ctrl1, NormalForm ctrl1, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q (AmpSignal s amp0 ctrl0 -> AmpSignal s amp1 ctrl1 -> Signal s v q (T y)) -> Filter event s Time q (AmpSignal s amp0 ctrl0 -> AmpSignal s amp1 ctrl1 -> Signal s v q (T y))Source
sequenceMultiModulated :: (C event, RealFrac q, Storable y, C q y, C q, C v) => ChunkSize -> T v q -> Channel -> ModulatedInstrument s Time q instrument -> Filter event s Time q (Modulator instrument (Signal s v q (T y))) -> Filter event s Time q (Signal s v q (T y))Source
prepareTones :: (C event, RealFrac q, C q) => Channel -> Program -> Bank s Time q signal -> Filter event s Time q (T StrictTime [signal])Source
applyModulation :: (Transform signal, NormalForm signal) => AmpSignal s amp signal -> Modulator (AmpSignal s amp signal -> body) bodySource
applyModulator :: Modulator a b -> T StrictTime [a] -> T StrictTime [b]Source
renderSequence :: (Storable y, C q y, C u, C q) => ChunkSize -> T u q -> T StrictTime [Signal s u q (T y)] -> Signal s u q (T y)Source
advanceModulationChunky :: (Transform signal, NormalForm signal) => LazyTime -> State (AmpSignal s amp signal) LazyTimeSource
advanceModulationChunk :: (Transform signal, NormalForm signal) => StrictTime -> State (AmpSignal s amp signal) StrictTimeSource