Safe Haskell | None |
---|---|
Language | Haskell98 |
The sampler
- data Sample a
- type Sam = Sample Sig2
- type Bpm = D
- runSam :: Bpm -> Sam -> SE Sig2
- mapBpm :: (Bpm -> Sig2 -> Sig2) -> Sam -> Sam
- bindSam :: (Sig2 -> SE Sig2) -> Sam -> Sam
- bindBpm :: (Bpm -> Sig2 -> SE Sig2) -> Sam -> Sam
- liftSam :: Sample (SE a) -> Sample a
- sig1 :: D -> Sig -> Sam
- sig2 :: D -> Sig2 -> Sam
- infSig1 :: Sig -> Sam
- infSig2 :: Sig2 -> Sam
- fromSig1 :: D -> Sig -> Sam
- fromSig2 :: D -> Sig2 -> Sam
- rest :: D -> Sam
- wav :: String -> Sam
- wavr :: String -> Sam
- seg :: D -> D -> String -> Sam
- segr :: D -> D -> String -> Sam
- rndWav :: D -> String -> Sam
- rndWavr :: D -> String -> Sam
- rndSeg :: D -> D -> D -> String -> Sam
- rndSegr :: D -> D -> D -> String -> Sam
- ramWav :: LoopMode -> Sig -> String -> Sam
- wav1 :: String -> Sam
- wavr1 :: String -> Sam
- seg1 :: D -> D -> String -> Sam
- segr1 :: D -> D -> String -> Sam
- rndWav1 :: D -> String -> Sam
- rndWavr1 :: D -> String -> Sam
- rndSeg1 :: D -> D -> D -> String -> Sam
- rndSegr1 :: D -> D -> D -> String -> Sam
- ramWav1 :: LoopMode -> Sig -> String -> Sam
- linEnv :: D -> D -> Sam -> Sam
- expEnv :: D -> D -> Sam -> Sam
- hatEnv :: Sam -> Sam
- decEnv :: Sam -> Sam
- riseEnv :: Sam -> Sam
- edecEnv :: Sam -> Sam
- eriseEnv :: Sam -> Sam
- del :: D -> Sam -> Sam
- str :: D -> Sam -> Sam
- wide :: D -> Sam -> Sam
- flow :: [Sam] -> Sam
- pick :: Sig -> [Sam] -> Sam
- pickBy :: Sig -> [(D, Sam)] -> Sam
- lim :: D -> Sam -> Sam
- atPan :: Sig -> Sam -> Sam
- atPch :: Sig -> Sam -> Sam
- atCps :: Sig -> Sam -> Sam
- loop :: Sam -> Sam
- rep1 :: D -> Sam -> Sam
- rep :: [D] -> Sam -> Sam
- pat1 :: D -> Sam -> Sam
- pat :: [D] -> Sam -> Sam
- type Chord = [D]
- arpUp :: Chord -> [D] -> Sam -> Sam
- arpDown :: Chord -> [D] -> Sam -> Sam
- arpOneOf :: Chord -> [D] -> Sam -> Sam
- arpFreqOf :: [D] -> Chord -> [D] -> Sam -> Sam
- arpUp1 :: Chord -> Sig -> Sam -> Sam
- arpDown1 :: Chord -> Sig -> Sam -> Sam
- arpOneOf1 :: Chord -> Sig -> Sam -> Sam
- arpFreqOf1 :: [D] -> Chord -> Sig -> Sam -> Sam
- wall :: D -> Sam -> Sam
- forAirports :: [(D, D, D)] -> Sam -> Sam
- genForAirports :: [(D, D, Sam)] -> Sam
- module Csound.Sam.Ui
Documentation
The generic type for samples.
Functor Sample | |
Applicative Sample | |
RenderCsd Sam | |
Fractional a => Fractional (Sample a) | |
Num a => Num (Sample a) | |
SigSpace a => SigSpace (Sample a) |
Lifters
bindBpm :: (Bpm -> Sig2 -> SE Sig2) -> Sam -> Sam Source
Lifts bind on stereo signals to samples with BPM.
Constructors
sig2 :: D -> Sig2 -> Sam Source
Constructs sample from limited stereo signal (duration is in seconds)
fromSig2 :: D -> Sig2 -> Sam Source
Constructs sample from limited stereo signal (duration is in BPMs)
Stereo
seg :: D -> D -> String -> Sam Source
Constructs sample from the segment of a wav file. The start and end times are measured in seconds.
seg begin end fileName
rndWav :: D -> String -> Sam Source
Picks segments from the wav file at random. The first argument is the length of the segment.
rndWavr :: D -> String -> Sam Source
Picks segments from the wav file at random. The first argument is the length of the segment.
rndSeg :: D -> D -> D -> String -> Sam Source
Constructs random segments of the given length from an interval.
rndSegr :: D -> D -> D -> String -> Sam Source
Constructs reversed random segments of the given length from an interval.
ramWav :: LoopMode -> Sig -> String -> Sam Source
Reads a sample from the file in RAM.
ramWav loopMode speed fileName
Mono
seg1 :: D -> D -> String -> Sam Source
Constructs sample from the segment of a mono wav file. The start and end times are measured in seconds.
seg begin end fileName
rndWav1 :: D -> String -> Sam Source
Picks segments from the mono wav file at random. The first argument is the length of the segment.
rndWavr1 :: D -> String -> Sam Source
Picks segments from the mono wav file at random. The first argument is the length of the segment.
rndSeg1 :: D -> D -> D -> String -> Sam Source
Constructs random segments of the given length from an interval.
rndSegr1 :: D -> D -> D -> String -> Sam Source
Constructs reversed random segments of the given length from an interval.
ramWav1 :: LoopMode -> Sig -> String -> Sam Source
Reads a sample from the mono file in RAM.
ramWav1 loopMode speed fileName
Envelopes
linEnv :: D -> D -> Sam -> Sam Source
A linear rise-decay envelope. Times a given in BPMs.
linEnv rise dec sample
expEnv :: D -> D -> Sam -> Sam Source
An exponential rise-decay envelope. Times a given in BPMs.
expEnv rise dec sample
Parabolic envelope that starts and ends at zero and reaches maximum at the center.
Arrange
pick :: Sig -> [Sam] -> Sam Source
Picks samples at random. The first argument is the period ofmetronome in BPMs. The tick of metronome produces new random sample from the list.
pickBy :: Sig -> [(D, Sam)] -> Sam Source
Picks samples at random. We can specify a frequency of the occurernce. The sum of all frequencies should be equal to 1.
Loops
rep1 :: D -> Sam -> Sam Source
Plays the sample at the given period (in BPMs). The samples don't overlap.
rep :: [D] -> Sam -> Sam Source
Plays the sample at the given pattern of periods (in BPMs). The samples don't overlap.
pat1 :: D -> Sam -> Sam Source
Plays the sample at the given period (in BPMs). The overlapped samples are mixed together.
pat :: [D] -> Sam -> Sam Source
Plays the sample at the given pattern of periods (in BPMs). The overlapped samples are mixed together.
Arpeggio
arpOneOf :: Chord -> [D] -> Sam -> Sam Source
Plays arpeggio of samles with random notes from the chord.
arpFreqOf :: [D] -> Chord -> [D] -> Sam -> Sam Source
Plays arpeggio of samles with random notes from the chord. We can assign the frequencies of the notes.
arpOneOf1 :: Chord -> Sig -> Sam -> Sam Source
Plays arpeggio of samles with random notes from the chord.
arpFreqOf1 :: [D] -> Chord -> Sig -> Sam -> Sam Source
Plays arpeggio of samles with random notes from the chord. We can assign the frequencies of the notes.
Misc patterns
wall :: D -> Sam -> Sam Source
Constructs the wall of sound from the initial segment of the sample. The segment length is given in BPMs.
wall segLength
forAirports :: [(D, D, D)] -> Sam -> Sam Source
The pattern is influenced by the Brian Eno's work "Music fo Airports". The argument is list of tripples:
(delayTime, repeatPeriod, pitch)
It takes a Sample and plays it in the loop with given initial delay time. The third cell in the tuple pitch is a value for scaling of the pitch in tones.
genForAirports :: [(D, D, Sam)] -> Sam Source
The pattern is influenced by the Brian Eno's work "Music fo Airports".
It's more generic than pattern forAirport
The argument is list of tripples:
(delayTime, repeatPeriod, Sample)
It takes a list of Samples and plays them in the loop with given initial delay time and repeat period.
module Csound.Sam.Ui