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:
- 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.
- (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.
- (01-June-2018) The Haskell School of Music textbook is now available for preorder on Cambridge University Press’s website and on Amazon.com.
- (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.