LilyPond Regression Tests
‘AAA-intro-regression.ly’
This document presents proofs for LilyPond 2.11.64. When the text corresponds with the shown notation, we consider LilyPond Officially BugFree (tm). This document is intended for finding bugs and for documenting bugfixes.
In the web version of this document, you can click on the file name or figure for each example to see the corresponding input file.
TODO: order of tests (file names!), test only one feature per test. Smaller and neater tests.
‘accidental-ancient.ly’
Accidentals are available in different ancient styles, which all are collected here.‘accidental-broken-tie-spacing.ly’
When a tie is broken, the spacing engine must consider the accidental after the line break, to prevent a collision from occurring.‘accidental-cautionary.ly’
Cautionary accidentals may be indicated using either parentheses (default) or smaller accidentals.‘accidental-clef-change.ly’
Accidentals are reset for clef changes.‘accidental-collision.ly’
accidentals avoid stems of other notes too.‘accidental-contemporary.ly’
Several automatic accidental rules aim to reproduce contemporary music notation practices:-
'dodecaphonicstyle prints accidentals on every note (including naturals) -
'neo-modern styleprints accidentals on every note (not including naturals), except when a note is immediately repeated -
'neo-modern-cautionarystyle acts like neo-modern, adding cautionary parentheses around accidentals. -
'teachingprints accidentals normally, but adds cautionary accidentals when an accidental is already included in the key signature.
Both scores should show the same accidentals.
‘accidental-double.ly’
If two forced accidentals happen at the same time, only one sharp sign is printed.‘accidental-forced-tie-barline.ly’
Cautionary accidentals applied to tied notes after a bar line are valid for the whole measure.‘accidental-forced-tie.ly’
Accidentals can be forced with ! and ? even if the notes are tied.‘accidental-ledger.ly’
Ledger lines are shortened when there are accidentals. This happens only for the single ledger line close to the note head, and only if the accidental is horizontally close to the head.‘accidental-octave.ly’
This shows how accidentals in different octaves are handled. The note names are also automatically printed but the octavation has been dropped out.
‘accidental-piano.ly’
In piano accidental style, notes in both staves influence each other. In this example, each note should have an accidental.‘accidental-placement.ly’
Accidentals are placed as closely as possible. Accidentals in corresponding octaves are aligned. The top accidental should be nearest to the chord. The flats in a sixth should be staggered.‘accidental-quarter.ly’
Quarter tone notation is supported, including threequarters flat.‘accidental-single-double.ly’
A sharp sign after a double sharp sign, as well as a flat sign after a double flat sign is automatically prepended with a natural sign.
‘accidental-suggestions.ly’
setting thesuggestAccidentals will print
accidentals vertically relative to the note. This is useful for
denoting Musica Ficta.
‘accidental-tie.ly’
The second and third notes should not get accidentals, because they are tied to a note. However, an accidental is present if the line is broken at the tie, which happens for the G sharp.‘accidental-unbroken-tie-spacing.ly’
Tied accidentaled notes (which cause reminder accidentals) do not wreak havoc in the spacing when unbroken.‘accidental-voice.ly’
This shows how modern cross voice auto cautionary accidentals are handled. The first two fisses get accidentals because they belong to different voices. The first f gets cautionary natural because of previous measure. The last f gets cautionary natural because fis was only in the other voice.
‘accidental.ly’
Accidentals work: the second note does not get a sharp. The third and fourth show forced and courtesy accidentals.
‘alignment-order.ly’
Newly created contexts can be inserted anywhere in the vertical alignment.‘alignment-vertical-manual-setting.ly’
Alignments may be changed pre system by settingalignment-offsets in the line-break-system-details
property
‘alignment-vertical-spacing.ly’
By setting properties inNonMusicalPaperColumn, vertical
spacing of alignments can be adjusted per system.
By setting alignment-extra-space or
fixed-alignment-extra-space an individual system may be
stretched vertically.
For technical reasons, overrideProperty has to be used for
setting properties on individual object. \override in a
\context block may still be used for global overrides.
‘ambitus-pitch-ordering.ly’
Ambituses use actual pitch not lexicographic ordering.‘ambitus.ly’
Ambituses indicate pitch ranges for voices.Accidentals only show up if they’re not part of key
signature. AmbitusNoteHead grobs also have ledger lines.
‘apply-context.ly’
With\applyContext, \properties can be modified
procedurally. Applications include: checking bar numbers, smart
octavation.
This example prints a bar-number during processing on stdout.
‘apply-output.ly’
The\applyOutput expression is the most flexible way to
tune properties for individual grobs.
Here, the layout of a note head is changed depending on its vertical position.
‘arpeggio-bracket.ly’
A square bracket on the left indicates that the player should not arpeggiate the chord.
‘arpeggio-collision.ly’
Arpeggio stays clear of accidentals and flipped note heads.‘arpeggio-no-overshoot.ly’
Arpeggios do not overshoot the highest note head. The first chord in this example simulates overshoot using'positions for comparison with the correct behaviour.
‘arpeggio-parenthesis.ly’
There is a variant of the arpeggio sign that uses a ‘vertical slur’ instead of the wiggle.‘arpeggio-span-one-staff.ly’
Span arpeggios within one staff also work‘arpeggio.ly’
Arpeggios are supported, both cross-staff and broken single staff.
‘augmentum.ly’
Augmentum dots are accounted for in horizontal spacing.‘auto-beam-bar.ly’
No auto beams will be put over (manual) repeat bars.‘auto-beam-beaming-override.ly’
Autobeamer rememberssubdivideBeams and other
beaming pattern related functions at the start of an autobeam.
‘auto-beam-beat-grouping.ly’
Autobeaming will break beams according to beatGrouping if the total length of the beat groups is equal to measureLength. Otherwise, it will break beams according to beatLength.‘auto-beam-no-beam.ly’
The autobeamer may be switched off for a single note with\noBeam.
‘auto-beam-triplet.ly’
Automatic beaming is also done on tuplets.‘auto-beam-tuplets.ly’
Tuplet-spanner should not put (visible) brackets on beams even if they’re auto generated.‘auto-beam.ly’
Beams are place automatically; the last measure should have a single beam.‘auto-change.ly’
Auto change piano staff switches voices between up and down staves automatically; rests are switched along with the coming note. When central C is reached, staff is not yet switched (by default).‘backend-excercise.ly’
Excercise all output functions‘backend-svg.ly’
‘balloon.ly’
With balloon texts, objects in the output can be marked, with lines and explanatory text added.‘bar-check-redefine.ly’
The meaning of| is stored in the
identifier pipeSymbol.
‘bar-line-dashed.ly’
The dashes in a dashed bar line covers staff lines exactly. Dashed barlines between staves start and end on a half dash precisely.‘bar-line-dotted.ly’
The dots in a dotted bar line are in spaces.‘bar-number.ly’
Bar numbers may be set and their padding adjusted individually. The counting of bar numbers is started after the anacrusis.To prevent clashes at the beginning of a line, the padding may have to be increased.
‘bar-scripts.ly’
Markings can be attached to (invisible) barlines.
‘beam-auto-knee.ly’
A knee is made automatically when a horizontal beam fits in a gap between note heads that is larger than a predefined threshold.‘beam-auto.ly’
There are presets for theauto-beam engraver in the case of common
time signatures.
‘beam-beamlet-break.ly’
beamlets don’t run to end of line if there are no other beamlets on the same height.‘beam-beamlet-grace.ly’
Beamlets in grace notes remain readable.‘beam-beat-grouping.ly’
Beaming patterns obey thebeatGrouping property.
‘beam-break-no-bar.ly’
Broken beams have sane endings even if grobs are not present at the broken end.‘beam-break.ly’
Beams can be printed across line breaks, if forced.‘beam-center-slope.ly’
Simple beams on middle staffline are allowed to be slightly sloped, even if the notes have ledgers. Beams reaching beyond middle line can have bigger slope.‘beam-concave-chord.ly’
‘beam-concave-damped.ly’
Beams that are not strictly concave are damped according to their concaveness.‘beam-concave.ly’
Fully concave beams should be horizontal. Informally spoken, concave refers to the shape of the notes that are opposite a beam. If an up-beam has high notes on its center stems, then we call it concave.If a beam is fails a test, the desired slope is printed next to it.
‘beam-cross-staff-auto-knee.ly’
Automatic cross-staff knees work also (here they were produced with explicit staff switches).‘beam-cross-staff-script.ly’
scripts don’t trigger beam formatting. If this does happen, we can have a cyclic dependency on Y-positions of staves.‘beam-cross-staff-slope.ly’
Cross staff (kneed) beams do not cause extreme slopes.‘beam-cross-staff.ly’
Beams can be typeset over fixed distance aligned staves, beam beautification does not really work, but knees do. Beams should be behave well, wherever the switching point is.
‘beam-damp.ly’
Beams are less steep than the notes they encompass.‘beam-default-lengths.ly’
Beamed stems have standard lengths if possible. Quantization is switched off in this example.‘beam-extreme.ly’
Beams should behave reasonably well, even under extreme circumstances.
Stems may be short, but noteheads should never touch the beam. Note that
under normal circumstances, these beams would get knees. Here
Beam.auto-knee-gap was set to false.
‘beam-feather-knee-stem-length.ly’
In feathered beams, stems in knees reach up to the feathered part correctly.‘beam-feather.ly’
Specifyinggrow-direction on a beam, will cause
feathered beaming. The \featherDurations function can be used
to adjust note durations.
‘beam-flat-retain-direction.ly’
Even very flat but slanted patterns should give slanted beams.‘beam-french.ly’
In French style beaming, the stems do not go between beams.‘beam-funky-beamlet.ly’
Funky kneed beams with beamlets also work. The beamlets should be pointing to the note head.‘beam-funky.ly’
In complex configurations of knee beaming, according to Paul Roberts, the first stem of a beam determines the direction of the beam, and as such the way that following (kneed) stems attach to the beam. This is in disagreement with the current algorithm.‘beam-isknee.ly’
Beams can be placed across a PianoStaff.
‘beam-knee-symmetry.ly’
Point-symmetric beams should receive the same quanting. There is no up/down bias in the quanting code.‘beam-length.ly’
Beams should look the same.
‘beam-manual-beaming.ly’
Beaming can be overidden for individual stems.‘beam-multiple-cross-staff.ly’
Kneed beams (often happens with cross-staff beams) should look good when there are multiple beams: all the beams should go on continuously at the staff change. Stems in both staves reach up to the last beam.‘beam-multiplicity-over-rests.ly’
When a beam goes over a rest, there should not be any beamlets pointing towards the rest unless absolutely necessary.‘beam-outside-beamlets.ly’
Beams may overshoot stems. This is also controlled withbreak-overshoot.
‘beam-over-barline.ly’
Explicit beams may cross barlines.‘beam-position.ly’
Beams on ledgered notes should always reach the middle staff line. The second beam, counting from the note head side, should never be lower than the second staff line. This does not hold for grace note beams. Override withno-stem-extend.
‘beam-quant-standard.ly’
This file tests a few standard beam quants, taken from Ted Ross’ book. If LilyPond finds another quant, the correct quant is printed over the beam.‘beam-quanting-32nd.ly’
Stem lengths take precedence over beam quants: ‘forbidden’ quants are only avoided for 32nd beams when they are outside of the staff. However, that leads to very long stems, which is even worse.‘beam-quanting-horizontal.ly’
In this test for beam quant positions for horizontal beams, staff lines should be covered in all cases. For 32nd beams, the free stem lengths are between 2 and 1.5.‘beam-quarter.ly’
Quarter notes may be beamed: the beam is halted momentarily.‘beam-rest.ly’
The number of beams does not change on a rest.‘beam-second.ly’
Engraving second intervals is tricky. We used to have problems with seconds being too steep, or getting too long stems. In a file like this, showing seconds, you’ll spot something fishy very quickly.‘beam-shortened-lengths.ly’
Beams in unnatural direction, have shortened stems, but do not look too short.‘beam-single-stem.ly’
Single stem beams are also allowed. For such beams, clip-edges is switched off automatically.‘beam-slope-stemlet.ly’
For slope calculations, stemlets are treated as invisible stems.‘beam-unconnected-beamlets.ly’
By settingmax-beam-connect, it is
possible to create pairs of unconnected beamlets.
‘beaming-ternary-metrum.ly’
Automatic beaming works also in ternary time sigs. In this case, the 8th is a beat, so the 16ths are split into two groups. This can be avoided by overridingbeatLength to be
three 8th notes.
‘beaming.ly’
Beaming is generated automatically. Beams may cross bar lines. In that case, line breaks are forbidden.
‘beams.ly’
Beaming can be also given explicitly.‘bend-after.ly’
Falls and doits can be created with bendAfter. They run to the next note, or to the next barline. Microtone bends (i.e. \bendAfter #3.5) are also supported.‘bend-dot.ly’
Bends avoid dots, but only if necessary.‘break-alignment-anchor-alignment.ly’
The default callback for break-align-anchor in clefs and time/key signatures reads the break-align-anchor-aligment property to align the anchor to the extent of the break-aligned grob.‘break-alignment-anchors.ly’
The break-align-anchor property of a break-aligned grob gives the horizontal offset at which other grobs should attach.‘break.ly’
Breaks can be encouraged and discouraged using \break and
\noBreak.
‘breathing-sign-ancient.ly’
Gregorian chant notation sometimes also uses commas and ticks, but in smaller font size (we call it ’virgula’ and ’caesura’). However, the most common breathing signs are divisio minima/maior/maxima and finalis, the latter three looking similar to bar glyphs.
‘breathing-sign.ly’
Breathing signs are available in different tastes: commas (default), ticks, vees and ‘railroad tracks’ (caesura).
‘chord-changes.ly’
Property chordChanges: display chord names only when there’s a change in the chords scheme, but always display the chord name after a line break.‘chord-name-entry-11.ly’
The 11 is only added to major-13 if it is mentioned explicitly.‘chord-name-entry.ly’
Chords can be produced with the chordname entry code (\chordmode mode), using a pitch and a suffix. Here,
the suffixes are printed below pitches.
‘chord-name-exceptions.ly’
The propertychordNameExceptions can used
to store a list of special notations for specific chords.
‘chord-name-major7.ly’
The layout of the major 7 can be tuned withmajorSevenSymbol.
‘chord-names-bass.ly’
In ignatzek inversions, a note is dropped down to act as the bass note of the chord. Bass note may be also added explicitly. Above the staff: computed chord names. Below staff: entered chord name.‘chord-names-languages.ly’
The english naming of chords (default) can be changed to german (\germanChords replaces B and Bes to H and B), semi-german
(\semiGermanChords replaces B and Bes to H and Bb), italian
(\italianChords uses Do Re Mi Fa Sol La Si), or french
(\frenchChords replaces Re to RĂ©).
‘chord-scripts.ly’
Scripts can also be attached to chord elements.‘chord-tremolo-short.ly’
Tremolo repeats can be constructed for short tremolos (total duration smaller than 1/4) too. Only some of the beams are connected to the stems.
‘chord-tremolo-single.ly’
Chord tremolos on a single note.‘chord-tremolo-stem-direction.ly’
Stem directions influence positioning of whole note tremolo beams.‘chord-tremolo-whole.ly’
chord tremolos don’t collide with whole notes.‘chord-tremolo.ly’
Chord tremolos look like beams, but are a kind of repeat symbol. To avoid confusion, chord tremolo beams do not reach the stems, but leave a gap. Chord tremolo beams on half notes are not ambiguous, as half notes cannot appear in a regular beam, and should reach the stems.
In this example, each tremolo lasts exactly one measure.
(To ensure that the spacing engine is not confused we add some regular notes as well.)
‘chords-funky-ignatzek.ly’
Jazz chords may have unusual combinations.‘chromatic-scales.ly’
staffLineLayoutFunction is used to change the position of the notes.
This sets staffLineLayoutFunction to ly:pitch-semitones to
produce a chromatic scale with the distance between a consecutive
space and line equal to one semitone.
‘clef-oct.ly’
Octavation signs may be added to clefs. These octavation signs may be placed below or above (meaning an octave higher or lower), and can take any value, including 15 for two octaves.‘clef-ottava.ly’
Ottava brackets and clefs both modify Staff.middleCPosition, but they don’t confuse one another.‘clef-warn.ly’
Unknown clef name warning displays available clefs‘clefs.ly’
Clefs withfull-size-change should be typeset in
full size.
‘clip-systems.ly’
Clipping snippets from a finished scoreNotes:
- If system starts and ends are included, they include extents of the System grob, eg. instrument names.
- Grace notes at the end point of the region are not included
- Regions can span multiple systems. In this case, multiple EPS files are generated.
This file needs to be run separately with -dclip-systems; the
collated-files.html of the regression test does not adequately show
the results.
The result will be files named ‘base-from-start-to-end[-count].eps’.
‘cluster-break.ly’
Clusters behave well across line breaks.‘cluster-cross-staff.ly’
Clusters can be written across staves.‘cluster-single-note.ly’
don’t crash on single chord clusters.‘cluster-style.ly’
Clusters behave well across line breaks.‘cluster.ly’
Clusters are a device to denote that a complete range of notes is to be played.‘collision-2.ly’
Single head notes may collide.‘collision-alignment.ly’
Notes in different staves should be aligned to the left-most note, in case of collisions.‘collision-dots-invert.ly’
When notes are colliding, the resolution depends on the dots: notes with dots should go to the right, if there could be confusion to which notes the dots belong.‘collision-dots-move.ly’
If dotted note heads must remain on the left side, collision resolution moves the dots to the right.‘collision-dots-up-space-dotted.ly’
For collisions where the upper note is dotted and in a space, the upper is moved to right. This behavior can be tuned by prefer-dotted-right.‘collision-dots.ly’
Collision resolution tries to put notes with dots on the right side.‘collision-head-chords.ly’
Note heads in collisions should be merged if they have the same positions in the extreme note heads.‘collision-head-solfa-fa.ly’
The FA note (a triangle) is merged to avoid creating a block-shaped note.‘collision-heads.ly’
Open and black note heads are not merged by default.‘collision-manual.ly’
Collision resolution may be forced manually withforce-hshift.
‘collision-merge-differently-dotted.ly’
IfNoteCollision has
merge-differently-dotted = ##t note
heads that have differing dot counts may be merged anyway. Dots
should not disappear when merging similar note heads.
‘collision-merge-differently-headed.ly’
Ifmerge-differently-headed is enabled, then
open note heads may be merged with black noteheads, but only
if the black note heads are from 8th or shorter notes.
‘collision-merge-dots.ly’
When merging heads, the dots are merged too.‘collision-mesh.ly’
Oppositely stemmed chords, meshing into each other, are resolved.‘collision-seconds.ly’
Seconds do not confuse the collision algorithm too much. The best way to format this would be to merge the two Ds, but we will be happy for now if the upstem D does not collide with the downstem C.‘collision-whole.ly’
Mixed collisions with whole notes require asymmetric shifts.‘collisions.ly’
In addition to normal collision rules, there is support for polyphony, where the collisions are avoided by shifting middle voices horizontally.
‘color.ly’
Each grob can have a color assigned to it. Use the\override and \revert expressions to set the
color property.
‘completion-heads-lyrics.ly’
You can put lyrics under completion heads.‘completion-heads-multiple-ties.ly’
The Completion_heads_engraver correctly handles notes that need to be split into more than 2 parts.
‘completion-heads-polyphony.ly’
Completion heads are broken across bar lines. This was intended as a debugging tool, but it can be used to ease music entry. Completion heads are not fooled by polyphony with a different rhythm.‘completion-heads-tie.ly’
Completion heads will remember ties, so they are started on the last note of the split note.‘completion-heads.ly’
If the Note_heads_engraver is replaced by the Completion_heads_engraver, notes that cross bar lines are split into tied notes.
‘context-die-staff.ly’
a staff should die if there is reference to it.‘custos.ly’
Custodes may be engraved in various styles.‘display-lily-tests.ly’
This is a test of the display-lily-music unit. Problems are reported on the stderr of this run.‘dot-column-rest-collision.ly’
Dot columns do not trigger beam slanting too early.‘dot-flag-collision.ly’
Dots move to the right when a collision with the (up)flag happens.‘dot-rest-beam-trigger.ly’
Dotted rests connected with beams do not trigger premature beam calculations. In this case, the beam should be sloped, and there should be no programming_error() warnings.‘dot-up-voice-collision.ly’
in collisions, the stems of outer voice are added to the dot support of the inner voices.‘dots.ly’
Both noteheads and rests can have dots. Augmentation dots should never be printed on a staff line, but rather be shifted vertically. They should go up, but in case of multiple parts, the down stems have down shifted dots. In case of chords, all dots should be in a column. The dots follow the shift of rests when avoiding collisions.The priorities to print the dots are (ranked in importance):
- keeping dots off staff lines,
- keeping dots close to their note heads,
- moving dots in the direction specified by the voice,
- moving dots up.
‘double-repeat-default-volta.ly’
For volte, the style of double repeats can be set usingdoubleRepeatType.
‘double-repeat.ly’
Three types of double repeat bar line are supported.‘drums.ly’
In drum notation, there is a special clef symbol, drums are placed to their own staff positions and have note heads according to the drum, an extra symbol may be attached to the drum, and the number of lines may be restricted.‘dynamics-broken-hairpin.ly’
Broken crescendi should be open on one side.‘dynamics-glyphs.ly’
Dynamic letters are kerned, and their weight matches that of the hairpin signs. The dynamic scripts should be horizontally centered on the note head. Scripts that should appear closer to the note head (staccato, accent) are reckoned with.‘dynamics-hairpin-length.ly’
Hairpins extend to the extremes of the bound if there is no adjacent hairpin or dynamic-text. If there is, the hairpin extends to the center of the column or the bound of the text respectively.‘dynamics-line.ly’
Dynamics appear below or above the staff. If multiple dynamics are linked with (de)crescendi, they should be on the same line. Isolated dynamics may be forced up or down.‘dynamics-text-spanner-abs-dynamic.ly’
left attach dir for text crescendi starting on an absolute dynamic is changed, so cresc. and the absolute dynamic don’t overstrike.‘dynamics-text-spanner-padding.ly’
The 2nd half of the cresc. stays at a reasonable distance from the notes.‘dynamics-unbound-hairpin.ly’
Crescendi may start off-notes, however, they should not collapse into flat lines.‘easy-notation.ly’
Easy-notation (or Ez-notation) prints names in note heads. You also get ledger lines, of course.‘fermata-rest-position.ly’
Fermatas over multimeasure rests are positioned as over normal rests.
‘figured-bass-alteration.ly’
Bass figures can carry alterations.‘figured-bass-continuation-center.ly’
Pairs of congruent figured bass extender lines are vertically centered iffiguredBassCenterContinuations is set to
true.
‘figured-bass-continuation-forbid.ly’
By adorning a bass figure with\!, an extender
may be forbidden.
‘figured-bass-continuation-modifiers.ly’
Figured bass extender lines shall be broken when a figure has a different alteration, augmentation or diminishment.‘figured-bass-continuation.ly’
Figured bass extender lines run between repeated bass figures. They are switched on withuseBassFigureExtenders
‘figured-bass-implicit.ly’
Implicit bass figures are not printed, but they do get extenders.‘figured-bass-slashed-numbers.ly’
‘figured-bass-staff.ly’
Figured bass can also be added to Staff context directly. In that case, the figures must be entered with\figuremode and be directed
to an existing Staff context.
Since these engravers are on Staff level, properties
controlling figured bass should be set in Staff context.
‘figured-bass.ly’
Figured bass is created by the FiguredBass context which responds to figured bass events and rest events. You must enter these using the special\figuremode { } mode, which allows you to
type numbers, like <4 6+> and add slashes, backslashes and pluses.
You can also enter markup strings. The vertical alignment may also be tuned.
‘fill-line-test.ly’
The fill-line markup command should align texts in columns. For example, the characters in the center should form one column.‘finger-chords-accidental.ly’
Scripts left of a chord avoid accidentals.‘finger-chords-order.ly’
Ordering of the fingerings depends on vertical ordering of the notes, and is independent of up/down direction.‘finger-chords.ly’
It is possible to associate fingerings uniquely with notes. This makes it possible to add horizontal fingerings to notes.‘fingering-cross-staff.ly’
Fingerings work correctly with cross-staff beams.‘fingering.ly’
Automatic fingering tries to put fingering instructions next to noteheads.‘flags-default.ly’
Default flag styles: ’(), ’mensural and ’no-flag. Compare all three methods to print them: (1) C++ default implementation, (2) Scheme implementation using the ’flag-style grob property and (3) setting the ’flag property explicitly to the desired Scheme function. All three systems should be absolutely identical.‘flags-in-scheme.ly’
The ’flag property of the Stem grob can be set to a custom scheme function to generate the glyph for the flag.‘follow-voice-break.ly’
The line-spanners connects to the Y position of the note on the next line. When put across line breaks, only the part before the line break is printed.
‘follow-voice-consecutive.ly’
The voice follower is not confused when set for consecutive sets of staff switches.‘font-bogus-ligature.ly’
TM and No should not be changed into trademark/number symbols. This may happen with incorrect font versions.‘font-family-override.ly’
The default font families for text can be overridden withmake-pango-font-tree
‘font-kern.ly’
Text set in TrueType Fonts that contain kerning tables, are kerned.‘font-name.ly’
Other fonts can be used by settingfont-name for
the appropriate object. The string should be a Pango font description
without size specification.
‘font-postscript.ly’
This file demonstrates how to load different (postscript) fonts. The file ‘font.scm’ shows how to define the scheme-functionmake-century-schoolbook-tree.
This file should be run with the TeX and extra options should be passed to LaTeX and dvips to help it find the uncb font.
‘fret-boards.ly’
Frets can be assigned automatically. The results will be best when one string number is indicated in advance‘fret-diagrams.ly’
‘general-scheme-bindings.ly’
This file tests various Scheme utility functions.‘generic-output-property.ly’
As a last resort, the placement of grobs can be adjusted manually, by
setting the extra-offset of a grob.
‘glissando-broken.ly’
If broken, Glissandi anticipate on the pitch of the next line.‘glissando-no-break.ly’
Glissandi are not broken. Here a\break is ineffective.
Use breakable grob property to override.
‘glissando.ly’
Between notes, there may be simple glissando lines. Here, the first two glissandi are not consecutive.The engraver does no time-keeping, so it involves some trickery to get << { s8 s8 s4 } { c4 \gliss d4 } >> working correctly.
‘grace-auto-beam.ly’
The autobeamer is not confused by grace notes.‘grace-bar-line.ly’
Bar line should come before the grace note.‘grace-bar-number.ly’
Grace notes do tricky things with timing. If a measure starts with a grace note, the measure does not start at 0, but earlier. Nevertheless, lily should not get confused. For example, line breaks should be possible at grace notes, and the bar number should be printed correctly.‘grace-beam.ly’
Grace beams and normal beams may occur simultaneously. Unbeamed grace notes are not put into normal beams.‘grace-direction-polyphony.ly’
The\voiceOne setting is retained after
finishing the grace section.
‘grace-end-2.ly’
Grace notes at the end of an expression don’t cause crashes.‘grace-end.ly’
Grace notes after the last note do not confuse the timing code.‘grace-nest1.ly’
Grace code should not be confused by nested sequential music containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example.‘grace-nest2.ly’
Grace code should not be confused by nested sequential music containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example.‘grace-nest3.ly’
In nested syntax, graces are still properly handled.‘grace-nest4.ly’
Also in the nested syntax here, grace notes appear rightly.‘grace-nest5.ly’
Graces notes may have the same duration as the main note.‘grace-part-combine.ly’
Grace notes may be put in apartcombiner.
‘grace-partial.ly’
A\partial may be combined with a
\grace.
‘grace-staff-length.ly’
Stripped version of trip.ly. Staves should be of correct length.‘grace-start.ly’
Pieces may begin with grace notes.‘grace-stem-length.ly’
Stem lengths for grace notes should be shorter than normal notes, if possible. They should never be longer, even if that would lead to beam quanting problems.‘grace-stems.ly’
HerestartGraceMusic should set no-stem-extend to
true; the two grace beams should be the same here.
‘grace-sync.ly’
Grace notes in different voices/staves are synchronized.‘grace-types.ly’
There are three different kinds of grace types: the base grace switches to smaller type, the appoggiatura inserts also a slur, and the acciaccatura inserts a slur and slashes the stem.‘grace-unfold-repeat.ly’
When grace notes are entered with unfolded repeats, line breaks take place before grace notes.‘grace-volta-repeat-2.ly’
A volta repeat may begin with a grace. Consecutive ending and starting repeat bars are merged into one:||:.
‘grace-volta-repeat.ly’
Repeated music can start with grace notes. Bar checks preceding the grace notes do not cause synchronization effects.‘grace.ly’
You can have beams, notes, chords, stems etc. within a\grace section. If there are tuplets, the grace notes will not
be under the brace.
Main note scripts do not end up on the grace note.
‘graphviz.ly’
The graphviz feature draws dependency graphs for grob properties.‘grid-lines.ly’
With grid lines, vertical lines can be drawn between staves synchronized with the notes.‘grob-tweak.ly’
With the\tweak function, individual grobs that
are directly caused by events may be tuned directly.
‘hairpin-barline-break.ly’
If a hairpin ends on the first note of a new stave, we do not print that ending. But on the previous line, this hairpin should not be left open, and should end at the bar line.‘hairpin-circled.ly’
Hairpins can have circled tips. A decrescendo del niente followed by a crescendo al niente should only print one circle.‘hairpin-dashed.ly’
Hairpin crescendi may be dashed.‘hairpin-ending.ly’
Hairpin dynamics start under notes if there are no text-dynamics. If there are text dynamics, the hairpin does not run into them.‘hairpin-to-barline-mark.ly’
’to-barline is not confused by very long marks.‘hairpin-to-barline.ly’
Hairpins whose end note is preceded by a bar line should end at that bar line.‘hairpin-to-rest.ly’
Hairpins end at the left edge of a rest.‘hara-kiri-percent-repeat.ly’
Staves with percent repeats are not killed.‘hara-kiri-pianostaff.ly’
Hara-kiri staves kill themselves if they are empty. This example really contains three staves, but as they progress, empty ones are removed: this example has three staves, but some of them disappear: note how the 2nd line only has the bar number 2. (That the bar number is printed might be considered a bug, however, the scenario of all staves disappearing does not happen in practice.)Any staff brackets and braces are removed, both in the single staff and no staff case.
This example was done with a pianostaff, which has fixed distance alignment; this should not confuse the mechanism.
‘hara-kiri-stanza-number.ly’
stanza numbers remain, even on otherwise empty lyrics lines.‘harp-pedals-sanity-checks.ly’
The harp-pedal markup function does some sanity checks. All the diagrams here violate the standard (7 pedals with divider after third), so a warning is printed out, but they should still look okay.‘harp-pedals-tweaking.ly’
Harp pedals can be tweaked through the size, thickness and harp-pedal-details properties of TextScript.‘harp-pedals.ly’
Basic harp diagram functionality, including circled pedal boxes. The third diagram uses an empty string, the third contains invalid characters. Both cases will create warnings, but should still not fail with an error.‘horizontal-bracket-break.ly’
Horizontal brackets connect over line breaks.‘horizontal-bracket.ly’
Note grouping events are used to indicate where analysis brackets start and end.‘identifier-following-chordmode.ly’
Identifiers following a chordmode section are not interpreted as chordmode tokens. In the following snippet, the identifier ‘m’ is not interpreted by the lexer as as a minor chord modifier.‘identifiers.ly’
test identifiers.‘incipit.ly’
Incipit can be printed using an InstrumentName grob.‘instrument-name-dynamic.ly’
Instrument names (aligned on axis group spanners) ignore dynamic and pedal line spanners.
‘instrument-name-hara-kiri.ly’
PianoStaff.instrument and
PianoStaff.instr are removed when the staves are killed off.
In this example, the 2nd staff (marked by the barnumber 2) disappears as does the instrument name.
‘instrument-name-markup.ly’
Instrument names are set withStaff.instrument and
Staff.instr. You can enter markup texts to create more funky names,
including alterations.
‘instrument-name-partial.ly’
Instrument names are also printed on partial starting measures.‘instrument-name-x-align.ly’
Instrument names horizontal alignment is tweaked by changing theStaff.Instrument #'self-alignment-X property. The
\layout variables indent and short-indent define
the space where the instrument names are aligned before the first and
the following systems, respectively.
‘instrument-name.ly’
Staff margins are also markings attached to barlines. They should be left of the staff, and be centered vertically with respect to the staff. They may be on normal staves, but also on compound staves, like the PianoStaff.
‘instrument-switch.ly’
TheswitchInstrument music function modifies
properties for an in staff instrument switch.
‘key-clefs.ly’
Each clef has its own accidental placing rules.‘key-signature-cancellation-extra-natural.ly’
IfextraNatural is set then keys that are not
altered farther away (eg from sharp to double sharp) are
cancelled. Otherwise only keys that do not occur in the new key
signature are cancelled.
‘key-signature-cancellation.ly’
Key cancellation signs consists of naturals for pitches that are not in the new key signature. Naturals get a little padding so the stems don’t collide.‘key-signature-padding.ly’
With thepadding-pairs property, distances
between individual key signature items can be adjusted.
‘key-signature-scordatura.ly’
By settingStaff.keySignature directly,
key signatures can be set invidually per pitch.
‘keys.ly’
Key signatures may appear on key changes, even without a barline.
In the case of a line break, the restoration accidentals are printed at
end of a line. If createKeyOnClefChange is set, key signatures
are created also on a clef change.
‘laissez-vibrer-tie-beam.ly’
\laissezVibrer ties on beamed notes don’t trigger
premature beam slope calculation.
‘laissez-vibrer-ties.ly’
l.v. ties should avoid dots and staff lines, similar to normal ties.
They have fixed size. Their formatting can be tuned with
tie-configuration.
‘landscape.ly’
Scores may be printed in landcape mode.‘ledger-line-minimum.ly’
When ledgered notes are very close, for example, in grace notes, they are kept at a minimum distance to prevent the ledgers from disappearing.‘ledger-line-shorten.ly’
Ledger lines are shortened when they are very close. This ensures that ledger lines stay separate.‘ledger-lines-varying-staves.ly’
Ledger lines should appear at every other location for a variety of staves using bothline-count and
line-positions.
‘ligature-bracket.ly’
The ligature bracket right-end is not affected by other voices.‘lily-in-scheme.ly’
LilyPond syntax can be used inside scheme to build music expressions, with the#{ ... #} syntax.
Scheme forms can be introduced inside these blocks by escaping
them with a $, both in a LilyPond context or in a Scheme
context.
In this example, the \withpaddingA, \withpaddingB and
\withpaddingC music functions set different kinds of padding on
the TextScript grob.
‘line-arrows.ly’
Arrows can be applied to text-spanners and line-spanners (such as the Glissando)‘line-dash-small-period.ly’
Generate valid postscript even if dash-period is small compared to line thickness.‘line-dashed-period.ly’
The period of a dashed line is adjusted such that it starts and ends on a full dash.‘line-style-zigzag-spacing.ly’
Setting'zigzag style for spanners does not
cause spacing problems: in this example, the first text markup and
zigzag trillspanner have the same outside staff positioning as
the second markup and default trillspanner.
‘line-style.ly’
Cover all line styles available‘lyric-combine-new.ly’
With the\lyricsto mechanism, individual lyric
lines can be associated with one melody line. Each lyric line
can be tuned to either follow or ignore melismata.
‘lyric-combine-polyphonic.ly’
Polyphonic rhythms and rests do not disturb\lyricsto.
‘lyric-combine-switch-voice-2.ly’
switching voices in the middle of the lyrics is possible usinglyricsto.
‘lyric-combine-switch-voice.ly’
Switching the melody to a different voice works even if the switch occurs together with context instantiation.‘lyric-combine.ly’
Lyrics can be set to a melody automatically. Excess lyrics will be discarded. Lyrics will not be set over rests. You can have melismata either by setting a property melismaBusy, or by setting automaticMelismas (which will set melismas during slurs and ties). If you want a different order than first Music, then Lyrics, you must precook a chord of staves/lyrics and label those. Of course, the lyrics ignore any other rhythms in the piece.‘lyric-extender-broken.ly’
Lyric extenders run to the end of the line if it continues the next line. Otherwise, it should run to the last note of the melisma.‘lyric-extender-no-heads.ly’
Extender engraver also notices the lack of note heads. Here the extender ends on the 2nd quarter note, despite the grace note without a lyric attached.‘lyric-extender-rest.ly’
IfextendersOverRests is set, an extender
is not terminated upon encountering a rest.
‘lyric-extender-right-margin.ly’
Extenders will not protrude into the right margin‘lyric-extender.ly’
A LyricExtender may span several notes. A LyricExtender does not extend past a rest, or past the next lyric syllable.‘lyric-hyphen-break.ly’
Hyphens are printed at the beginning of the line only when they go past the first note.‘lyric-hyphen-retain.ly’
The minimum distance between lyrics is determined by theminimum-distance of LyricHyphen and
LyricSpace.
The ideal length of a hyphen is determined by its length
property, but it may be shortened down to minimum-length in
tight situations. If in this it still does not fit, the hyphen will be
omitted.
Like all overrides within \lyricsto and \addlyrics, the
effect of a setting is delayed is one syllable.
‘lyric-hyphen.ly’
In lyrics, hyphens may be used.‘lyric-melisma-manual.ly’
Melisma’s may be entered manually by substituting_ for lyrics on notes that are part of the melisma.
‘lyric-no-association-rhythm.ly’
When lyrics are not associated with specific voices, the lyric placement should follow lyric rhythms. In particular, the second syllable here should not be attached to the first note of the first staff.‘lyric-phrasing.ly’
Normally, the lyric is centered on the note head. However, on melismata, the text is left aligned on the left-side of the note head.
‘lyric-tie.ly’
Tildes in lyric syllables are converted to tie symbols.‘lyrics-after-grace.ly’
Lyrics are ignored for aftergrace notes.‘lyrics-bar.ly’
Adding a Bar_engraver to the Lyrics context makes sure that
lyrics do not collide with barlines.
‘lyrics-melisma-beam.ly’
Melismata are triggered by manual beams.‘lyrics-no-notes.ly’
Lyric syllables without note attachment are not centered. Centering may cause unintended effects when the paper column is very wide.‘lyrics-tenor-clef.ly’
Lyrics are not lowered despite the presence of an octavation 8.‘markup-arrows.ly’
The feta font has arrow heads‘markup-bidi-pango.ly’
A single pango string is considered to have one direction. The hebrew in this example (including punctuation) is set right-to-left, with the first word (containing 1) on the right.‘markup-column-align.ly’
Fixed horizontal alignment of columns of text can be set using \left-column, \center-column and \right-column.‘markup-commands.ly’
test various markup commands.‘markup-eps.ly’
The epsfile markup command reads an EPS file‘markup-line-thickness.ly’
The thickness setting between markup lines and other lines is consistent.‘markup-lines.ly’
Text that can spread over pages is entered with the\markuplines command.
‘markup-music-glyph.ly’
Reset fontname for musicglyph. For unknown glyphs, we print a warning.‘markup-note-dot.ly’
A dotted whole note displayed via the\note
command must separate the note head and the dot. The dot avoids the upflag.
‘markup-note.ly’
The note markup function may be used to make metronome markings. It works for a variety of flag, dot and duration settings.‘markup-scheme.ly’
There is a Scheme macromarkup to produce markup
texts using a similar syntax as \markup.
‘markup-score.ly’
Use \score block as markup command.‘markup-stack.ly’
Markup scripts may be stacked.‘markup-syntax.ly’
Demo of markup texts, using LilyPond syntax.‘markup-user.ly’
Users may define non-standard markup commands using thedefine-markup-command scheme macro.
‘markup-word-wrap.ly’
The markup commands\wordwrap and \justify
produce simple paragraph text.
‘measure-grouping.ly’
TheMeasure_grouping_engraver adds triangles and
brackets above beats when the beats of a time signature are grouped.
‘mensural-ligatures.ly’
Mensural ligatures show different shapes, depending on the rhythmical pattern and direction of the melody line.‘mensural.ly’
There is limited support for mensural notation: note head shapes are available. Mensural stems are centered on the note heads, both for up and down stems.‘metronome-marking.ly’
Here\tempo directives are printed as metronome markings.
The marking is left aligned with the time signature, if there is one.
‘metronome-parenthesized.ly’
Using an empty text in the metronome marks, one can generate parenthesized tempo marks.
‘metronome-text.ly’
The tempo command supports text markup and/or duration=count. Using the Score.hideTempoNote, one can hide the duration=count in the tempo mark.
‘midi-drums.ly’
Midi can create drums.‘midi-dynamics.ly’
Midi also handles crescendo and decrescendo, either starting and ending from specified or unspecified sound level.‘midi-grace.ly’
Grace notes don’t intrroduce syncing problems: the last note off will appear at tick 768 (2 * 384).‘midi-lyric-barcheck.ly’
Lyrics in MIDI are aligned to ties and beams: this examples causes no bar checks in MIDI.‘midi-microtone-off.ly’
Microtonal shifts should be corrected before the start of the next (possibly grace) note.‘midi-microtone.ly’
The pitch wheel is used for microtones.‘midi-partial.ly’
MIDI and partial measures work together.‘midi-pedal.ly’
Pedals. Runtimidity -idvvv file.midi |grep Midi
to see midi events.
‘midi-scales.ly’
Converting LilyPond input to MIDI and then again back withmidi2ly.py is a reversible procedure in some simple cases,
which mean that the original .ly -file and the one converted
back from the generated .midi -file do not differ.
Here are produced some scales.
‘midi-transposition.ly’
should deliver f’ in MIDI‘midi-tuplets.ly’
Midi2ly tuplet test.
python scripts/midi2ly.py --duration-quant=32 \ --allow-tuplet=4*2/3 \ --allow-tuplet=8*2/3 \ --allow-tuplet=4*3/5 \ --allow-tuplet=8*3/5 \ tu.midi
‘midi-volume-equaliser.ly’