Skip to content
Urs Liska edited this page Jun 28, 2020 · 4 revisions

openLilyLib - Introduction

These pages are intended to temporarily give a general overview about the openLilyLib package infrastructure for the GNU LilyPond music notation software. As long as there is no proper documentation (see the Documentation Generation project) they will get you going with the infrastructure and its packages.

What Is openLilyLib?

Calling openLilyLib a “package infrastructure” is somewhat misleading as it actually serves a two-fold goal: providing a collection of ready-to-use functionality for LilyPond (bundled in packages) - and an infrastructure to make it easier to build modular and reusable bits of code and functionality.

Overview

The openLilyLib ecosystem is composed of a number of repositories within the openlilylib Github organization. Each repository contains a single package dedicated to a specific purpose. Please refer to each package's repository for further information about what they do. However, there are two repositories that are somewhat special: snippets and oll-core.

The snippets Package

snippets is a loosely organized collection of extension functionality, inspired by the LilyPond Snippet Repository. The difference to the LSR is a) that it is maintained as a Git repository (which simplifies maintenance and development) and b) that the functions are includable (the user doesn't have to copy the code into their own files).

The snippets repository is self-contained and can be used without further consideration, but it is also possible to use it “just like any other” openLilyLib package.

oll-core

oll-core is - as the name suggests - the core of the openLilyLib infrastructure. It provides basic functionality like package and module loading, option handling, logging and some more, but it also exports many of its generally useful helper functions.

All openLilyLib packages (except snippets) depend on oll-core, so installing this is the minimum requirement for any use of openLilyLib.

Installation

“Installing openLilyLib” or any of its packages consists of two separate operations: downloading packages and making them available to LilyPond.

Preparation

openLilyLib resides in a “root” folder of your choice, (e.g. ~/openlilylib on *nix systems), so this should be created first. In order to use packages this root directory has to be added to LilyPond's include path, which can be achieved by passing it to LilyPond's -I command line option. NOTE: The path to openLilyLib has to be given as an absolute path. When using the Frescobaldi IDE the directory can be added to the corresponding list in the Preferences dialog.

Obtaining a Package

There are two ways of downloading a package, both accessible through the green "Clone or Download" button on the repository's front page. Any current state of a repository can be downloaded as a ZIP file which then has to be unzipped into the openLilyLib root directory. Alternatively it can directly be cloned with Git, which is the recommended way of obtaining openLilyLib. Seriously, even if you have never heard of Git, now would be a welcome opportunity to start. For cloning one would move into the openLilyLib root directory and issue the command git clone https://github.com/openlilylib/oll-core (for the oll-core repository).


Once oll-core and some other packages are available openLilyLib can be used, as is described on basic usage.