synthesizer-llvm-0.8.1.2: Efficient signal processing using runtime compilation

Safe HaskellNone

Synthesizer.LLVM.Server.Packed.Instrument

Contents

Synopsis

Documentation

squareStereoReleaseFM :: IO (Real -> Real -> T Real -> T Real -> T Real -> ChunkSize -> T (T Real) -> Instrument Real (T Vector))Source

Square like wave constructed as difference of two phase shifted sawtooth like oscillations.

tineBankFM :: IO (Real -> Real -> T Real -> T Real -> T Real -> T Real -> T Real -> T Real -> T Real -> T Real -> T Real -> ChunkSize -> T (T Real) -> Instrument Real (T Vector))Source

brass :: IO (Real -> Real -> Real -> Real -> Real -> Real -> T Real -> T Real -> ChunkSize -> T (T Real) -> Instrument Real (T Vector))Source

helper functions

modulation :: (p -> (T (T Real), Real)) -> Param p (T (T Real))Source

for testing

adsr :: IO (Real -> Real -> Real -> Real -> Real -> ChunkSize -> SampleRate Real -> Real -> LazyTime -> T Vector)Source

The ADSR curve is composed from three parts: Attack, Decay(+Sustain), Release. Attack starts when the key is pressed and lasts attackTime seconds where it reaches height attackPeak*amplitudeOfVelocity. It should be attackPeak>1 because in the following phase we want to approach 1 from above. Say the curve would approach the limit value L if it would continue after the end of the attack phase, the slope is determined by the halfLife with respect to this upper bound. That is, attackHalfLife is the time in seconds where the attack curve reaches or would reach L/2. After Attack the Decay part starts at the same level and decays to amplitudeOfVelocity. The slope is again a halfLife, that is, decayHalfLife is the time where the curve drops from attackPeak*amplitudeOfVelocity to (attackPeak+1)/2*amplitudeOfVelocity. This phase lasts as long as the key is pressed. If the key is released the curve decays with half life releaseHalfLife.