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’re ready to head to theTutorials and Examples pages to learn about how to use Euterpea and try out some existing code. 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-Nov-2018) Two new PDF slideshow-style tutorials are available on the Tutorials page.
- (05-Oct-2018) The Haskell School of Music textbook is now shipping on Amazon and Cambridge.
- (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.