Skip to main content

File Import & Library

Importing LilyPond Files

LilyPond files are converted to sheet music notation automatically. Here's how it works and what to expect.

The Short Version

LilyPond files convert with excellent accuracy for notes. Because LilyPond is already a notation format (unlike MIDI), Crescendo can preserve all the essential musical information: pitches, rhythms, key signatures, time signatures, and more.

Performance markings like dynamics and articulations are intentionally skipped—they're not needed for practice mode, and keeping the converter simple ensures reliability.

What is LilyPond?

LilyPond is a free, open-source music notation program that creates sheet music from text files. Instead of clicking and dragging notes onto a staff, you write music using a text-based syntax—similar to how programmers write code.

Example LilyPond syntax

\relative c' {
  \key d \major
  \time 3/4
  d4 e fis | g2. | a4 b cis | d2.
}

This produces a simple melody in D major.

LilyPond is popular with classical musicians, academics, and the open-source community. The Mutopia Project hosts over 2,100 public domain pieces in LilyPond format.

Who Uses LilyPond?

If you don't already know what LilyPond is, you probably don't have any LilyPond files. This format is used by:

  • Mutopia Project contributors—2,100+ free classical pieces
  • Open-source enthusiasts—developers who prefer text-based workflows
  • Academics and researchers—precise control over notation details
  • Composers—publication-quality output without subscription fees

New to sheet music files? Start with MusicXML instead. It's more widely available and doesn't require conversion. See Where to Find Sheet Music.

How Conversion Works

When you import a LilyPond file, Crescendo converts it to MusicXML (standard notation format) through a four-stage pipeline:

  1. Parse
    Read the text file and identify musical elements (notes, rests, commands)
  2. Analyze
    Resolve relative octaves, expand variables, process repeats
  3. Quantize
    Convert durations to standard notation values
  4. Emit
    Generate MusicXML with all note data preserved

The conversion focuses on note accuracy above all else. If something doesn't affect which key you press or when, it's not included in the output.

What's Preserved (Everything You Need)

LilyPond is a notation format, so much more is preserved compared to MIDI:

Information Accuracy Notes
Note pitches ~100% Including accidentals (sharps, flats, double sharps)
Note durations ~100% Quarter, eighth, dotted notes, etc.
Key signatures ~100% All major and minor keys
Time signatures ~100% All standard meters
Staff assignment ~99% Treble/bass from \new Staff blocks
Chords ~100% Simultaneous notes: <c e g>
Ties ~95% Connected notes: c4~ c4
Rests ~100% Including multi-measure rests
Grace notes ~100% \grace and \acciaccatura
Tuplets ~100% Triplets, quintuplets, etc.
Repeats ~100% Unfolded for practice

What's Intentionally Skipped

These elements are parsed but not included in the output. This is a deliberate design choice, not a limitation:

Dynamics

Markings like \p, \f, \crescendo are recognized but not output.

Why skipped: Practice mode checks note correctness, not volume. Dynamics don't affect which keys you press.

Articulations

Staccato (-.), accents (->), and similar markings are not included.

Why skipped: These describe how to play, not what to play.

Slurs and phrasing

Slur markings ( ) and phrase markings \( \) are ignored.

Why skipped: Phrasing is interpretive. Reference your original score for musical expression.

Pedal markings, ornaments, lyrics

\sustainOn, \trill, \addlyrics, and similar are not converted.

Why skipped: These add complexity without affecting note-learning practice.

Scheme code and custom functions

LilyPond allows embedding Scheme code for advanced customization. This is not supported.

Why skipped: Too complex to execute safely. Files with Scheme code may fail to convert.

\include statements

Files that reference external files cannot be processed.

Why skipped: External files aren't available during import. Find a self-contained version.

Advanced Features Supported

The converter handles many advanced LilyPond constructs:

Feature LilyPond Syntax Status
Relative octave mode \relative c' { } Supported
Fixed octave mode \fixed c' { } Supported
Piano staff \new PianoStaff << >> Supported
Variables melody = { } \melody Supported
Transposition \transpose c d { } Supported
Ottava (8va/8vb) \ottava #1 Supported
Partial measures \partial 4 Supported
Repeats with alternatives \repeat volta 2 { } \alternative Supported
Multi-voice notation << { } \\ { } >> Supported

What Happens When You Import

  1. Conversion notice—You'll see a dialog explaining that LilyPond requires conversion
  2. Automatic conversion—Crescendo converts the file to sheet music notation
  3. Quality check—The converted file is validated
  4. Added to library—The piece appears in your library, ready to practice

Note: The original LilyPond file is not kept. Crescendo stores only the converted sheet music notation. If you need the .ly file later, keep a copy elsewhere.

Where to Find LilyPond Files

Mutopia Project

mutopiaproject.org—Over 2,100 public domain classical pieces (Bach, Beethoven, Chopin, and more). All pieces include LilyPond source files.

Tip: Mutopia also provides MIDI files, which may be easier to work with if you don't need the LilyPond source.

For most users, MusicXML is a better choice than LilyPond. It's more widely available and doesn't require conversion. See Where to Find Sheet Music for MusicXML sources.


Troubleshooting

"LilyPond conversion failed"

The file may use features the converter doesn't support.

Common causes:

  • Scheme code or custom functions
  • \include statements referencing external files
  • Syntax errors in the original file
  • Very deeply nested structures

Try:

  • Open the file in LilyPond to verify it compiles
  • Export as MIDI from LilyPond, then import that instead
  • Find an alternative version of the piece
"The file may contain unsupported LilyPond features"

This means the converter encountered something it couldn't process.

Unsupported features include:

  • Embedded Scheme code (#(...))
  • Custom override commands
  • External file includes
  • Some rare or deprecated syntax

Try exporting the piece as MIDI from LilyPond software, then import the MIDI file instead.

Missing dynamics, articulations, or slurs

This is intentional. The converter focuses on notes and rhythms for practice mode. Performance markings are deliberately not included.

For interpretation details, reference the original LilyPond-rendered PDF or a printed score.

The notation looks slightly different from the original

The notes and timing are correct, but visual details like beaming and spacing may differ. This is normal—Crescendo uses standard MusicXML rendering, which may not match LilyPond's distinctive engraving style.

For practice purposes, this shouldn't affect your learning.

Should I use LilyPond or MusicXML?

MusicXML is preferred when available. It requires no conversion and preserves everything perfectly.

Use LilyPond when:

  • You already have LilyPond files (e.g., from Mutopia)
  • MusicXML isn't available for the piece
  • You work with LilyPond as your primary notation tool

Still Need Help?

Having trouble with a specific LilyPond file? Send it to us and we'll take a look.

support@crescendopiano.app

Response time: 2-3 business days

Related Articles