Skip to content

hilton/lilypond-workshop

Repository files navigation

Generating sheet music: from one DSL to another

Instructions and examples for a workshop on generating sheet music from code using Lilypond.

Software installation

This workshop requires the following software:

Configuration

  1. Frescobaldi / Preferences… / LilyPond Preferences / Running LilyPond: enable Run LilyPond with English messages

Testing the set-up

  1. Open SimpleSynth (MacOS: right-click and select Open) first
  2. Open Frescobaldi (MacOS: right-click and select Open)
  3. In the Untitled editor window, enter { c }
  4. To test music notation output, on the Lilypond menu, select Engrave (Preview) and check that the Music View window shows music notation.
  5. On the Tools menu, enable MIDI player.
  6. On the File menu, select Save and save the file.
  7. To test MIDI output, enter the following, select Engrave (Preview),
    \score {
      { 
        c, c c' c''
      }
      \midi {}
      \layout {}
    }
    
  8. To re-enable generate music notation as well as MIDI output, add the line \layout {} after the midi {} line

Note: if you start SimpleSynth (or another MIDI player) after Frescobaldi, enable MIDI output as follows:

  1. On the Frescobaldi menu, select Preferences…
  2. In the MIDI settings section, click Refresh MIDI ports

Examples

See the .ly Lilypond files in this repository for the workshop examples.

Workshop exercises

  1. Retype 1 Minimal input and 2 Basic notation.ly.
  2. In 2 Basic notation.ly, complete the melody.
  3. Create the following, based on the example in 3 Lyrics.ly

Nursery rhyme exercise

Note: use \time 6/8 before the notes to set the bar length.