[Haskell-cafe] Haskell audio libraries & audio formats

Henning Thielemann lemming at henning-thielemann.de
Tue Aug 26 14:11:37 EDT 2008


On Mon, 25 Aug 2008, John Van Enk wrote:

> How well would the storablevector package (Data.StorableVector) work for
> storing audio data? One of the major issues I'm still working over is that I
> want to maintain something similar to a [[a]] format (since the underlying
> PortAudio library and hardware could support hundreds of interleaved
> channels) but I would like to be able to build in some typechecking to the
> functions to make sure the number of channels matches the nubmer expected in
> the functions.

With
   data Stereo a =  Stereo !a !a

you could also use
   Stereo (Stereo a)
    for quadrophony and so on. Would this be convenient enough?

StorableVector stores everything of fixed length for which a Storable 
instance is defined.


More information about the Haskell-Cafe mailing list