Skip to content

noteflakes/ripple

Repository files navigation

Ripple - DRY for Lilypond

Ripple is a small program that helps you generate scores and parts without repeating yourself, performing complex includes or writing scheme macros.

Here are some of Ripple's features:

  • Create scores and parts from files organized in a consistent, easy-to-understand directory hierarchy.
  • Improved Lilypond syntax for writing music, with support for macros (very useful for notating recurring rhythms), better accidentals, prefixed beams and slurs, and shorthand notation for stuff like divisi, appogiaturas, etc.
  • Automatically create MIDI versions of your scores.
  • Proof mode for faster editing - get your PDF regenerated every time you save your source.
  • Compilation mode for mixing different musical works together in a single score or part.

For comprehensive examples of the improved syntax checkout out my music scores project (mainly works by Bach).

A Ripple project:

Ripple expects your files to be organized a certain way for it to function correctly. Here is a simple example:

my_music
  bach
    BWV1027-1
      _work.yml
      gamba.rpl
      cembalo.rpl

The music is contained in .ly or .rpl files (the latter are assumed to be in Ripple syntax and are converted to normal Lilypond syntax). The _work.yml file is a YAML file that contains the attributes of the work:

title: Sonata for Viola da Gamba and Harpsichord G-dur BWV1027
composer: Johann Sebastian Bach
parts:
  gamba:
    title: Viola da gamba
score:
  order: gamba, cembalo

To process the files into parts and scores, simply cd into the directory and run ripple.

cd my_music
ripple

Lyrics are entered in a separate file with the same part name and using the .lyrics or .lyr extension (the latter using enhanced syntax). Basso continuo figures are also entered in a separate file with the same part name and a .figures or .fig extension (the latter also using the improved Ripple syntax).

Ripple will generate Lilypond files and put them into my_music/_ly, and then run Lilypond to produce PDF files that will be put in my_music/_pdf.

Multi-movement works

Ripple also supports multi-movement works. Consider the following file hierarchy:

my_music
  BWV1029
    _work.yml
    01-allegro
      gamba.rpl
      cembalo.rpl
    02-adagio
      gamba.rpl
      cembalo.rpl
    03-vivace
      gamba.rpl
      cembalo.rpl

Ripple will generate gamba and cembalo parts containing all three movements, as well as a score containing the three movements. The directory names are converted into movement titles, e.g. "1. Allegro", "2. Adagio" and "3. Vivace".

Configuration files

Each work should have its own _work.yml file. This file can be used to configure the different parts and their order in the score. Here is a sample file: