synthesizer-core-0.8.3: Audio signal processing coded in Haskell: Low level part
Copyright(c) Henning Thielemann 2006
LicenseGPL
Maintainersynthesizer@henning-thielemann.de
Stabilityprovisional
Portabilityrequires multi-parameter type classes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Synthesizer.Basic.WaveSmoothed

Description

Waveforms which are smoothed according to the oscillator frequency in order to suppress aliasing effects.

Synopsis

Documentation

data T t y Source #

Instances

Instances details
C a y => C a (T t y) Source # 
Instance details

Defined in Synthesizer.Basic.WaveSmoothed

Methods

(*>) :: a -> T t y -> T t y #

C y => C (T t y) Source # 
Instance details

Defined in Synthesizer.Basic.WaveSmoothed

Methods

zero :: T t y #

(+) :: T t y -> T t y -> T t y #

(-) :: T t y -> T t y -> T t y #

negate :: T t y -> T t y #

fromFunction :: (t -> t -> y) -> T t y Source #

fromWave :: (C t, C t, C y) => T t y -> T t y Source #

Use this function for waves which are sufficiently smooth. If the Nyquist frequency is exceeded the wave is simply replaced by a constant zero wave.

fromControlledWave :: (C t, C t, C y) => (t -> T t y) -> T t y Source #

raise :: C y => y -> T t y -> T t y Source #

amplify :: C y => y -> T t y -> T t y Source #

distort :: (y -> z) -> T t y -> T t z Source #

apply :: T t y -> t -> T t -> y Source #

sine :: (C a, C a) => T a a Source #

map a phase to value of a sine wave

cosine :: (C a, C a) => T a a Source #

saw :: (C a, C a) => T a a Source #

saw tooth, it's a ramp down in order to have a positive coefficient for the first partial sine

square :: (C a, C a) => T a a Source #

square

triangle :: (C a, C a) => T a a Source #

triangle

data Harmonic a Source #

This is similar to Polar coordinates, but the range of the phase is from 0 to 1, not 0 to 2*pi.

If you need to represent a harmonic by complex coefficients instead of the polar representation, then please build a complex valued polynomial from your coefficients and use it to distort a helix.

distort (Poly.evaluate (Poly.fromCoeffs complexCoefficients)) helix

harmonic :: T a -> a -> Harmonic a Source #

composedHarmonics :: (C a, C a) => [Harmonic a] -> T a a Source #

Specify the wave by its harmonics.

The function is implemented quite efficiently by applying the Horner scheme to a polynomial with complex coefficients (the harmonic parameters) using a complex exponential as argument.