csound-sampler-0.0.6.2: A musical sampler based on Csound

Safe HaskellNone
LanguageHaskell98

Csound.Sam.Trig

Contents

Synopsis

Char sampler

samCharTrig :: String -> String -> Sam -> Sam Source

Triggers the sample with any char from the first string and stops the sample with any char from the second string.

samCharTap :: D -> String -> Sam -> Sam Source

Char trigger with fixed note limiting by length in second. It's useful optimization. It's good to use for drum notes and short sounds.

samCharPush :: Char -> Sam -> Sam Source

Plays a sample while the key is pressed.

samCharToggle :: Char -> Sam -> Sam Source

Toggles the sample when the key is pressed.

samCharGroup :: [(Char, Sam)] -> String -> Sam Source

Plays one of the sample from the list when corresponding char is pressed. The last string is for stopping the samples.

samCharCycle :: Char -> String -> [Sam] -> Sam Source

Plays samples in sequence when key is pressed. The last string is for stopping the sequence.

Midi sampler

samMidiTrig :: MidiChn -> Int -> Sam -> Sam Source

Triggers a sample with midi key. The key is an integer midi code. The C1 is 60 and the A1 is 69.

samMidiTap :: MidiChn -> D -> Int -> Sam -> Sam Source

Midi trigger with fixed note limiting by length in second. It's useful optimization. It's good to use for drum notes and short sounds. The key is an integer midi code. The C1 is 60 and the A1 is 69.

samMidiToggle :: MidiChn -> Int -> Sam -> Sam Source

Toggles samples with midi key. The key is an integer midi code. The C1 is 60 and the A1 is 69.

samMidiGroup :: MidiChn -> [(Int, Sam)] -> Sam Source

Plays samples in the group. It's like the samCharGroup. The key is an integer midi code. The C1 is 60 and the A1 is 69.

Generic functions

samMidiTrigBy :: MidiTrigFun Sig2 -> MidiChn -> Int -> Sam -> Sam Source

Generic samMidiTrig. We can specify the midi triggering 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.

samMidiTapBy :: MidiTrigFun Sig2 -> MidiChn -> D -> Int -> Sam -> Sam Source

Generic samMidiTap. We can specify the midi triggering 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.

samMidiPushBy :: MidiTrigFun Sig2 -> MidiChn -> Int -> Sam -> Sam Source

Generic samMidiPush. We can specify the midi triggering 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.

samMidiToggleBy :: MidiTrigFun Sig2 -> MidiChn -> Int -> Sam -> Sam Source

Generic samMidiToggle. We can specify the midi triggering 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.

samMidiGroupBy :: MidiTrigFun Sig2 -> MidiChn -> [(Int, Sam)] -> Sam Source

Generic samMidiGroup. We can specify the midi triggering 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.