Instructions and examples for a workshop on generating sheet music from code using Lilypond.
This workshop requires the following software:
- Lilypond latest version (required)
- Frescobaldi 2.20 (recommended), or a text editor
- A MIDI player for audio output (optional)
- MacOS: SimpleSynth
- Frescobaldi / Preferences… / LilyPond Preferences / Running LilyPond: enable Run LilyPond with English messages
- Open SimpleSynth (MacOS: right-click and select Open) first
- Open Frescobaldi (MacOS: right-click and select Open)
- In the Untitled editor window, enter
{ c }
- To test music notation output, on the Lilypond menu, select Engrave (Preview) and check that the Music View window shows music notation.
- On the Tools menu, enable MIDI player.
- On the File menu, select Save and save the file.
- To test MIDI output, enter the following, select Engrave (Preview),
\score { { c, c c' c'' } \midi {} \layout {} }
- To re-enable generate music notation as well as MIDI output, add the line
\layout {}
after themidi {}
line
Note: if you start SimpleSynth (or another MIDI player) after Frescobaldi, enable MIDI output as follows:
- On the Frescobaldi menu, select Preferences…
- In the MIDI settings section, click Refresh MIDI ports
See the .ly
Lilypond files in this repository for the workshop examples.
- Retype
1 Minimal input
and2 Basic notation.ly
. - In
2 Basic notation.ly
, complete the melody. - Create the following, based on the example in
3 Lyrics.ly
Note: use \time 6/8
before the notes to set the bar length.