Euterpea is a cross-platform, domain-specific language for computer music applications embedded in the Haskell programming language. Euterpea is a wide-spectrum language, suitable for high-level music representation, algorithmic composition, music analysis, working with MIDI, low-level audio processing, sound synthesis, and virtual instrument design.
Getting Started with Euterpea
Here’s what you need to do to install Euterpea for the first time and play your first note (there is also a video tutorial):
- Install Haskell Platform for your operating system. You can use either the Full or Core version.
- Open a command prompt (Windows) or terminal (Mac/Linux) and run:
cabal install Euterpea
- Mac/Linux only: install a MIDI software synthesizer, such as SimpleSynth or Fluidsynth. Make sure it’s running before you start Euterpea in GHCi.
- Now, open a command prompt or terminal and run the following:
play $ c 4 qn
- (Optional) If you also want HSoM, which is the companion library for the Haskell School of Music textbook, you can install it with
cabal install HSoMand import the library in GHCi with
- Mac users: to use HSoM’s musical user interfaces (MUIs), you must compile to executable rather than using the interpreter. Go to the download and installation page‘s section on “Testing HSoM’s MUIs” for information on how to do this.
Now you can head to the Examples page and try some other things! Once you’re ready to start building your own programs with Euterpea, head to the API Documentation for more information on Euterpea’s features.
Having installation trouble or don’t hear any sound? The Download and Installation page has more detailed installation walkthroughs and announcements about recent issues, and the Troubleshooting page has a list of solutions for common problems organized by category. For sound problems, you can also check out the Setting up MIDI page.
Looking for a text editor to use with Haskell & Euterpea? Here are some suggestions:
- Notepad++ (Windows only)
- Atom with a Haskell plugin (Windows/Mac/Linux)
- Or check out this extensive list of editor options.
- (05-Oct-2018) The Haskell School of Music textbook is now shipping on Amazon and Cambridge. If purchasing from Amazon, please be cautious about listings from 3rd party sellers at this time. Amazon’s own listings are legitimate (indicated by “ships from and sold by Amazon.com” appearing near the add-to-cart button), but there have unfortunately been some suspicious “used” listings at ridiculously high prices – some even appearing before the book was formally in print.
- (26-Sept-2018) Euterpea 2.0.6 is on Hackage. The only change in this version over 2.0.5 is a bug fix for infinite playback on Mac systems with multiple MIDI input/output devices.
- (03-July-2018) Euterpea 2.0.5 is on Hackage. Notable changes include dependency version bumps and a new module, Euterpea.IO.MIDI.ToMidi2, that provides a means to export more than one MIDI track with the same instrument assignment.
- (27-May-2018) Euterpea 2.0.4 is on Hackage is now compatible with Haskell Platform 8.4.2. If you had a failed installation with that version of the platform, please do a “cabal update” before trying the installation again.
- (17-Sept-2017) VividEuterpea lets you play Euterpea Music values with real-time audio processing using the Vivid library. It’s a one-file utility set that you can drop into your project folder. Vivid must be installed (easy to do with “cabal install vivid”) and SuperCollider must also be installed. SuperCollider must be running and have its server booted up before you try to play music with VividEuterpea.
Please send questions and comments to Donya Quick.