andrewcoppin at btinternet.com
Sun Aug 26 04:12:03 EDT 2007
Evan Laforge wrote:
>> 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.
Well, since I can't do C...
(What I typically end up doing in these situations is to write a small
server program in some language that *does* have the feature I want, and
then talk to it over TCP from the language that *doesn't* have the
feature. But it's typically quite a lot of typing... and the only
language I know of that supports sound (other than C) is Java. And it's
> 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 :)
Heh. FFT is tricky. But I got it to work one time... ;-)
>> Reaktor has abstraction. You can build a gizmo that does something
>> useful, call it a macro, and then use it whereever you want.
> Well, except that if you then change your macro you have re-copy it
> into every instrument or ensemble or other macro that uses it. So I
> consider the macros basically a copy and paste mechanism.
More information about the Haskell-Cafe