[Haskell-cafe] Low Level Audio - Writing bytes to the sound card?

minh thu noteed at gmail.com
Fri Dec 4 15:31:45 EST 2009

2009/12/4 M Xyz <functionallyharmonious at yahoo.com>
> > if you get it to work
> As a spoiled Java programmer, this new role as pioneer is a bit intimidating, but I will give it a shot. :)
> I downloaded the portaudio v19 source and I'm attempting to build it. Apparently I have to register my Visual Studio Express with Microsoft. Deeper down the rabbit hole... (Interesting aside, on the registration form under "What programming language topics are you interested in?" neither F# or Haskell are listed)
> I wish there was a multimedia standard library for beginners like me. Writing audio to the speakers shouldn't be such a journey.


Did you look at synthesizer ? There is a short introductory file [1].
Be sure to look at the source (there is a link next to each function
definition). Outputting list of values is easy, for instance

Play.monoToInt16 (44100::Double) (map sin [0::Double,0.1..])

It uses SoX [2], which should be installed.


[1] http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer-Plain-Tutorial.html
[2] http://sox.sourceforge.net/

More information about the Haskell-Cafe mailing list