Jim Snavely on 13 Apr 2012 06:39:34 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to choose a "fast array" library in Haskell |
Hi Spencer, I don't have alot of suggestions for a DSP representation in Haskell - because I know very little about DSP. However, its seems like the sort of thing people use Repa for. http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Repa_Tutorial I would love to see a basic example of DSP in Haskell such as building and displaying a spectrogram. Good luck, and please keep us updated! --Jim On Fri, Apr 13, 2012 at 7:50 AM, Spencer Russell <spencer.f.russell@gmail.com> wrote: > I'm playing around with the idea of writing a library/framework for > audio analysis / information retrieval research, and I'm deciding > between doing it in Python (for userbase, ease, familiarity, etc.) or > Haskell (mostly because I want to do something nontrivial in haskell, > and I think that a compositional, functional approach could lend > itself well to this application). > > To get a feel I'm implementing some basic pieces in both languages. > I'm hitting a bit of a wall with Haskell though, just figuring out > what my basic internal representation should be. In Python it's easy > because there's such a strong consensus around NumPy, but Haskell > seems to have a multitude of different data structures for this kind > of thing. > > I'm using hSndFile to load in audio files, which has an interface both > to generate Data.StorableVector as well as Data.Vector. There's also > StorableVector-StreamFusion and Data.Vector.Storable. The HaskellDSP > project uses "Array a (Complex b)" for Integral a and RealFloat b. > > Is there any consensus on what direction things are going? Right now I > just want to load in an audio file, chop it up into frames, take an > FFT of each frame, and display a spectrogram. I'd like to do this > without converting to a different representation at every step. > > Any ideas? > > Thanks, > Spencer -- --Jim