Safe Haskell | None |
---|---|
Language | Haskell2010 |
Basic waveforms that are used most often. A waveform function takes in a time varied frequency (in Hz).
Synopsis
- type Wave = Sig -> SE Sig
- osc :: Sig -> Sig
- oscBy :: Tab -> Sig -> Sig
- saw :: Sig -> Sig
- isaw :: Sig -> Sig
- pulse :: Sig -> Sig
- sqr :: Sig -> Sig
- pw :: Sig -> Sig -> Sig
- tri :: Sig -> Sig
- ramp :: Sig -> Sig -> Sig
- blosc :: Tab -> Sig -> Sig
- osc' :: D -> Sig -> Sig
- oscBy' :: Tab -> D -> Sig -> Sig
- saw' :: D -> Sig -> Sig
- isaw' :: D -> Sig -> Sig
- pulse' :: D -> Sig -> Sig
- sqr' :: D -> Sig -> Sig
- pw' :: Sig -> D -> Sig -> Sig
- tri' :: D -> Sig -> Sig
- ramp' :: Sig -> D -> Sig -> Sig
- blosc' :: Tab -> D -> Sig -> Sig
- rndOsc :: Sig -> SE Sig
- rndOscBy :: Tab -> Sig -> SE Sig
- rndSaw :: Sig -> SE Sig
- rndIsaw :: Sig -> SE Sig
- rndPulse :: Sig -> SE Sig
- rndSqr :: Sig -> SE Sig
- rndPw :: Sig -> Sig -> SE Sig
- rndTri :: Sig -> SE Sig
- rndRamp :: Sig -> Sig -> SE Sig
- rndBlosc :: Tab -> Sig -> SE Sig
- rndPhs :: (D -> Sig -> Sig) -> Sig -> SE Sig
- rawTri :: Sig -> Sig
- rawSaw :: Sig -> Sig
- rawSqr :: Sig -> Sig
- rawPw :: Double -> Sig -> Sig
- rawTri' :: D -> Sig -> Sig
- rawSaw' :: D -> Sig -> Sig
- rawSqr' :: D -> Sig -> Sig
- rawPw' :: Double -> D -> Sig -> Sig
- rndRawTri :: Sig -> SE Sig
- rndRawSaw :: Sig -> SE Sig
- rndRawSqr :: Sig -> SE Sig
- rndRawPw :: Double -> Sig -> SE Sig
- unipolar :: Sig -> Sig
- bipolar :: Sig -> Sig
- uosc :: Sig -> Sig
- uoscBy :: Tab -> Sig -> Sig
- usaw :: Sig -> Sig
- uisaw :: Sig -> Sig
- upulse :: Sig -> Sig
- usqr :: Sig -> Sig
- upw :: Sig -> Sig -> Sig
- utri :: Sig -> Sig
- uramp :: Sig -> Sig -> Sig
- ublosc :: Tab -> Sig -> Sig
- uosc' :: D -> Sig -> Sig
- uoscBy' :: Tab -> D -> Sig -> Sig
- usaw' :: D -> Sig -> Sig
- uisaw' :: D -> Sig -> Sig
- upulse' :: D -> Sig -> Sig
- usqr' :: D -> Sig -> Sig
- upw' :: Sig -> D -> Sig -> Sig
- utri' :: D -> Sig -> Sig
- uramp' :: Sig -> D -> Sig -> Sig
- ublosc' :: Tab -> D -> Sig -> Sig
- urndOsc :: Sig -> SE Sig
- urndOscBy :: Tab -> Sig -> SE Sig
- urndSaw :: Sig -> SE Sig
- urndIsaw :: Sig -> SE Sig
- urndPulse :: Sig -> SE Sig
- urndSqr :: Sig -> SE Sig
- urndPw :: Sig -> Sig -> SE Sig
- urndTri :: Sig -> SE Sig
- urndRamp :: Sig -> Sig -> SE Sig
- urndBlosc :: Tab -> Sig -> SE Sig
- urawTri :: Sig -> Sig
- urawSaw :: Sig -> Sig
- urawSqr :: Sig -> Sig
- urawPw :: Double -> Sig -> Sig
- urawTri' :: D -> Sig -> Sig
- urawSaw' :: D -> Sig -> Sig
- urawSqr' :: D -> Sig -> Sig
- urawPw' :: Double -> D -> Sig -> Sig
- urndRawTri :: Sig -> SE Sig
- urndRawSaw :: Sig -> SE Sig
- urndRawSqr :: Sig -> SE Sig
- urndRawPw :: Double -> Sig -> SE Sig
- rndh :: Sig -> SE Sig
- urndh :: Sig -> SE Sig
- rndi :: Sig -> SE Sig
- urndi :: Sig -> SE Sig
- white :: SE Sig
- pink :: SE Sig
- brown :: SE Sig
- fosc :: Sig -> Sig -> Sig -> Sig -> Sig
- type Lfo = Sig
- lfo :: (Sig -> Sig) -> Sig -> Sig -> Sig
- detune :: Sig -> (Sig -> a) -> Sig -> a
- multiHz :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> a
- multiCent :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> a
- multiRnd :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> SE a
- multiGauss :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> SE a
- multiRndSE :: Fractional a => Int -> Sig -> (Sig -> SE a) -> Sig -> SE a
- multiGaussSE :: Fractional a => Int -> Sig -> (Sig -> SE a) -> Sig -> SE a
- urspline :: Sig -> Sig -> SE Sig
- birspline :: Sig -> Sig -> SE Sig
- buz :: Sig -> Sig -> Sig
- gbuz :: (Sig, Sig) -> Sig -> Sig -> Sig
- buz' :: D -> Sig -> Sig -> Sig
- gbuz' :: D -> (Sig, Sig) -> Sig -> Sig -> Sig
- losc :: Tab -> Sig2
- losc3 :: Tab -> Sig2
- rosc :: Tab -> Sig2
- monoLosc :: Tab -> Sig
- loscCfd :: D -> Tab -> Sig2
- loscCfd' :: (D, D) -> D -> Tab -> Sig2
- ldisk :: Str -> Sig2
- rdisk :: Str -> Sig2
- ldisk1 :: Str -> Sig
- rdisk1 :: Str -> Sig
Documentation
Bipolar
ramp :: Sig -> Sig -> Sig Source #
Triangle wave with ramp factor (factor's range is 0 to 1)
ramp factor cps
A band-limited oscillator with user defined waveform (it's stored in the table).
With phase control
oscBy' :: Tab -> D -> Sig -> Sig Source #
An oscillator with user provided waveform with initial phase (the second argiment).
pw' :: Sig -> D -> Sig -> Sig Source #
Pulse width modulation (width range is 0 to 1)
pw' dutyCycle phase cps
ramp' :: Sig -> D -> Sig -> Sig Source #
Triangle wave with ramp factor (factor's range is 0 to 1)
ramp' factor phase cps
blosc' :: Tab -> D -> Sig -> Sig #
A band-limited oscillator with user defined waveform (it's stored in the table).
With random phase
Raw analog waves (no band limiting)
Analogue-like waves with no band-limiting. Can be useful for LFOs.
Unipolar
unipolar :: Sig -> Sig Source #
Turns a bipolar sound (ranges from -1 to 1) to unipolar (ranges from 0 to 1)
bipolar :: Sig -> Sig Source #
Turns an unipolar sound (ranges from 0 to 1) to bipolar (ranges from -1 to 1)
With phase control
With random phase
Raw analog waves (no band limiting)
Analogue-like waves with no band-limiting. Can be useful for LFOs.
Noise
rndh :: Sig -> SE Sig Source #
Constant random signal. It updates random numbers with given frequency.
constRnd freq
rndi :: Sig -> SE Sig Source #
Linear random signal. It updates random numbers with given frequency.
rndi freq
Frequency modulation
fosc :: Sig -> Sig -> Sig -> Sig -> Sig Source #
Frequency modulation
fosc carrierFreq modulatorFreq modIndex cps
Low frequency oscillators
Detune
detune :: Sig -> (Sig -> a) -> Sig -> a Source #
Scales the oscillator by frequency. That's how we can rise the pitch by 2 semitones and 15 cents:
detune (semitone 2 * cent 15) osc
Unision
multiHz :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> a Source #
Unision by Hertz. It creates n oscillators that are playing the same pitch slightly detuned. The oscillatos's pitch is evenly distributed in Hz.
multiHz numberOfUnits amountHz wave
multiCent :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> a Source #
Unision by Cents. It creates n oscillators that are playing the same pitch slightly detuned. The oscillatos's pitch is evenly distributed in cents.
multiCent numberOfUnits amountCent wave
multiRnd :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> SE a Source #
Oscillators are detuned randomly in the given interval.
multiRnd numberOfUnits amountCent wave
multiGauss :: Fractional a => Int -> Sig -> (Sig -> a) -> Sig -> SE a Source #
Oscillators are detuned randomly with Gauss distribution in the given interval.
multiGauss numberOfUnits amountCent wave
multiRndSE :: Fractional a => Int -> Sig -> (Sig -> SE a) -> Sig -> SE a Source #
Oscillators are detuned randomly in the given interval. Useful for waves that return a signals with Side Effects.
multiRnd numberOfUnits amountCent wave
multiGaussSE :: Fractional a => Int -> Sig -> (Sig -> SE a) -> Sig -> SE a Source #
Oscillators are detuned randomly with Gauss distribution in the given interval. Useful for waves that return a signals with Side Effects.
multiGauss numberOfUnits amountCent wave
Random splines
urspline :: Sig -> Sig -> SE Sig Source #
Unipolar random splines. It generates the splines with unipolar output (ranges from 0 to 1). Arguments affect the frequency for generation of new values.
urspline cpsMin cpsMax
birspline :: Sig -> Sig -> SE Sig Source #
Bipolar random splines. It generates the splines with bipolar output (ranges from -1 to 1). Arguments affect the frequency for generation of new values.
birspline cpsMin cpsMax
Buzzes
buz :: Sig -> Sig -> Sig Source #
Output is a set of harmonically related sine partials.
buz numOfHarmonics frequency
gbuz :: (Sig, Sig) -> Sig -> Sig -> Sig Source #
Output is a set of harmonically related cosine partials.
gbuz (minHarm, maxHarm) ratio frequency
Loop over files in ram
Loop over table stereo files. Uses loscil3 under the hood. Watch out for sample rates! If file sample rate is different from global project sample rate then playback will be distorted.
Loop over table stereo files with cubic interpolation. Uses loscil3 under the hood. Watch out for sample rates! If file sample rate is different from global project sample rate then playback will be distorted.
monoLosc :: Tab -> Sig Source #
Loop over table mono files. Uses loscil3 under the hood. Watch out for sample rates! If file sample rate is different from global project sample rate then playback will be distorted.
loscCfd' :: (D, D) -> D -> Tab -> Sig2 Source #
Loops with cross-fades at the ends. We can specify loop segment (in seconds).