|
|
|
|
|
|
Synopsis |
|
|
|
|
Sound Generators
|
|
|
:: [Double] | The sound to play. Output will be finite if sound is finite.
| -> [Double] | Speed, 1.0 = normal,
0.0 < X < 1.0 = slower resp. lower,
1.0 < X = faster resp. higher,
X < 0.0 => X = abs X.
| -> [Double] | Output
| Play given sound with variable speed resp. frequency.
(General definition: Usually a frequency of 1.0 means a period of 1024 values).
Use scratchSample or scratchSampleSignal for backward playing.
|
|
|
|
A sinus wave generator with a period of 1024/N for frequency N
|
|
|
A cosinus wave generator
|
|
|
A rectangle wave generator
|
|
|
A sawtooth wave generator
|
|
|
A triangle wave generator
|
|
|
|
Functions for Lists
|
|
sampleAndHold :: (Ord a, Num a) => b -> [a] -> [b] -> [b] | Source |
|
Current output value is repeatet until the first list argument value switches from zero or below
to a non-zero positive value, the actual value of the second list argument is then taken for output.
|
|
|
Maps the values to the average of the last N values (including the actual)
|
|
|
If predicate holds for N elements, list is cut.
|
|
|
|
Functions for single values
|
|
These Functions can be used with map:
|
|
|
compress p x = x / (abs p + abs x) |
|
|
:: Double | Base,
| -> Double | Notenumber
| -> Double | 2 ^ (Notenumber / Base)
| Transforms a notevalue into a frequency. A Notevalue of 0.0 means a frequency of 1.0.
|
|
|
|
:: Double | Period
| -> Double | New Frequency (Hz) for old frequency of 1.0
| -> Double | Input Frequency
| -> Double | Output Frequency
| Adjusts the frequency. If given oscillator has period X for frequency of 1.0 and you want it to
produce a wave with Y Hz at frequency of 1.0, use map (adjustFrequency X Y) to adjust the
input of the oscillator.
|
|
|
Other Functions
|
|
These Functions are not simple (i. e. linear) list transformers:
|
|
|
Splits a wave into parts. they are split when a value equal or less than zero is followed by a
value greater than zero.
|
|
|
:: [Double] | w1
| -> [Double] | w2
| -> [Double] | result
| Create a wave with the beginning of w1, the ending of w2 and the length of the longer one of them.
|
|
|
Produced by Haddock version 2.4.2 |