wavy-0.1.0.0: Process WAVE files in Haskell.

Safe HaskellNone

Sound.Wav.ChannelData

Description

This module allows us to deal with channel data inside of a riff file. You may wish to extract audio data from WAVE files or put audio data into wave files and your data may be in integral or floating formats. These methods make it trivial for you to put that data inside WaveFiles. This module is designed to make the manipulation of the channel data inside a wave file easier.

Synopsis

Documentation

getWaveDataSource

Arguments

:: WaveFormat

The format that the data is in.

-> Get [[Int64]]

The audio data, normalised into a stardard container.

Generate a getter that will parse a WAVE data chunk from a raw stream given a wave format.

extractIntegralWaveDataSource

Arguments

:: WaveFile

The wave file that contains the data that you wish to extract.

-> Either WaveParseError IntegralWaveData

The final result, either an error or the data that you were looking for.

Given a WaveFile you will either get back an integral lossless representation of the audio data or you will get back a parser error.

extractFloatingWaveDataSource

Arguments

:: WaveFile

The WaveFile that contains the data that you wish to extract.

-> Either WaveParseError FloatingWaveData 

Extracts the data in the WaveFile in the floating format. This method allows you to view the audio data in this file in the range [-1, 1] so that you can process a normalised view of the data no matter how it was internally encoded. Be aware that the conversion to floating point and back will be a lossy operation.

encodeIntegralWaveDataSource

Arguments

:: WaveFile

The WaveFile that you wish to fill with data.

-> IntegralWaveData

The integral data to be placed inside the WaveFile.

-> WaveFile

A WaveFile containing the data that you provided (formatted correctly).

Given a WaveFile replace it's data contents with the integral data that you provide.

encodeFloatingWaveDataSource

Arguments

:: WaveFile

The WaveFile that will be used to contain the provided data.

-> FloatingWaveData

The floating data to be placed inside the WaveFile. Will be converted to integrals internally and will therefore be a lossy process.

-> WaveFile

A WaveFile containing the data that you provided (formatted correctly).

Given a WaveFile replace it's data contents with the floating data that you provide.

putIntegralWaveDataSource

Arguments

:: WaveFormat

The format that the wave data should be encoded into.

-> IntegralWaveData

The integral data that should be pushed out to the stream.

-> Put

A Put context that will be used to write the data out.

A putter for integral wave data given a format so that you can output correctly formatted data to any stream.

putFloatingWaveDataSource

Arguments

:: WaveFormat

The format that the WAVE data should be encoded into.

-> FloatingWaveData

The floating data that should be pushed out to the stream.

-> Put

A Put context that will be used to write the data out.

A putter for floating wave data given a format so that you can output correctly formatted data to any stream.