Personal tools

Sound data structures

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(In-memory sound formats)
 
(synthesizer library)
Line 51: Line 51:
 
| dsp
 
| dsp
 
| <hask>Array a, [a]</hask>
 
| <hask>Array a, [a]</hask>
  +
|-
  +
| [[Synthesizer]]
  +
| <hask>[a], StorableVector.Lazy a, (StateT s Maybe a, s)</hask>
 
|-
 
|-
 
| jack
 
| jack
Line 70: Line 73:
 
|-
 
|-
 
| alsa-midi
 
| alsa-midi
  +
| Uses midi library
  +
|-
  +
| [[Haskore]]
 
| Uses midi library
 
| Uses midi library
 
|-
 
|-
Line 85: Line 91:
 
| hCsound
 
| hCsound
 
| <hask>CsoundPtr</hask>
 
| <hask>CsoundPtr</hask>
  +
|-
  +
| HasSound / [[Haskore]]
  +
| <hask>OrcExp</hask>
 
|-
 
|-
 
| hsc3
 
| hsc3

Revision as of 07:09, 29 August 2008

At the request of Don Stuart, here is some information about the formats supported by different sound libraries.

Contents

1 In-memory data formats

In-memory sound formats are fairly diverse.

1.1 Reading and writing sound files

Library Sound file format
HCodecs
(Audible a) => DiffUArray Int a
hsndfile
MArray
with
Float
and
Double
HSoundFile
[[Double]]
ALUT
OpenAL.AL.Buffer
WAVE
[[Int32]]

1.2 Playing sounds

Library Sound file format
OpenAL
Ptr UInt8
,
Ptr Int16
, 1-N channels
SDL-mixer
ForeignPtr ChunkStruct
,
ForeignPtr MusicStruct

1.3 Sound processing libraries

Library Sound file format
dsp
Array a, [a]
Synthesizer
[a], StorableVector.Lazy a, (StateT s Maybe a, s)
jack Operates via mapping functions
mainMono :: (CFloat -> IO CFloat) -> IO ()

mainStereo :: ((CFloat, CFloat) -> IO (CFloat, CFloat)) -> IO ()

1.4 MIDI-based

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
YampaSynth Stand-alone program

1.5 Special-purpose APIs only (FFIs, etc.)

Library Sound file format
hCsound
CsoundPtr
HasSound / Haskore
OrcExp
hsc3
UGen

1.6 No public sound-buffer API

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