Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the easiest way to play a sound sample in Haskell?

Tags:

haskell

audio

I'm toying around with constructing a basic music composition system for fun. I can represent music in memory, but I'd (obviously) like to be able to output actual sounds! I don't really care what the format is (MIDI, mp3, ogg, whatever). I just want to be able to load samples into the program and play them in the simplest way possible. I've searched around for a solution but everything I'm seeing is either a) too complex (overhead-wise) for my needs, b) not actively supported, or c) not well-documented. I would love to see an example of sound output or otherwise, some direction on the simplest way to do so.

like image 528
Benjamin Kovach Avatar asked Oct 20 '22 09:10

Benjamin Kovach


1 Answers

You might like Euterpea, which isn't on Hackage but was a breeze to install and has quite verbose documentation (it seems it forms the core of an introductory Haskell course at Yale). Hover over the word "Euterpea" in the menu at the top to find more links/instructions.

like image 51
Daniel Wagner Avatar answered Nov 15 '22 09:11

Daniel Wagner