[Haskell-cafe] library to read/write audio files

Stefan Kersten sk at k-hornz.de
Tue Dec 11 13:15:27 EST 2007


hi john,

On 11.12.2007, at 18:14, John Lato wrote:
> I've been working on a library to encode/decode audio files (wave,
> aiff, etc.) to and from lazy bytestrings, and it's finally in a form
> where I'm willing to share.  It's available at
> http://mml.music.utexas.edu/jwlato/HSoundFile/, lightly cabalized and
> haddock-ified.  The basic item is a Data.SoundFile datatype and a
> SndFileCls class.  Each file format (wave, etc.) has a datatype with
> instances of SndFileCls and Data.Binary (thanks to Don S. for
> suggesting Data.Binary).  At least that's the idea, I've only
> implemented the Wave format so far, but I wanted to make it easy to
> add new formats.

sounds good!

> I originally intended to use Erik de Castro Lopo's excellent
> libsndfile (and there are some remnants of that in darcs), but after
> realizing I wanted a more functional interface I decided to roll my
> own.  It's likely possible to wrap libsndfile in a functional
> interface, but that is beyond my current abilities.

incidentally, i've been working on libsndfile bindings the last few  
days; here's the darcs repository:

http://darcs.k-hornz.de/cgi-bin/darcsweb.cgi?r=hsndfile;a=summary

it's not quite finished yet, but if you're interested you could have  
a look at the interface and make suggestions. maybe both projects  
could benefit from each other? i personally don't see much advantages  
in _not_ using libsndfile underneath ...

<sk>



More information about the Haskell-Cafe mailing list