Lilypond music preprocessor

Related tags


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:


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
    title: Viola da gamba
  order: gamba, cembalo

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

cd my_music

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:


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:

title: Missa Brevis G-dur BWV 236
composer: Johann Sebastian Bach
editor: Sharon Rosner
copyright: © IBS 2009 - all rights reserved
  hide_empty_staves: true
    - oboe1
    - oboe2
    - violino1
    - violino2
    - viola
    - soprano
    - alto
    - tenore
    - basso
    - continuo

Each movement can also have its own _movement.yml file containing overrides for the specific movement. You can for example specify colla parte without copying the music:

    source: soprano
    source: alto
    source: soprano
    source: alto
    source: tenore

This configuration file specifies that the oboe1 and violino1 parts take their music from the soprano part, oboe2 and violino2 from the alto part, and the viola from the tenore part.

In addition, default settings can be stored in a _ripple.yml file, which can be used for setting for example the editor's name or the copyright notice.

Ripple also currently includes the following default settings for several voice types and instruments:

  1. Clef - the clef is automatically inserted by Ripple unless it is set to none.
  2. AutoBeam:false/true (default is true) - this setting is can be used in order to insert a \autoBeamOff macro in vocal parts.

Overriding default settings

The settings used by Ripple to process the source files are merged from the different settings files (ripple/lib/defaults.yml, _ripple.yml, _work.yml, _movement.yml) and can further be overriden by specifying an --opt switch:

ripple BWV17 --opt "editor:Someone else but me"

Auto-regeneration mode

Ripple can be put into auto-regeneration mode, in which it watches the source directory and process the specified files each time a file is saved in that directory. To use ripple in auto-regenration mode, add auto:true to your _ripple.yml file, or specify the --auto switch:

ripple BWV17 --auto

Proof mode

Proof mode is similar to auto-regeneration mode, except that each time a file is changed or added, it is compiled into PDF (as a single movement and part) and opened in the background. This mode is very useful when entering parts. To use ripple in proof mode, add proof:true to your _ripple.yml file, or specify the --proof or -P switch:

ripple BWV17 -P

Compilation mode

Compilation mode allows you to compile different pieces/movements into a single score or part. The compilation settings are defined in a YAML file. Here's a simple example:

title: My First Ripple Compilation
subtitle: Just Testing
  - work: bach/BWV1041
    movement: 01-allegro
  - work: bach/BWV1066
    movement: "09-bourree-II"
    score_breaks: 2
        source: fagotto
        breaks: 1
    source: continuo
    clef: bass
    hide_figures: true

In order to process the compilation, use the -c switch:

ripple -c compilations/test

When no parts are specified, Ripple will process all parts specified in the compilation file. As the example above shows, you can also control page breaks for individual parts and for the score. For more examples of usage look at my own compilations.

Ad-hoc compilations

Ripple also lets you perform ad-hoc compilations without preparing a compilation file by using the -C switch:

ripple -C bach/BWV156 bach/BWV044 bach/BWV017

If no parts are specified, only the score will be prepared. You can also compile specific movements by specifying them using the format work#movement. Ripple will also understand movement numbers instead of complete movement references:

ripple -C bach/BWV156#1 bach/BWV044#2

You can also specify a title for the compilation by including the -t switch:

ripple -C -t "My own title" bach/BWV156#1 bach/BWV044#2

More ripple tips

Process multiple works

ripple bach/BWV017 bach/BWV166

Create a MIDI version of your score:

ripple bach/BWV017 -M

Open the rendered PDF file once it is ready:

ripple bach/BWV017 -o

This also works for MIDI files:

ripple bach/BWV017 -M -o

If you find yourself always using the -o switch, you can add the following setting to your _ripple.yml file instead:

open_target: true

Process only the score:

ripple bach/BWV017 -s

Process only the parts:

ripple bach/BWV017 --no-score

Process a specific part:

ripple bach/BWV017 -p continuo
ripple bach/BWV017 -p violino1,violino2

Process a specific movement:

ripple bach/BWV017 -m 01-coro
Sharon Rosner
père, bricoleur, rêveur
Sharon Rosner
Music typeset with the Lilypond system

