4 Scheme functions (LilyPond Internals Reference)

## 4 Scheme functions

Function: accidental->text-markup alteration ¶

  Return accidental glyph markup for alteration, to be used in text.

Function: add-bar-glyph-print-procedure glyph proc ¶

  Specify the single glyph glyph that calls print procedure proc.

  The procedure proc has to be defined in the form `(make-...-bar-line is-span grob extent)` even if the arguments is-span and extent are not used within the routine.

Function: ly:add-context-mod contextmods modification ¶

  Adds the given context modification to the list contextmods of context modifications.

Function: add-grace-property context-name grob sym val ¶

  Set sym=val for grob in context-name.

Function: ly:add-interface iface desc props ¶

  Add a new grob interface. iface is the interface name, desc is the interface description, and props is the list of user-settable properties for the interface.

Function: ly:add-listener callback disp cl ¶

  Add the single-argument procedure callback as listener to the dispatcher disp. Whenever disp hears an event of class cl, it calls callback with it.

Function: add-new-clef clef-name clef-glyph clef-position transposition c0-position ¶

  Add a new clef to the list of supported clefs.

  The arguments clef-name, clef-glyph, clef-position, and transposition are used to add an entry to the `supported-clefs` alist. Arguments clef-glyph and c0-position extend `c0-pitch-alist`.

