|
|
|
|
|
Description |
Datatypes and functions useful for all SoundFile datatypes.
|
|
Synopsis |
|
|
|
|
Basic Audio data types
|
|
|
The samplerate value, in samples per second.
|
|
|
The bit depth, or word length, of audio data.
|
|
|
A single sample of audio data. Represented normalized to [-1,1]
|
|
|
One frame of audio data, i.e. the sample value for each channel in the data.
|
|
|
A position in a data stream, or a length, in frame values.
|
|
|
An audio data stream. This has both the raw audio data (as a list of SoundFrame),
and the total length, in frames.
| Instances | |
|
|
SoundFile types and classes
|
|
|
Basic information about the audio data: number of channels, samplerate, and bit depth.
| Constructors | | Instances | |
|
|
|
The type of the SndFileCls
Internal is a special type used for the SndFile class.
| Constructors | AIFF | | WavePCM | | OtherSoundFile String | | Internal | |
| Instances | |
|
|
|
A generic datatype for SoundFile data.
| Constructors | | Instances | |
|
|
class SndFileCls a where | Source |
|
The basic class datatypes that represent soundfiles should support.
| | Methods | | get a SndFileInfo with data for the current SoundFile
| | | get the type of the underlying instance
| | | Get the AudioSig from the SndFileCls instance.
| | | convert a SndFileCls instance to the SoundFile type.
| | | Get the length of audio data, in frames.
|
| | Instances | |
|
|
Error handling
|
|
|
Constructors | NoFormatError | Audio format information not found in file
| UnknownFileTypeError | File is not in a recognized file format
| InvalidBitDepthError BitDepth [BitDepth] | Specified bit depth is not supported
| OtherError String | unspecified error.
|
| Instances | |
|
|
|
Monad to support error handling.
|
|
Functions
|
|
SoundFile functions
|
|
|
length of the audio data.
|
|
|
The audio data.
|
|
|
Convert an interleaved [SoundData] (e.g., [l1, r1, l2, r2,...]) to [SoundFrame]
|
|
|
Interleave a [[SoundData]] to [SoundFrame], e.g. [[l1,l2,l3], [r1,r2,r3]] -> [[l1,r1], [l2,r2], [l3, r3]]
|
|
AudioSig functions
|
|
|
|
|
|
|
|
Produced by Haddock version 2.6.0 |