synthesizer-0.2.0.1: Audio signal processing coded in HaskellSource codeContentsIndex
Synthesizer.Basic.WaveSmoothed
Portabilityrequires multi-parameter type classes
Stabilityprovisional
Maintainersynthesizer@henning-thielemann.de
Description
Waveforms which are smoothed according to the oscillator frequency in order to suppress aliasing effects.
Synopsis
data T t y
fromFunction :: (t -> t -> y) -> T t y
fromWave :: (C t, C t, C y) => T t y -> T t y
fromControlledWave :: (C t, C t, C y) => (t -> T t y) -> T t y
raise :: C y => y -> T t y -> T t y
amplify :: C y => y -> T t y -> T t y
distort :: (y -> z) -> T t y -> T t z
apply :: T t y -> t -> T t -> y
sine :: (C a, C a) => T a a
cosine :: (C a, C a) => T a a
saw :: (C a, C a) => T a a
square :: (C a, C a) => T a a
triangle :: (C a, C a) => T a a
data Harmonic a
harmonic :: T a -> a -> Harmonic a
composedHarmonics :: (C a, C a) => [Harmonic a] -> T a a
Documentation
data T t y Source
show/hide Instances
Smooth Flat t (T t) (T T)
C Flat (T t) (T t)
C amp => C amp (T t) (T amp (T t))
C a y => C a (T t y)
C y => C (T t y)
fromFunction :: (t -> t -> y) -> T t ySource
fromWave :: (C t, C t, C y) => T t y -> T t ySource
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 ySource
raise :: C y => y -> T t y -> T t ySource
amplify :: C y => y -> T t y -> T t ySource
distort :: (y -> z) -> T t y -> T t zSource
apply :: T t y -> t -> T t -> ySource
sine :: (C a, C a) => T a aSource
map a phase to value of a sine wave
cosine :: (C a, C a) => T a aSource
saw :: (C a, C a) => T a aSource
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 aSource
square
triangle :: (C a, C a) => T a aSource
triangle
data Harmonic a Source
This is similar to Polar coordinates, but the range of the phase is from 0 to 1, 0 to 2*pi.
harmonic :: T a -> a -> Harmonic aSource
composedHarmonics :: (C a, C a) => [Harmonic a] -> T a aSource

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.

Produced by Haddock version 2.4.2