Intro (from long ago) This repo contains sheet music typeset with the Lilypond typesetter. The music chosen is in favour of cello music (mostly chambe

Enthusiastic about  the Cello 95 Sep 24, 2021
Frescobaldi LilyPond Editor

README for Frescobaldi Homepage: Main author: Wilbert Berendsen Frescobaldi is a LilyPond sheet music text editor. It aims

Frescobaldi 501 Sep 21, 2021
A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.

openLilyLib/snippets What's this? What is openLilyLib/snippets? There are two answers to this: it's a repository of LilyPond snippets, and it's part o

openlilylib 102 Jul 10, 2021
Use Lilypond like a boss!

The lyp package index lyp - The Lilypond Swiss Army Knife lyp is an open-source tool that takes the pain out of working with Lilypond. Use packages: I

noteflakes 66 Sep 23, 2021
Lilypond music preprocessor

Ripple - DRY for Lilypond Ripple is a small program that helps you generate scores and parts without repeating yourself, performing complex includes o

Sharon Rosner 21 Mar 24, 2020
A beautiful cross platform Desktop Player for Google Play Music

Google Play Music™ Desktop Player Windows: MacOS / Linux: Run "Google Play Music" as a standalone desktop app. Never again will you have to hunt throu

Samuel Attard 8.5k Sep 12, 2021
Typographic Beat-Oriented Notation for music

tbon Typographic Beat-Oriented Notation for music Tbon aims to be the fastest way to enter pitches, rhythms, meter and dynamic levels from a computer

null 11 Jan 23, 2020

ieaseMusic Elegant NeteaseMusic desktop app, Rock with NeteaseMusic ?? Built by Electron, React, MobX, JSS API 由 Binaryify/NeteaseCloudMusicApi 提供。 Pr

null 8.6k Sep 22, 2021
OpenSheetMusicDisplay renders sheet music in MusicXML format in your web browser based on VexFlow. OSMD is brought to you by

OpenSheetMusicDisplay (OSMD) A MusicXML renderer for the Browser About OSMD • Demo • Key Features • Limitations • How to Use

Open Sheet Music Display 800 Sep 15, 2021
🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)

Verovio is a fast, portable and lightweight library for engraving Music Encoding Initiative (MEI) digital scores into SVG images. Verovio also contain

RISM Digital Center 426 Sep 22, 2021
Repository of scores typeset using Lilypond & Ripple

Ciconia's Score Repository This repository contains my edition of works by Bach and other baroque composers typeset using Lilypond and Ripple. Process

Sharon Rosner 17 Aug 15, 2021
Beautiful LilyPond scores under free licenses

A project to collect and maintain beautiful LilyPond music scores, and to document LilyPond engraving styles, Scheme programs and templates. You can

Wilbert Berendsen 39 Aug 11, 2021
Music player for deepin desktop environment.

deepin-music Deepin music is a local music player with beautiful design and simple functions developed by Deepin Technology. Dependencies Build depend

Wuhan Deepin Technology Co.,Ltd. 155 Sep 16, 2021
A music programming language for musicians. :notes:

Installation | Docs | Changelog | Contributing composers chatting Alda is a text-based programming language for music composition. It allows you to co

Alda 4.7k Sep 25, 2021
Mopidy is an extensible music server written in Python

Mopidy Mopidy is an extensible music server written in Python. Mopidy plays music from local disk, Spotify, SoundCloud, Google Play Music, and more. Y

Mopidy 7.2k Sep 17, 2021
The git repository of the advanced drum machine

Hydrogen drum machine Hydrogen is an advanced drum machine for GNU/Linux, Mac and Windows. It's main goal is to bring professional yet simple and intu

Hydrogen 702 Sep 15, 2021
Open source sheet music

The Mutopia Project The Mutopia Project offers sheet music based on editions in the public domain. All sheet music is written in LilyPond by volunteer

null 187 Sep 3, 2021
music library manager and MusicBrainz tagger

beets Beets is the media library management system for obsessive music geeks. The purpose of beets is to get your music collection right once and for

beetbox 10.4k Sep 15, 2021
LilyPond mini-score engraving and sharing service for musicians.

Tunefl LilyPond mini-score engraving and sharing service for musicians. The live Tunefl service is at More sleep lost by tiredpixel. Insta

Nic Williams 22 Jun 22, 2020