Euterpea-2.0.0: Library for computer music research and education

Safe HaskellNone
LanguageHaskell98

Euterpea.IO.Audio.IO

Synopsis

Documentation

outFile Source

Arguments

:: (AudioSample a, Clock p) 
=> String

Filename to write to.

-> Double

Duration of the wav in seconds.

-> Signal p () a

Signal representing the sound.

-> IO () 

Writes sound to a wave file (.wav)

outFileNorm Source

Arguments

:: (AudioSample a, Clock p) 
=> String

Filename to write to.

-> Double

Duration of the wav in seconds.

-> Signal p () a

Signal representing the sound.

-> IO () 

Like outFile, but normalizes the output if the amplitude of the signal goes above 1. If the maximum sample is less than or equal to 1, the output is not normalized. Currently this requires storing the entire output stream in memory before writing to the file.

maxSample :: forall a p. (AudioSample a, Clock p) => Double -> Signal p () a -> Double Source

Compute the maximum sample of an SF in the first dur seconds.