csound-expression-5.3.1: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Air.Sampler

Contents

Synopsis

Event sampler

Note: The release phase of the instrument is skipped with event sampler functions.

evtTrig :: Sigs a => Maybe a -> Tick -> Tick -> a -> a Source #

Triggers the signal with the first stream and turns it off with the second stream.

evtTap :: Sigs a => D -> Tick -> a -> a Source #

Consider note limiting? or performance degrades every note is held to infinity and it continues to produce zeroes. No it's not every sequence note triggers it but it's best to limit them anyway

evtGroup :: Sigs a => Maybe a -> [(Tick, a)] -> Tick -> a Source #

Plays a list signals. It triggers the signal with event stream and silences all the rest in the list so that only one signal is playing. We can create simple costum monosynthes with this function. The last event stream stops all signals.

evtCycle :: Sigs a => Maybe a -> Tick -> Tick -> [a] -> a Source #

Triggers one signal after another with an event stream.

syncEvtTrig :: Sigs a => Sig -> Maybe a -> Tick -> Tick -> a -> a Source #

syncEvtTap :: Sigs a => Sig -> D -> Tick -> a -> a Source #

syncEvtGroup :: Sigs a => Sig -> Maybe a -> [(Tick, a)] -> Tick -> a Source #

syncEvtCycle :: Sigs a => Sig -> Maybe a -> Tick -> Tick -> [a] -> a Source #

Triggers one signal after another with an event stream.

Keyboard sampler

charTrig :: Sigs a => Maybe a -> String -> String -> a -> a Source #

Triggers a signal when one of the chars from the first string is pressed. Stops signal from playing when one of the chars from the second string is pressed.

charTap :: Sigs a => D -> String -> a -> a Source #

charPush :: Sigs a => Maybe a -> Char -> a -> a Source #

Plays a signal while a key is pressed.

charToggle :: Sigs a => Maybe a -> Char -> a -> a Source #

Toggles the signal when key is pressed.

charGroup :: Sigs a => Maybe a -> [(Char, a)] -> String -> a Source #

Plays a list of signals when corresponding key is pressed. Turns off all other signals in the group. The last string is for stopping the group from playing.

charCycle :: Sigs a => Maybe a -> Char -> String -> [a] -> a Source #

Plays signals one after another when key is pressed. Stops the group from playing when the char from the last argument is pressed.

syncCharTrig :: Sigs a => Sig -> Maybe a -> String -> String -> a -> a Source #

Triggers a signal when one of the chars from the first string is pressed. Stops signal from playing when one of the chars from the second string is pressed. Synchronizes the signal with bpm (first argument).

syncCharTap :: Sigs a => Sig -> D -> String -> a -> a Source #

syncCharPush :: Sigs a => Sig -> Maybe a -> Char -> a -> a Source #

Plays a signal while a key is pressed. Synchronized by BPM (first argument).

syncCharToggle :: Sigs a => Sig -> Maybe a -> Char -> a -> a Source #

Toggles the signal when key is pressed. Synchronizes by BPM (first argument).

syncCharGroup :: Sigs a => Sig -> Maybe a -> [(Char, a)] -> String -> a Source #

Plays a list of signals when corresponding key is pressed. Turns off all other signals in the group. The last string is for stopping the group from playing. Events are syncronized by BPM (first argument).

syncCharCycle :: Sigs a => Sig -> Maybe a -> Char -> String -> [a] -> a Source #

Plays signals one after another when key is pressed. Stops the group from playing when the char from the last argument is pressed. Events are syncronised with BPM (first argument).

Midi sampler

midiTrig :: (SigSpace a, Sigs a) => MidiChn -> Int -> a -> SE a Source #

Plays a signal when the key is pressed. Retriggers the signal when the key is pressed again. The key is an integer midi code. The C1 is 60 and the A1 is 69.

midiTap :: (SigSpace a, Sigs a) => MidiChn -> D -> Int -> a -> SE a Source #

Plays a signal when the key is pressed. Retriggers the signal when the key is pressed again. Turns off the signal after specified duration (n seconds). The key is an integer midi code. The C1 is 60 and the A1 is 69.

midiPush :: (SigSpace a, Sigs a) => MidiChn -> Int -> a -> SE a Source #

Plyas a signal while the key is pressed. The key is an integer midi code. The C1 is 60 and the A1 is 69.

midiToggle :: (SigSpace a, Sigs a) => MidiChn -> Int -> a -> SE a Source #

Plays and stops a signal in the toggle mode. The key is an integer midi code. The C1 is 60 and the A1 is 69.

midiGroup :: (SigSpace a, Sigs a) => MidiChn -> [(Int, a)] -> SE a Source #

Plays a set of signals on the list of keys. When certain key is pressed the corresponding signal starts to play and all the rest are stopped.

  • - The key is an integer midi code. The C1 is 60 and the A1 is 69.

Generic functions

midiTrigBy :: (SigSpace a, Sigs a) => MidiTrigFun a -> MidiChn -> Int -> a -> SE a Source #

The generic midiTrig. We can specify the midi function. The midi function takes in a signal and a volume of the pressed key (it ranges from 0 to 1). It produces some output. The default is scaling the signal with the amplitude.

midiTapBy :: (SigSpace a, Sigs a) => MidiTrigFun a -> MidiChn -> D -> Int -> a -> SE a Source #

The generic midiTap. We can specify the midi function. The midi function takes in a signal and a volume of the pressed key (it ranges from 0 to 1). It produces some output. The default is scaling the signal with the amplitude.

midiPushBy :: (SigSpace a, Sigs a) => MidiTrigFun a -> MidiChn -> Int -> a -> SE a Source #

The generic midiPush. We can specify the midi function. The midi function takes in a signal and a volume of the pressed key (it ranges from 0 to 1). It produces some output. The default is scaling the signal with the amplitude.

midiToggleBy :: (SigSpace a, Sigs a) => MidiTrigFun a -> MidiChn -> Int -> a -> SE a Source #

The generic midiToggle. We can specify the midi function. The midi function takes in a signal and a volume of the pressed key (it ranges from 0 to 1). It produces some output. The default is scaling the signal with the amplitude.

midiGroupBy :: (SigSpace a, Sigs a) => MidiTrigFun a -> MidiChn -> [(Int, a)] -> SE a Source #

The generic midiGroup. We can specify the midi function. The midi function takes in a signal and a volume of the pressed key (it ranges from 0 to 1). It produces some output. The default is scaling the signal with the amplitude.

Midi instruments

type MidiTrigFun a = a -> D -> SE a Source #

midiAmpInstr :: (SigSpace a, Sigs a) => a -> D -> SE a Source #

Scales the signal with the amplitude.

midiLpInstr :: (SigSpace a, Sigs a) => (Sig, Sig) -> Sig -> a -> D -> SE a Source #

Applies a low pass filter to the signal. The first two arguments are the frequency range for center frequency of the filter and the second one is amount of resonance (ranges from 0 to 1).

midiAudioLpInstr :: (SigSpace a, Sigs a) => Sig -> a -> D -> SE a Source #

the midiLpInstr with audio range for center frequency.

midiConstInstr :: (SigSpace a, Sigs a) => a -> D -> SE a Source #

Ignores the amplitude and justplays back the original signal.

Misc

Keyboard char columns