| Subject: | Re: [Haskell-cafe] Haskell audio libraries & audio formats |
|---|---|
| From: | "John Van Enk" |
| Date: | Mon, 25 Aug 2008 14:16:59 -0400 |
|
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. I've considered doing the following:
> data SingleChannel > data DualChannel > data TriChannel > type Frames = [[a]] > data AudioData a = AudioData Frames > adata = [[x] | x <- [...]] :: AudioData SingleChannel I'd like to have a better way of: 1) packing the audio data in something other than a list 2) representing more information about the data parameters (such as sample rate and number of channels) without relying as heavily upon runtime checks/errors (which HCodecs Data.Audio format seems to rely on). The ideal format would be [(a,a,..a)], but this seems cumbersome (since each tuple would have to be defined individually), I'm pretty sure that a runtime check on both sample rate, and number of channels will be necessary, but I just want to ask a little more before continuing down that path. I also noticed that Data.Audio uses a DiffUArray. In this circumstance, would a StorableVector be better, or a DiffUArray? On Sun, Aug 24, 2008 at 1:06 PM, Eric Kidd <haskell@xxxxxxxxxxxxxxx> wrote:
-- /jve _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@xxxxxxxxxxx http://www.haskell.org/mailman/listinfo/haskell-cafe |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Haskell-cafe] Haskell Speed Myth, Don Stewart |
|---|---|
| Next by Date: | Re: [Haskell-cafe] OpenGL's VBO with Haskell, Jefferson Heard |
| Previous by Thread: | Re: [Haskell-cafe] Haskell audio libraries & audio formats, Don Stewart |
| Next by Thread: | Re: [Haskell-cafe] Haskell audio libraries & audio formats, Henning Thielemann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |