synthesizer-alsa-0.3: Control synthesizer effects via ALSA/MIDI



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



replicateLong :: Write sig y => StrictTime -> y -> sig ySource

piecewiseConstant :: Write sig y => T StrictTime y -> sig ySource

piecewiseConstantInit :: Write sig y => y -> T StrictTime y -> sig ySource

piecewiseConstantInitWith :: Write sig c => (y -> c) -> c -> T StrictTime [y] -> sig cSource

type Instrument y signal = y -> y -> LazyTime -> signalSource

type Bank y signal = Program -> Instrument y signalSource

renderInstrument :: C y => Bank y signal -> Note -> signalSource

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

flatten :: (Monoid signal, C time) => T time [signal] -> T time signalSource

Turn an event list with bundles of elements into an event list with single events.

applyModulation :: (Transform signal, NormalForm signal) => signal -> Modulator (signal -> instr, note) (instr, note)Source

evaluateVectorHead :: NormalForm signal => signal -> t -> tSource

We have to evaluate the head value at each drop in order to avoid growing thunks that lead to a space leak.

type Arranger signal = T Int signal -> signalSource

data Modulator note signal Source

The state action for the time should just return the argument time. However we need this time (or alternatively another result type) for triggering the drop in advanceModulationChunk. Without this strict evaluation, the drop will be delayed until the control curve is actually needed.


forall state . Modulator state (StrictTime -> State state StrictTime) (note -> State state signal) 

sequenceCore :: Monoid signal => Arranger signal -> Channel -> Program -> Modulator Note signal -> Filter signalSource

sequence :: (Monoid signal, C y) => Arranger signal -> Channel -> Instrument y signal -> Filter signalSource

sequenceModulated :: (Transform ctrl, NormalForm ctrl, Monoid signal, C y) => Arranger signal -> ctrl -> Channel -> (ctrl -> Instrument y signal) -> Filter signalSource

sequenceMultiModulated :: (Monoid signal, C y) => Arranger signal -> Channel -> instrument -> Modulator (instrument, Note) (Instrument y signal, Note) -> Filter signalSource

sequenceMultiProgram :: (Monoid signal, C y) => Arranger signal -> Channel -> Program -> [Instrument y signal] -> Filter signalSource

sequenceModulatedMultiProgram :: (Transform ctrl, NormalForm ctrl, Monoid signal, C y) => Arranger signal -> ctrl -> Channel -> Program -> [ctrl -> Instrument y signal] -> Filter signalSource