Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Sound data structures
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== In-memory data formats == In-memory sound formats are fairly diverse. === Reading and writing sound files === {| border="1" |- ! Library ! Sound file format |- | HCodecs | <hask>(Audible a) => DiffUArray Int a</hask> |- | [[hsndfile]] | <hask>MArray</hask> with <hask>Float</hask> and <hask>Double</hask> |- | HSoundFile | <hask>[[Double]]</hask> |- | [[ALUT]] | <hask>OpenAL.AL.Buffer</hask> |- | WAVE | <hask>[[Int32]]</hask> |- | [[Sox]] | Lists, [[Storable Vector]], whatever you have a <hask>hPut</hask> and <hask>hGetContents</hask> function for. |- | [[Sox|libsox]] | [[Storable Vector]] |- | [http://hackage.haskell.org/package/riff riff] | <hask>Data.ByteString.Lazy</hask> |} === Playing sounds === {| border="1" |- ! Library ! Sound file format |- | [[OpenAL]] | <hask>Ptr UInt8</hask>, <hask>Ptr Int16</hask>, 1-N channels |- | SDL-mixer | <hask>ForeignPtr ChunkStruct</hask>, <hask>ForeignPtr MusicStruct</hask> |} === Sound processing libraries === {| border="1" |- ! Library ! Sound file format |- | [[DSP|dsp]] | <hask>Array a, [a]</hask> |- | [[Synthesizer|synthesizer]] | <hask>[a]</hask>, [[Storable Vector|StorableVector.Lazy a]], <hask>(StateT s Maybe a, s)</hask> (like {{HackagePackage|id=stream-fusion}}) |- | [[JACK|jack]] | Operates via mapping functions<br /><hask>mainMono :: (CFloat -> IO CFloat) -> IO ()</hask><br /><hask>mainStereo :: ((CFloat, CFloat) -> IO (CFloat, CFloat)) -> IO ()</hask>, <br /><hask>StorableArray</hask> |- | [[ALSA|alsa-pcm]] | <hask>(SampleFrame a) => Ptr a</hask> |- | [[Hommage]] | <hask>[a]</hask> |} === [[MIDI]]-based === {| border="1" |- ! Library ! Sound file format |- | HCodecs | Reads and writes MIDI files |- | [[MIDI|midi]] | Reads and writes MIDI files |- | [[ALSA|alsa-midi]] | Uses midi library |- | [[Haskore]] | Uses midi library |- | [[ALSA|alsa-seq]] | Custom midi structures |- | YampaSynth | Stand-alone program |} === Special-purpose APIs only (FFIs, etc.) === {| border="1" |- ! Library ! Sound file format |- | [[CSound|hCsound]] | <hask>CsoundPtr</hask> |- | HasSound / [[Haskore]] | <hask>OrcExp</hask> |- | [[SuperCollider|hsc3]] | <hask>UGen</hask> |} === No public sound-buffer API === {| border="1" |- ! 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 |} [[Category:Music]]
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width