At the request of Don Stuart, here is some information about the formats supported by different sound libraries.
In-memory data formats[edit]
In-memory sound formats are fairly diverse.
Reading and writing sound files[edit]
Library
|
Sound file format
|
HCodecs
|
(Audible a) => DiffUArray Int a
|
hsndfile
|
MArray with Float and Double
|
HSoundFile
|
[[Double]]
|
ALUT
|
OpenAL.AL.Buffer
|
WAVE
|
[[Int32]]
|
Sox
|
Lists, Storable Vector, whatever you have a hPut and hGetContents function for.
|
libsox
|
Storable Vector
|
riff
|
Data.ByteString.Lazy
|
Playing sounds[edit]
Library
|
Sound file format
|
OpenAL
|
Ptr UInt8 , Ptr Int16 , 1-N channels
|
SDL-mixer
|
ForeignPtr ChunkStruct , ForeignPtr MusicStruct
|
Sound processing libraries[edit]
Library
|
Sound file format
|
HCodecs
|
Reads and writes MIDI files
|
midi
|
Reads and writes MIDI files
|
alsa-midi
|
Uses midi library
|
Haskore
|
Uses midi library
|
alsa-seq
|
Custom midi structures
|
YampaSynth
|
Stand-alone program
|
Special-purpose APIs only (FFIs, etc.)[edit]
No public sound-buffer API[edit]
Library
|
Sound file format
|
hbeat
|
The relevant source files are missing!
|
hogg
|
Very low-level API for Ogg internals only
|
libmpd
|
No sound buffer API
|
sonic-visualizer
|
No sound buffer API
|
truelevel
|
Stand-alone program (uses WAVE)
|
wavconvert
|
Stand-alone program
|