[Haskell-cafe] Ideas

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Sat Aug 25 17:36:01 EDT 2007

Evan Laforge writes: 

>> Indeed, you can write certain DSP algorithms beautifully in Haskell.
>> Now, if only it could talk to the audio hardware... (Or just use common
>> file formats even.)
> Oh, that's easy.  I wrote an FFI interface to portaudio a while back
> to write a delay-looping type utility in haskell.  It was pretty
> trivial.  You could do the same for libsndfile or whatever. 
> The only thing I'm uncertain about is whether it would have good
> enough time and space performance.  All the real work is writing yet
> another set of basic envelope, oscillator, and fft primitives.  You
> *should* be able to go all the way down to the samples in pure haskell
> though, which would be more elegant than those other languages :)


Well, if you want to see what you can do with a lazy functional language,
not necessarily Haskell, but Clean (sorry for advertizing a competitor
on this list...), perhaps have a look on my PADL paper 


I generated .wav files as output, from lazy streams, so the sound was 
My ambition was to code in a very, very compact way some musical
instruments, with looping replaced by co-recursion. It cannot be extremely
efficient, but it seems quite elegant and powerful. 

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list