Safe Haskell | None |
---|
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
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 -> SamSource
Lifts bind on stereo signals to samples with BPM.
Constructors
fromSig2 :: D -> Sig2 -> SamSource
Constructs sample from limited stereo signal (duration is in BPMs)
Stereo
seg :: D -> D -> String -> SamSource
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 -> SamSource
Picks segments from the wav file at random. The first argument is the length of the segment.
rndWavr :: D -> String -> SamSource
Picks segments from the wav file at random. The first argument is the length of the segment.
rndSeg :: D -> D -> D -> String -> SamSource
Constructs random segments of the given length from an interval.
rndSegr :: D -> D -> D -> String -> SamSource
Constructs reversed random segments of the given length from an interval.
ramWav :: LoopMode -> Sig -> String -> SamSource
Reads a sample from the file in RAM.
ramWav loopMode speed fileName
Mono
seg1 :: D -> D -> String -> SamSource
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 -> SamSource
Picks segments from the mono wav file at random. The first argument is the length of the segment.
rndWavr1 :: D -> String -> SamSource
Picks segments from the mono wav file at random. The first argument is the length of the segment.
rndSeg1 :: D -> D -> D -> String -> SamSource
Constructs random segments of the given length from an interval.
rndSegr1 :: D -> D -> D -> String -> SamSource
Constructs reversed random segments of the given length from an interval.
ramWav1 :: LoopMode -> Sig -> String -> SamSource
Reads a sample from the mono file in RAM.
ramWav1 loopMode speed fileName
Envelopes
linEnv :: D -> D -> Sam -> SamSource
A linear rise-decay envelope. Times a given in BPMs.
linEnv rise dec sample
expEnv :: D -> D -> Sam -> SamSource
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] -> SamSource
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)] -> SamSource
Picks samples at random. We can specify a frequency of the occurernce. The sum of all frequencies should be equal to 1.
Loops
Plays the sample at the given period (in BPMs). The samples don't overlap.
rep :: [D] -> Sam -> SamSource
Plays the sample at the given pattern of periods (in BPMs). The samples don't overlap.
Plays the sample at the given period (in BPMs). The overlapped samples are mixed together.
pat :: [D] -> Sam -> SamSource
Plays the sample at the given pattern of periods (in BPMs). The overlapped samples are mixed together.
Arpeggio
arpOneOf :: Chord -> [D] -> Sam -> SamSource
Plays arpeggio of samles with random notes from the chord.
arpFreqOf :: [D] -> Chord -> [D] -> Sam -> SamSource
Plays arpeggio of samles with random notes from the chord. We can assign the frequencies of the notes.
arpOneOf1 :: Chord -> Sig -> Sam -> SamSource
Plays arpeggio of samles with random notes from the chord.
arpFreqOf1 :: [D] -> Chord -> Sig -> Sam -> SamSource
Plays arpeggio of samles with random notes from the chord. We can assign the frequencies of the notes.
Misc patterns
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 -> SamSource
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)] -> SamSource
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.