synthesizer-midi-0.6.0.1: Render audio signals from MIDI files or realtime messages

Safe HaskellNone

Synthesizer.MIDI.Dimensional

Description

Convert MIDI events of a MIDI controller to a control signal.

Synopsis

Documentation

type Signal s v y signal = AmpSignal s (Dimensional v y) signalSource

type AmpSignal s amp signal = T (Phantom s) amp 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.

Constructors

Filter (Filter event (T s u t a)) 

Instances

Functor (Filter event s u t) 
Applicative (Filter event s u t) 

runFilter :: C event => T StrictTime [event] -> Filter event s u t a -> T s u t aSource

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 ModulatedInstrument s u q signal = q -> T (Recip u) q -> T s u q (LazyTime s -> signal)Source

type Bank s u q signal = Program -> ModulatedInstrument s u q signalSource

renderInstrument :: C q => Bank s Time q signal -> Note -> T s Time q signalSource

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

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

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))Source