csound-expression-4.8.4: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Patch

Contents

Description

Patches.

Synopsis

Documentation

type CsdNote = (D, D) Source

A simple csound note (good for playing with midi-keyboard). It's a pair of amplitude (0 to 1) and freuqncy (Hz).

type Instr a = CsdNote -> SE a Source

An instrument transforms a note to a signal.

type Fx a = a -> SE a Source

An effect processes the input signal.

type Fx1 = Fx Sig Source

Mono effect.

type Fx2 = Fx Sig2 Source

Stereo effect.

data FxSpec a Source

Constructors

FxSpec 

Fields

fxMix :: DryWetRatio
 
fxFun :: Fx a
 

type Patch1 = Patch Sig Source

Mono patches.

type Patch2 = Patch Sig2 Source

Stereo patches.

data Patch a Source

A patch. It's an instrument, an effect and default dry/wet ratio.

Constructors

Patch 

Fields

patchInstr :: Instr a
 
patchFx :: [FxSpec a]
 

Instances

getPatchFx :: (SigSpace a, Sigs a) => Patch a -> Fx a Source

Transforms all the effects for the given patch into a single function.

atMix :: Sig -> Patch a -> Patch a Source

Sets the mix of the last effect.

atMixes :: [Sig] -> Patch a -> Patch a Source

Sets the mix of the effects from last to first.

Midi

atMidi :: (SigSpace a, Sigs a) => Patch a -> SE a Source

Plays a patch with midi. Supplies a custom value for mixing effects (dry/wet). The 0 is a dry signal, the 1 is a wet signal.

Events

atSched :: (SigSpace a, Sigs a) => Patch a -> Evt (Sco CsdNote) -> SE a Source

Plays a patch with event stream. Supplies a custom value for mixing effects (dry/wet). The 0 is a dry signal, the 1 is a wet signal.

atSchedUntil :: (SigSpace a, Sigs a) => Patch a -> Evt CsdNote -> Evt b -> SE a Source

Sco

atSco :: (SigSpace a, Sigs a) => Patch a -> Sco CsdNote -> Sco (Mix a) Source

Plays a patch with scores. Supplies a custom value for mixing effects (dry/wet). The 0 is a dry signal, the 1 is a wet signal.

Single note

atNote :: (SigSpace a, Sigs a) => Patch a -> CsdNote -> SE a Source

Plays a patch at the given note.

Fx

addInstrFx :: Fx a -> Patch a -> Patch a Source

Adds an effect to the patch's instrument.

addPreFx :: DryWetRatio -> Fx a -> Patch a -> Patch a Source

Appends an effect before patch's effect.

addPostFx :: DryWetRatio -> Fx a -> Patch a -> Patch a Source

Appends an effect after patch's effect.

Pads

harmonPatch :: (SigSpace a, Sigs a) => [Sig] -> [D] -> Patch a -> Patch a Source

deepPad :: (SigSpace a, Sigs a) => Patch a -> Patch a Source

Misc

patchWhen :: Sigs a => BoolSig -> Patch a -> Patch a Source

Plays the patch when confition is true otherwise it produces silence.

mixInstr :: (SigSpace a, Num a) => Sig -> Patch a -> Patch a -> Patch a Source