Function: ly:add-option sym val description rest ¶

  Add program option sym with default value val and docstring description.

  LilyPond uses this function to define Scheme options available on the command line (given by `-d` or `--define-default`).

  After start-up, command-line Scheme options are provided to LilyPond by function `ly:command-line-options`, which returns a key-value alist where all values are Scheme strings. Use the optional argument `#:type` to specify how such a value string for key sym should be processed by `ly:set-option`.

  - If set to symbol `string`, don’t do any further conversion and accept the value as a string. This is also necessary if a potentially fitting type predicate gets defined after LilyPond’s command-line option handling (for example, `ly:duration?`). In such cases, type checking should be performed manually later on.
  - If set to symbol `string-or-boolean`, do the same as with `string` but convert strings `"#f"` and `"#t"` to Boolean values.
  - If set to symbol `string-or-false`, do the same as with `string` but convert a string value `"#f"` to Boolean value `#f`.
  - If set to a procedure, handle the value as a Scheme expression and use the procedure as a predicate to check whether the value fits. This is also the default behaviour if `#:type` is not set, using `boolean?` as the procedure.
  - If set to a list, handle the value as a Scheme expression and check whether it is one of the list’s elements (using `equal?` for the comparison test).

  ‘Handling as a Scheme expression’ means that the string gets passed to the `read` Scheme function, which stops reading after the first complete Scheme expression has been parsed. As a consequence, both strings `"foo"` and `"foo bar"` get converted to symbol `foo`, while a string `"(foo"` causes an error because the Scheme expression is not complete.

  Passing `#:internal? #t` makes the option an internal option, not displayed in the `lilypond -dhelp` output (but displayed in `lilypond -dhelp-internal`.

  Passing `#:accumulative? #t` makes the option accumulative, which gathers `-d` values in a list instead of letting the last `-d` flag overwrite the others.

Function: add-simple-time-signature-style style proc ¶

  Specify the procedure proc returning markup for a time signature style style. The procedure is called with one argument, the pair `(numerator . denominator)`.

Function: add-stroke-glyph stencil grob dir stroke-style flag-style ¶

  Add a stroke glyph (from the music font) to the given flag stencil.

  This is an auxiliary function for `create-glyph-flag`.

Function: add-stroke-straight stencil grob dir log stroke-style offset length thickness stroke-thickness ¶

  Add an acciaccatura stroke to the given flag stencil.

  This is an auxiliary function for `straight-flag`.

Function: add-to-tag-group tag-group tags ¶

  Add the given tags to the existing tag-group symbol list.

  Returns `#f` if successful, and an error message if the tag-group does not exist or if there is a conflicting tag group definition for one of the symbols in tags.

Function: alist->hash-table lst ¶

  Convert alist lst to a table.

  Warning: The resulting hash table is hashed by identity. This actually corresponds to the `alist->hashq-table` function of Guile’s `(ice-9 hash-table)` module, not `alist->hash-table`.

Function: alist-keys alist ¶

  Get the keys of alist, not necessarily sorted or unique.

Function: ly:all-grob-interfaces ¶

  Return the hash table with all grob interface descriptions.

Function: ly:all-options ¶

  Get all option settings in an alist.

Function: ly:all-output-backend-commands ¶

  Return the list of extra output backend commands that are used internally in file `lily/stencil-interpret.cc`.

Function: ly:all-stencil-commands ¶

  Return the list of stencil commands that can be defined in the output modules (in files `output-*.scm`).

Function: ly:all-stencil-expressions ¶

  Return all symbols recognized as stencil expressions.

Function: allow-volta-hook bar-glyph ¶

  Allow the volta bracket hook being drawn over bar line bar-glyph.

Function: alterations-in-key pitch-list ¶

  Count number of sharps minus number of flats.

Function: ly:angle x y ¶

  Calculate angle in degrees of given vector. With one argument, x is a number pair indicating the vector. With two arguments, x and y specify the respective coordinates.

Function: angle-0-2pi angle ¶

  Take angle (in radians) and map it between 0 and 2pi.

Function: angle-0-360 angle ¶

  Take angle (in degrees) and map it between 0 and 360 degrees.

Function: ly:append-to-option var val ¶

  Add value val to an accumulative program option var.

  See also function `ly:add-option`.

Function: apply-tag-operating-markup prop-val-modificator music ¶

  Apply prop-val-modificator to tag markup in music.

  Iterate over `music` to find markups that use the `\tag`-command. Markups are recognized in the music properties `text` and `value` of the iterated music objects. If the value of the property contains tag markups, the `prop-val-modificator` is applied to it and the modified value is updated accordingly.

Function: approximate-pitch-note-head::calc-direction grob ¶

  Choose a direction for arrow note heads.

  This function assumes that the head style is set to `arrow`. When the head is at the end of the stem, which is the expected case, point the head in the opposite direction of the stem. Otherwise, point the head away from the center of the staff.

Function: array-copy/subarray! src dst offsets … ¶

  Similar to `array-copy`, but takes extra parameters for the start of a subarray where to copy. For example:

      (let ((arr (make-array 'a 4 4))
            (to-copy (make-array 'b 2 2)))
        (array-copy/subarray! to-copy arr 2 1)
        arr)
      ⇒
      #2((a a a a)
         (a a a a)
         (a b b a)
         (a b b a))

Function: arrow-stencil x y thick staff-space grob ¶

  Return a right-pointing, filled arrow-head, where x determines the basic horizontal position and y determines the basic vertical position. Both values are adjusted using staff-space, which is `StaffSymbol`’s staff space. thick is the used line thickness.

Function: arrow-stencil-maker start? end? ¶

  Return a function drawing a line from current point to `destination`, with optional arrows of `max-size` on start and end controlled by start? and end?.

Function: ascend-to-context m context [id [mods]] ¶

  Like `context-spec-music`, but only ascending.

Macro: assert … ¶

  Use `(assert condition)` or `(assert condition extra-failure-message)` to check that condition is true, and raise an error otherwise. Use this for conditions that should always be true, barring bugs; raise a more informative error if protecting against a user error.

Function: ly:assoc-get key alist default-value strict-checking ¶

  Return value if key in alist, else default-value (or `#f` if not specified). If strict-checking is set to `#t` and key is not in alist, a programming error is output.

Function: assoc-get _ _ [_ [_]] ¶

  - LilyPond procedure: ly:assoc-get (SCM key, SCM alist, SCM default_value, SCM strict_checking)

  Return value if key in alist, else default-value (or `#f` if not specified). If strict-checking is set to `#t` and key is not in alist, a programming error is output.

Function: at-bar-line-substitute-caesura-type substitute-type ¶

  At a bar line, create the caesura using substitute-type rather than the value of `caesuraType`.

Function: ly:axis-group-interface::add-element grob grob-element ¶

  Add grob-element to the axis group grob. In particular, grob becomes parent to grob-element on all axes supported by grob, unless the parents are already set.

Function: ly:bar-line::calc-anchor grob ¶

  Calculate the anchor position of a bar line. The anchor is used for the correct placement of bar numbers, etc.

Function: bar-line::calc-break-visibility grob ¶

  Calculate the visibility of a bar line at line breaks.

Function: bar-line::calc-glyph-name grob ¶

  Return the name of the bar line glyph printed by grob for the actual break direction.

Function: bar-line::calc-glyph-name-for-direction glyphs dir ¶

  Find the glyph name for a bar line. `glyphs` is the list of bar-line types to consider in order. Each must have been defined with `define-bar-line`. dir is the break direction to consider: `LEFT` = end of line, `CENTER` = middle of line, `RIGHT` = start of line.

Function: bar-line::compound-bar-line grob bar-glyph extent ¶

  Build the bar line stencil.

Function: bar-line::draw-filled-box x-ext y-ext thickness extent grob ¶

  Return a straight bar line created by `ly:round-filled-box` looking at x-ext, y-ext, and thickness. The blot is calculated from extent and grob. y-ext is not necessarily equal to extent.

Function: ly:bar-line::print grob ¶

  The print routine for bar lines.

Function: bar-line::widen-bar-extent-on-span grob extent ¶

  Widen the bar line extent towards span bars adjacent to grob grob.

Function: ly:base64-encode bv ¶

  Encode the given bytevector as a base 64 string.

Function: ly:basic-progress str rest ¶

  A Scheme callable function to issue a basic progress message str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: beam-exceptions time-sig time-signature-settings ¶

  Get the `beamExceptions` value for time-sig from time-signature-settings.

  time-sig must be a sane, canonical time signature.

Function: beat-base time-sig time-signature-settings ¶

  Get the `beatBase` value for time-sig from time-signature-settings.

  time-sig must be a sane, canonical time signature.

  If there is no entry, derive a value from time-sig.

Function: beat-structure base time-sig time-signature-settings ¶

  Get the `beatStructure` value for time-sig from time-signature-settings, scaled to base units.

  time-sig must be a sane, canonical time signature.

  If there is no entry, derive a structure from time-sig.

Function: bend::arrow-head-stencil thickness x-y-coords height width dir ¶

  Return an arrow head stencil, calculated from the given dimensions height and width, and translated to x-y-coords, the end of the bend-spanners (curved) line.

Function: bend::calc-bend-x-begin bend-spanner bounding-noteheads factor quarter-tone-diffs ¶

  Calculate the starting values in x direction of the bend. After a line break, the values from the right bound are taken minus 1.5 staff spaces. For bends-down or if grob property `'style` equals to `'pre-bend`, `'hold` or `'pre-bend-hold`, `interval-center` is applied the topmost note head of the starting note heads. In any other case the right edge of the starting note head is used. The value of `BendSpanner.details.horizontal-left-padding` is added, which may be changed by an appropriate override. Returns a list of the same length as the amount of bend-starting note heads.

Function: bend::calc-bend-x-end bend-spanner top-left-tab-nhd top-right-tab-nhd ¶

  Calculate the ending x coordinate of bend-spanner. At the line end, take the items of `BreakAlignGroup` into account and a little bit of padding. Ends an unbroken spanner or the last of a broken one in the middle of the topmost note head of its bounding note column.

Function: bend::target-cautionary spanner ¶

  Set `'parenthesized` of all relevant note heads of spanners right bound to `#t`. This procedure is the default value of `'before-line-breaking`.

Function: bend::text-string spanner ¶

  Take a spanner grob and calculate a list with the quarter tone diffs between the pitches of starting and ending bound. Because bending to different amounts is very unlikely, only the first element of this list is returned as a string.

Function: bend-spanner::print grob ¶

  Return the final stencil. A line and curve, an arrow head and a text representing the amount a string is bent.

Function: ly:bezier-extent control-points axis ¶

  Compute the extent of the Bézier curve defined by control-points along axis.

Function: ly:bezier-extract control-points t-min t-max ¶

  Return a sub-curve of the Bézier curve defined by control-points. The sub-curve is delimited by the curve points indexed by t-min and t-max (between 0 and 1, 0 = first control point, 1 = last control point). A sub-curve of a Bézier curve is in turn a Bézier curve.

Function: bit-list->byte-list bit-list ¶

  Convert the given list of bits (booleans), whose length must be a multiple of 8, into a list of bytes (integers between 0 and 255).

Function: bit-list->int bit-list ¶

  Convert the given list of booleans to the number that it represents in binary.

Function: ly:book? x ¶

  Is x a smob of class `Book`?

Function: ly:book-add-bookpart! book-smob book-part ¶

  Add book-part to book-smob book part list.

Function: ly:book-add-score! book-smob score ¶

  Add score to book-smob score list.

Function: ly:book-book-parts book ¶

  Return book parts in book.

Function: book-first-page layout props ¶

  Return the `'first-page-number` of the entire book.

Function: ly:book-header book ¶

  Return header in book.

Function: ly:book-paper book ¶

  Return paper in book.

Function: ly:book-process book-smob default-paper default-layout output ¶

  Print book. output is passed to the backend unchanged. For example, it may be a string (for file based outputs) or a socket (for network based output).

Function: ly:book-process-to-systems book-smob default-paper default-layout output ¶

  Print book. output is passed to the backend unchanged. For example, it may be a string (for file based outputs) or a socket (for network based output).

Function: ly:book-scores book ¶

  Return scores in book.

Function: ly:book-set-header! book module ¶

  Set the book header.

Function: box-grob-stencil grob ¶

  Make a box of exactly the extents of the grob. The box precisely encloses the contents.

Function: box-stencil stencil thickness padding ¶

  Add a box around stencil, producing a new stencil.

  The spacing characteristics are preserved if either a `\hspace` or a `\vspace` command (with either positive or negative values) gets boxed. This means that padding and thickness added to an empty extent will not participate in spacing and is not recognized by skylines.

Function: ly:bp num ¶

  num bigpoints (1/72th inch).

Function: ly:bracket a iv t p ¶

  Make a bracket in direction a. The extent of the bracket is given by iv. The wings protrude by an amount of p, which may be negative. The thickness is given by t.

Function: bracketify-stencil stil axis thick protrusion padding ¶

  Add brackets around stil, producing a new stencil.

Function: break-alignable-interface::self-alignment-of-anchor g ¶

  Return a value for g’s `self-alignment-X` that will place g on the same side of the reference point defined by a `break-aligned` item such as a `Clef`.

Function: break-alignable-interface::self-alignment-opposite-of-anchor g ¶

  Return a value for g’s `self-alignment-X` that will place g on the opposite side of the reference point defined by a `break-aligned` item such as a `Clef`.

Function: ly:break-alignment-interface::find-nonempty-break-align-group ¶

  Find the `BreakAlignGroup` with the given break-align-symbol in this `BreakAlignment`. Return `#f` if there is no such group. Also return `#f` if the group has empty `X-extent`, which can happen if it contains only omitted items.

Function: break-alignment-list end-of-line middle begin-of-line ¶

  Return a callback that calculates a value based on a grob’s break direction.

Function: ly:broadcast disp ev ¶

  Send the stream event ev to the dispatcher disp.

Function: byte-list->bit-list byte-list ¶

  Convert a list of bytes (integers between 0 and 255) into a list of bits (booleans).

Function: caesura-script-interface::before-line-breaking script ¶

  Callback for `CaesuraScript` grob. Eliminate scripts aligned to bar lines if they might collide with a span bar. Some types of bar lines have visible span bars and some don’t. For consistent notation, we don’t check whether particular `SpanBar` grobs are actually visible, just that they exist.

Function: caesura-to-bar-line-or-divisio context caesura-type observations ¶

  `caesuraTypeTransform` callback to print articulated caesurae as chant breath marks using the infrastructure for modern bar lines when possible.

Function: caesura-to-divisio context caesura-type observations ¶

  `caesuraTypeTransform` callback to print articulated caesurae as chant breath marks.

Function: ly:cairo-output-stencil basename stencil paper formats ¶

  dump a single stencil through the Cairo backend

Function: ly:cairo-output-stencils basename stencils header paper formats ¶

  dump book through cairo backend

Function: calc-harmonic-pitch pitch music ¶

  Calculate the harmonic pitches in music given pitch as the non-harmonic pitch.

Function: calc-measure-length time-sig ¶

  Calculate the measure length for time-sig.

  time-sig must be a sane, canonical time signature.

Function: calc-pattern-element pattern-list factor ¶

  First and last relevant value of the probably nested number list pattern-list, supposed to be a sorted list, are used to determine how to scale. factor is the multiplier for the found value. The returned new list drops the first element of pattern-list.

Function: calc-submeasure-structure base time-sig time-signature-settings ¶

  Get the `submeasureStructure` value for time-sig.

  Look up the value in time-signature-settings and scale it to base units. If there is no entry, derive a structure from time-sig.

  time-sig must be a sane, canonical time signature.

Function: ly:camel-case->lisp-identifier name-sym ¶

  Convert `FooBar_Bla` to `foo-bar-bla` style symbol.

Function: centered-spanner-interface::calc-x-offset grob ¶

  Compute the shift from this spanner’s reference point to a point centered between two non-musical columns, according to the `spacing-pair` property. This also takes `self-alignment-X` into account. The default for `spacing-pair` is `'(break-alignment . break-alignment)`.

Function: centered-stencil stencil ¶

  Center stencil stencil in both the x and y directions.

Function: ly:chain-assoc-get key achain default-value strict-checking ¶

  Return value for key from a list of alists achain. If no entry is found, return default-value or `#f` if default-value is not specified. With strict-checking set to `#t`, a programming error is output in such cases.

Function: chain-assoc-get _ _ [_ [_]] ¶

  - LilyPond procedure: ly:chain-assoc-get (SCM key, SCM achain, SCM default_value, SCM strict_checking)

  Return value for key from a list of alists achain. If no entry is found, return default-value or `#f` if default-value is not specified. With strict-checking set to `#t`, a programming error is output in such cases.

Function: change-pitches music converter ¶

  Recurse through music, applying converter to pitches. converter is typically a transposer or an inverter (see file `scm/modal-transforms.scm`), but may be user-defined. The converter function must take a single pitch as its argument and return a new pitch. These are LilyPond Scheme pitches, e.g., `(ly:make-pitch 0 2 0)`.

Function: check-context-path path [location] #:default default ¶

  Check a context property path specification path, a symbol list (or a single symbol), for validity and possibly complete it. Returns the completed specification, or `#f` when rising an error (using optionally location).

  The `#:default default` option specifies the context name to return when path does not include one. The default is `'Bottom`.

Function: ly:check-expected-warnings ¶

  Check whether all expected warnings have really been triggered.

Function: check-grob-path path rest … ¶

  Check a grob path specification path, a symbol list (or a single symbol), for validity and possibly complete it. Returns the completed specification, or `#f` if invalid, optionally using location for an error message. If an optional keyword argument `#:start start` is given, the parsing starts at the given index in the sequence ‘`Context.Grob.property.sub-property...`’, with the default of ‘`0`’ implying the full path.

  If there is no valid first element of path fitting at the given path location, an optionally given `#:default default` is used as the respective element instead without checking it for validity at this position.

  The resulting path after possibly prepending default can be constrained in length by optional arguments `#:min min` and `#:max max`, defaulting to ‘`1`’ and unlimited, respectively.

Function: check-music-path path rest … ¶

  Check a music property path specification path, a symbol list (or a single symbol), for validity and possibly complete it. Returns the completed specification, or `#f` when rising an error (using optionally location).

Function: chord-name:german-lowercase-name-markup pitch lowercase? ¶

  Return German lowercase note name markup for pitch.

  Argument lowercase? is ignored.

Function: chord-name:german-markup german? ¶

  Return German note name markup with accidental glyphs for pitch.

  This function displays pitch B as letter H. If german? is not `#f`, display pitch B-flat as letter B. If equal to `#f`, display this pitch as letter B with a flat.

  If lowercase? is not `#f`, a lowercase note name is returned, otherwise the first character gets capitalized.

  This is a callback function for either the `chordRootNamer` or the `chordNoteNamer` context property.

Function: chord-name:italian-markup french? ¶

  Return Italian note name markup with accidental glyphs for pitch.

  If french? is not `#f`, French note names are returned (for example, ‘ré’ instead of ‘re’ for pitch D).

  If lowercase? is not `#f`, a lowercase note name is returned, otherwise the first character gets capitalized.

  This is a callback function for either the `chordRootNamer` or the `chordNoteNamer` context property.

Function: chord-name:markup language ¶

  Return note name markup with accidental glyphs for pitch.

  Argument language sets the language used to display the pitch name (see file `define-note-names.scm` for available values); if this symbol is missing or set to `#f`, the current input language is used.

  If lowercase? is not `#f`, a lowercase note name is returned, otherwise the first character gets capitalized.

  This is a callback function for either the `chordRootNamer` or the `chordNoteNamer` context property.

Function: chord-name:name-markup language ¶

  Return note name markup for pitch.

  If lowercase? is not `#f`, a lowercase note name is returned, otherwise the first character gets capitalized.

  Use function `pitch->name` to get a pitch name without accidentals.

  Argument language sets the language used to display the pitch name; if this symbol is missing or set to `#f`, the current input language is used.

  This is a callback function for either the `chordRootNamer` or the `chordNoteNamer` context property.

Function: circle-stencil stencil thickness padding [bbox] ¶

  Add a circle around stencil, producing a new stencil.

  If optional argument bbox is set to `#t`, use the bounding box of stencil as the circle’s diameter. Otherwise, use either the width or height of stencil (whatever is larger).

Function: clef-modifier::print grob ¶

  Callback for `ClefModifier` grob.

Function: clef-transposition-markup oct style ¶

  The transposition sign formatting function. oct is supposed to be a string holding the transposition number, style determines the way the transposition number is displayed.

Function: closest-staff-line staff-symbol nhd-staff-pos ¶

  Return the line-position of staff-symbol which is closest to nhd-staff-pos.

Function: ly:cm num ¶

  num cm.

Function: collect-book-music-for-book book music ¶

  Book music handler.

Function: collect-bookpart-for-book book-part ¶

  Top-level book-part handler.

Function: collect-music-aux score-handler music ¶

  Pass music to score-handler, with preprocessing for page layout instructions.

Function: collect-music-for-book music ¶

  Top-level music handler.

Function: ly:command-line-code ¶

  The Scheme code specified on the command line with option `-e`.

Function: ly:command-line-options ¶

  The Scheme options specified on the command line with option `-d`.

  Return a key-value alist, with keys being symbols and values being strings.

Function: comparator-from-key key cmp ¶

  Return a comparator function that applies key to the two elements and compares the results using cmp. Especially useful for sorting.

Function: ly:connect-dispatchers to from ¶

  Make the dispatcher to listen to events from from.

Function: construct-chord-elements root duration modifications ¶

  Build a chord on root using modifiers in modifications. `NoteEvents` have duration duration.

  Notes: Natural 11 is left from chord if not explicitly specified.

  Entry point for the parser.

Function: ly:context? x ¶

  Is x a smob of class `Context`?

Function: ly:context-alias? context name ¶

  Is name the name or an alias of context?

Function: ly:context-children context ¶

  Return a list with the children contexts of context.

Function: ly:context-current-moment context ¶

  Return the current moment of context.

Function: ly:context-def? x ¶

  Is x a smob of class `Context_def`?

Function: ly:context-def-lookup def sym val ¶

  Return the value of sym in context definition def (e.g., `\Voice`). If no value is found, return val or `'()` if val is undefined. sym can be any of ‘`default-child`’, ‘`consists`’, ‘`description`’, ‘`aliases`’, ‘`accepts`’, ‘`property-ops`’, ‘`context-name`’, ‘`group-type`’.

Function: ly:context-def-modify def mod ¶

  Return the result of applying the context-mod mod to the context definition def. Does not change def.

Function: ly:context-event-source context ¶

  Return `event-source` of context.

Function: ly:context-events-below context ¶

  Return a `stream-distributor` that distributes all events from context and all its subcontexts.

Function: ly:context-find context name ¶

  Find a context with name or alias name, first considering context and then searching its ancestors. Return `#f` if not found.

Function: ly:context-grob-definition context name ¶

  Return the definition of name (a symbol) within context as an alist.

Function: ly:context-id context ¶

  Return the ID string of context, i.e., for `\context Voice = "one" …` return the string `one`.

Function: ly:context-matched-pop-property context grob cell ¶

  This undoes a particular `\override`, `\once \override` or `\once \revert` when given the specific alist pair to undo.

Function: ly:context-mod? x ¶

  Is x a smob of class `Context_mod`?

Function: ly:context-mod-apply! context mod ¶

  Apply the context modification mod to context.

Function: ly:context-name context ¶

  Return the name of context, i.e., for `\context Voice = "one" …` return the symbol `Voice`.

Function: ly:context-output-def context ¶

  Return the output definition of context.

Function: ly:context-parent context ¶

  Return the parent of context, `#f` if none.

Function: ly:context-property context name rest ¶

  Get the value of property name visible in context. The first rest argument may optionally be an alternative value to return when the property value is `'()`. Following that, there may appear keyword options:

  > `#:default`

  >   The value to return when the property is not set. When this option is absent, the same value is returned as when the property value is `'()`.

  > `#:search-ancestors?`

  >   `#f` limits the search to context. The default is `#t`.

Function: ly:context-property-pop context name ¶

  Remove the top entry from the stack for property name in context context and set or unset the property. If the stack is empty, throw `ly:context-property-stack-underflow` and do not change the property.

Function: ly:context-property-push context name ¶

  Add the current value (or lack thereof) of property name in context context to a context-specific stack. The state should be restored later with a paired `ly:context-property-pop` for the same context and property.

Function: ly:context-property-where-defined context name def ¶

  Return the context above context where property name is defined, or def (defaulting to `'()`) if no such context is found.

Function: ly:context-pushpop-property context grob eltprop val ¶

  Do `\temporary \override` or `\revert` operation in context. The grob definition grob is extended with eltprop (if val is specified) or reverted (if unspecified).

Function: ly:context-schedule-moment context moment ¶

  Add moment (which must lie in the future) to the list of moments to process for the global context governing context. This makes it possible for translators (engravers, performers) to act at moments not directly created by user input.

Function: ly:context-set-property! context name val ¶

  Set value of property name in context to val.

Function: context-spec-music m context [id [mods]] ¶

  Add `\context context = id \with mods` to m.

Function: ly:context-unset-property context name ¶

  Unset value of property name in context.

Function: copy-repeat-chord original-chord repeat-chord duration event-types ¶

  Copy all events in event-types (be sure to include `rhythmic-events`) from original-chord over to repeat-chord with their articulations filtered as well. Any duration is replaced with the specified duration.

Function: count-list lst ¶

  Given lst as `(E1 E2 .. )`, return `((E1 . 1) (E2 . 2) ... )`.

Function: create-glyph-flag flag-style dir-modifier grob ¶

  Create a flag stencil by looking up the glyph from the music font.

  This is an auxiliary function for `mensural-flag`, `glyph-flag`, and `normal-flag`.

Function: cross-staff-connect stem ¶

  Set cross-staff property of the stem to this function to connect it to other stems automatically

Function: cue-substitute quote-music ¶

  Must happen after `quote-substitute`.

Function: cyclic-base-value value cycle ¶

  Take value (for example, an angle) and modulo-maps it between 0 and base cycle.

Function: ly:debug str rest ¶

  A Scheme callable function to issue a debug message str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: default-flag grob ¶

  Create a flag stencil for the stem.

  The flag style is derived from the `style` property of grob (which must be of type `Flag`).

  By default, LilyPond uses a C++ function (which is slightly faster) to do exactly the same as this function. However, if you want to modify the default flags this function can be used to obtain the default flag stencil, which can then be modified at will.

  The available, predefined values for `style` are `""` (empty, for normal flags), `"mensural"`, and `"no-flag"`. Other values are used to construct glyph names for flags; see function `glyph-flag` for details.

  Example:

      \override Flag.stencil = #default-flag
      \override Flag.style = #'mensural

Function: ly:default-scale ¶

  Get the global default scale.

Function: define-bar-line bar-glyph eol-glyph bol-glyph span-glyph ¶

  Define a bar glyph bar-glyph and its substitutes at the end of a line (eol-glyph), at the beginning of a line (bol-glyph) and as a span bar (span-glyph).

  After definition, bar-glyph is accepted as an argument to the `\bar` command. To distinguish bar lines with the same unbroken glyph, bar-glyph may be annotated with text after a hyphen, as in the predefined `\bar ".|:-|"` and `\bar ".|:-||"`.

  The substitute glyphs may be either strings or booleans.

  The value `#f` or the string `"x"` call for no glyph. Unlike `#f`, `"x"` may be annotated and may be used in bar-glyph, as in the predefined `\bar "x-."`. The empty string, `""`, calls for a zero-width stencil; it also may be annotated, as in the predefined `\bar "-span|"`.

  The value `#t` calls for the same value as bar-glyph. Note that this includes any annotations, which can affect things like which span bar is chosen or whether a volta bracket closes.

  See List of bar lines.

Function: define-deprecated-property category-type-symbol deprecated-symbol deprecated-type? #:new-symbol new-symbol #:new->old new->old #:old->new old->new #:warning warning ¶

  If warning is #f, a default warning will be generated.

Function: define-event-class class parent ¶

  Defines a new event `class` derived from `parent`, a previously defined event class.

Macro: define-event-function … ¶

  Like `define-music-function`, but the return value must be a post-event.

Function: define-fonts paper define-font define-pango-pf ¶

  Return a string of all fonts used in paper, invoking the functions define-font and define-pango-pf for producing the actual font definition.

Macro: define-markup-command … ¶

  Define a markup function. Syntax:

      (define-markup-command (command layout props arg1 arg2 …)
                             (type1? type2? …)
                             [ #:properties ((property1 default1)
                                             (property2 default2)
                                             …) ]
          [ #:category category ]
          [ #:as-string expression ]
          [ "doc-string" ]
          command-body)

  This macro defines the markup function `command-markup`. When this function is applied as

      (command-markup layout props arg1 arg2 …)

  it executes command-body, a sequence of S-expression similar to the body of a `define` form. The body should return a stencil.

  type1?, type2?, etc., are type predicates for the arguments arg1, arg2, etc. doc-string is an optional description of the command; this can be retrieved using `procedure-documentation` on `command-markup`, and is used for built-in markup commands to generate the documentation.

  Moreover, this macro defines a helper function `make-command-markup`, which can be applied as

      (make-command-markup arg1 arg2 …)

  (without `layout` and `props` arguments). This yields a markup. Interpreting it, using `(interpret-markup markup layout props)`, invokes `command-markup` as above.

  The specified properties are available as `let`-bound variables in the command body, using the respective default value as fallback in case the property is not found in `props`, or `#f` if no default was given. `props` itself is left unchanged: if you want defaults specified in that manner passed down into other markup functions, you need to adjust `props` yourself.

  If the `as-string` named argument is given, it should be an expression, which is evaluated by `markup->string` when lossily converting markups to strings. The expression can use all variables available in the main body, namely `layout`, `props`, the arguments, and the properties. However, in many cases `layout` will be `#f` because such an output definition is not available (such as for MIDI output). This case must be accounted for. The expression can recursively call `markup->string`, passing it `#:layout layout #:props props`.

  The auto-generated documentation makes use of some optional specifications that are otherwise ignored:

  - category is either a symbol or a symbol list specifying the categories for this markup command in the docs.
  - As an element of the ‘properties’ list, you may directly use `command-markup` instead of a `(property default)` to indicate that this markup command is called by the newly defined command, adding its properties to the documented properties of the new command. There is no protection against circular definitions.

  Some object properties are attached to the resulting `command-markup` function according to the parameters of the definition: `markup-command-signature`, `markup-function-category`, `markup-function-properties`.

Macro: define-markup-list-command … ¶

  Same as `define-markup-command`, but defines a command that, when interpreted, returns a list of stencils instead of a single one.

  Markup list commands are recognizable programmatically by having the `markup-list-function?` object property to `#t`.

Macro: define-music-function … ¶

  Define and return a music function. Syntax:

      (define-music-function (arg1 arg2 …)
                             (type1? type2? …)
          function-body)

  type1?, type2?, etc., can take one of the forms `predicate?` for mandatory arguments satisfying the predicate, `(predicate?)` for optional parameters of that type defaulting to `#f`, `(predicate? value)` for optional parameters with a specified default value (evaluated at definition time). An optional parameter can be omitted in a call only when it cannot get confused with a following parameter of different type.

  A music function must return a music expression.

Macro: define-scheme-function … ¶

  Like `define-music-function`, but the return type is not restricted to music.

Macro: define-syntax-function … ¶

  Helper macro for `ly:make-music-function`. Syntax:

      (define-syntax-function result-type?
                              (arg1 arg2 …)
                              (type1? type2? …)
        function-body)

  See `define-music-function` for information on type predicates. `result-type?` can specify a default in the same manner as predicates, to be used in case of a type error in arguments or result.

Function: define-tag-group tags ¶

  Define a tag group consisting of the given tags, a list of symbols. Returns `#f` if successful, and an error message if there is a conflicting tag group definition.

Macro: define-void-function … ¶

  Like `define-music-function`, but the return value must be the special ‘`*unspecified*`’ value (i.e., what most Guile functions with “unspecified” value return). Use this when defining functions for executing actions rather than returning values, to keep LilyPond from trying to interpret the return value.

Function: degrees->radians angle-degrees ¶

  Convert the given angle from degrees to radians.

Function: ly:deprecation-warning str rest ¶

  Issue the warning str about the use of a deprecated feature.

  The message is formatted with `format`; rest holds the formatting arguments (if any).

  Duplicate warnings are suppressed. Duplicates are recognized by the formatted message, not by the format string alone. Including highly variable information in the message (e.g., the arguments passed to a deprecated function) will defeat this check and consume more memory. This function returns `#f` if it did not log the message.

  Do not use this function merely as a rate-limited warning. There may be program options affecting the handling of deprecation warnings that are not appropriate for warnings in general.

Function: descend-to-context m context [id [mods]] ¶

  Like `context-spec-music`, but only descending.

Function: determine-split-list evl1 evl2 chord-range ¶

  Event lists evl1 and evl2 should be ascending. chord-range is a pair of numbers `(min . max)` defining the distance in steps between notes that may be combined into a chord or unison.

Function: determine-string-fret-finger context notes specified-info rest ¶

  Determine string numbers and frets for playing notes as a chord, given specified information specified-info. specified-info is a list with two list elements, specified strings `defined-strings` and specified fingerings `defined-fingers`. Only a fingering of 0 will affect the fret selection, as it specifies an open string. If `defined-strings` is `'()`, the context property `defaultStrings` is used as a list of defined strings. Looks for predefined fretboards if `predefinedFretboardTable` is not `#f`. If rest is present, it contains the `FretBoard` grob, and a fretboard gets created. Otherwise, a list of `(string fret finger)` lists is returned.

  If the context-property `supportNonIntegerFret` is set `#t`, micro-tones are supported for `TabStaff`, but not not for `FretBoards`.

Function: ly:dimension? d ¶

  Is d a dimension? Used to distinguish length variables from normal numbers.

Function: ly:dir? s ¶

  Is s a direction? Valid directions are `-1`, `0`, or `1`, where `-1` represents left or down, `1` represents right or up, and `0` represents a neutral direction.

Function: dir-basename file rest … ¶

  Strip suffixes in rest, but leave directory component for file.

Function: ly:directed direction magnitude ¶

  Calculate an `(x . y)` pair with optional magnitude (defaulting to `1.0`) and direction specified either as an angle in degrees or a coordinate pair giving the direction. If magnitude is a pair, the respective coordinates are scaled independently, useful for ellipse drawings.

Function: direction-scaled val ¶

  Returns val, scaled by `'direction` of grob. The return value is used for `extra-spacing-height` to push note columns right in `markLengthOn`.

Function: ly:disconnect-dispatchers to from ¶

  Stop the dispatcher to listening to events from from.

Function: ly:dispatcher? x ¶

  Is x a smob of class `Dispatcher`?

Function: display-lily-music expr [port] ¶

  Display the music expression expr using LilyPond syntax.

Function: display-music music [port] ¶

  Display music, not done with `music-map` for clarity of presentation.

Function: display-scheme-music obj [port] ¶

  Display obj, typically a music expression, in a friendly fashion, which often can be read back in order to generate an equivalent expression.

Function: dodecaphonic-no-repeat-rule context pitch barnum ¶

  An accidental rule that typesets an accidental before every note (just as in the dodecaphonic accidental style) except if the note is immediately preceded by a note with the same pitch. This is a common accidental style in contemporary notation.

Function: ly:duration? x ¶

  Is x a smob of class `Duration`?

Function: ly:duration<? p1 p2 ¶

  Is p1 shorter than p2?

Function: ly:duration->moment dur ¶

  Convert dur to a `moment` with no grace part.

Function: ly:duration->number dur ¶

  Convert dur to the equivalent number of whole notes.

Function: ly:duration->string dur ¶

  Convert dur to a string.

Function: ly:duration-compress dur factor ¶

  Compress dur by rational factor.

Function: ly:duration-dot-count dur ¶

  Extract the dot count from dur.

Function: duration-dot-factor dotcount ¶

  Given a count of the dots used to extend a musical duration, return the numeric factor by which they increase the duration.

Function: ly:duration-factor dur ¶

  Extract the compression factor from dur. Return it as a pair.

Function: duration-line::calc grob ¶

  Return list of values needed to print a stencil for `DurationLine`.

Function: duration-line::print grob ¶

  Return the stencil of `DurationLine`.

Function: ly:duration-log dur ¶

  Extract the duration log from dur.

Function: duration-log-factor lognum ¶

  Given a logarithmic duration number, return the length of the duration, as a number of whole notes.

Function: ly:duration-scale dur ¶

  Extract the compression factor from dur. Return it as a rational.

Function: duration-visual dur ¶

  Given a duration object, return the visual part of the duration (base note length and dot count), in the form of a duration object with non-visual scale factor 1.

Function: duration-visual-length dur ¶

  Given a duration object, return the length of the visual part of the duration (base note length and dot count), as a number of whole notes.

Function: dynamic-text-spanner::before-line-breaking grob ¶

  Monitor left bound of `DynamicTextSpanner` for absolute dynamics. If found, ensure `DynamicText` does not collide with spanner text by changing `'attach-dir` and `'padding`. Reads the `'right-padding` property of `DynamicText` to fine-tune space between the two text elements.

Function: ly:effective-prefix ¶

  Return the top-level directory of LilyPond’s data tree.

  For example, if LilyPond Scheme files are stored in directory `/foo/bar/scm` and PS files in `/foo/bar/ps`, the effective prefix is `/foo/bar`.

Function: elbowed-hairpin coords mirrored? ¶

  Create hairpin based on a list of coords in `(cons x y)` form. `x` is the portion of the width consumed for a given line and `y` is the portion of the height. For example, `'((0 . 0) (0.3 . 0.7) (0.8 . 0.9) (1.0 . 1.0))` means that at the point where the hairpin has consumed 30% of its width, it must be at 70% of its height. Once it is to 80% width, it must be at 90% height. It finishes at 100% width and 100% height. If coords does not begin with `'(0 . 0)` the final hairpin may have an open tip. For example ’(0 . 0.5) will cause an open end of 50% of the usual height.

  mirrored? indicates if the hairpin is mirrored over the y axis or if just the upper part is drawn.

  Returns a function that accepts a hairpin grob as an argument and draws the stencil based on its coordinates.

      #(define simple-hairpin
        (elbowed-hairpin '((0 . 0)(1.0 . 1.0)) #t))

      \relative c' {
        \override Hairpin #'stencil = #simple-hairpin
        a\p\< a a a\f
      }

Function: ellipse-stencil stencil thickness x-padding y-padding ¶

  Add an ellipse around stencil, padded by the padding pair, producing a new stencil.

Function: end-broken-spanner? spanner ¶

  Is spanner broken and the last of its broken siblings? See also `unbroken-or-last-broken-spanner?`.

Function: ly:engraver-announce-end-grob engraver grob cause ¶

  Announce the end of a grob (i.e., the end of a spanner) originating from given engraver instance, with grob being a grob. cause should either be another grob or a music event.

Function: ly:engraver-make-grob engraver grob-name cause ¶

  Create a grob originating from given engraver instance, with given grob-name, a symbol. cause should either be another grob or a music event.

Function: ly:engraver-make-item engraver grob-name cause ¶

  Same as `ly:engraver-make-grob`, but always create a grob with the `Item` class. This is useful when the same grob definition is used to create grobs of differing classes.

Function: ly:engraver-make-spanner engraver grob-name cause ¶

  Same as `ly:engraver-make-grob`, but always create a grob with the `Spanner` class. This is useful when the same grob definition is used to create grobs of differing classes.

Function: ly:engraver-make-sticky engraver grob-name host cause ¶

  Utility function to create a grob sticking to another grob. This acts like either `ly:engraver-make-item` or `ly:engraver-make-spanner`, depending on the class of the host. Additionally, the host is made the parent of the newly created sticky grob on the y axis and, for items, on the x axis. Sticky spanners take their bounds from their host and their end is announced with the end of the host.

  Sticky grobs must have the `sticky-grob-interface` interface, see sticky-grob-interface.

Function: ensure-list item-or-list-of-items ¶

  Ensure the argument is a list. If it is not put it in one.

Function: ly:error str rest ¶

  A Scheme callable function to issue the error str. The error is formatted with `format`; rest holds the formatting arguments (if any).

Function: eval-carefully symbol module default … ¶

  Check whether all symbols in expression symbol are reachable in module module. In that case evaluate, otherwise print a warning and set an optional default.

Function: ly:event? obj ¶

  Is obj a proper (non-rhythmic) `Event` object?

Function: event-chord-notes event-chord ¶

  Return a list of all notes from event-chord.

Function: event-chord-pitches event-chord ¶

  Return a list of all pitches from event-chord.

Function: event-chord-reduce music ¶

  Reduce event chords in music to their first note event, retaining only the chord articulations. Returns the modified music.

Function: event-chord-wrap! music ¶

  Wrap isolated rhythmic events and non-postevent events in music inside of an `EventChord`. Chord repeats ‘`q`’ are expanded using the default settings of the parser.

Function: ly:event-deep-copy m ¶

  Copy m and all sub-expressions of m.

Function: event-has-articulation? event-type stream-event ¶

  Is event-type in the `articulations` list of the music causing stream-event?

Function: ly:event-length event moment ¶

  Return the length of a stream event. If `moment` is not given, this is just the event’s `length` property. If `moment` is given and is an in-grace moment (i.e. having non-zero, usually negative, grace part), then the length of the stream event is returned as a grace-only moment. In any case, thus, the effective length of the stream event when happening at `moment` is returned.

Function: ly:event-property sev sym val ¶

  Get the property sym of stream event sev. If sym is undefined, return val or `'()` if val is not specified.

Function: ly:event-set-property! ev sym val ¶

  Set property sym in event ev to val.

Function: expand-repeat-chords! event-types music ¶

  Walk through music and fill repeated chords (notable by having a duration in `duration`) with the notes from their respective predecessor chord.

Function: expand-repeat-notes! music ¶

  Walk through music and give pitchless notes (not having a pitch in `pitch` or a drum type in `drum-type`) the pitch(es) from the predecessor note/chord if available.

Function: ly:expect-warning str rest ¶

  Register str as an expected warning that should be suppressed.

  If this Scheme-callable function does not encounter the given warning, a warning about the missing warning is shown. If the same warning occurs multiple times, this function must be called multiple times, too.

  str should usually be tagged as being translated with `(G_ ...)`, and rest holds the expected parameter values.

  Example:

      (ly:expect-warning (G_ "Bar number is ~a; expected ~a") 3 15)

  It is also possible to use a truncated version of the expected warning as the value for str (i.e., the beginning of the two strings must match). However, it is recommended to compare str with the full message to avoid potential hits with other, almost identical warnings.

Function: extract-beam-exceptions music ¶

  Create a value useful for setting `beamExceptions` from music.

Function: extract-music music pred? ¶

  Return a flat list of all music matching pred? inside of music, not recursing into matches themselves.

Function: extract-named-music music music-name ¶

  Return a flat list of all music named music-name (either a single event symbol or a list of alternatives) inside of music, not recursing into matches themselves.

Function: ly:extract-subfont-from-collection collection-file-name idx subfont-file-name ¶

  Extract the subfont of index idx in TrueType collection (TTC) or OpenType/CFF collection (OTC) file collection-file-name and write it to file subfont-file-name.

Function: extract-typed-music music type ¶

  Return a flat list of all music with type (either a single type symbol or a list of alternatives) inside of music, not recursing into matches themselves.

Function: figured-bass-continuation::print grob ¶

  Callback for `BassFigureContinuation` grobs.

Function: fill-integer-interval iv ¶

  Return a new list based upon iv, supposed to be an ordered interval of numbers. This new list contains the interval bounds and every integer between them.

Function: ly:find-file name strict ¶

  Return the absolute file name of name. By default, if the file is not found, return `#f`. If the optional parameter strict is passed as `#t`, raise an error in this case instead.

Function: find-named-props prop-name grob-descriptions ¶

  Used by `\magnifyMusic` and `\magnifyStaff`. If grob-descriptions is equal to the `all-grob-descriptions` alist (defined in `scm/define-grobs.scm`), this finds all grobs that can have a value for the prop-name property, and return them as a list in the following format:

      '((grob prop-name)
        (grob prop-name)
        ...)

Function: find-pitch-entry keysig pitch accept-global accept-local ¶

  Return the first entry in keysig that matches pitch by note name and octave. Alteration is not considered. accept-global states whether key signature entries should be included. accept-local states whether local accidentals should be included. If no matching entry is found, `#f` is returned.

Function: finger-glide::print grob ¶

  The stencil printing procedure for grob `FingerGlideSpanner`. Depending on the grob property `style` several forms of appearance are printed. Possible settings for grob property `style` are `zigzag`, `trill`, `dashed-line`, `dotted-line`, `stub-left`, `stub-right`, `stub-both`, `bow`, `none` and `line`, which is the default.

Function: first-assoc keys lst ¶

  Return first successful assoc of key from keys in lst.

Function: first-broken-spanner? spanner ¶

  Is spanner broken and the first of its broken siblings? See also `unbroken-or-first-broken-spanner?`.

Function: first-member members lst ¶

  Return first successful member (of member) from members in lst.

Function: flat-flag grob ¶

  A callback function for `Flag.stencil` to get a flat flag.

  The up-stem and down-stem angles of the flags are both 0 degrees. If the caller sets the `stroke-style` property of grob to the string `"grace"`, add a slash through the flag.

  This function returns a stencil.

Function: flat-zip-longest lsts … ¶

  Return a list made of the first element from the first list, then the first element from the second list, …, the second element from the first list, …, until all lists are exhausted. For example:

      (flat-zip-longest '(a b c d) '(e f) '(g h i)) ⇒ '(a e g b f h c i d)

Function: flatten-list x ¶

  Unnest list.

Function: flip-stencil axis stil ¶

  Flip stencil stil in the direction of axis. Value `X` (or `0`) for axis flips it horizontally. Value `Y` (or `1`) flips it vertically. stil is flipped in place; its position, the coordinates of its bounding box, remains the same.

Function: fold-some-music pred? proc init music ¶

  This works recursively on music like `fold` does on a list, calling ‘`(pred? music)`’ on every music element. If `#f` is returned for an element, it is processed recursively with the same initial value of ‘`previous`’, otherwise ‘`(proc music previous)`’ replaces ‘`previous`’ and no recursion happens. The top music is processed using init for ‘`previous`’.

Function: fold-values proc lst inits … ¶

  A variant of `fold` that works on one list only, but allows proc to return multiple values, and can itself return multiple values. The calls to proc are `(proc list-elem previous1 previous2 …)`. Note that the inits arguments are given after lst in the signature, unlike `fold`.

Function: ly:font-config-add-directory dir ¶

  Add directory dir to FontConfig.

Function: ly:font-config-add-font font ¶

  Add font font to FontConfig.

Function: ly:font-config-display-fonts port ¶

  List all fonts visible to FontConfig, together with directory information.

  Optional argument port selects the output port; the default is `(current-error-port)`.

Function: ly:font-config-get-font-file name ¶

  Get the file for font name, as found by FontConfig.

Function: ly:font-design-size font ¶

  Given the font metric font, return the design size, relative to the current `output-scale`.

Function: ly:font-file-name font ¶

  Given the font metric font, return the corresponding file name.

Function: ly:font-get-glyph font name ¶

  Return a stencil from font for the glyph named name. If the glyph is not available, return an empty stencil.

  Note that this command can only be used to access glyphs from fonts loaded with `ly:system-font-load`; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodings `fetaMusic` and `fetaBraces`, respectively.

Function: ly:font-glyph-name-to-index font name ¶

  Return the index for name in font.

  Note that this command can only be used to access glyphs from fonts loaded with `ly:system-font-load`; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodings `fetaMusic` and `fetaBraces`, respectively.

Function: ly:font-index-to-charcode font index ¶

  Return the character code for index in font.

  Note that this command can only be used to access glyphs from fonts loaded with `ly:system-font-load`; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodings `fetaMusic` and `fetaBraces`, respectively.

Function: ly:font-magnification font ¶

  Given the font metric font, return the magnification, relative to the current `output-scale`.

Function: ly:font-metric? x ¶

  Is x a smob of class `Font_metric`?

Function: ly:font-name font ¶

  Given the font metric font, return the corresponding name.

Function: font-name-split font-name ¶

  Return `(font-name . design-size)` from font-name string or `#f`.

Function: for-some-music stop? music ¶

  Walk through music, process all elements calling stop? and only recurse if this returns `#f`.

Function: ly:format str rest ¶

  LilyPond specific format function, supporting `~a` and `~[0-9]f`. Basic support for `~s` is also provided.

Function: ly:format-output context ¶

  Given a global context in its final state, process it and return the `Music_output` object in its final state.

Function: format-segno-mark-considering-bar-lines segno-number context ¶

  When bar lines incorporate segni, print no mark for the first segno because that would be redundant. Print the usual marks for later segni to avoid ambiguity.

Function: fret->pitch fret ¶

  Calculate a pitch given fret for the harmonic.

Function: fret-parse-terse-definition-string props definition-string ¶

  Parse a fret diagram string that uses terse syntax; return a pair containing props, modified to include the string-count determined by definition-string, and a fret indication list with the appropriate values.

Function: function-chain arg function-list ¶

  Apply a list of functions in function-list to arg. Each element of function-list is structured `(cons function '(arg2 arg3 ...))`. If function takes arguments besides arg, they are provided in function-list. Example:

      (function-chain 1 `((,+ 1) (,- 2) (,+ 3) (,/)))
         ⇒ 1/3

Function: generate-crop-stencil paper-book ¶

  Returns a stencil for the cropped output of the given Paper_book

Function: generate-preview-stencil paper-book ¶

  Returns a stencil for a preview of given Paper_book

Function: ly:generic-bound-extent grob common ¶

  Determine the extent of grob relative to common along the x axis, finding its extent as a bound when it a has `bound-alignment-interfaces` property list set and otherwise the full extent.

Function: ly:get-all-function-documentation ¶

  Get a hash table with all LilyPond Scheme extension functions.

Function: ly:get-all-translators ¶

  Return a list of all translator objects that may be instantiated.

Function: get-bound-note-heads spanner ¶

  Take a spanner grob and return a pair containing all note heads of the initial starting and the final `NoteColumn`.

Function: ly:get-cff-offset font-file-name idx ¶

  Get the offset of the ‘CFF’ table for font-file-name, returning it as an integer. The optional idx argument is useful for OpenType/CFF collections (OTC) only; it specifies the font index within the OTC. The default value of idx is 0.

Function: get-chord-shape shape-code tuning base-chord-shapes ¶

  Return the chord shape associated with shape-code and tuning in the hash-table base-chord-shapes.

Function: ly:get-context-mods contextmod ¶

  Returns the list of context modifications stored in contextmod.

Function: ly:get-font-format font-file-name idx ¶

  Get the font format for font-file-name, returning it as a symbol. The optional idx argument is useful for TrueType Collections (TTC) and OpenType/CFF collections (OTC) only; it specifies the font index within the TTC/OTC. The default value of idx is 0.

Function: ly:get-option var ¶

  Get a global option setting.

Function: get-postscript-bbox string ¶

  Extract the bounding box from string, or return `#f` if not present.

Function: ly:get-spacing-spec from-scm to-scm ¶

  Return the spacing spec going between the two given grobs, from-scm and to-scm.

Function: get-tweakable-music mus ¶

  When tweaking music, return a list of music expressions where the tweaks should be applied. Relevant for music wrappers and event chords.

Function: glyph-flag flag-style ¶

  A callback for function `default-flag` to get a flag glyph.

  This function actually constructs a function returning a stencil, expecting a single argument, grob.

  It looks up glyph `flags.StyleDirLog` in the music font and uses it for the flag stencil. Style is the flag style based on flag-style (which can be empty), Dir is the flag direction (either ‘`u`’ or ‘`d`’), and Log the duration log (an integer in the range 3 to 10) from which the number of flags attached to the stem is derived. Both Dir and Log are taken from grob. Example: `flags.u3`.

  If `grob` has the `stroke-style` property set, add a second glyph with the same glyph name components but use its value instead for log. Example: `flags.ugrace`.

  Not to be used with mensural flags, which have a slightly different naming scheme (see function `mensural-flag`).

Function: ly:grob? x ¶

  Is x a smob of class `Grob`?

Function: grob::all-objects grob ¶

  Return a list of the names and contents of all properties having type `ly:grob?` or `ly:grob-array?` for all interfaces supported by grob grob.

Function: grob::compose-function func data ¶

  Create a callback entity func to be stored in a grob property, based on the grob property data data (which can be plain data, a callback itself, or an unpure-pure container).

  Function or unpure-pure container func accepts a grob and a value and returns another value. Depending on the type of data, func is used for building a grob callback or an unpure-pure container.

Function: grob::directional-value value-when-negative value-when-positive #:controlling-property controlling-property #:default default ¶

  grob callback generator for returning a value depending on the sign of the numeric property identified by the `#:controlling-property` argument.

  Values for negative and positive cases are required. The `#:default` argument specifies the return value when the controlling property is zero.

  The three possible return values of the callback are stored as a list in the callback’s `callback-range` object property from where they can be retrieved for documentation purposes.

Function: grob::display-objects grob ¶

  Display all objects stored in properties of grob grob.

Function: grob::inherit-parent-property axis property default … ¶

  grob callback generator for inheriting a property from an axis parent, defaulting to default if there is no parent or the parent has no setting.

Function: grob::name grob ¶

  Return the name of the grob grob as a symbol.

Function: grob::offset-function func data rest … ¶

  Create a callback entity func to be stored in a grob property, based on the grob property data data (which can be plain data, a callback itself, or an unpure-pure container).

  Function func accepts a grob and returns a value that is added to the value resulting from data. Optional argument plus defaults to ‘`+`’ but may be changed to allow for using a different underlying accumulation.

  If data is `#f` or `'()`, it is not included in the sum.

Function: grob::relay-directional-property negative-property positive-property #:controlling-property controlling-property #:default default #:default-property default-property ¶

  grob callback generator for returning the value of another property depending on the sign of the numeric property identified by the `#:controlling-property` argument.

  The `#:default` argument specifies the value to return when any lookup fails.

  Property names for negative and positive cases are required. The optional `#:default-property` argument identifies a property to relay when the controlling value is zero; if none is provided, the default value is returned.

Function: grob::relay-other-property property ¶

  grob callback generator for returning the value of another property, which is identified by the symbol property.

Function: grob::rhythmic-location grob ¶

  Return a pair consisting of the measure number and moment within the measure of grob grob.

Function: grob::unpure-Y-extent-from-stencil pure-function ¶

  The unpure height will come from a stencil whereas the pure height will come from `pure-function`.

Function: grob::when grob ¶

  Return the global timestep (a `Moment`) of grob grob.

Function: ly:grob-alist-chain grob global ¶

  Get an alist chain for grob grob, with global as the global default. If unspecified, there is no global default.

Function: ly:grob-array? x ¶

  Is x a smob of class `Grob_array`?

Function: ly:grob-array->list grob-arr ¶

  Return the elements of grob-arr as a Scheme list.

Function: ly:grob-array-filter predicate grob-arr ¶

  Like `filter`, return a new grob array containing the elements of grob-arr that satisfy predicate. Order is preserved.

Function: ly:grob-array-length grob-arr ¶

  Return the length of grob-arr.

Function: ly:grob-array-ref grob-arr index ¶

  Retrieve the indexth element of grob-arr.

Function: ly:grob-basic-properties grob ¶

  Get the immutable properties of grob.

Function: ly:grob-chain-callback grob proc sym ¶

  Find the callback that is stored as property sym of grob grob and chain proc to the head of this, meaning that it is called using grob and the previous callback’s result.

Function: ly:grob-common-refpoint grob other axis ¶

  Find the common refpoint of grob and other for axis.

Function: ly:grob-common-refpoint-of-array grob others axis ¶

  Find the common refpoint of grob and others (a grob-array) for axis.

Function: ly:grob-default-font grob ¶

  Return the default font for grob grob.

Function: ly:grob-extent grob refp axis ¶

  Get the extent in axis direction of grob relative to the grob refp.

Function: ly:grob-get-vertical-axis-group-index grob ¶

  Get the index of the vertical axis group the grob grob belongs to; return `-1` if none is found.

Function: ly:grob-interfaces grob ¶

  Return the interfaces list of grob grob.

Function: ly:grob-layout grob ¶

  Get `\layout` definition from grob grob.

Function: ly:grob-list->grob-array grob-list ¶

  Convert a Scheme list of grobs to a grob array.

Function: ly:grob-object grob sym val ¶

  Return the value of a pointer in grob grob of property sym. When sym is undefined in grob, it returns val if specified or `'()` (end-of-list) otherwise. The kind of properties this taps into differs from regular properties. It is used to store links between grobs, either grobs or grob arrays. For instance, a note head has a `stem` property, the stem grob it belongs to. Just after line breaking, all those grobs are scanned and replaced by their relevant broken versions when applicable.

Function: ly:grob-original grob ¶

  Return the unbroken original grob of grob, grob may be an item or spanner.

Function: ly:grob-parent grob axis def ¶

  Get the parent of grob. axis is `0` for the x axis, `1` for the y axis. If grob has no parent on this axis (yet), return def, or `'()` if def is not specified.

Function: ly:grob-pq<? a b ¶

  Compare two grob priority queue entries. This is an internal function.

Function: ly:grob-properties? x ¶

  Is x a smob of class `Grob_properties`?

Function: ly:grob-property grob sym val ¶

  Return the value for property sym of grob. If no value is found, return val or `'()` if val is not specified.

Function: ly:grob-property-data grob sym ¶

  Return the value for property sym of grob, but do not process callbacks.

Function: ly:grob-pure-height grob refp beg end val ¶

  Return the pure height of grob given refpoint refp. If no value is found, return val or `'()` if val is not specified.

Function: ly:grob-pure-property grob sym beg end val ¶

  Return the pure value for property sym of grob. If no value is found, return val or `'()` if val is not specified.

Function: ly:grob-pure-relative-coordinate grob refp start end ¶

  Return the pure vertical coordinate of grob relative to refp between start and end.

Function: ly:grob-relative-coordinate grob refp axis ¶

  Get the coordinate in axis direction of grob relative to the grob refp.

Function: ly:grob-robust-relative-extent grob refp axis ¶

  Get the extent in axis direction of grob relative to the grob refp, or `(0,0)` if empty.

Function: ly:grob-script-priority-less a b ¶

  Compare two grobs by script priority. For internal use.

Function: ly:grob-set-nested-property! grob symlist val ¶

  Set nested property symlist in grob grob to value val.

Function: ly:grob-set-object! grob sym val ¶

  Set sym in grob grob to value val.

Function: ly:grob-set-parent! grob axis parent-grob ¶

  Set parent-grob as the parent of grob grob in axis axis.

Function: ly:grob-set-property! grob sym val ¶

  Set sym in grob grob to value val.

Function: ly:grob-spanned-column-rank-interval grob ¶

  Return a pair with the `rank` of the furthest left column and the `rank` of the furthest right column spanned by `grob`.

Function: ly:grob-staff-position sg ¶

  Return the y position of sg relative to the staff.

Function: ly:grob-suicide! grob ¶

  Kill grob.

Function: ly:grob-system grob ¶

  Return the system grob of grob.

Function: grob-transformer property func ¶

  Create an override value good for applying func to either pure or unpure values. func is called with the respective grob as first argument and the default value (after resolving all callbacks) as the second.

Function: ly:grob-translate-axis! grob d a ¶

  Translate grob on axis a over distance d.

Function: ly:grob-vertical<? a b ¶

  Does a lie above b on the page?

Function: group-into-ranges lst ¶

  Turn a (possibly unsorted) list of integers into a sorted list of ranges, represented as pairs. For example:

      (group-into-ranges '(1 4 3 6 7 2)) ⇒ ((1 . 4) (6 . 7))

Function: ly:gulp-file filename [size] ¶

  Same as `ly:gulp-file-utf8`, but decode the file as Latin 1. Warning: this is rarely what you want; consider using `ly:gulp-file-utf8` instead.

Function: ly:gulp-file-utf8 filename [size] ¶

  Find a file on the search path (with `ly:find-file`), and return its contents decoded as UTF-8. Raise an error if the file is not found.

  If the optional argument size is given, read at most size characters (not bytes) from the file.

Function: ly:has-glyph-names? font-file-name idx ¶

  Does the font for font-file-name have glyph names? The optional idx argument is useful for TrueType Collections (TTC) and OpenType/CFF collections (OTC) only; it specifies the font index within the TTC/OTC. The default value of idx is 0.

Function: ly:hash-table-keys tab ¶

  Return a list of keys in tab.

Function: headers-property-alist-chain headers ¶

  Take a list of `\header` blocks (Guile modules). Return an alist chain containing all of their bindings where the names have been prefixed with `header:`. This alist chain is suitable for interpreting a markup in the context of these headers.

Function: hook-stencil x y staff-space thick blot grob ¶

  Return a hook stencil where x determines the horizontal position and y determines the basic vertical position. The final stencil is adjusted vertically using staff-space, which is `StaffSymbol`’s staff space, and uses blot, which is the current `'blot-diameter`. The stencil’s thickness is usually taken from grob `'details`, thick serves as a fallback value.

Function: horizontal-script::calc-staff-position val ¶

  Set `staff-position` for horizontal script definitions in the alist for context property `scriptDefinitions`. This opens the possibility to set `Y-offset` or `staff-position` by `override` or `tweak`. Directly setting `Y-offset` in script definitions blocks this. val should usually be zero, but can be any other number in order to insert some offset from zero in y-axis direction.

Function: horizontal-script::extra-spacing-height grob ¶

  Set `extra-spacing-height` for horizontal script to `item::extra-spacing-height-including-staff` to avoid overlapping with surrounding note columns.

Function: ly:in-event-class? ev cl ¶

  Does event ev belong to event class cl?

Function: ly:inch num ¶

  num inches.

Function: index-map f lsts … ¶

  Applies f to corresponding elements of lists, just as `map`, providing an additional counter starting at zero. f needs to have the counter in its arguments. For example:

      (index-map (lambda (i elt)
                   (format #f "~s is the element at index ~a" elt i))
                 '(a b c d e))

Function: ly:input-both-locations sip ¶

  Return input location in sip as

      (file-name first-line first-column last-line last-column)

Function: ly:input-file-line-char-column sip ¶

  Return input location in sip as `(file-name line char column)`.

Function: ly:input-location? x ¶

  Is x a smob of class `Input`?

Function: ly:input-message sip msg rest ¶

  Print msg as a GNU compliant error message, pointing to the location in sip. msg is interpreted similar to `format`’s argument, using rest.

Function: ly:input-warning sip msg rest ¶

  Print msg as a GNU compliant warning message, pointing to the location in sip. msg is interpreted similar to `format`’s argument, using rest.

Function: int->bit-list n [pad-length] ¶

  Return the representation of n in binary, as a list of booleans.

  If the optional argument pad-length is given, the list is padded with leading zeros to make it at least this long.

Function: interpret-markup _ _ _ ¶

  - LilyPond procedure: ly:text-interface::interpret-markup

  Convert a text markup into a stencil. layout is a `\\layout` block. props is an alist chain, i.e., a list of alists. markup is the markup text to be processed. See also `grob-interpret-markup`.

Function: ly:interpret-music-expression mus ctx ¶

  Interpret the music expression mus in the global context ctx. The context is returned in its final state.

Function: interval-center x ¶

  Center the number pair x, if an interval.

Function: interval-index interval dir ¶

  Interpolate interval between between left (dir=`-1`) and right (dir=`+1`).

Function: interval-length x ¶

  Length of the number pair x, if an interval.

Function: ly:intlog2 d ¶

  The 2-logarithm of 1/d.

Function: invalidate-alterations context ¶

  Invalidate alterations in context.

  Elements of `'localAlterations` corresponding to local alterations of the key signature have the form `'((octave . notename) . (alter barnum . end-mom))`. Replace them with a version where `alter` is set to `'clef` to force a repetition of accidentals.

  Entries that conform with the current key signature are not invalidated.

Function: ly:item? g ¶

  Is g an `Item` object?

Function: item::extra-spacing-height-including-staff grob ¶

  Return a value for `extra-spacing-height` that augments the extent of the grob to the extent of the staff.

Function: ly:item-break-dir it ¶

  The break status direction of item it. `-1` means end of line, `0` unbroken, and `1` beginning of line.

Function: ly:item-get-column it ¶

  Return the `PaperColumn` or `NonMusicalPaperColumn` associated with this `Item`.

Function: ly:iterator? x ¶

  Is x a smob of class `Music_iterator`?

Function: layout-line-thickness grob ¶

  Get the line thickness of the grob’s corresponding layout.

Function: layout-set-absolute-staff-size sz ¶

  Set the absolute staff size inside of a `\layout{}` block. sz is in points.

Function: layout-set-staff-size sz ¶

  Set the staff size inside of a `\layout{}` block. sz is in points.

Function: ledger-lines::positions-from-ledgered-grob ledgered-grob staff-pos ¶

  Reading properties from `StaffSymbol`, calculate positions of ledger lines for grobs with `'staff-position` staff-pos. `'ledger-extra` may be taken from ledgered-grob.

Function: left-align-at-split-notes grob ¶

  Left-align `LyricText` if the parent `NoteHead` is split by `Completion_heads_engraver`

Function: ly:length x y ¶

  Calculate magnitude of given vector. With one argument, x is a number pair indicating the vector. With two arguments, x and y specify the respective coordinates.

Function: ly:lily-lexer? x ¶

  Is x a smob of class `Lily_lexer`?

Function: ly:lily-parser? x ¶

  Is x a smob of class `Lily_parser`?

Function: lilypond-main files ¶

  Entry point for LilyPond.

Function: lilypond-version-outdated? file-version lily-version ¶

  Is file-version outdated compared to lily-version? This is defined as a version that is from a lower release series (corresponding to the first two numbers of the version) or a version from the same unstable release series (odd minor version number) with a lower patch level (third number). A stable version from the same series does not count as outdated because compatibility is preserved.

Function: ly:line-interface::line grob startx starty endx endy ¶

  Make a line using layout information from grob grob.

Function: list-insert-separator lst between ¶

  Create new list, inserting between between elements of lst.

Function: list-join lst intermediate ¶

  Put intermediate between all elements of lst.

Function: list-map function ls ¶

  Apply function to the probably nested list ls and all of it sublists. First it recurses over the children, then the function is applied to ls.

Function: list-pad-left lst len filler fillers … ¶

  Same as `list-pad-right`, but add padding on the left.

Function: list-pad-right lst len filler fillers … ¶

  Pad lst on the right by appending elements until its length is at least len. The elements are taken from the variadic arguments. For example:

      (list-pad-right '(a b c) 10 'd 'e)
      ⇒ (a b c d e d e d e d)

Function: ly:listened-event-class? disp cl ¶

  Does disp listen to any event type in the list cl?

Function: ly:listened-event-types disp ¶

  Return a list of all event types that disp listens to.

Function: ly:listener? x ¶

  Is x a smob of class `Listener`?

Function: lookup-markup-command code ¶

  Return `(function . signature)` for a markup command code, or return `#f`.

Function: lyric-hyphen::vaticana-style grob ¶

  Draw a `LyricHyphen` grob as needed for Gregorian chant in Editio Vaticana style, that is, apply it once, flush-left. If the `text` property of `LyricHyphen` is set, print this markup. If the property is not set, use a hyphen character.

Function: lyric-text::print grob ¶

  Allow interpretation of tilde characters as lyric ties.

Function: make-accidental-dodecaphonic-rule octaveness laziness ¶

  Variation on function make-accidental-rule that creates an dodecaphonic accidental rule.

Function: make-accidental-rule octaveness laziness ¶

  Create an accidental rule that makes its decision based on the octave of the note and a laziness value.

  octaveness is either `'same-octave` or `'any-octave` and defines whether the rule should respond to accidental changes in other octaves than the current. `'same-octave` is the normal way to typeset accidentals – an accidental is made if the alteration is different from the last active pitch in the same octave. `'any-octave` looks at the last active pitch in any octave.

  laziness states over how many bars an accidental should be remembered. `0` is the default – accidental lasts over 0 bar lines, that is, to the end of current measure. A positive integer means that the accidental lasts over that many bar lines. `-1` is ‘forget immediately’, that is, only look at key signature. `#t` is ‘forever’.

Function: ly:make-book paper header scores ¶

  Make a `\book` of paper and header (which may be `#f` as well) containing `\score`s.

Function: ly:make-book-part scores ¶

  Make a `\bookpart` containing `\score`s.

Function: make-bow-stencil start stop thickness angularity bow-height orientation ¶

  Create a bow stencil. It starts at point start, ends at point stop. thickness is the thickness of the bow. The higher the value of number angularity, the more angular the shape of the bow. bow-height determines the height of the bow. orientation determines whether the bow is concave or convex. Both variables are supplied to support independent usage.

  Done by calculating a horizontal unit bow first, then moving all control points to the correct positions. Limitation: s-curves are currently not supported.

Function: make-c-time-signature-markup spec ¶

  Make markup for the ‘C’ time signature style.

Function: make-circle-stencil radius thickness fill ¶

  Make a circle of radius radius and thickness thickness.

Function: make-clef-set clef-name ¶

  Generate the clef setting commands for a clef named clef-name.

Function: make-connected-line points grob ¶

  Take a list of points, points. Return a line connecting points, using `ly:line-interface::line` and getting layout information from grob.

Function: make-connected-path-stencil pointlist thickness x-scale y-scale connect fill ¶

  Make a connected path described by the list pointlist, beginning at point (0, 0), with thickness thickness, and scaled by x-scale in the x direction and y-scale in the y direction. connect and fill are boolean arguments that specify whether the path should be connected or filled, respectively.

Function: ly:make-context-mod mod-list ¶

  Create a context modification, optionally initialized via the list of modifications mod-list.

Function: make-cue-clef-set clef-name ¶

  Generate the clef setting commands for a cue clef with name clef-name.

Function: make-cue-clef-unset ¶

  Reset the clef settings for a cue clef.

Function: ly:make-dispatcher ¶

  Return a newly created dispatcher.

Function: ly:make-duration length dotcount num den ¶

  Make a duration. length is the negative logarithm (base 2) of the duration: 1 is a half note, 2 is a quarter note, 3 is an eighth note, etc. The number of dots after the note is given by the optional argument dotcount.

  The duration factor is optionally given by integers num and den, alternatively by a single rational number.

  A duration is a musical duration, i.e., a length of time described by a power of two (whole, half, quarter, etc.) and a number of augmentation dots.

Function: make-duration-of-length moment ¶

  Make duration of the given `moment` length.

Function: make-ellipse-stencil x-radius y-radius thickness fill ¶

  Make an ellipse of x radius x-radius, y radius `y-radius`, and thickness thickness with fill defined by `fill`.

Macro: make-engraver … ¶

  Like `make-translator`, but create an engraver, i.e., the resulting translator is only run in layout output and ignored in MIDI.

Function: make-filled-box-stencil xext yext ¶

  Make a filled box.

Function: ly:make-global-context output-def ¶

  Set up a global interpretation context, using the output block output-def. The context is returned.

Function: ly:make-global-translator global ¶

  Create a translator group and connect it to the global context global. The translator group is returned.

Function: make-glyph-time-signature-markup style fraction ¶

  Make markup for a symbolic time signature of the form `timesig.<style><numerator><denominator>`, for example ‘`timesig.mensural34`’. If the music font does not have a glyph for the requested style and fraction, issue a warning and make a numbered time signature instead.

Function: ly:make-grob-properties alist ¶

  Package the given property list alist in a grob property container stored in a context property with the name of a grob.

Function: make-grob-property-override grob gprop val ¶

  Make a `Music` expression that overrides gprop to val in grob. This is a `\temporary \override`, making it possible to `\revert` to any previous value afterwards.

Function: make-grob-property-revert grob gprop ¶

  Revert the grob property gprop for grob.

Function: make-grob-property-set grob gprop val ¶

  Make a `Music` expression that overrides a gprop to val in grob. Does a pop first, i.e., this is not a `\temporary \override`.

Function: make-harmonic mus ¶

  Convert music variable mus to harmonics.

Function: make-line-stencil width startx starty endx endy ¶

  Make a line stencil of given line width and set its extents accordingly.

Function: ly:make-listener callback ¶

  This is a compatibility wrapper for creating a ‘listener’ for use with `ly:add-listener` from a callback taking a single argument. Since listeners are equivalent to callbacks, this is no longer needed.

Function: make-modal-inverter around to scale ¶

  Wrapper function for `inverter-factory`.

Function: make-modal-transposer from to scale ¶

  Wrapper function for `transposer-factory`.

Function: ly:make-moment m g gn gd ¶

  Create a moment with rational main timing m, and optional grace timing g.

  A moment is a point in musical time. It consists of a pair of rationals (m, g), where m is the timing for the main notes, and g the timing for grace notes. In absence of grace notes, g is zero.

  For compatibility reasons, it is possible to write two numbers specifying numerator and denominator instead of the rationals. These forms cannot be mixed, and the two-argument form is disambiguated by the sign of the second argument: if it is positive, it can only be a denominator and not a grace timing.

Function: ly:make-music props ¶

  Make a C++ `Music` object and initialize it with props.

  This function is for internal use and is only called by `make-music`, which is the preferred interface for creating music objects.

Function: make-music name music-properties … ¶

  Create a music object of given name, and set its properties according to `music-properties`, a list of alternating property symbols and values. Example:

      (make-music 'OverrideProperty
                  'symbol 'Stem
                  'grob-property 'thickness
                  'grob-value (* 2 1.5))

  Instead of a successive symbol and value, an entry in the list may also be an alist or a music object in which case its elements, respectively its mutable property list (properties not inherent to the type of the music object), are taken.

  The argument list will be interpreted left to right, so later entries override earlier ones.

Function: ly:make-music-function signature func ¶

  Make a function to process music, to be used for the parser. func is the function, and signature describes its arguments. signature’s cdr is a list containing either `ly:music?` predicates or other type predicates. Its car is the syntax function to call.

Function: ly:make-music-relative! music pitch ¶

  Make music relative to pitch, return final pitch.

Function: ly:make-output-def ¶

  Make an output definition.

Function: make-oval-stencil x-radius y-radius thickness fill ¶

  Make an oval from two Bézier curves, of x radius x-radius, y radius y-radius, and thickness thickness with fill defined by fill.

Function: ly:make-page-label-marker label ¶

  Return page marker with label label.

Function: ly:make-page-permission-marker symbol permission ¶

  Return page marker with page breaking and turning permissions.

Function: ly:make-paper-outputter port alist default-callback ¶

  Create an outputter dumping to port. alist should map symbols to procedures. See file `output-ps.scm` for an example. If default-callback is given, it is called for unsupported expressions.

Function: make-part-combine-context-changes state-machine split-list ¶

  Generate a sequence of part combiner context changes from a split list.

Function: make-part-combine-marks split-list [get-next-state] ¶

  Generate a sequence of segments alternating skips and part-combine-events for each active voice. There may be an initial skip that is not specced to any Voice context.

Function: make-partial-ellipse-stencil x-radius y-radius start-angle end-angle thick connect fill ¶

  Create an elliptical arc. x-radius is the x radius of the arc. y-radius is the y radius of the arc. start-angle is the starting angle of the arc (in degrees). end-angle is the ending angle of the arc (in degrees). thick is the thickness of the line. connect is a boolean flag indicating whether the end should be connected to the start by a line. fill is a boolean flag indicating whether the shape should be filled.

Function: make-path-stencil path thickness x-scale y-scale fill #:line-cap-style line-cap-style #:line-join-style line-join-style ¶

  Make a stencil based on the path described by the list path, with thickness thickness, and scaled by x-scale in the x direction and y-scale in the y direction (the difference with scaling the resulting stencil using `ly:stencil-scale` is that this scaling does not change the thickness). fill is a boolean argument that specifies whether the path should be filled. Valid path commands are

      moveto rmoveto lineto rlineto curveto rcurveto closepath

  and their standard SVG single-letter equivalents

      M m L l C c Z z

Macro: make-performer … ¶

  Like `make-translator`, but create a performer, i.e., the resulting translator is only run in MIDI and ignored in layout output. Scheme performers do not support acknowledgers and `process-acknowledged`.

Function: ly:make-pitch octave note alter ¶

  Make a pitch. octave is specified by an integer, zero for the octave containing middle C. note is a number indexing the global default scale, with 0 corresponding to pitch C and 6 usually corresponding to pitch B. Optional alter is a rational number of 200-cent whole tones for alteration.

Function: ly:make-prob type init rest ¶

  Create a `Prob` object.

Function: ly:make-rand-seed ¶

  Create seed value for initialization of a pseudo-random generator by combining output from a high-resolution clock with the current process id.

Function: ly:make-regex pattern ¶

  Construct a new regular expression object.

  Note that regular expressions created with this function are distinct from Guile native regular expressions (the latter don’t fully support Unicode). They should be used with `ly:regex-…` functions.

  The full reference for the supported regular expression syntax can be read at https://www.pcre.org/original/doc/html/pcrepattern.html.

Macro: make-relative … ¶

  The list of pitch or music variables in variables is (when inside of a ‘`\relative`’ expression) first passed through the throwaway expression reference for the sake of adjusting the variables according to the needs of relative notation, and then is employed for constructing the returned expression music.

  This should work well both inside and outside of `\relative` even when music function arguments get used multiple times and/or in different order in the resulting music expression.

  Outside of `\relative`, the result just reflects plugging in the variables into music.

  Inside of `\relative`, however, `\relative` is getting called on the reference expression (that is supposed to contain the variables just once and in the order and arrangement that results in a natural action of `\relative` on their values). After adjusting the octaves in the variables in that manner, the resulting expression music is constructed from them.

  Any of the variables containing a pitch rather than a complete music expression is replaced with a simple note event for the purpose of plugging into reference and thus is also affected by `\relative`.

  For \relative to have an effect on one of the variables, the reference expression must use the values of the variables without creating copies (i.e., only using ‘`#`’ instead of ‘`$`’ on them inside of ‘`#{…#}`’ constructs). The reference expression will usually just be a sequential or chord expression naming all variables in sequence, implying that followup music will be relativized according to the resulting pitch of the last or first variable, respectively.

  For constructing the resulting music however, the usual copying requirements for avoiding side effects from multiply used music function arguments and return values apply.

  An example would be

      abba =
      #(define-music-function (a b) (ly:music? ly:music?)
        (make-relative (a b)
          #{ #a #b #}
          #{ $a $b $b $a #}))

      \relative {
        \abba c'' g'
      }

Function: make-repeat name times main alts ¶

  Create a repeat music expression, with all properties initialized properly.

Function: ly:make-rotation angle center ¶

  Make a transform rotating by angle in degrees. If center is given as a pair of coordinates, it is the center of the rotation, otherwise the rotation is around (0, 0).

Function: ly:make-scale steps ¶

  Create a scale. The argument is a vector of rational numbers, each of which represents the number of 200-cent tones of a pitch above the tonic.

Function: ly:make-scaling scale scaley ¶

  Create a scaling transform from argument scale and optionally scaley. When both arguments are given, they must be real and give the scale in x and y direction. If only scale is given, it may also be complex to indicate a scaled rotation in the manner of complex number rotations, or a pair of reals for specifying different scales in x and y direction like with the first calling convention.

Function: ly:make-score music ¶

  Encapsulate music into a score smob.

  This is a low-level function that does no preprocessing. You might be looking for function `scorify-music` instead, which also preprocesses music.

Function: make-semitone->pitch pitches ¶

  Convert pitches, an unordered list of note values covering (after disregarding octaves) all absolute pitches in need of conversion, into a function converting semitone numbers (absolute pitch missing enharmonic information) back into note values.

  For a key signature without accidentals

      c cis d es e f fis g gis a bes b

  might be a good choice, covering Bb major to A major and their parallel keys, and melodic/harmonic C minor to A minor.

Function: ly:make-skyline segments axis direction ¶

  Create a new skyline from a list of segments. A skyline is an object representing an outline along a ‘horizon axis’, much like a city skyline. The argument segments is a list of segments. A segment has the form `'((x1 . y1) . (x2 . y2))`. The resulting skyline, viewed on the given axis, has a builing joining these two points for each segment. x1, y1, x2, y2 may be infinite. The buildings can be given in any order, and overlap.

Function: ly:make-spring ideal min-dist ¶

  Make a spring. ideal is the ideal distance of the spring, and min-dist is the minimum distance.

Function: ly:make-stencil expr xext yext ¶

  Stencils are device independent output expressions. They carry two pieces of information:

  1. A specification of how to print this object. This specification is processed by the output backends, for example `scm/output-ps.scm`.
  2. The vertical and horizontal extents of the object, given as pairs. If an extent is unspecified (or if you use `empty-interval` as its value), it is taken to be empty.

Function: make-stencil-boxer thickness padding callback ¶

  Return function that adds a box around the grob passed as argument.

Function: make-stencil-circler thickness padding callback ¶

  Return function that adds a circle around the grob passed as argument.

Function: ly:make-stream-event cl proplist ¶

  Create a stream event of class cl with the given mutable property list.

Function: make-tmpfile dir ¶

  Return a temporary file (as a Scheme port). If dir is `#f`, a file in the directory given by the environment variable `$TMPDIR` is created.

Function: ly:make-tmpfile-name filename ¶

  Return filename, suffixed by a randomly generated, hexadecimal id.

Function: ly:make-transform xx yx xy yy x0 y0 ¶

  Create a transform. Without options, it is the identity transform. Given four arguments xx, yx, xy, and yy, it is a linear transform. Given six arguments (with x0 and y0 last), it is an affine transform.

  Transforms can be called as functions on other transforms (concatening them) or on points given either as complex number or real number pair. See also `ly:make-rotation`, `ly:make-scaling`, and `ly:make-translation`.

Function: ly:make-translation x y ¶

  Make a transform translating by x and y. If only x is given, it can also be a complex number or a pair of numbers indicating the offset to use.

Macro: make-translator … ¶

  Helper macro for creating Scheme translators usable in both ‘`\midi`’ and ‘`\layout`’.

  The usual form for a translator is an association list (or alist) mapping symbols to either anonymous functions or to another such alist.

  `make-translator` accepts forms where the first element is either an argument list starting with the respective symbol, followed by the function body (comparable to the way `define` is used for defining functions), or a single symbol followed by subordinate forms in the same manner. You can also just make an alist pair literally (the ‘`car`’ is quoted automatically) as long as the unevaluated ‘`cdr`’ is not a pair. This is useful if you already have defined your engraver functions separately.

  Symbols mapping to a function would be `initialize`, `start-translation-timestep`, `pre-process-music`, `process-music`, `stop-translation-timestep`, and `finalize`. Symbols mapping to another alist specified in the same manner are `listeners` with the subordinate symbols being event classes.

  A template for writing a translator with all methods is:

      (lambda (context)
        (let (local-variables ...)
          (make-translator
           ((initialize translator)
            ...)
           ((start-translation-timestep translator)
            ...)
           (listeners
            ((event-class-1 translator event)
             ...)
            ((event-class-2 translator event #:once)
             ...))
           ((process-music translator)
            ...)
           (acknowledgers
            ((grob-interface-1 translator grob source-translator)
             ...)
            ((grob-interface-2 translator grob source-translator)
             ...))
           ((process-acknowledged translator)
            ...)
           ((stop-translation-timestep translator)
            ...)
           ((finalize translator)
            ...))))

  This can be used as the argument to `\consists`.

  For `listeners`, a special feature is available: the argument list of a listener can be terminated with the keyword `#:once`. This makes for a listener that is only ever triggered once per time step. If it receives several events in the same time step, it emits a warning, except if they are all equal (where equality is checked recursively, with `equal?`).

Function: make-transparent-box-stencil xext yext ¶

  Make a transparent box.

Function: ly:make-unpure-pure-container unpure pure ¶

  Make an unpure-pure container. unpure should be an unpure expression, and pure should be a pure expression. If pure is omitted, the value of unpure will be used twice, except that a callback is given two extra arguments that are ignored for the sake of pure calculations.

Function: map-selected-alist-keys function keys alist ¶

  Return alist with function applied to all of the values in list keys. Example:

      (map-selected-alist-keys - '(a b) '((a . 1) (b . -2) (c . 3) (d . 4)))
         ⇒ ((a . -1) (b . 2) (c . 3) (d . 4))

Function: map-some-music map? music ¶

  Walk through music, transform all elements calling map? and only recurse if this returns `#f`. `elements` or `articulations` that are not music expressions are discarded: this allows some amount of filtering.

  `map-some-music` may overwrite the original music.

Function: marked-up-headfoot what-odd what-even ¶

  Read variables what-odd and what-even from the page’s layout. Interpret either of them as header or footer markup, with properties reflecting the variables in the page’s layout and header modules.

Function: marked-up-title what ¶

  Read variable what from the page’s layout. Interpret it as title markup, with properties reflecting the variable in the page’s layout and header modules.

Macro: markup … ¶

  The `markup` macro provides a LilyPond-like syntax for building markups using Scheme keywords, replacing `\command` with `#:command`. For example, this:

      \markup { foo
                \raise #0.2 \hbracket \bold bar
                \override #'(baseline-skip . 4)
                \bracket \column { baz bazr bla }
      }

  translates to this:

      (markup "foo"
              #:raise 0.2 #:hbracket #:bold "bar"
              #:override '(baseline-skip . 4)
              #:bracket #:column ("baz" "bazr" "bla"))

Function: markup->string m #:layout layout #:props props ¶

  Convert a markup or markup list to an approximate string representation. This is useful for, e.g., PDF metadata and MIDI markers.

  The optional named layout and props argument are an output definition and a property alist chain, like the ones that are used when interpreting markups.

Function: markup-command-list? x ¶

  Check whether x is a markup command list, i.e., a list composed of a markup list function and its arguments.

Function: markup-default-to-string-method layout props args … ¶

  The default `markup->string` handler for markups, used when `markup->string` encounters a markup that has no special `as-string` expression defined. This applies `markup->string` on all markup arguments and joins the results, separating them with spaces.

Macro: markup-lambda … ¶

  Defines and returns an anonymous markup command. Other than not registering the markup command, this is identical to `define-markup-command`.

Function: markup-list? arg ¶

  Return a true value if x is a list of markups or markup command lists.

Macro: markup-list-lambda … ¶

  Same as `markup-lambda` but defines a markup list command that, when interpreted, returns a list of stencils instead of a single one.

Function: matrix-rotate-counterclockwise matrix ¶

  Return a copy of matrix rotated counterclockwise. matrix is a 2-dimensional array without non-zero lower bounds in its shape.

Function: measure-counter::text grob ¶

  A number for a measure count. Broken measures are numbered in parentheses. When the counter spans several measures (like with compressed multi-measure rests), it displays a measure range.

Function: mensural-flag grob ¶

  A callback for function `default-flag` to get a mensural flag.

  Mensural flags are aligned with staff lines; for stems ending on staff lines, use different flags than for notes between staff lines. The idea is that the inner end of a flag always touches a staff line.

  The mensural flag glyph is taken from the music font; its name is `flags.mensuralDirTypeLog`. Dir is the flag direction (either ‘`u`’ or ‘`d`’), Type is ‘`0`’ if the note head is between staff lines and ‘`1`’ otherwise, Log is the duration log (an integer in the range 3 to 6) from which the number of flags attached to the stem is derived. Both Dir and Log are taken from grob. Example: `flags.mensuralu13`.

  This function returns a stencil.

Function: ly:message str rest ¶

  A Scheme callable function to issue the message str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: middle-broken-spanner? spanner ¶

  Is spanner broken and among the middle broken pieces (i.e., neither the first nor the last)?

Function: midi-program instrument ¶

  Return the program of the instrument.

Function: ly:minimal-breaking paper-book ¶

  Break (pages and lines) the `Paper_book` object paper-book without looking for optimal spacing: stack as many lines on a page before moving to the next one.

Function: minmax/cmp cmp arg args … ¶

  Like `min` or `max`, but applies to any type of values, comparing them with cmp instead of `<` or `>`. For example:

      (minmax/cmp (comparator-from-key string-length <) "a" "aa" "aaa")
      ⇒ "a"
      (minmax/cmp (comparator-from-key string-length >) "a" "aa" "aaa")
      ⇒ "aaa"

Function: ly:mm num ¶

  num mm.

Function: mmrest-of-length mus ¶

  Create a multi-measure rest of exactly the same length as mus.

Function: modern-straight-flag grob ¶

  A callback function for `Flag.stencil` to get a modern straight flag.

  This is used by composers like Stockhausen or Boulez.

  The straight flag angles are 18 and 22 degrees for up-stems and down-stems, respectively, and thus smaller than for `old-straight-flag`. If the caller sets the `stroke-style` property of grob to the string `"grace"`, add a slash through the flag.

  This function returns a stencil.

Function: ly:module->alist mod ¶

  Dump the contents of module mod as an alist.

Function: ly:module-copy dest src ¶

  Copy all bindings from module src into dest.

Function: ly:modules-lookup modules sym def ¶

  Look up sym in the list modules, returning the first occurrence. If not found, return def or `#f` if def isn’t specified.

Function: ly:moment? x ¶

  Is x a smob of class `Moment`?

Function: ly:moment<? a b ¶

  Compare two moments.

Function: ly:moment-add a b ¶

  Add two moments.

Function: ly:moment-div a b ¶

  Divide moment a by a number b (or by the main part of another moment).

Function: ly:moment-grace mom ¶

  Extract grace timing as a rational number from mom.

Function: ly:moment-grace-denominator mom ¶

  Extract denominator from grace timing.

Function: ly:moment-grace-numerator mom ¶

  Extract numerator from grace timing.

Function: ly:moment-main mom ¶

  Extract main timing as a rational number from mom.

Function: ly:moment-main-denominator mom ¶

  Extract denominator from main timing.

Function: ly:moment-main-numerator mom ¶

  Extract numerator from main timing.

Function: ly:moment-mod a b ¶

  Modulo of two moments.

Function: ly:moment-mul a b ¶

  Multiply moment a by a number b (or by the main part of another moment).

Function: ly:moment-sub a b ¶

  Subtract two moments.

Function: ly:music? obj ¶

  Is obj a `Music` object?

Function: music->make-music obj ¶

  Generate an expression that, once evaluated, may return an object equivalent to obj, that is, for a music expression, a `(make-music ...)` form.

Function: music-clone music music-properties … ¶

  Clone music and set properties according to music-properties, a list of alternating property symbols and values:

      (music-clone start-span 'span-direction STOP)

  Only properties that are not overridden by music-properties are actually fully cloned.

Function: ly:music-compress mus scale ¶

  Compress mus by scale.

Function: ly:music-deep-copy m origin ¶

  Copy m and all sub expressions of m. m may be an arbitrary type; cons cells and music are copied recursively. If origin is given, it is used as the origin for one level of music by calling `ly:set-origin!` on the copy.

Function: ly:music-duration-compress mus fact ¶

  Compress mus by factor fact, which is a `Moment`.

Function: ly:music-duration-length mus ¶

  Extract the duration field from mus and return the length.

Function: music-filter pred? music ¶

  Filter out music expressions that do not satisfy pred?.

Function: ly:music-function? x ¶

  Is x a smob of class `Music_function`?

Function: ly:music-function-extract x ¶

  Return the Scheme function inside x.

Function: ly:music-function-signature x ¶

  Return the function signature inside x.

Function: music-is-of-type? mus type ¶

  Does mus belong to the music class type?

Function: ly:music-length mus ¶

  Return the duration of mus as a `ly:moment`.

Function: ly:music-list? lst ¶

  Is lst a list of music objects?

Function: music-map function music ¶

  Apply function to music and all of the music it contains.

  First it recurses over the children, then the function is applied to music.

Function: ly:music-mutable-properties mus ¶

  Return an alist containing the mutable properties of mus. The immutable properties are not available, since they are constant and initialized by the `make-music` function.

Function: ly:music-output? x ¶

  Is x a smob of class `Music_output`?

Function: music-pitches music ¶

  Return a list of all pitches from music.

Function: ly:music-property mus sym val ¶

  Return the value for property sym of music expression mus. If no value is found, return val or `'()` if val is not specified.

Function: music-selective-filter descend? pred? music ¶

  Recursively filter out music expressions that do not satisfy pred?, but refrain from filtering the subexpressions of music that does not satisfy descend?.

Function: music-selective-map descend? function music ¶

  Apply function recursively to music, but refrain from mapping subexpressions of music that does not satisfy descend?.

Function: music-separator? m ¶

  Is m a separator?

Function: ly:music-set-property! mus sym val ¶

  Set property sym in music expression mus to val.

Function: ly:music-start mus ¶

  Get the start of music expression mus and return it as a `Moment` object.

Function: ly:music-transpose m p ¶

  Transpose m such that central C is mapped to p. Return m.

Function: music-type-predicate types ¶

  Return a predicate function that can be used for checking music to have one of the types listed in types.

Function: neo-modern-accidental-rule context pitch barnum ¶

  An accidental rule that typesets an accidental if it differs from the key signature and does not directly follow a note on the same staff line. This rule should not be used alone because it does neither look at bar lines nor different accidentals at the same note name.

Function: no-flag grob ¶

  A callback for function `default-flag`, indicating ‘no flag’.

  This function simply returns an empty stencil.

Function: ly:non-fatal-error str rest ¶

  A Scheme callable function to issue the error str. The error is formatted with `format`; rest holds the formatting arguments (if any). When using this function, some way of signalling the error should be employed in order for the compilation to eventually result in a nonzero return code.

Function: normal-flag grob ¶

  A callback for function `default-flag` to get a ‘normal’ flag.

  See function `glyph-flag` for the naming scheme of flag glyphs (with argument flag-style set to the empty string).

  This function returns a stencil.

Function: normalize-color color ¶

  Convert a color given in any of the supported formats into a list of 4 numbers: R, G, B, A. Possible formats are: such a list of 4 numbers; a list of 3 numbers (transparency defaults to 1.0); a CSS string (named color, or “#RRGGBB”, or “#RRGGBBAA”, or “#RGB”, or “#RGBA”).

Function: not-first-broken-spanner? spanner ¶

  Is spanner broken and not the first of its broken siblings? The name is read “(not first) and broken”.

Function: not-last-broken-spanner? spanner ¶

  Is spanner broken and not the last of its broken siblings? The name is read “(not last) and broken”.

Function: ly:note-column-accidentals note-column ¶

  Return the `AccidentalPlacement` grob from note-column if any, or `SCM_EOL` otherwise.

Function: ly:note-column-dot-column note-column ¶

  Return the `DotColumn` grob from note-column if any, or `SCM_EOL` otherwise.

Function: ly:note-extra-source-file filename parser ¶

  Register a file, e.g., an image file, as being needed to compile the current file. This is used for the `-dembed-source-code` option. A parser may optionally be specified.

  In general, this function can embed arbitrary files into LilyPond’s PDF output (using embedded file streams).

Function: ly:note-head::stem-attachment font-metric glyph-name direction ¶

  Get stem attachment point from font_metric for glyph-name.

  This only works for note head glyphs. Depending on direction, the attachment point for an up-stem or a down-stem is returned. direction defaults to `UP` if not specified.

  The return value is a pair, where each component is measured in a -1 to 1 scale so that -1 is the left/bottom edge of the note head’s bounding box and 1 is the right/top edge.

Function: ly:note-scale? x ¶

  Is x a smob of class `Scale`?

Function: note-to-cluster music ¶

  Replace `NoteEvent`s by `ClusterNoteEvent`s.

Function: ly:number->duration x ¶

  Convert a duration expressed in units of whole notes to a `ly:duration`. The log, number of dots, and scaling factor are chosen automatically.

Function: ly:number->string s ¶

  Convert s to a string without generating many decimals.

Function: number-format number-type num custom-format … ¶

  Print num according to the requested number-type. Choices include `arabic`, `custom`, `roman-ij-lower`, `roman-ij-upper`, `roman-lower` (the default), and `roman-upper`.

  For `custom`, custom-format must be present; it gets applied to num.

Function: offset-fret fret-offset diagram-definition ¶

  Add fret-offset to each fret indication in diagram-definition and return the resulting verbose `fret-diagram-definition`.

Function: offsetter property offsets ¶

  Apply offsets to the default values of property of grob. Offsets are restricted to immutable properties and values of type `number`, `number-pair`, or `number-pair-list`.

Function: old-straight-flag grob ¶

  A callback function for `Flag.stencil` to get an old straight flag.

  This is used by composers like Bach.

  The up-stem and down-stem angles of the flags are both 45 degrees. If the caller sets the `stroke-style` property of grob to the string `"grace"`, add a slash through the flag.

  This function returns a stencil.

Function: ly:one-line-auto-height-breaking paper-book ¶

  Put each score on a single line, and put each line on its own page. Modify the `paper-width` setting so that every page is wider than the widest line. Modify the `paper-height` setting to fit the height of the tallest line.

Function: ly:one-line-breaking paper-book ¶

  Put each score on a single line, and put each line on its own page. Modify the `paper-width` setting so that every page is wider than the widest line.

Function: ly:one-page-breaking paper-book ¶

  Put each score on a single page. The `paper-height` settings are modified so each score fits on one page, and the height of the page matches the height of the full score.

Function: ly:optimal-breaking paper-book ¶

  Optimally break (pages and lines) the `Paper_book` object paper-book to minimize badness for both vertical and horizontal spacing.

Function: ly:option-usage port internal ¶

  Print `ly:set-option` usage. Optional port argument for the destination defaults to current output port. Specify internal to get doc for internal options.

Function: optional-material-bracket::positions grob ¶

  Callback for `OptionalMaterialBracket` grobs.

Function: optionally-grouped-beat-structure->beat-structure structure ¶

  If structure has groups defining submeasures, ungroup them.

Function: optionally-grouped-beat-structure->submeasure-structure structure ¶

  If the beats in structure are grouped, extract the submeasure structure from them.

Function: ly:otf->cff otf-file-name idx ¶

  Convert the contents of an OTF file to a CFF file, returning it as a string. The optional idx argument is useful for OpenType/CFF collections (OTC) only; it specifies the font index within the OTC. The default value of idx is 0.

Function: ly:otf-font? font ¶

  Is font an OpenType font?

Function: ly:otf-font-glyph-info font glyph ¶

  Given the font metric font of an OpenType font, return the information about named glyph glyph (a string).

Function: ly:otf-font-table-data font tag ¶

  Extract a table tag from font. Return empty string for non-existent tag.

Function: ly:otf-glyph-count font ¶

  Return the number of glyphs in font.

Function: ly:otf-glyph-list font ¶

  Return a list of glyph names for font.

Function: ly:output-def? x ¶

  Is x a smob of class `Output_def`?

Function: ly:output-def-clone def ¶

  Clone output definition def.

Function: ly:output-def-lookup def sym val ¶

  Return the value of sym in output definition def (e.g., `\paper`). If no value is found, return val or `'()` if val is undefined.

Function: ly:output-def-parent output-def default-value ¶

  Return the parent output definition of output-def, or default-value if output-def has no parent. default-value is optional, and defaults to `'()`.

Function: ly:output-def-scope def ¶

  Return the variable scope inside def.

Function: ly:output-def-set-variable! def sym val ¶

  Set an output definition def variable sym to val.

Function: ly:output-description output-def ¶

  Return the description of translators in output-def.

Function: ly:output-file-name-for-input-file-name name ¶

  Convert the name of an input file (as provided on the command line) to the name of an output file without an extension, honoring command-line options such as `--output` and `-dstrip-output-dir`.

Function: ly:output-find-context-def output-def context-name ¶

  Return an alist of all context defs (matching context-name if given) in output-def.

Function: output-module? module ¶

  Return `#t` if module belongs to an output module usually carrying context definitions (`\midi` or `\layout`).

Function: ly:outputter-close outputter ¶

  Close port of outputter.

Function: ly:outputter-dump-stencil outputter stencil ¶

  Dump stencil expr onto outputter.

Function: ly:outputter-dump-string outputter str ¶

  Dump str onto outputter.

Function: ly:outputter-output-scheme outputter expr ¶

  Output expr to the paper outputter.

Function: ly:outputter-port outputter ¶

  Return output port for outputter.

Function: oval-stencil stencil thickness x-padding y-padding ¶

  Add an oval around `stencil`, padded by the padding pair, producing a new stencil.

Function: override-head-style heads style ¶

  Override style for heads to style.

Function: override-time-signature-setting time-signature setting ¶

  Override the time signature settings for the context in time-signature, with the new setting alist setting.

Function: ly:page-marker? x ¶

  Is x a smob of class `Page_marker`?

Function: ly:page-turn-breaking paper-book ¶

  Optimally break (pages and lines) the `Paper_book` object paper-book such that page turns only happen in specified places, returning its pages.

Function: ly:pango-font? f ¶

  Is f a Pango font?

Function: ly:pango-font-physical-fonts f ¶

  Return alist of `(ps-name file-name font-index)` lists for Pango font f.

Function: pango-pf-file-name pango-pf ¶

  Return the file name of the Pango physical font pango-pf.

Function: pango-pf-font-name pango-pf ¶

  Return the font name of the Pango physical font pango-pf.

Function: pango-pf-fontindex pango-pf ¶

  Return the font index of the Pango physical font pango-pf.

Function: ly:paper-book? x ¶

  Is x a smob of class `Paper_book`?

Function: ly:paper-book-header pb ¶

  Return the header definition (`\header`) in `Paper_book` object pb.

Function: ly:paper-book-pages pb ¶

  Return pages in `Paper_book` object pb.

Function: ly:paper-book-paper pb ¶

  Return the paper output definition (`\paper`) in `Paper_book` object pb.

Function: ly:paper-book-performances pb ¶

  Return performances in `Paper_book` object pb.

Function: ly:paper-book-scopes pb ¶

  Return scopes in `Paper_book` object pb.

Function: ly:paper-book-systems pb ¶

  Return systems in `Paper_book` object pb.

Function: ly:paper-column::break-align-width col align-syms ¶

  col should be a non-musical paper-column. This function determines the horizontal extent of a break align group contained in this column, relative to the system. The break align group is searched according to align-sym, which is either a break align symbol (see the `break-align-symbol` property), or a list of such symbols. For example,

      (ly:paper-column::break-align-width col '(key-signature staff-bar))

  tries to find a `BreakAlignGroup` of key signatures, but falls back on bar lines if there are no key signatures or if the extent of the `BreakAlignGroup` containing them is empty (for example, if they are omitted).

  The special symbol `break-alignment` means the combined extent of all items in the paper column. It is useful as the last element of the list, for a catch-all fallback.

  This function never returns an empty interval. If no matching group is found or the group has an empty extent, it returns a point interval at the coordinate of the column relative to the system.

Function: ly:paper-column::print ¶

  Optional stencil for `PaperColumn` or `NonMusicalPaperColumn`. Draws the rank number of each column, its moment in time, a blue arrow showing the ideal distance, and a red arrow showing the minimum distance between columns.

Function: ly:paper-fonts def ¶

  Return a list containing the fonts from output definition def (e.g., `\paper`).

Function: ly:paper-get-font def chain ¶

  Find a font metric in output definition def satisfying the font qualifiers in alist chain chain, and return it. (An alist chain is a list of alists, containing grob properties.)

Function: ly:paper-get-number def sym ¶

  Return the value of variable sym in output definition def as a double.

Function: ly:paper-outputscale def ¶

  Return the `output-scale` for output definition def.

Function: ly:paper-score-paper-systems paper-score ¶

  Return vector of `paper_system` objects from paper-score.

Function: ly:paper-system? obj ¶

  Is obj a C++ `Prob` object of type `paper-system`?

Function: parenthesize-stencil stencil half-thickness width angularity padding ¶

  Add parentheses around stencil, returning a new stencil.

Function: ly:parse-file name ¶

  Parse a single `.ly` file. Upon failure, throw `ly-file-failed` key.

Function: ly:parse-init name ¶

  Parse the init file name.

Function: ly:parse-string-expression parser-smob ly-code filename line ¶

  Parse the string ly-code with parser-smob. Return the contained music expression. filename and line are optional source indicators.

Function: parse-terse-string terse-definition ¶

  Parse a `fret-diagram-terse` definition string terse-definition and return a marking list, which can be used with a fretboard grob.

Function: ly:parsed-undead-list! ¶

  Return the list of objects that have been found alive but should have been dead, and clear that list.

Function: ly:parser-append-to-include-path path ¶

  Append path to the current parser’s include path.

Function: ly:parser-clear-error parser ¶

  Clear error flag for parser, defaulting to current parser.

Function: ly:parser-clone closures location ¶

  Return a clone of current parser. An association list of port positions to closures can be specified in closures in order to have `$` and `#` interpreted in their original lexical environment. If location is a valid location, it becomes the source of all music expressions inside.

Function: ly:parser-define! id val ¶

  Bind id to val in current parser’s module.

Function: ly:parser-define-once! id val ¶

  If id is unbound, bind it to val in current parser’s module.

Function: ly:parser-error msg input ¶

  Display an error message and make current parser fail. Without a current parser, trigger an ordinary error.

Function: ly:parser-has-error? parser ¶

  Does parser (defaulting to current parser) have an error flag?

Function: ly:parser-include-string ly-code ¶

  Include the string ly-code into the input stream for current parser. Can only be used in immediate Scheme expressions (`$` instead of `#`).

Function: ly:parser-lookup id rest ¶

  Look up id in the current parser’s module.

  The rest arguments may contain the `#:default` keyword option with the value to return when the variable is not defined. When the `#:default` option is absent, `'()` is used.

Function: ly:parser-output-name parser ¶

  Return the base name of the output file. If parser is left off, use currently active parser.

Function: ly:parser-parse-string parser-smob ly-code ¶

  Parse the string ly-code with parser-smob. Upon failure, throw `ly-file-failed` key.

Function: ly:parser-set-note-names names ¶

  Replace current note names in parser. names is an alist of symbols. This only has effect if the current mode is notes.

Function: percussion? instrument ¶

  Return `#t` if the instrument should use MIDI channel 9.

Function: ly:perform-text-replacements props input-string ¶

  A string transformer to perform text replacements using the `replacement-alist` from the property alist chain props.

Function: ly:performance-headers performance ¶

  Return the list of headers with the innermost first.

Function: ly:performance-write performance filename name ¶

  Write performance to filename storing name as the name of the performance in the file metadata.

Function: ly:pitch? x ¶

  Is x a smob of class `Pitch`?

Function: ly:pitch<? p1 p2 ¶

  Is p1 lexicographically smaller than p2?

Function: pitch->alteration pitch [language] ¶

  Return the alteration of pitch.

  Optional argument language sets the language used to display the pitch name (see file `define-note-names.scm` for available values); if this symbol is missing or set to `#f`, the current input language is used.

Function: pitch->name pitch [language] ¶

  Return name of pitch without accidentals or octaves.

  Optional argument language sets the language used to display the pitch name (see file `define-note-names.scm` for available values); if this symbol is missing or set to `#f`, the current input language is used.

Function: ly:pitch-alteration pp ¶

  Extract the alteration from pitch pp.

Function: ly:pitch-diff pitch root ¶

  Return pitch delta such that root transposed by delta equals pitch.

Function: ly:pitch-negate p ¶

  Negate pitch p.

Function: ly:pitch-notename pp ¶

  Extract the note name from pitch pp.

Function: ly:pitch-octave pp ¶

  Extract the octave from pitch pp.

Function: ly:pitch-quartertones pp ¶

  Calculate the number of quarter tones of pitch pp from middle C.

Function: ly:pitch-semitones pp ¶

  Calculate the number of semitones of pitch pp from middle C.

Function: ly:pitch-steps p ¶

  Number of steps counted from middle C of the pitch p.

Function: ly:pitch-tones pp ¶

  Calculate the number of tones of pitch pp from middle C as a rational number.

Function: ly:pitch-transpose p delta ¶

  Transpose pitch p by the amount delta, where delta is relative to middle C.

Function: ly:png->eps-dump file-name port r g b a ¶

  Read the PNG image under file-name and convert it to EPS data, dumping the output onto port. r, g, b and a are the components of the background color.

Function: ly:png-dimensions file-name ¶

  Read the PNG image under file-name and return its dimensions as a pair of integers, or `#f` if there was an error (a warning is printed in this case).

Function: ly:pointer-group-interface::add-grob grob sym grob-element ¶

  Add grob-element to grob’s sym grob array.

Function: polar->rectangular radius angle-in-degrees ¶

  Return polar coordinates (radius, angle-in-degrees) as rectangular coordinates `(x-length . y-length)`.

Function: ly:position-on-line? sg spos ¶

  Return whether spos is on a line of the staff associated with the grob sg (even on an extender line).

Function: prepend-alist-chain key val chain ¶

  Convenience to make a new alist chain from chain by prepending a binding of key to val. This is similar to `acons`, for alist chains (lists of alists).

Function: ly:prob? x ¶

  Is x a smob of class `Prob`?

Function: ly:prob-immutable-properties prob ¶

  Retrieve an alist of immutable properties.

Function: ly:prob-mutable-properties prob ¶

  Retrieve an alist of mutable properties.

Function: ly:prob-property prob sym val ¶

  Return the value for property sym of Prob object prob. If no value is found, return val or `'()` if val is not specified.

Function: ly:prob-property? obj sym ¶

  Is boolean prop sym of obj set?

Function: ly:prob-set-property! obj sym value ¶

  Set property sym of obj to value.

Function: ly:prob-type? obj type ¶

  Is obj the specified prob type?

Function: ly:programming-error str rest ¶

  A Scheme callable function to issue the internal warning str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: ly:progress str rest ¶

  A Scheme callable function to print progress str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: ly:property-lookup-stats sym ¶

  Return hash table with a property access corresponding to sym. Choices are `prob`, `grob`, and `context`.

Function: ly:pt num ¶

  num printer points.

Function: ly:pure-call data grob start end rest ¶

  Convert property data (unpure-pure container or procedure) to value in a pure context defined by grob, start, end, and possibly rest arguments.

Function: pure-chain-offset-callback grob start end prev-offset ¶

  Sometimes, a chained offset callback is unpure and there is no way to write a pure function that estimates its behavior. In this case, we use a pure equivalent that will simply pass the previous calculated offset value.

Function: ratio->fret ratio ¶

  Calculate a fret number given ratio for the harmonic.

Function: ratio->pitch ratio ¶

  Calculate a pitch given ratio for the harmonic.

Function: read-lily-expression chr port ¶

  Read a lilypond music expression enclosed within `#{` and `#}` from port and return the corresponding Scheme music expression. ‘`$`’ and ‘`#`’ introduce immediate and normal Scheme forms.

Function: recording-group-emulate music odef ¶

  Interpret music according to odef, but store all events in a chronological list, similar to the `Recording_group_engraver` in LilyPond version 2.8 and earlier.

Function: ly:regex? x ¶

  Is x a smob of class `Regex`?

Function: ly:regex-exec regex string ¶

  Scan string for a match of the regular expression object regex (constructed with `ly:make-regex`). Return a match object or `#f`. See `ly:regex-match-…` functions for what you can do with the match object.

  For example, this extracts the components of a date in YYYY-MM-DD format:

  >     #(define date-components
  >        (let ((date-regex (ly:make-regex "^(\\d{4})-(\\d{2})-(\\d{2})$")))
  >          (lambda (date)
  >            (let ((match (ly:regex-exec date-regex date)))
  >              (if match
  >                  (list (string->number (ly:regex-match-substring match 1))
  >                        (string->number (ly:regex-match-substring match 2))
  >                        (string->number (ly:regex-match-substring match 3)))
  >                  (error "not a date"))))))

Function: ly:regex-exec->list regex string ¶

  Like `ly:regex-exec`, but return a list of non-overlapping matches instead of the first match only."

Function: ly:regex-match? x ¶

  Is x a regular expression match object?

Function: ly:regex-match-positions match [index] ¶

  Retrieve the start and end of a capturing group in a regular expression match object, returned as a pair, or `#f`. See `ly:regex-match-substring` for details. The index argument is optional, defaulting to 0.

Function: ly:regex-match-prefix m ¶

  Retrieve the part of the target string before the regex match m.

Function: ly:regex-match-substring m [index] ¶

  Retrieve the substring matched by a specific capturing group in the match object match. index should be 1 for the first group, 2 for the second group, etc. index defaults to 0, which returns the substring matched by the entire regular expression. If the capturing group was not part of the match (e.g., group 2 when matching `aa` against the regex `(a+)|(b+)`), `#f` is returned.

Function: ly:regex-match-suffix m ¶

  Retrieve the part of the target string after the regex match m.

Function: ly:regex-quote string ¶

  Escape special characters in string, forming a regular expression pattern that matches exactly string.

  Example:

      (ly:regex-quote "$2")
      ⇒ "\\$2"

Function: ly:regex-replace regex string replacements ¶

  Scan for matches of the compiled regular expression regex (created with `ly:make-regex`) in the string string, and form a new string by replacing them according to the replacements. Each replacement argument can be:

  - A string, which is output as-is.
  - A non-negative integer, which is interpreted as a match substring index (see `ly:regex-match-substring`).
  - A procedure, which is called on the match object, and should return a string.

  This example converts a date from YYYY-MM-DD format to DD-MM-YYYY format:

  >     #(define date-yyyy-mm-dd->dd-mm-yyyy
  >        (let ((date-regex (ly:make-regex "(\\d{4})-(\\d{2})-(\\d{2})")))
  >          (lambda (date)
  >            (ly:regex-replace date-regex date 3 "-" 2 "-" 1))))

  This example does the same, using a procedure:

  >     #(define date-yyyy-mm-dd->dd-mm-yyyy
  >        (let ((date-regex (ly:make-regex "(\\d{4})-(\\d{2})-(\\d{2})")))
  >          (lambda (date)
  >            (ly:regex-replace
  >             date-regex
  >             date
  >             (lambda (match)
  >               (format #f "~a-~a-~a"
  >                       (ly:regex-match-substring match 3)
  >                       (ly:regex-match-substring match 2)
  >                       (ly:regex-match-substring match 1)))))))

Function: ly:regex-split regex str ¶

  Split str into non-overlapping occurrences of the regex regex, returning a list of the substrings.

Function: ly:register-stencil-expression symbol ¶

  Add symbol as head of a stencil expression.

Function: ly:register-translator creator name description ¶

  Register a translator creator (usually a descriptive alist or a function/closure returning one when given a context argument) with the given symbol name and the given description alist.

Function: ly:relative-group-extent elements common axis ¶

  Determine the extent of elements relative to common in the axis direction.

Function: remove-from-tag-group tag-group tags ¶

  Remove the given tags from the existing tag-group symbol list.

  Returns `#f` if successful, and an error message if the tag-group does not exist.

Function: remove-grace-property context-name grob sym ¶

  Remove all sym for grob in context-name.

Function: remove-whitespace strg ¶

  Remove characters satisfying `char-whitespace?` from string strg.

Function: ly:rename-file oldname newname ¶

  Rename oldname to newname. In contrast to Guile’s `rename-file` function, this replaces the destination if it already exists. On Windows, fall back to copying the file contents if newname cannot be deleted.

Function: ly:reset-all-fonts ¶

  Forget all about previously loaded fonts.

Function: ly:reset-options alist ¶

  Reset all program options to the values in alist.

Function: reset-tag-group tag-group ¶

  Remove the tag group definition for the given tag-group symbol list.

  Returns `#f` if successful, and an error message if the given tag group could not be found.

Function: reset-tag-groups ¶

  Reset the tag groups to the default internal tag groups.

Function: retrieve-glyph-flag flag-style dir dir-modifier grob ¶

  Load the correct flag glyph from the music font.

  This is an auxiliary function for `create-glyph-flag`.

Function: retrograde-music music ¶

  Return music in retrograde (reversed) order.

Function: revert-fontSize func-name mag ¶

  Used by `\magnifyMusic` and `\magnifyStaff`. Calculate the previous `fontSize` value (before scaling) by factoring out the magnification factor mag (if func-name is `'magnifyMusic`), or by factoring out the context property `magnifyStaffValue` (if func-name is `'magnifyStaff`). Revert the `fontSize` in the appropriate context accordingly.

  With `\magnifyMusic`, the scaling is reverted after the music block it operates on. `\magnifyStaff` does not operate on a music block, so the scaling from a previous call (if there is one) is reverted before the new scaling takes effect.

Function: revert-head-style heads ¶

  Revert style for heads.

Function: revert-props func-name mag props ¶

  Used by `\magnifyMusic` and `\magnifyStaff`. Revert each prop in props in the appropriate context. func-name is either `'magnifyMusic` or `'magnifyStaff`. The props list is formatted like:

      '((Stem thickness)
        (Slur line-thickness)
        ...)

Function: ly:round-filled-box xext yext blot ¶

  Make a `Stencil` object that prints a black box of dimensions xext, yext and roundness blot.

Function: ly:round-polygon points blot extroversion filled ¶

  Make a `Stencil` object that prints a polygon with corners at the points defined by points (a list of coordinate pairs) and roundness blot. Optional numeric argument extroversion shifts the outline outward, with the default of 0 keeping the middle of the line just on the polygon. If optional Boolean argument filled is set to `#t` (which is the default), fill the polygon.

Function: rounded-box-stencil stencil thickness padding blot ¶

  Add a rounded box around stencil, producing a new stencil.

Function: ly:run-translator mus output-def ¶

  Process mus according to output-def. An interpretation context is set up, and mus is interpreted with it. The context is returned in its final state.

Function: sane-time-signature? x ¶

  Is x a supported, semantically valid time signature in canonical form?

  See the `\time` command for a description of canonical form.

Function: scale-beam-thickness mag ¶

  Used by `\magnifyMusic`. Scaling `Beam.beam-thickness` exactly to the mag value will not work. This uses two reference values for `beam-thickness` to determine an acceptable value when scaling, then does the equivalent of a `\temporary \override` with the new value.

Function: scale-fontSize func-name mag ¶

  Used by `\magnifyMusic` and `\magnifyStaff`. Look up the current `fontSize` in the appropriate context and scale it by the magnification factor mag. func-name is either `'magnifyMusic` or `'magnifyStaff`.

Function: scale-layout paper scale ¶

  Return a clone of paper, scaled by the given scale factor.

Function: scale-props func-name mag allowed-to-shrink? props ¶

  Used by `\magnifyMusic` and `\magnifyStaff`. For each prop in props, find the current value of the requested prop, scale it by the magnification factor mag, and do the equivalent of a `\temporary \override` with the new value in the appropriate context. If allowed-to-shrink? is `#f`, don’t let the new value be less than the current value. func-name is either `'magnifyMusic` or `'magnifyStaff`. The props list is formatted like:

      '((Stem thickness)
        (Slur line-thickness)
        ...)

Function: ly:score? x ¶

  Is x a smob of class `Score`?

Function: ly:score-add-output-def! score def ¶

  Add an output definition def to score.

Function: ly:score-embedded-format score layout ¶

  Run score through layout (an output definition) scaled to correct `output-scale` already, returning a list of layout lines.

Function: ly:score-error? score ¶

  Was there an error in the score?

Function: ly:score-header score ¶

  Return score header.

Function: ly:score-music score ¶

  Return score music.

Function: ly:score-output-defs score ¶

  All output definitions in a score.

Function: ly:score-set-header! score module ¶

  Set the score header.

Function: scorify-music music ¶

  Preprocess music and encapsulate it into a score smob.

  Among other things, preprocessing replaces chord repetitions via ‘q’ with the correct actual chords.

Function: ly:script-interface::calc-direction grob ¶

  Usually the `'direction` of an articulation is set in `default-script-alist`. If the `'direction` is not specified there and not specified by user settings, this procedure steps in.

  In absence of `'direction` the direction for vertically placed scripts is calculated taking its `'direction-source`, usually `Stem`, and its `'side-relative-direction`, falling back to value `1`, into account. For horizontally placed scripts we simply provide `LEFT` as a fallback value.

  As a last resort `CENTER` is returned.

Function: ly:script-interface::print grob ¶

  The `stencil` of a script grob.

Function: seconds->moment s context ¶

  Return a moment equivalent to s seconds at the current tempo.

Function: select-head-glyph style log ¶

  Select a note head glyph string.

  The constructed name is based on note head style style and the duration log log.

Function: self-alignment-interface::self-aligned-on-breakable grob ¶

  Return the `X-offset` that places grob according to its `self-alignment-X` over the reference point defined by the `break-align-anchor-alignment` of a `break-aligned` item such as a `Clef`.

Function: sequential-music-to-chord-exceptions seq [omit-root] ¶

  Transform sequential music seq to chord exceptions.

  seq is music that contains a sequence of chords with attached markup having the form

      <pitch1 pitch2 ... >...-\markup { markup }

  for example, `<c e g b d'>-\markup \super "maj9"`.

  Each chord gets transformed to a chord exception, which is a two-element list: its first element is a list representing the pitches pitch1, pitch2, etc., in a normalized form; the second element holds a procedure that generates markup.

  If optional argument omit-root is set and not equal to `#f`, pitch1 (i.e., the root of the chord) is omitted while constructing the chord exception.

  The function returns a list of all chord exceptions given in seq.

Function: set-accidental-style style rest … ¶

  Set accidental style to style. Optionally take a context argument, e.g., `'Staff` or `'Voice`. The context defaults to `Staff`, except for piano styles, which use `GrandStaff` as a context.

Function: set-default-paper-size name rest … ¶

  Set the default paper size to name with orientation rest.

  name is either a predefined paper size string like `"quarto"` or a pair of numbers like `'(cons (* 100 mm) (* 50 mm))` to specify a custom paper size.

  If optional argument rest is set to `'landscape`, pages are rotated by 90 degrees, and wider line widths are set accordingly. Swapping the paper dimensions without having the print rotated can be achieved by appending the string `landscape` to the name of the paper size itself (example: `"a4landscape"`).

  This function can only be used at top level; it must come before any `\paper` block. See also function `set-paper-size`.

Function: ly:set-default-scale scale ¶

  Set the global default scale. This determines the tuning of pitches with no accidentals or key signatures. The first pitch is C. Alterations are calculated relative to this scale. The number of pitches in this scale determines the number of scale steps that make up an octave. Usually the 7-note major scale.

Function: set-global-staff-size sz ¶

  Set the default staff size, where sz is thought to be in points.

Function: ly:set-grob-creation-callback cb ¶

  Specify a procedure that gets called every time a new grob is created. The callback receives as arguments the grob that was created, the name of the C++ source file that caused the grob to be created, and the corresponding line number in the C++ source file. Call with `#f` as argument to unset the callback.

Function: ly:set-grob-modification-callback cb ¶

  Specify a procedure that gets called every time LilyPond modifies a grob property. The callback receives as arguments the grob that is being modified, the name of the C++ file in which the modification was requested, the line number in the C++ file in which the modification was requested, the name of the function in which the modification was requested, the property to be changed, and the new value for the property. Call with `#f` as argument to unset the callback.

Function: ly:set-middle-C! context ¶

  Set the `middleCPosition` variable in context based on the variables `middleCClefPosition` and `middleCOffset`.

Function: set-mus-properties! m alist ¶

  Set all of alist as properties of m.

Function: ly:set-option var val ¶

  Set program option var to value val.

  See also function `ly:add-option`.

Function: ly:set-origin! m origin ¶

  Set the origin given in origin to m. m is typically a music expression or a list of music. List structures are searched recursively, but recursion stops at the changed music expressions themselves.

  origin is generally of type `ly:input-location?`, defaulting to `(*location*)`. Other valid values for `origin` are a music expression which is then used as the source of location information, or `#f` or `'()` in which case no action is performed. The return value is m itself.

Function: set-output-property grob-name symbol val ¶

  Usage example: `\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1))`

Function: set-paper-size name rest … ¶

  Set the paper size within `\paper` to name with orientation rest.

  name is either a predefined paper size string like `"quarto"` or a pair of numbers like `'(cons (* 100 mm) (* 50 mm))` to specify a custom paper size.

  If optional argument rest is set to `'landscape`, pages are rotated by 90 degrees, and wider line widths are set accordingly. Swapping the paper dimensions without having the print rotated can be achieved by appending the string `landscape` to the name of the paper size itself (example: `"a4landscape"`).

  This function can only be used within a `\paper` block; it must come before any other functions used within the same `\paper` block. See also function `set-default-paper-size`.

Function: ly:set-property-cache-callback cb ¶

  Specify a procedure that gets called whenever LilyPond calculates a callback function and caches the result. The callback receives as arguments the grob whose property it is, the name of the property, the name of the callback that calculated the property, and the new (cached) value of the property. Call with `#f` as argument to unset the callback.

Function: ly:set-rand-seed seed ¶

  Seed the internal pseudo-random generator with the specified value.

Function: shift-one-duration-log music shift dot ¶

  Add shift to `duration-log` of `'duration` in music and optionally dot to any note encountered. The number of dots in the shifted music may not be less than zero.

Function: shift-right-at-line-begin g ¶

  Shift an item to the right, but only at the start of the line.

Function: shift-semitone->pitch key semitone->pitch ¶

  Given a function semitone->pitch converting a semitone number into a note value for a lookup table created in relation to C, returns a corresponding function in relation to key. The note values returned by this function differ only enharmonically from the original semitone->pitch function.

Function: skip->rest mus ¶

  Replace mus by `RestEvent` of the same duration if it is a `SkipEvent`. Useful for extracting parts from crowded scores.

Function: skip-of-length mus ¶

  Create a skip of exactly the same length as mus.

Function: skip-of-moment-span start-moment end-moment ¶

  Make skip music fitting between start-moment and end-moment. The grace part of end-moment matters only if start-moment and end-mom have the same main part.

Function: ly:skyline? x ¶

  Is x a smob of class `Skyline`?

Function: ly:skyline->points skyline horizon-axis ¶

  Return a list of points from the given skyline, if viewed with horizon-axis as ‘horizon axis’. Joining the points with a line draws the outline of the skyline.

Function: ly:skyline-distance skyline other-skyline horizon-padding ¶

  Compute the distance between the two skylines, padding by horizon-padding if provided.

Function: ly:skyline-empty? sky ¶

  Return whether skyline sky is empty.

Function: ly:skyline-height skyline x ¶

  Return the height of skyline at point x.

Function: ly:skyline-max-height skyline ¶

  Return the maximum height found in skyline.

Function: ly:skyline-max-height-position skyline ¶

  Return the position at which skyline reaches its maximum height.

Function: ly:skyline-merge skyline1 skyline2 ¶

  Merge the two given skylines.

Function: ly:skyline-pad skyline horizon-padding ¶

  Return a version of skyline padded by horizon-padding along the horizon.

Function: ly:skyline-touching-point skyline other-skyline horizon-padding ¶

  Get the point where skyline and other-skyline (having opposite directions) reach their minimum distance. If horizon-padding is provided, one skyline is padded with it first.

Function: ly:skylines-for-stencil stencil axis ¶

  Return a pair of skylines representing the outline of stencil. axis is the ‘horizon axis’ (i.e., this function gives skylines suitable for the `vertical-skylines` property if axis is `X`, and for `horizontal-skylines` if axis is `Y`).

Function: ly:smob-protects ¶

  Return LilyPond’s internal smob protection list.

Function: ly:solve-spring-rod-problem springs rods length ragged ¶

  Solve a spring and rod problem for count objects that are connected by count-1 springs, and an arbitrary number of rods. count is implicitly given by springs and rods. The springs argument has the format `(ideal, inverse_hook)` and rods is of the form `(idx1, idx2, distance)`.

  length is a number, ragged a boolean.

  The function returns a list containing the force (positive for stretching, negative for compressing and `#f` for non-satisfied constraints) followed by spring-count+1 positions of the objects.

Function: ly:source-file? x ¶

  Is x a smob of class `Source_file`?

Function: ly:source-files parser-smob ¶

  Return a list of input files that have been opened up to here, including the files that have been closed already. A parser, parser-smob, may optionally be specified.

Function: ly:span-bar::before-line-breaking grob ¶

  A dummy callback that kills the `Grob` grob if it contains no elements.

Function: ly:span-bar::calc-anchor grob ¶

  Calculate the anchor position of the `SpanBar`. The anchor is used for the correct placement of bar numbers, etc.

Function: ly:span-bar::calc-glyph-name grob ¶

  Return the `'glyph-name` of the corresponding `BarLine` grob. The corresponding `SpanBar` glyph is computed within `span-bar::compound-bar-line`.

Function: span-bar::compound-bar-line grob bar-glyph extent ¶

  Build the stencil of the span bar.

Function: ly:span-bar::print grob ¶

  The print routine for span bars.

Function: ly:span-bar::width grob ¶

  Compute the width of the `SpanBar` stencil.

Function: Span_stem_engraver ctx ¶

  Connect cross-staff stems to the stems above in the system.

Function: ly:spanner? g ¶

  Is g a spanner object?

Function: ly:spanner-bound spanner dir def ¶

  Get one of the bounds of spanner. dir is `-1` for left, and `1` for right. If the spanner does not (yet) have a bound for this direction, return def, or `'()` if def is not specified.

Function: ly:spanner-broken-into spanner ¶

  Return broken-into list for spanner.

Function: ly:spanner-broken-neighbor spanner dir ¶

  Return the broken neighbor of spanner on the next or previous system according to dir. If there is no neighbor, return `#f`.

Function: ly:spanner-set-bound! spanner dir item ¶

  Set grob item as bound in direction dir for spanner.

Function: ly:spawn command rest ¶

  Simple Scheme interface to the GLib function `g_spawn_sync`. If an error occurs, format it with `format` and rest.

Function: split-list-by-group-lengths lst groups ¶

  Split list into groups whose lengths are given in groups. For example:

      (split-list-by-group-lengths '(a b c d e f) '(3 2 1)
      ⇒ ((a b c) (d e) (f))

Function: split-list-by-separator lst pred ¶

  Split lst at each element that satisfies pred, and return the parts (with the separators removed) as a list of lists. Example:

      (split-list-by-separator '(a 0 b c 1 d) number?)
         ⇒ ((a) (b c) (d))

Function: ly:spring? x ¶

  Is x a smob of class `Spring`?

Function: ly:spring-set-inverse-compress-strength! spring strength ¶

  Set the inverse compress strength of spring.

Function: ly:spring-set-inverse-stretch-strength! spring strength ¶

  Set the inverse stretch strength of spring.

Function: stack-lines dir padding baseline stils ¶

  Stack stencils vertically with a baseline skip.

Function: stack-stencil-line space stencils ¶

  Adjoin a list of stencils along the x axis, leaving space between the end of each stencil and the beginning of the following stencil. Stencils with empty y extent are not given space before them and don’t avoid overlapping other stencils.

Function: stack-stencils axis dir padding stils ¶

  Stack stencils stils in direction axis, dir, using padding.

Function: stack-stencils-padding-list axis dir paddings stils ¶

  Stack stencils stils in direction axis, dir, using a list of paddings.

Function: staff-ellipsis::print grob ¶

  Callback for `StaffEllipsis` grob, which is used with `skipTypesetting`.

Function: staff-ellipsis::pure-height grob beg end ¶

  Callback for `StaffEllipsis` grob, which is used with `skipTypesetting`.

Function: ly:staff-symbol-line-thickness grob ¶

  Return the current staff line thickness in the staff associated with grob, expressed as a multiple of the current staff space height.

Function: ly:staff-symbol-staff-radius grob ¶

  Return the radius of the staff associated with grob.

Function: ly:staff-symbol-staff-space grob ¶

  Return the current staff space height in the staff associated with grob, expressed as a multiple of the default height of a staff space in the traditional five-line staff.

Function: ly:stderr-redirect fd-or-file-name mode ¶

  Redirect standard error output (stderr) to file descriptor fd if the first parameter is an integer, or to file file-name, opened with mode.

Function: ly:stem::extremal-heads ¶

  Return a pair containing the lowest and highest heads on this stem.

  If the stem has only one head, both elements of the pair refer to it. If the stem has no heads, the result is `'(() . ())`.

Function: ly:stencil? x ¶

  Is x a smob of class `Stencil`?

Function: ly:stencil-add args ¶

  Combine stencils. Takes any number of arguments.

Function: ly:stencil-aligned-to stil axis dir ¶

  Align stencil stil using its own extents. dir is a number. `-1` and `1` are left and right, respectively. Other values are interpolated (so `0` means the center).

Function: ly:stencil-combine-at-edge first axis direction second padding ¶

  Construct a stencil by putting second next to first.

  axis can be `0` (x axis) or `1` (y axis). direction can be `-1` (left or down) or `1` (right or up). The stencils are juxtaposed with padding as extra space. first and second may also be `'()` or `#f`.

  If either of the stencils is spacing (i.e., the result of `\\hspace` markup and similar commands), padding does not apply.

Function: ly:stencil-empty? stil axis ¶

  Return whether stil is empty. If an optional axis is supplied, the emptiness check is restricted to that axis.

Function: ly:stencil-expr stil ¶

  Return the expression of stencil stil.

Function: ly:stencil-extent stil axis ¶

  Return a pair of numbers signifying the extent of stencil stil in axis direction (`0` or `1` for x and y axis, respectively).

Function: ly:stencil-outline stil outline ¶

  Return a stencil with the stencil expression (inking) of stencil stil but with outline and dimensions from stencil outline.

Function: stencil-pad-around amount stencil ¶

  Add a padding of amount around stencil, returning a new stencil.

Function: ly:stencil-rotate stil angle x y ¶

  Return a stencil stil rotated by angle degrees around the relative offset (x, y). E.g., an offset of (-1, 1) rotates the stencil around the left upper corner.

Function: ly:stencil-rotate-absolute stil angle x y ¶

  Return a stencil stil rotated by angle degrees around point (x, y), given in absolute coordinates.

Function: ly:stencil-scale stil x y ¶

  Scale stencil stil using the horizontal and vertical scaling factors x and optional y (defaulting to x). Negative values flip or mirror stil without changing its origin; this may result in collisions unless it is repositioned.

Function: stencil-squash-extent stencil axis ¶

  Set the extent of stencil in the dimension axis to zero.

Function: ly:stencil-stack first axis direction second padding mindist ¶

  Construct a stencil by stacking second next to first.

  axis can be `0` (x axis) or `1` (y axis). direction can be `-1` (left or down) or `1` (right or up). The stencils are juxtaposed with padding as extra space. first and second may also be `'()` or `#f`. As opposed to `ly:stencil-combine-at-edge`, metrics are suited for successively accumulating lines of stencils. Also, second stencil is drawn last.

  If mindist is specified, reference points are placed apart at least by this distance. If either of the stencils is spacing (i.e., the result of `\\hspace` markup and similar commands), padding and mindist do not apply.

Function: ly:stencil-translate stil offset ¶

  Return a copy of stencil stil but translated by offset (a pair of numbers).

Function: ly:stencil-translate-axis stil amount axis ¶

  Return a copy of stencil stil but translated by amount in axis direction.

Function: stencil-true-extent stencil axis ¶

  Return the extent of the actual printed ink of stencil on axis.

Function: stencil-whiteout stil [style [thickness [line-thickness [color]]]] ¶

  White-out stencil stil (i.e., add a white background around it).

  If set, optional argument style determines the shape of the white background: value `'outline` makes the function use `stencil-whiteout-outline` to produce the white background, value `'rounded-box` applies `stencil-whiteout-box` to produce a white background with rounded corners. If other values are given (e.g., `'box`) or when unspecified, `stencil-whiteout-box` is used to produce a white background with square corners.

  If optional argument thickness is specified it determines how far, as a multiple of line-thickness (which is an optional argument, too, defaulting to value 0.1), the white background extends past the extents of stil. If thickness is not specified, an appropriate default is chosen based on style.

  Optional argument color sets the color of the white-out, defaulting to white.

Function: stencil-whiteout-box stil [thickness [blot [color]]] ¶

  White-out stencil stil by printing it on top of a white rectangle.

  By default, the white background rectangle encloses stil without any borders; this can be changed by setting optional argument thickness (defaulting to value zero). Optional argument blot gives the blot diameter for rounding the corners of the background rectangle (default value is zero, making sharp corners). Optional argument color changes the background color (defaulting to white).

Function: stencil-whiteout-outline stil [thickness [color [angle-increments [radial-increments]]]] ¶

  White-out stencil stil by surrounding its outline with white.

  This function works by creating a series of white stencils radially offset from the original stencil with angles from 0° to 360°.

  Optional argument thickness (default value 0.3) specifies how big the white outline is.

  The number of angle increments can be controlled with optional argument angle-increments, defaulting to value 16 (corresponding to 22.5°). The number of radius increments (from zero to thickness) can be controlled with optional argument radial-increments, defaulting to value 1. Thus radial-increments specifies how many copies of the white stencil we make on our way out to thickness, and angle-increments how many copies of the white stencil we make between 0° and 360°. In total, radial-increments*angle-increments copies are drawn.

  Optional argument color changes the white-out color (defaulting to white).

Function: stencil-with-color stencil color ¶

  Return a modified version of the given stencil that is colored with the given color. See `normalize-color` for possible color formats.

Function: straight-flag flag-thickness flag-spacing upflag-angle upflag-length downflag-angle downflag-length ¶

  Construct a straight flag stencil function.

  The constructed function expects a single argument, grob.

  flag-thickness and flag-spacing are given in staff spaces, upflag-angle and downflag-angle are given in degrees, and upflag-length and downflag-length are given in staff spaces.

  All lengths are scaled according to the font size of the note. If the `stroke-style` property in grob is set to the string `"grace"`, add a slash through the flag.

  This is an auxiliary function for `modern-straight-flag`, `old-straight-flag`, and `flat-flag`.

Function: ly:stream-event? obj ¶

  Is obj a `Stream_event` object?

Function: string->string-list str ¶

  Convert string str into a list of strings with length 1. `"aBc"` will be converted to `("a" "B" "c")`. For an empty string or if str is not of type `string?`, return a list containing `""`.

Function: ly:string-percent-encode str ¶

  Encode all characters in string str with hexadecimal percent escape sequences, with the following exceptions: characters ‘`-./_`’ and characters in ranges `0-9`, `A-Z`, and `a-z`.

Function: ly:string-substitute a b s ¶

  Replace string a by string b in string s.

Function: style-note-heads heads style music ¶

  Set style for all heads in music. Works both inside of and outside of chord construct.

Function: suggest-convert-ly-message version-seen ¶

  Internally used when the file has an error, to suggest usage of `convert-ly` if the `\version` statement is considered outdated compared to the LilyPond version that is running.

Function: symbol-concatenate names … ¶

  Like `string-concatenate`, but for symbols.

Function: ly:system-font-load name ¶

  Load the OpenType system font `name.otf`. Fonts loaded with this command must contain two additional SFNT font tables called `LILC` and `LILY`, needed for typesetting musical elements. Currently, only the Emmentaler and the Emmentaler-Brace fonts fulfill these requirements.

  Note that only `ly:font-get-glyph` and derived code (like `\lookup`) can access glyphs from the system fonts; text strings are handled exclusively via the Pango interface.

Function: tab-note-head::handle-ties grob ¶

  Handle tab note heads ending a `Tie`, deal with `RepeatTie`.

  If a `Slur` or `Glissando` starts at a tie-ending `TabNoteHead` always print the `TabNoteHead` parenthesized.

  If a tie-ending `TabNoteHead` occurs at the beginning of a line print it parenthesized unless sub-properties `note-head-visible` and `parenthesize` of `details.tied-properties` are set `#f`, which can be done manually or using `hideSplitTiedTabNotes`.

  A `TabNoteHead` with `\repeatTie` is printed parenthesized as well, the same holds if `\repeatTie` is applied to a chord. This is useful for seconda volta blocks. This behavior can be switched off with `hideSplitTiedTabNotes`.

Function: tab-note-head::print grob ¶

  Print a tab note head.

Function: tag-group-defined? tag-group ¶

  Test if given tag-group is defined.

  Return `#t` if so and `#f` otherwise.

Function: tag-group-get tag ¶

  Return the tag group (as a list of symbols) that the given tag symbol belongs to, `#f` if none.

Function: tags-keep-predicate tags ¶

  Return a predicate that returns `#f` for any music that is to be removed by `\keepWithTag` on the given symbol or list of symbols tags.

Function: tags-remove-predicate tags ¶

  Return a predicate that returns `#f` for any music that is to be removed by `\removeWithTag` on the given symbol or list of symbols tags.

Function: teaching-accidental-rule context pitch barnum ¶

  An accidental rule that typesets a cautionary accidental if it is included in the key signature and does not directly follow a note on the same staff line.

Function: ly:text-interface::interpret-markup ¶

  Convert a text markup into a stencil. layout is a `\\layout` block. props is an alist chain, i.e., a list of alists. markup is the markup text to be processed. See also `grob-interpret-markup`.

Function: time-signature? x ¶

  Is x syntactically a time signature in canonical form?

  When defining a music function that requires a canonical time signature, use this predicate in the function signature, then validate the value in the function body.

  A time signature is one fraction or a list of two or more fractions (representing concatenation).

  A fraction is a pair, `(numerator . denominator)`, where the denominator is always a number. The numerator is one term or a list of two or more terms, where each term is either a number or another fraction. A list represents concatenation.

Function: ly:time-signature::calc-fraction grob ¶

  Compatibility callback for the deprecated `fraction` property.

  Returns the value of `time-signature` reduced to a fraction.

Function: ly:time-signature::print grob ¶

  Print routine for time signatures.

Function: ly:time-signature::print-x grob ¶

  Print routine for an X-shaped sign indicating no time signature.

Function: time-signature->fraction time-sig ¶

  Reduce canonical time signature time-sig to a single, simple fraction (or #f).

Function: ly:time-tracer-include-and-remove-file file-name ¶

  Incorporate records from file file-name into the current trace. If successful, remove file-name. This supports aggregating completed traces from child processes into the parent’s trace.

Function: ly:time-tracer-restart name ¶

  Reinitialize the global tracer in a child process to avoid interfering with the parent’s trace. name is the name given to the top-level duration slice in the new trace.

Function: ly:time-tracer-set-file file-name ¶

  Direct time-trace output to file file-name. If file-name is `#f`, disable tracing.

Function: ly:time-tracer-stop ¶

  Finalize the global tracer.

Function: to-staff-space size [unit] ¶

  Convert absolute size in unit to staff-space units.

  Possible values for unit are `'pt`, `'bp`, `'mm`, `'cm`, and `'in`. If unit is omitted, use `'pt`.

  Example:

      \markup \hspace #(to-staff-space 25 'mm)

Function: toe-heel-subst-stencil grob left right ¶

  Construct a stencil for a toe-heel substitution.

Function: ly:transform? x ¶

  Is x a smob of class `Transform`?

Function: ly:transform->list transform ¶

  Convert a transform matrix to a list of six values. Values are xx, yx, xy, yy, x0, y0.

Function: ly:translate-cpp-warning-scheme str ¶

  Translate a string in C++ `printf` format and modify it to use it for Scheme formatting.

Function: ly:translator? x ¶

  Is x a smob of class `Translator`?

Function: ly:translator-context trans ¶

  Return the context of the translator object trans.

Function: ly:translator-description creator ¶

  Return an alist of properties of translator definition creator.

Function: ly:translator-group? x ¶

  Is x a smob of class `Translator_group`?

Function: ly:translator-name creator ¶

  Return the type name of the translator definition creator. The name is a symbol.

Function: ly:transpose-key-alist l pit ¶

  Make a new key alist of l transposed by pitch pit.

Function: tsig-abbr-expand abbr ¶

  Convert abbreviated time signature abbr to canonical form.

  This change is purely syntactic and does not check any values. Return `#f` if abbr is not syntactically valid.

  See the `\timeAbbrev` command for a description of abbreviated form. See the `\time` command for a description of canonical form.

  Example:

      (tsig-abbr-expand '((2 3 8) (2 4)))
      ⇒ '(((2 3) . 8) (2 . 4))

Function: ly:ttf->pfa ttf-file-name idx ¶

  Convert the contents of a TrueType font file to PostScript Type 42 font, returning it as a string. The optional idx argument is useful for TrueType collections (TTC) only; it specifies the font index within the TTC. The default value of idx is 0.

Function: ly:ttf-ps-name ttf-file-name idx ¶

  Extract the PostScript name from a TrueType font. The optional idx argument is useful for TrueType collections (TTC) only; it specifies the font index within the TTC. The default value of idx is 0.

Function: ly:tuplet-description? x ¶

  Is x a smob of class `Tuplet_description`?

Function: unbroken-or-first-broken-spanner? spanner ¶

  Is spanner either unbroken or the first of its broken siblings?

Function: unbroken-or-last-broken-spanner? spanner ¶

  Is spanner either unbroken or the last of its broken siblings?

Function: unbroken-spanner? spanner ¶

  Is spanner unbroken? A spanner has to be broken if it spans more than one system, or if one of its bounds is on the limit of the system. This function returns `#f` on the clones, but `#t` on the originals.

Function: unfold-repeats types music ¶

  Replace repeats of the types given by types with unfolded repeats. If types is an empty list, `repeated-music` is taken, unfolding all.

Function: unfold-repeats-fully music ¶

  Unfold repeats and expand the resulting `unfolded-repeated-music`.

Function: uniq-list lst ¶

  Remove doublets from list lst (i.e., make its elements unique), assuming that it is sorted. Uses `equal?` for comparisons.

Function: uniqued-alist alist [hash-func [assoc-func]] ¶

  Make keys unique in alist. If duplicate keys are found, the first key-value pair is kept. The order of entries is otherwise preserved. The optional arguments hash-func and assoc-func are a hashing function and an alist retrieval function, as in Guile’s `hashx-…` functions.

Function: unity-if-multimeasure context dur ¶

  Given a context and a duration, return `1` if the duration is longer than the `measureLength` in that context, and `#f` otherwise. This supports historic use of `Completion_heads_engraver` to split `c1*3` into three whole notes.

Function: ly:unpure-call data grob rest ¶

  Convert property data (unpure-pure container or procedure) to value in an unpure context defined by grob and possibly rest arguments.

Function: ly:unpure-pure-container? x ¶

  Is x a smob of class `Unpure_pure_container`?

Function: ly:unpure-pure-container-pure-part pc ¶

  Return the pure part of pc.

Function: ly:unpure-pure-container-unpure-part pc ¶

  Return the unpure part of pc.

Function: unspecified-music? mus ¶

  Recognize ‘unspecified’ music by its `void` property. Music functions and event functions return such music by default.

Function: ly:usage ¶

  Print usage message.

Function: value-for-spanner-piece property args ¶

  Associate a piece of broken spanner grob with an element of list arg.

Function: ly:verbose-output? ¶

  Was verbose output requested, i.e., is the log level at least `DEBUG`?

Function: ly:version ¶

  Return the current LilyPond version as a list, e.g., `(1 3 127 uu1)`.

Function: ly:version? op ver ¶

  Use operator op to compare the currently executed LilyPond version with a given version ver, which is passed as a list of numbers.

Function: voicify-music m [id] ¶

  Recursively split chords that are separated with `\\`. Optional id can be a list of context ids to use. If numeric, they also indicate a voice type override. If id is just a single number, that’s where numbering starts.

Function: volta-bracket::calc-hook-visibility bar-glyph ¶

  Determine the visibility of the volta bracket end hook, returning `#t` if no hook should be drawn.

Function: ly:volta-bracket::calc-shorten-pair grob ¶

  Calculate the `shorten-pair` values for an ideal placement of the volta brackets relative to the bar lines.

Function: volta-spec-music number-list music ¶

  Add \volta number-list to music.

Function: ly:warning str rest ¶

  A Scheme callable function to issue the warning str. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: ly:warning-located location str rest ¶

  A Scheme callable function to issue the warning str at the specified location in an input file. The message is formatted with `format`; rest holds the formatting arguments (if any).

Function: ly:wide-char->utf-8 wc ¶

  Encode the Unicode codepoint wc, an integer, as UTF-8.

Function: write-me message x ¶

  Return x. Display message and write x. Handy for debugging, possibly turned off.

#### LilyPond Internals Reference v2.26.0 (stable-branch).

- 1 Music definitions
  - 1.1 Music expressions
    - 1.1.1 `AbsoluteDynamicEvent`
    - 1.1.2 `AdHocJumpEvent`
    - 1.1.3 `AdHocMarkEvent`
    - 1.1.4 `AlternativeEvent`
    - 1.1.5 `AnnotateOutputEvent`
    - 1.1.6 `ApplyContext`
    - 1.1.7 `ApplyOutputEvent`
    - 1.1.8 `ArpeggioEvent`
    - 1.1.9 `ArticulationEvent`
    - 1.1.10 `BarCheckEvent`
    - 1.1.11 `BarEvent`
    - 1.1.12 `BassFigureEvent`
    - 1.1.13 `BeamEvent`
    - 1.1.14 `BeamForbidEvent`
    - 1.1.15 `BendAfterEvent`
    - 1.1.16 `BendSpanEvent`
    - 1.1.17 `BreakDynamicSpanEvent`
    - 1.1.18 `BreathingEvent`
    - 1.1.19 `CaesuraEvent`
    - 1.1.20 `ChordSlurEvent`
    - 1.1.21 `ClusterNoteEvent`
    - 1.1.22 `CodaMarkEvent`
    - 1.1.23 `CompletizeExtenderEvent`
    - 1.1.24 `ContextChange`
    - 1.1.25 `ContextSpeccedMusic`
    - 1.1.26 `CrescendoEvent`
    - 1.1.27 `DalSegnoEvent`
    - 1.1.28 `DecrescendoEvent`
    - 1.1.29 `DoublePercentEvent`
    - 1.1.30 `DurationLineEvent`
    - 1.1.31 `EpisemaEvent`
    - 1.1.32 `Event`
    - 1.1.33 `EventChord`
    - 1.1.34 `ExtenderEvent`
    - 1.1.35 `FineEvent`
    - 1.1.36 `FingerGlideEvent`
    - 1.1.37 `FingeringEvent`
    - 1.1.38 `FootnoteEvent`
    - 1.1.39 `GlissandoEvent`
    - 1.1.40 `GraceMusic`
    - 1.1.41 `HarmonicEvent`
    - 1.1.42 `HyphenEvent`
    - 1.1.43 `InitialContextMusic`
    - 1.1.44 `KeyChangeEvent`
    - 1.1.45 `LabelEvent`
    - 1.1.46 `LaissezVibrerEvent`
    - 1.1.47 `LigatureEvent`
    - 1.1.48 `LineBreakEvent`
    - 1.1.49 `LyricCombineMusic`
    - 1.1.50 `LyricEvent`
    - 1.1.51 `MeasureCounterEvent`
    - 1.1.52 `MeasureSpannerEvent`
    - 1.1.53 `MultiMeasureArticulationEvent`
    - 1.1.54 `MultiMeasureRestEvent`
    - 1.1.55 `MultiMeasureRestMusic`
    - 1.1.56 `MultiMeasureTextEvent`
    - 1.1.57 `Music`
    - 1.1.58 `NonArpeggiatoEvent`
    - 1.1.59 `NoteEvent`
    - 1.1.60 `NoteGroupingEvent`
    - 1.1.61 `OptionalMaterialEvent`
    - 1.1.62 `OttavaEvent`
    - 1.1.63 `OverrideProperty`
    - 1.1.64 `PageBreakEvent`
    - 1.1.65 `PageTurnEvent`
    - 1.1.66 `PartCombineEvent`
    - 1.1.67 `PartCombineMusic`
    - 1.1.68 `PartialEvent`
    - 1.1.69 `PartialSet`
    - 1.1.70 `PercentEvent`
    - 1.1.71 `PercentRepeatedMusic`
    - 1.1.72 `PesOrFlexaEvent`
    - 1.1.73 `PhrasingSlurEvent`
    - 1.1.74 `PolymetricTimeSignatureEvent`
    - 1.1.75 `PolymetricTimeSignatureMusic`
    - 1.1.76 `PostEvents`
    - 1.1.77 `PropertySet`
    - 1.1.78 `PropertyUnset`
    - 1.1.79 `QuoteMusic`
    - 1.1.80 `ReferenceTimeSignatureEvent`
    - 1.1.81 `ReferenceTimeSignatureMusic`
    - 1.1.82 `RehearsalMarkEvent`
    - 1.1.83 `RelativeOctaveCheck`
    - 1.1.84 `RelativeOctaveMusic`
    - 1.1.85 `RepeatSlashEvent`
    - 1.1.86 `RepeatTieEvent`
    - 1.1.87 `RestEvent`
    - 1.1.88 `RevertProperty`
    - 1.1.89 `ScriptEvent`
    - 1.1.90 `SectionEvent`
    - 1.1.91 `SectionLabelEvent`
    - 1.1.92 `SegnoMarkEvent`
    - 1.1.93 `SegnoRepeatedMusic`
    - 1.1.94 `SequentialAlternativeMusic`
    - 1.1.95 `SequentialMusic`
    - 1.1.96 `SimultaneousMusic`
    - 1.1.97 `SkipEvent`
    - 1.1.98 `SkipMusic`
    - 1.1.99 `SkippedMusic`
    - 1.1.100 `SlurEvent`
    - 1.1.101 `SostenutoEvent`
    - 1.1.102 `SpacingSectionEvent`
    - 1.1.103 `SpanEvent`
    - 1.1.104 `StaffHighlightEvent`
    - 1.1.105 `StaffSpanEvent`
    - 1.1.106 `StringNumberEvent`
    - 1.1.107 `StrokeFingerEvent`
    - 1.1.108 `SustainEvent`
    - 1.1.109 `TempoChangeEvent`
    - 1.1.110 `TextMarkEvent`
    - 1.1.111 `TextScriptEvent`
    - 1.1.112 `TextSpanEvent`
    - 1.1.113 `TieEvent`
    - 1.1.114 `TimeScaledMusic`
    - 1.1.115 `TransposedMusic`
    - 1.1.116 `TremoloEvent`
    - 1.1.117 `TremoloRepeatedMusic`
    - 1.1.118 `TremoloSpanEvent`
    - 1.1.119 `TrillSpanEvent`
    - 1.1.120 `TupletSpanEvent`
    - 1.1.121 `UnaCordaEvent`
    - 1.1.122 `UnfoldedRepeatedMusic`
    - 1.1.123 `UnfoldedSpeccedMusic`
    - 1.1.124 `UnrelativableMusic`
    - 1.1.125 `VoiceSeparator`
    - 1.1.126 `VoltaRepeatEndEvent`
    - 1.1.127 `VoltaRepeatStartEvent`
    - 1.1.128 `VoltaRepeatedMusic`
    - 1.1.129 `VoltaSpanEvent`
    - 1.1.130 `VoltaSpeccedMusic`
    - 1.1.131 `VowelTransitionEvent`
  - 1.2 Music classes
    - 1.2.1 `absolute-dynamic-event`
    - 1.2.2 `ad-hoc-jump-event`
    - 1.2.3 `ad-hoc-mark-event`
    - 1.2.4 `alternative-event`
    - 1.2.5 `annotate-output-event`
    - 1.2.6 `apply-output-event`
    - 1.2.7 `arpeggio-event`
    - 1.2.8 `articulation-event`
    - 1.2.9 `bar-check-event`
    - 1.2.10 `bar-event`
    - 1.2.11 `bass-figure-event`
    - 1.2.12 `beam-event`
    - 1.2.13 `beam-forbid-event`
    - 1.2.14 `bend-after-event`
    - 1.2.15 `bend-span-event`
    - 1.2.16 `break-dynamic-span-event`
    - 1.2.17 `break-event`
    - 1.2.18 `break-span-event`
    - 1.2.19 `breathing-event`
    - 1.2.20 `caesura-event`
    - 1.2.21 `chord-slur-event`
    - 1.2.22 `cluster-note-event`
    - 1.2.23 `coda-mark-event`
    - 1.2.24 `completize-extender-event`
    - 1.2.25 `crescendo-event`
    - 1.2.26 `dal-segno-event`
    - 1.2.27 `decrescendo-event`
    - 1.2.28 `double-percent-event`
    - 1.2.29 `duration-line-event`
    - 1.2.30 `dynamic-event`
    - 1.2.31 `episema-event`
    - 1.2.32 `extender-event`
    - 1.2.33 `fine-event`
    - 1.2.34 `finger-glide-event`
    - 1.2.35 `fingering-event`
    - 1.2.36 `footnote-event`
    - 1.2.37 `general-rest-event`
    - 1.2.38 `glissando-event`
    - 1.2.39 `harmonic-event`
    - 1.2.40 `hyphen-event`
    - 1.2.41 `key-change-event`
    - 1.2.42 `label-event`
    - 1.2.43 `laissez-vibrer-event`
    - 1.2.44 `layout-instruction-event`
    - 1.2.45 `ligature-event`
    - 1.2.46 `line-break-event`
    - 1.2.47 `lyric-event`
    - 1.2.48 `mark-event`
    - 1.2.49 `measure-counter-event`
    - 1.2.50 `measure-spanner-event`
    - 1.2.51 `melodic-event`
    - 1.2.52 `multi-measure-articulation-event`
    - 1.2.53 `multi-measure-rest-event`
    - 1.2.54 `multi-measure-text-event`
    - 1.2.55 `music-event`
    - 1.2.56 `non-arpeggiato-event`
    - 1.2.57 `note-event`
    - 1.2.58 `note-grouping-event`
    - 1.2.59 `optional-material-event`
    - 1.2.60 `ottava-event`
    - 1.2.61 `page-break-event`
    - 1.2.62 `page-turn-event`
    - 1.2.63 `part-combine-event`
    - 1.2.64 `partial-event`
    - 1.2.65 `pedal-event`
    - 1.2.66 `percent-event`
    - 1.2.67 `pes-or-flexa-event`
    - 1.2.68 `phrasing-slur-event`
    - 1.2.69 `polymetric-time-signature-event`
    - 1.2.70 `reference-time-signature-event`
    - 1.2.71 `rehearsal-mark-event`
    - 1.2.72 `repeat-slash-event`
    - 1.2.73 `repeat-tie-event`
    - 1.2.74 `rest-event`
    - 1.2.75 `rhythmic-event`
    - 1.2.76 `script-event`
    - 1.2.77 `section-event`
    - 1.2.78 `section-label-event`
    - 1.2.79 `segno-mark-event`
    - 1.2.80 `skip-event`
    - 1.2.81 `slur-event`
    - 1.2.82 `sostenuto-event`
    - 1.2.83 `spacing-section-event`
    - 1.2.84 `span-dynamic-event`
    - 1.2.85 `span-event`
    - 1.2.86 `staff-highlight-event`
    - 1.2.87 `staff-span-event`
    - 1.2.88 `StreamEvent`
    - 1.2.89 `string-number-event`
    - 1.2.90 `stroke-finger-event`
    - 1.2.91 `structural-event`
    - 1.2.92 `sustain-event`
    - 1.2.93 `tempo-change-event`
    - 1.2.94 `text-mark-event`
    - 1.2.95 `text-script-event`
    - 1.2.96 `text-span-event`
    - 1.2.97 `tie-event`
    - 1.2.98 `time-signature-event`
    - 1.2.99 `tremolo-event`
    - 1.2.100 `tremolo-span-event`
    - 1.2.101 `trill-span-event`
    - 1.2.102 `tuplet-span-event`
    - 1.2.103 `una-corda-event`
    - 1.2.104 `volta-repeat-end-event`
    - 1.2.105 `volta-repeat-start-event`
    - 1.2.106 `volta-span-event`
    - 1.2.107 `vowel-transition-event`
  - 1.3 Music properties
- 2 Translation
  - 2.1 Contexts
    - 2.1.1 `ChoirStaff`
    - 2.1.2 `ChordGrid`
    - 2.1.3 `ChordGridScore`
    - 2.1.4 `ChordNames`
    - 2.1.5 `CueVoice`
    - 2.1.6 `Devnull`
    - 2.1.7 `DrumStaff`
    - 2.1.8 `DrumVoice`
    - 2.1.9 `Dynamics`
    - 2.1.10 `FiguredBass`
    - 2.1.11 `FretBoards`
    - 2.1.12 `Global`
    - 2.1.13 `GrandStaff`
    - 2.1.14 `GregorianTranscriptionLyrics`
    - 2.1.15 `GregorianTranscriptionStaff`
    - 2.1.16 `GregorianTranscriptionVoice`
    - 2.1.17 `InternalGregorianStaff`
    - 2.1.18 `InternalMensuralStaff`
    - 2.1.19 `KievanStaff`
    - 2.1.20 `KievanVoice`
    - 2.1.21 `Lyrics`
    - 2.1.22 `MensuralStaff`
    - 2.1.23 `MensuralVoice`
    - 2.1.24 `NoteNames`
    - 2.1.25 `NullVoice`
    - 2.1.26 `OneStaff`
    - 2.1.27 `PetrucciStaff`
    - 2.1.28 `PetrucciVoice`
    - 2.1.29 `PianoStaff`
    - 2.1.30 `RhythmicStaff`
    - 2.1.31 `Score`
    - 2.1.32 `Staff`
    - 2.1.33 `StaffGroup`
    - 2.1.34 `StandaloneRhythmScore`
    - 2.1.35 `StandaloneRhythmStaff`
    - 2.1.36 `StandaloneRhythmVoice`
    - 2.1.37 `TabStaff`
    - 2.1.38 `TabVoice`
    - 2.1.39 `VaticanaLyrics`
    - 2.1.40 `VaticanaScore`
    - 2.1.41 `VaticanaStaff`
    - 2.1.42 `VaticanaVoice`
    - 2.1.43 `Voice`
  - 2.2 Engravers and Performers
    - 2.2.1 `Accidental_engraver`
    - 2.2.2 `Alteration_glyph_engraver`
    - 2.2.3 `Ambitus_engraver`
    - 2.2.4 `Apply_output_engraver`
    - 2.2.5 `Arpeggio_engraver`
    - 2.2.6 `Auto_beam_engraver`
    - 2.2.7 `Axis_group_engraver`
    - 2.2.8 `Balloon_engraver`
    - 2.2.9 `Bar_engraver`
    - 2.2.10 `Bar_number_engraver`
    - 2.2.11 `Beam_collision_engraver`
    - 2.2.12 `Beam_engraver`
    - 2.2.13 `Beam_performer`
    - 2.2.14 `Beat_engraver`
    - 2.2.15 `Beat_performer`
    - 2.2.16 `Bend_engraver`
    - 2.2.17 `Bend_spanner_engraver`
    - 2.2.18 `Break_align_engraver`
    - 2.2.19 `Breathing_sign_engraver`
    - 2.2.20 `Caesura_engraver`
    - 2.2.21 `Centered_bar_number_align_engraver`
    - 2.2.22 `Chord_name_engraver`
    - 2.2.23 `Chord_square_engraver`
    - 2.2.24 `Chord_tremolo_engraver`
    - 2.2.25 `Clef_engraver`
    - 2.2.26 `Cluster_spanner_engraver`
    - 2.2.27 `Collision_engraver`
    - 2.2.28 `Completion_heads_engraver`
    - 2.2.29 `Completion_rest_engraver`
    - 2.2.30 `Concurrent_hairpin_engraver`
    - 2.2.31 `Control_track_performer`
    - 2.2.32 `Cue_clef_engraver`
    - 2.2.33 `Current_chord_text_engraver`
    - 2.2.34 `Custos_engraver`
    - 2.2.35 `Divisio_engraver`
    - 2.2.36 `Dot_column_engraver`
    - 2.2.37 `Dots_engraver`
    - 2.2.38 `Double_percent_repeat_engraver`
    - 2.2.39 `Drum_note_performer`
    - 2.2.40 `Drum_notes_engraver`
    - 2.2.41 `Duration_line_engraver`
    - 2.2.42 `Dynamic_align_engraver`
    - 2.2.43 `Dynamic_engraver`
    - 2.2.44 `Dynamic_performer`
    - 2.2.45 `Episema_engraver`
    - 2.2.46 `Extender_engraver`
    - 2.2.47 `Figured_bass_engraver`
    - 2.2.48 `Figured_bass_position_engraver`
    - 2.2.49 `Finger_glide_engraver`
    - 2.2.50 `Fingering_column_engraver`
    - 2.2.51 `Fingering_engraver`
    - 2.2.52 `Font_size_engraver`
    - 2.2.53 `Footnote_engraver`
    - 2.2.54 `Forbid_line_break_engraver`
    - 2.2.55 `Fretboard_engraver`
    - 2.2.56 `Glissando_engraver`
    - 2.2.57 `Grace_auto_beam_engraver`
    - 2.2.58 `Grace_beam_engraver`
    - 2.2.59 `Grace_engraver`
    - 2.2.60 `Grace_spacing_engraver`
    - 2.2.61 `Grid_chord_name_engraver`
    - 2.2.62 `Grid_line_span_engraver`
    - 2.2.63 `Grid_point_engraver`
    - 2.2.64 `Grob_pq_engraver`
    - 2.2.65 `Horizontal_bracket_engraver`
    - 2.2.66 `Horizontal_script_engraver`
    - 2.2.67 `Hyphen_engraver`
    - 2.2.68 `Instrument_name_engraver`
    - 2.2.69 `Instrument_switch_engraver`
    - 2.2.70 `Jump_engraver`
    - 2.2.71 `Keep_alive_together_engraver`
    - 2.2.72 `Key_engraver`
    - 2.2.73 `Key_performer`
    - 2.2.74 `Kievan_ligature_engraver`
    - 2.2.75 `Laissez_vibrer_engraver`
    - 2.2.76 `Ledger_line_engraver`
    - 2.2.77 `Ligature_bracket_engraver`
    - 2.2.78 `Lyric_engraver`
    - 2.2.79 `Lyric_performer`
    - 2.2.80 `Lyric_repeat_count_engraver`
    - 2.2.81 `Mark_engraver`
    - 2.2.82 `Mark_performer`
    - 2.2.83 `Mark_tracking_translator`
    - 2.2.84 `Measure_counter_engraver`
    - 2.2.85 `Measure_grouping_engraver`
    - 2.2.86 `Measure_spanner_engraver`
    - 2.2.87 `Melody_engraver`
    - 2.2.88 `Mensural_ligature_engraver`
    - 2.2.89 `Merge_mmrest_numbers_engraver`
    - 2.2.90 `Merge_rests_engraver`
    - 2.2.91 `Metronome_mark_engraver`
    - 2.2.92 `Midi_control_change_performer`
    - 2.2.93 `Multi_measure_rest_engraver`
    - 2.2.94 `New_fingering_engraver`
    - 2.2.95 `Non_musical_script_column_engraver`
    - 2.2.96 `Note_head_line_engraver`
    - 2.2.97 `Note_heads_engraver`
    - 2.2.98 `Note_name_engraver`
    - 2.2.99 `Note_performer`
    - 2.2.100 `Note_spacing_engraver`
    - 2.2.101 `Optional_material_bracket_engraver`
    - 2.2.102 `Ottava_spanner_engraver`
    - 2.2.103 `Page_turn_engraver`
    - 2.2.104 `Paper_column_engraver`
    - 2.2.105 `Parenthesis_engraver`
    - 2.2.106 `Part_combine_engraver`
    - 2.2.107 `Percent_repeat_engraver`
    - 2.2.108 `Phrasing_slur_engraver`
    - 2.2.109 `Piano_pedal_align_engraver`
    - 2.2.110 `Piano_pedal_engraver`
    - 2.2.111 `Piano_pedal_performer`
    - 2.2.112 `Pitch_squash_engraver`
    - 2.2.113 `Pitched_trill_engraver`
    - 2.2.114 `Pure_from_neighbor_engraver`
    - 2.2.115 `Repeat_acknowledge_engraver`
    - 2.2.116 `Repeat_tie_engraver`
    - 2.2.117 `Rest_collision_engraver`
    - 2.2.118 `Rest_engraver`
    - 2.2.119 `Rhythmic_column_engraver`
    - 2.2.120 `Script_column_engraver`
    - 2.2.121 `Script_engraver`
    - 2.2.122 `Script_row_engraver`
    - 2.2.123 `Separating_line_group_engraver`
    - 2.2.124 `Show_control_points_engraver`
    - 2.2.125 `Signum_repetitionis_engraver`
    - 2.2.126 `Skip_typesetting_engraver`
    - 2.2.127 `Slash_repeat_engraver`
    - 2.2.128 `Slur_engraver`
    - 2.2.129 `Slur_performer`
    - 2.2.130 `Spacing_engraver`
    - 2.2.131 `Span_arpeggio_engraver`
    - 2.2.132 `Span_bar_engraver`
    - 2.2.133 `Span_bar_stub_engraver`
    - 2.2.134 `Span_stem_engraver`
    - 2.2.135 `Spanner_break_forbid_engraver`
    - 2.2.136 `Spanner_tracking_engraver`
    - 2.2.137 `Staff_collecting_engraver`
    - 2.2.138 `Staff_highlight_engraver`
    - 2.2.139 `Staff_performer`
    - 2.2.140 `Staff_symbol_engraver`
    - 2.2.141 `Stanza_number_align_engraver`
    - 2.2.142 `Stanza_number_engraver`
    - 2.2.143 `Stem_engraver`
    - 2.2.144 `System_start_delimiter_engraver`
    - 2.2.145 `Tab_note_heads_engraver`
    - 2.2.146 `Tab_staff_symbol_engraver`
    - 2.2.147 `Tab_tie_follow_engraver`
    - 2.2.148 `Tempo_performer`
    - 2.2.149 `Text_engraver`
    - 2.2.150 `Text_mark_engraver`
    - 2.2.151 `Text_spanner_engraver`
    - 2.2.152 `Tie_engraver`
    - 2.2.153 `Tie_performer`
    - 2.2.154 `Time_signature_engraver`
    - 2.2.155 `Time_signature_performer`
    - 2.2.156 `Timing_translator`
    - 2.2.157 `Toe_heel_engraver`
    - 2.2.158 `Trill_spanner_engraver`
    - 2.2.159 `Tuplet_engraver`
    - 2.2.160 `Tweak_engraver`
    - 2.2.161 `Vaticana_ligature_engraver`
    - 2.2.162 `Vertical_align_engraver`
    - 2.2.163 `Volta_engraver`
  - 2.3 Tunable context properties
  - 2.4 Internal context properties
- 3 Backend
  - 3.1 All layout objects
    - 3.1.1 `Accidental`
    - 3.1.2 `AccidentalCautionary`
    - 3.1.3 `AccidentalPlacement`
    - 3.1.4 `AccidentalSuggestion`
    - 3.1.5 `Ambitus`
    - 3.1.6 `AmbitusAccidental`
    - 3.1.7 `AmbitusLine`
    - 3.1.8 `AmbitusNoteHead`
    - 3.1.9 `ApproximatePitchNoteHead`
    - 3.1.10 `Arpeggio`
    - 3.1.11 `BalloonText`
    - 3.1.12 `BarLine`
    - 3.1.13 `BarNumber`
    - 3.1.14 `BassFigure`
    - 3.1.15 `BassFigureAlignment`
    - 3.1.16 `BassFigureAlignmentPositioning`
    - 3.1.17 `BassFigureBracket`
    - 3.1.18 `BassFigureContinuation`
    - 3.1.19 `BassFigureLine`
    - 3.1.20 `Beam`
    - 3.1.21 `BendAfter`
    - 3.1.22 `BendSpanner`
    - 3.1.23 `BreakAlignGroup`
    - 3.1.24 `BreakAlignment`
    - 3.1.25 `BreathingSign`
    - 3.1.26 `CaesuraScript`
    - 3.1.27 `CenteredBarNumber`
    - 3.1.28 `CenteredBarNumberLineSpanner`
    - 3.1.29 `ChordBracket`
    - 3.1.30 `ChordName`
    - 3.1.31 `ChordSlur`
    - 3.1.32 `ChordSquare`
    - 3.1.33 `Clef`
    - 3.1.34 `ClefModifier`
    - 3.1.35 `ClusterSpanner`
    - 3.1.36 `ClusterSpannerBeacon`
    - 3.1.37 `CodaMark`
    - 3.1.38 `CombineTextScript`
    - 3.1.39 `ControlPoint`
    - 3.1.40 `ControlPolygon`
    - 3.1.41 `CueClef`
    - 3.1.42 `CueEndClef`
    - 3.1.43 `Custos`
    - 3.1.44 `Divisio`
    - 3.1.45 `DotColumn`
    - 3.1.46 `Dots`
    - 3.1.47 `DoublePercentRepeat`
    - 3.1.48 `DoublePercentRepeatCounter`
    - 3.1.49 `DoubleRepeatSlash`
    - 3.1.50 `DurationLine`
    - 3.1.51 `DynamicLineSpanner`
    - 3.1.52 `DynamicText`
    - 3.1.53 `DynamicTextSpanner`
    - 3.1.54 `Episema`
    - 3.1.55 `FingerGlideSpanner`
    - 3.1.56 `Fingering`
    - 3.1.57 `FingeringColumn`
    - 3.1.58 `Flag`
    - 3.1.59 `Footnote`
    - 3.1.60 `FretBoard`
    - 3.1.61 `Glissando`
    - 3.1.62 `GraceSpacing`
    - 3.1.63 `GridChordName`
    - 3.1.64 `GridLine`
    - 3.1.65 `GridPoint`
    - 3.1.66 `Hairpin`
    - 3.1.67 `HorizontalBracket`
    - 3.1.68 `HorizontalBracketText`
    - 3.1.69 `InstrumentName`
    - 3.1.70 `InstrumentSwitch`
    - 3.1.71 `JumpScript`
    - 3.1.72 `KeyCancellation`
    - 3.1.73 `KeySignature`
    - 3.1.74 `KievanLigature`
    - 3.1.75 `LaissezVibrerTie`
    - 3.1.76 `LaissezVibrerTieColumn`
    - 3.1.77 `LedgerLineSpanner`
    - 3.1.78 `LeftEdge`
    - 3.1.79 `LigatureBracket`
    - 3.1.80 `LyricExtender`
    - 3.1.81 `LyricHyphen`
    - 3.1.82 `LyricRepeatCount`
    - 3.1.83 `LyricSpace`
    - 3.1.84 `LyricText`
    - 3.1.85 `MeasureCounter`
    - 3.1.86 `MeasureGrouping`
    - 3.1.87 `MeasureSpanner`
    - 3.1.88 `MelodyItem`
    - 3.1.89 `MensuralLigature`
    - 3.1.90 `MetronomeMark`
    - 3.1.91 `MultiMeasureRest`
    - 3.1.92 `MultiMeasureRestNumber`
    - 3.1.93 `MultiMeasureRestScript`
    - 3.1.94 `MultiMeasureRestText`
    - 3.1.95 `NonMusicalPaperColumn`
    - 3.1.96 `NoteCollision`
    - 3.1.97 `NoteColumn`
    - 3.1.98 `NoteHead`
    - 3.1.99 `NoteName`
    - 3.1.100 `NoteSpacing`
    - 3.1.101 `OptionalMaterialBracket`
    - 3.1.102 `OttavaBracket`
    - 3.1.103 `PaperColumn`
    - 3.1.104 `Parentheses`
    - 3.1.105 `PercentRepeat`
    - 3.1.106 `PercentRepeatCounter`
    - 3.1.107 `PhrasingSlur`
    - 3.1.108 `PianoPedalBracket`
    - 3.1.109 `RehearsalMark`
    - 3.1.110 `RepeatSlash`
    - 3.1.111 `RepeatTie`
    - 3.1.112 `RepeatTieColumn`
    - 3.1.113 `Rest`
    - 3.1.114 `RestCollision`
    - 3.1.115 `Script`
    - 3.1.116 `ScriptColumn`
    - 3.1.117 `ScriptRow`
    - 3.1.118 `SectionLabel`
    - 3.1.119 `SegnoMark`
    - 3.1.120 `SignumRepetitionis`
    - 3.1.121 `Slur`
    - 3.1.122 `SostenutoPedal`
    - 3.1.123 `SostenutoPedalLineSpanner`
    - 3.1.124 `SpacingSpanner`
    - 3.1.125 `SpanBar`
    - 3.1.126 `SpanBarStub`
    - 3.1.127 `StaffEllipsis`
    - 3.1.128 `StaffGrouper`
    - 3.1.129 `StaffHighlight`
    - 3.1.130 `StaffSpacing`
    - 3.1.131 `StaffSymbol`
    - 3.1.132 `StanzaNumber`
    - 3.1.133 `Stem`
    - 3.1.134 `StemStub`
    - 3.1.135 `StemTremolo`
    - 3.1.136 `StringNumber`
    - 3.1.137 `StrokeFinger`
    - 3.1.138 `SustainPedal`
    - 3.1.139 `SustainPedalLineSpanner`
    - 3.1.140 `System`
    - 3.1.141 `SystemStartBar`
    - 3.1.142 `SystemStartBrace`
    - 3.1.143 `SystemStartBracket`
    - 3.1.144 `SystemStartSquare`
    - 3.1.145 `TabNoteHead`
    - 3.1.146 `TextMark`
    - 3.1.147 `TextScript`
    - 3.1.148 `TextSpanner`
    - 3.1.149 `Tie`
    - 3.1.150 `TieColumn`
    - 3.1.151 `TimeSignature`
    - 3.1.152 `TrillPitchAccidental`
    - 3.1.153 `TrillPitchGroup`
    - 3.1.154 `TrillPitchHead`
    - 3.1.155 `TrillPitchParentheses`
    - 3.1.156 `TrillSpanner`
    - 3.1.157 `TupletBracket`
    - 3.1.158 `TupletNumber`
    - 3.1.159 `UnaCordaPedal`
    - 3.1.160 `UnaCordaPedalLineSpanner`
    - 3.1.161 `VaticanaLigature`
    - 3.1.162 `VerticalAlignment`
    - 3.1.163 `VerticalAxisGroup`
    - 3.1.164 `VoiceFollower`
    - 3.1.165 `VoltaBracket`
    - 3.1.166 `VoltaBracketSpanner`
    - 3.1.167 `VowelTransition`
  - 3.2 Graphical Object Interfaces
    - 3.2.1 `accidental-interface`
    - 3.2.2 `accidental-participating-head-interface`
    - 3.2.3 `accidental-placement-interface`
    - 3.2.4 `accidental-suggestion-interface`
    - 3.2.5 `accidental-switch-interface`
    - 3.2.6 `align-interface`
    - 3.2.7 `ambitus-interface`
    - 3.2.8 `arpeggio-interface`
    - 3.2.9 `axis-group-interface`
    - 3.2.10 `balloon-interface`
    - 3.2.11 `bar-line-interface`
    - 3.2.12 `bar-number-interface`
    - 3.2.13 `bass-figure-alignment-interface`
    - 3.2.14 `bass-figure-interface`
    - 3.2.15 `beam-interface`
    - 3.2.16 `bend-after-interface`
    - 3.2.17 `bend-interface`
    - 3.2.18 `bezier-curve-interface`
    - 3.2.19 `break-alignable-interface`
    - 3.2.20 `break-aligned-interface`
    - 3.2.21 `break-alignment-interface`
    - 3.2.22 `breathing-sign-interface`
    - 3.2.23 `caesura-script-interface`
    - 3.2.24 `centered-bar-number-interface`
    - 3.2.25 `centered-bar-number-line-spanner-interface`
    - 3.2.26 `centered-spanner-interface`
    - 3.2.27 `chord-bracket-interface`
    - 3.2.28 `chord-name-interface`
    - 3.2.29 `chord-slur-interface`
    - 3.2.30 `chord-square-interface`
    - 3.2.31 `clef-interface`
    - 3.2.32 `clef-modifier-interface`
    - 3.2.33 `cluster-beacon-interface`
    - 3.2.34 `cluster-interface`
    - 3.2.35 `coda-mark-interface`
    - 3.2.36 `control-point-interface`
    - 3.2.37 `control-polygon-interface`
    - 3.2.38 `custos-interface`
    - 3.2.39 `dot-column-interface`
    - 3.2.40 `dots-interface`
    - 3.2.41 `duration-line-interface`
    - 3.2.42 `dynamic-interface`
    - 3.2.43 `dynamic-line-spanner-interface`
    - 3.2.44 `dynamic-text-interface`
    - 3.2.45 `dynamic-text-spanner-interface`
    - 3.2.46 `enclosing-bracket-interface`
    - 3.2.47 `episema-interface`
    - 3.2.48 `figured-bass-continuation-interface`
    - 3.2.49 `finger-glide-interface`
    - 3.2.50 `finger-interface`
    - 3.2.51 `fingering-column-interface`
    - 3.2.52 `flag-interface`
    - 3.2.53 `font-interface`
    - 3.2.54 `footnote-interface`
    - 3.2.55 `fret-diagram-interface`
    - 3.2.56 `glissando-interface`
    - 3.2.57 `grace-spacing-interface`
    - 3.2.58 `gregorian-ligature-interface`
    - 3.2.59 `grid-chord-name-interface`
    - 3.2.60 `grid-line-interface`
    - 3.2.61 `grid-point-interface`
    - 3.2.62 `grob-interface`
    - 3.2.63 `hairpin-interface`
    - 3.2.64 `hara-kiri-group-spanner-interface`
    - 3.2.65 `horizontal-bracket-interface`
    - 3.2.66 `horizontal-bracket-text-interface`
    - 3.2.67 `horizontal-line-spanner-interface`
    - 3.2.68 `inline-accidental-interface`
    - 3.2.69 `instrument-specific-markup-interface`
    - 3.2.70 `item-interface`
    - 3.2.71 `jump-script-interface`
    - 3.2.72 `key-cancellation-interface`
    - 3.2.73 `key-signature-interface`
    - 3.2.74 `kievan-ligature-interface`
    - 3.2.75 `ledger-line-spanner-interface`
    - 3.2.76 `ledgered-grob-interface`
    - 3.2.77 `ledgered-interface`
    - 3.2.78 `ligature-bracket-interface`
    - 3.2.79 `ligature-head-interface`
    - 3.2.80 `ligature-interface`
    - 3.2.81 `line-interface`
    - 3.2.82 `line-spanner-interface`
    - 3.2.83 `lyric-extender-interface`
    - 3.2.84 `lyric-hyphen-interface`
    - 3.2.85 `lyric-interface`
    - 3.2.86 `lyric-repeat-count-interface`
    - 3.2.87 `lyric-space-interface`
    - 3.2.88 `lyric-syllable-interface`
    - 3.2.89 `mark-interface`
    - 3.2.90 `measure-counter-interface`
    - 3.2.91 `measure-grouping-interface`
    - 3.2.92 `measure-spanner-interface`
    - 3.2.93 `melody-spanner-interface`
    - 3.2.94 `mensural-ligature-interface`
    - 3.2.95 `metronome-mark-interface`
    - 3.2.96 `multi-measure-interface`
    - 3.2.97 `multi-measure-rest-interface`
    - 3.2.98 `multi-measure-rest-number-interface`
    - 3.2.99 `musical-paper-column-interface`
    - 3.2.100 `non-musical-paper-column-interface`
    - 3.2.101 `note-collision-interface`
    - 3.2.102 `note-column-interface`
    - 3.2.103 `note-head-interface`
    - 3.2.104 `note-name-interface`
    - 3.2.105 `note-spacing-interface`
    - 3.2.106 `number-interface`
    - 3.2.107 `optional-material-bracket-interface`
    - 3.2.108 `ottava-bracket-interface`
    - 3.2.109 `outside-staff-axis-group-interface`
    - 3.2.110 `outside-staff-interface`
    - 3.2.111 `paper-column-interface`
    - 3.2.112 `parentheses-interface`
    - 3.2.113 `passage-delimiter-interface`
    - 3.2.114 `percent-repeat-interface`
    - 3.2.115 `piano-pedal-bracket-interface`
    - 3.2.116 `piano-pedal-interface`
    - 3.2.117 `piano-pedal-script-interface`
    - 3.2.118 `pitched-trill-interface`
    - 3.2.119 `pure-from-neighbor-interface`
    - 3.2.120 `rehearsal-mark-interface`
    - 3.2.121 `rest-collision-interface`
    - 3.2.122 `rest-interface`
    - 3.2.123 `rhythmic-grob-interface`
    - 3.2.124 `rhythmic-head-interface`
    - 3.2.125 `script-column-interface`
    - 3.2.126 `script-interface`
    - 3.2.127 `section-label-interface`
    - 3.2.128 `segno-mark-interface`
    - 3.2.129 `self-alignment-interface`
    - 3.2.130 `semi-tie-column-interface`
    - 3.2.131 `semi-tie-interface`
    - 3.2.132 `separation-item-interface`
    - 3.2.133 `side-position-interface`
    - 3.2.134 `signum-repetitionis-interface`
    - 3.2.135 `slur-interface`
    - 3.2.136 `spaceable-grob-interface`
    - 3.2.137 `spacing-interface`
    - 3.2.138 `spacing-options-interface`
    - 3.2.139 `spacing-spanner-interface`
    - 3.2.140 `span-bar-interface`
    - 3.2.141 `span-bar-stub-interface`
    - 3.2.142 `spanner-interface`
    - 3.2.143 `staff-ellipsis-interface`
    - 3.2.144 `staff-grouper-interface`
    - 3.2.145 `staff-highlight-interface`
    - 3.2.146 `staff-spacing-interface`
    - 3.2.147 `staff-symbol-interface`
    - 3.2.148 `staff-symbol-referencer-interface`
    - 3.2.149 `stanza-number-interface`
    - 3.2.150 `stem-interface`
    - 3.2.151 `stem-tremolo-interface`
    - 3.2.152 `sticky-grob-interface`
    - 3.2.153 `string-number-interface`
    - 3.2.154 `stroke-finger-interface`
    - 3.2.155 `system-interface`
    - 3.2.156 `system-start-delimiter-interface`
    - 3.2.157 `system-start-text-interface`
    - 3.2.158 `tab-note-head-interface`
    - 3.2.159 `text-interface`
    - 3.2.160 `text-mark-interface`
    - 3.2.161 `text-script-interface`
    - 3.2.162 `tie-column-interface`
    - 3.2.163 `tie-interface`
    - 3.2.164 `time-signature-interface`
    - 3.2.165 `trill-pitch-accidental-interface`
    - 3.2.166 `trill-spanner-interface`
    - 3.2.167 `tuplet-bracket-interface`
    - 3.2.168 `tuplet-number-interface`
    - 3.2.169 `unbreakable-spanner-interface`
    - 3.2.170 `vaticana-ligature-interface`
    - 3.2.171 `volta-bracket-interface`
    - 3.2.172 `volta-interface`
  - 3.3 User backend properties
  - 3.4 Internal backend properties
- 4 Scheme functions
- Appendix A Indices
  - A.1 Function index