| [ << Backend ] | [Top][Contents][Index] | [ Indices >> ] |
| [ < Internal backend properties ] | [ Up : Top ] | [ Indices > ] |
4 Scheme functions
- Function:
add-bar-glyph-print-procedureglyph proc Specify the single glyph glyph that calls print procedure proc. The procedure proc has to be defined in the form
(make-...-bar-line grob extent)even if the extent is not used within the routine.
- Function:
ly:add-context-modcontextmods modification -
Adds the given context modification to the list contextmods of context modifications.
- Function:
add-grace-propertycontext-name grob sym val Set sym=val for grob in context-name.
- Function:
ly:add-interfaceiface 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-listenercallback 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-clefclef-name clef-glyph clef-position transposition c0-position Append the entries for a clef symbol to supported clefs and
c0-pitch-alist.
- Function:
ly:add-optionsym val description rest -
Add a program option sym. val is the default value and description is a string description.
Passing
#internal? #tmakes the option an internal option, not displayed in thelilypond -dhelpoutput (but displayed inlilypond -dhelp-internal.Passing
#:accumulative? #tmakes the option accumulative, which gathers-dvalues in a list instead of letting the last-dflag overwrite the others.
- Function:
add-simple-time-signature-stylestyle 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-glyphstencil 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-straightstencil 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:
alist->hash-tablelst Convert alist lst to a table.
Warning: The resulting hash table is hashed by identity. This actually corresponds to the
alist->hashq-tablefunction of Guile’s(ice-9 hash-table)module, notalist->hash-table.
- 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-hookbar-glyph Allow the volta bracket hook being drawn over bar line bar-glyph.
- Function:
alterations-in-keypitch-list Count number of sharps minus number of flats.
- Function:
ly:anglex 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-2piangle Take angle (in radians) and map it between 0 and 2pi.
- Function:
angle-0-360angle Take angle (in degrees) and map it between 0 and 360 degrees.
- Function:
ly:append-to-optionvar val -
Add a value to an accumulative program option.
- 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-stencilx 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-makerstart? end? Return a function drawing a line from current point to
destination, with optional arrows ofmax-sizeon start and end controlled by start? and end?.
- 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-getkey alist default-value strict-checking -
Return value if key in alist, else default-value (or
#fif not specified). If strict-checking is set to#tand 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
#fif not specified). If strict-checking is set to#tand key is not in alist, a programming error is output.
- Function:
at-bar-line-substitute-caesura-typesubstitute-type At a bar line, create the caesura using substitute-type rather than the value of
caesuraType.
- Function:
ly:axis-group-interface::add-elementgrob 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-anchorgrob 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-visibilitygrob Calculate the visibility of a bar line at line breaks.
- Function:
bar-line::calc-glyph-namegrob Return the name of the bar line glyph printed by grob for the actual break direction.
- Function:
bar-line::calc-glyph-name-for-directionglyphs dir Find the glyph name for a bar line.
glyphsis the list of bar-line types to consider in order. Each must have been defined withdefine-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-linegrob bar-glyph extent Build the bar line stencil.
- Function:
bar-line::draw-filled-boxx-ext y-ext thickness extent grob Return a straight bar line created by
ly:round-filled-boxlooking 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::printgrob The print routine for bar lines.
- Function:
bar-line::widen-bar-extent-on-spangrob extent Widen the bar line extent towards span bars adjacent to grob grob.
- Function:
base-lengthtime-signature time-signature-settings Get
baseMomentrational value for time-signature from time-signature-settings.
- Function:
ly:base64-encodebv -
Encode the given bytevector as a base 64 string.
- Function:
ly:basic-progressstr 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-exceptionstime-signature time-signature-settings Get
beamExceptionsvalue for time-signature from time-signature-settings.
- Function:
beat-structurebase-length time-signature time-signature-settings Get
beatStructurevalue in base-length units for time-signature from time-signature-settings.
- Function:
bend::arrow-head-stencilthickness 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-beginbend-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
'styleequals to'pre-bend,'holdor'pre-bend-hold,interval-centeris 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 ofBendSpanner.details.horizontal-left-paddingis 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-endbend-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
BreakAlignGroupinto 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-cautionaryspanner Set
'display-cautionaryof all relevant note heads of spanners right bound to true. As a result they appear parenthesized. This procedure is the default value of'before-line-breaking.
- Function:
bend::text-stringspanner 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::printgrob Return the final stencil. A line and curve, an arrow head and a text representing the amount a string is bent.
- Function:
ly:bezier-extentcontrol-points axis -
Compute the extent of the Bézier curve defined by control-points along axis.
- Function:
ly:bezier-extractcontrol-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-listbit-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->intbit-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-partsbook -
Return book parts in book.
- Function:
book-first-pagelayout props Return the
'first-page-numberof the entire book.
- Function:
ly:book-headerbook -
Return header in book.
- Function:
ly:book-paperbook -
Return paper in book.
- Function:
ly:book-processbook-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-systemsbook-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-scoresbook -
Return scores in book.
- Function:
ly:book-set-header!book module -
Set the book header.
- Function:
box-grob-stencilgrob Make a box of exactly the extents of the grob. The box precisely encloses the contents.
- Function:
box-stencilstencil thickness padding Add a box around stencil, producing a new stencil.
- Function:
ly:bpnum -
num bigpoints (1/72th inch).
- Function:
ly:bracketa 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-stencilstil axis thick protrusion padding Add brackets around stil, producing a new stencil.
- Function:
break-alignable-interface::self-alignment-of-anchorg Return a value for g’s
self-alignment-Xthat will place g on the same side of the reference point defined by abreak-aligneditem such as aClef.
- Function:
break-alignable-interface::self-alignment-opposite-of-anchorg Return a value for g’s
self-alignment-Xthat will place g on the opposite side of the reference point defined by abreak-aligneditem such as aClef.
- Function:
ly:break-alignment-interface::find-nonempty-break-align-group -
Find the
BreakAlignGroupwith the given break-align-symbol in thisBreakAlignment. Return#fif there is no such group. Also return#fif the group has emptyX-extent, which can happen if it contains only omitted items.
- Function:
break-alignment-listend-of-line middle begin-of-line Return a callback that calculates a value based on a grob’s break direction.
- Function:
ly:broadcastdisp ev -
Send the stream event ev to the dispatcher disp.
- Function:
byte-list->bit-listbyte-list Convert a list of bytes (integers between 0 and 255) into a list of bits (booleans).
- Function:
caesura-script-interface::before-line-breakingscript Callback for
CaesuraScriptgrob. 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 particularSpanBargrobs are actually visible, just that they exist.
- Function:
caesura-to-bar-line-or-divisiocontext caesura-type observations caesuraTypeTransformcallback to print articulated caesurae as chant breath marks using the infrastructure for modern bar lines when possible.
- Function:
caesura-to-divisiocontext caesura-type observations caesuraTypeTransformcallback to print articulated caesurae as chant breath marks.
- Function:
ly:cairo-output-stencilbasename stencil paper formats -
dump a single stencil through the Cairo backend
- Function:
ly:cairo-output-stencilsbasename stencils header paper formats -
dump book through cairo backend
- Function:
calc-harmonic-pitchpitch music Calculate the harmonic pitches in music given pitch as the non-harmonic pitch.
- Function:
calc-measure-lengthtime-signature Calculate the measure length for time-signature.
- Function:
ly:camel-case->lisp-identifiername-sym -
Convert
FooBar_Blatofoo-bar-blastyle symbol.
- Function:
centered-spanner-interface::calc-x-offsetgrob Compute the shift from this spanner’s reference point to a point centered between two non-musical columns, according to the
spacing-pairproperty. This also takesself-alignment-Xinto account. The default forspacing-pairis'(break-alignment . break-alignment).
- Function:
centered-stencilstencil Center stencil stencil in both the x and y directions.
- Function:
ly:chain-assoc-getkey achain default-value strict-checking -
Return value for key from a list of alists achain. If no entry is found, return default-value or
#fif 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
#fif default-value is not specified. With strict-checking set to#t, a programming error is output in such cases.
- Function:
change-pitchesmusic 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-pathpath [location] 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
#fwhen rising an error (using optionally location).
- Function:
ly:check-expected-warnings -
Check whether all expected warnings have really been triggered.
- Function:
check-grob-pathpath 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
#fif invalid, optionally using location for an error message. If an optional keyword argument#:start startis 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 defaultis 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 minand#:max max, defaulting to ‘1’ and unlimited, respectively.
- Function:
check-music-pathpath 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
#fwhen rising an error (using optionally location).
- Function:
chord-name->german-markupB-instead-of-Bb Return pitch markup for PITCH, using german note names. If B-instead-of-Bb is set to #t real german names are returned. Otherwise semi-german names (with Bb and below keeping the british names)
- Function:
chord-name->italian-markupfrench? Return pitch markup for pitch, using Italian/French note names. If french? is set to
#t, french ‘ré’ is returned for pitch D instead of ‘re’.
- Function:
circle-stencilstencil thickness padding Add a circle around stencil, producing a new stencil.
- Function:
clef-modifier::printgrob Callback for
ClefModifiergrob.
- Function:
clef-transposition-markupoct 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:
ly:cmnum -
num cm.
- Function:
collect-book-music-for-bookbook music Book music handler.
- Function:
collect-bookpart-for-bookbook-part Top-level book-part handler.
- Function:
collect-music-auxscore-handler music Pass music to score-handler, with preprocessing for page layout instructions.
- Function:
collect-music-for-bookmusic 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.
- Function:
comparator-from-keykey 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-dispatchersto from -
Make the dispatcher to listen to events from from.
- Function:
construct-chord-elementsroot duration modifications Build a chord on root using modifiers in modifications.
NoteEventshave 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-childrencontext -
Return a list with the children contexts of context.
- Function:
ly:context-current-momentcontext -
Return the current moment of context.
- Function:
ly:context-def?x Is x a smob of class
Context_def?
- Function:
ly:context-def-lookupdef 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-modifydef mod -
Return the result of applying the context-mod mod to the context definition def. Does not change def.
- Function:
ly:context-event-sourcecontext -
Return
event-sourceof context context.
- Function:
ly:context-events-belowcontext -
Return a
stream-distributorthat distributes all events from context and all its subcontexts.
- Function:
ly:context-findcontext name -
Find a parent of context that has name or alias name. Return
#fif not found.
- Function:
ly:context-grob-definitioncontext name -
Return the definition of name (a symbol) within context as an alist.
- Function:
ly:context-idcontext -
Return the ID string of context, i.e., for
\context Voice = "one" …return the stringone.
- Function:
ly:context-matched-pop-propertycontext grob cell -
This undoes a particular
\override,\once \overrideor\once \revertwhen 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-namecontext -
Return the name of context, i.e., for
\context Voice = "one" …return the symbolVoice.
- Function:
ly:context-output-defcontext -
Return the output definition of context.
- Function:
ly:context-parentcontext -
Return the parent of context,
#fif none.
- Function:
ly:context-propertycontext sym def -
Return the value for property sym in context. If def is given, and property value is
'(), return def.
- Function:
ly:context-property-where-definedcontext name def -
Return the context above context where name is defined, or def (defaulting to
'()) if no such context is found.
- Function:
ly:context-pushpop-propertycontext grob eltprop val -
Do
\temporary \overrideor\revertoperation in context. The grob definition grob is extended with eltprop (if val is specified) or reverted (if unspecified).
- Function:
ly:context-schedule-momentcontext moment -
Add the given moment
moment(which must lie in the future) to the list of moments to process for the global context governingcontext. This makes it possible for translators (engravers, performers) to see moments not directly created by user input.
- Function:
ly:context-set-property!context name val -
Set value of property name in context context to val.
- Function:
context-spec-musicm context [id [mods]] Add
\context context = id \with modsto m.
- Function:
ly:context-unset-propertycontext name -
Unset value of property name in context context.
- Function:
copy-repeat-chordoriginal-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-listlst Given lst as
(E1 E2 .. ), return((E1 . 1) (E2 . 2) ... ).
- Function:
create-glyph-flagflag-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, andnormal-flag.
- Function:
cross-staff-connectstem Set cross-staff property of the stem to this function to connect it to other stems automatically
- Function:
cue-substitutequote-music Must happen after
quote-substitute.
- Function:
cyclic-base-valuevalue cycle Take value (for example, an angle) and modulo-maps it between 0 and base cycle.
- Function:
ly:debugstr 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-flaggrob Create a flag stencil for the stem.
The flag style is derived from the
styleproperty of grob (which must be of typeFlag).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
styleare""(empty, for normal flags),"mensural", and"no-flag". Other values are used to construct glyph names for flags; see functionglyph-flagfor details.Example:
\override Flag.stencil = #default-flag \override Flag.style = #'mensural
- Function:
ly:default-scale Get the global default scale.
- Function:
define-bar-linebar-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). The substitute glyphs may be either strings or booleans:
#tcalls for the same value as bar-glyph and#fcalls for no glyph.
- Function:
define-event-classclass parent Defines a new event
classderived fromparent, a previously defined event class.
- Macro:
define-event-function… Like
define-music-function, but the return value must be a post-event.
- Function:
define-fontspaper 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
defineform. 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-documentationoncommand-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
layoutandpropsarguments). This yields a markup. Interpreting it, using(interpret-markup markup layout props), invokescommand-markupas 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 inprops, or#fif no default was given.propsitself is left unchanged: if you want defaults specified in that manner passed down into other markup functions, you need to adjustpropsyourself.If the
as-stringnamed argument is given, it should be an expression, which is evaluated bymarkup->stringwhen lossily converting markups to strings. The expression can use all variables available in the main body, namelylayout,props, the arguments, and the properties. However, in many caseslayoutwill be#fbecause such an output definition is not available (such as for MIDI output). This case must be accounted for. The expression can recursively callmarkup->string, passing it#:layout layout #:props props.The autogenerated 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-markupinstead 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-markupfunction 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-functionfor 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-grouptags Define a tag group consisting of the given tags, a list of symbols. Returns
#fif 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->radiansangle-degrees Convert the given angle from degrees to radians.
- Function:
descend-to-contextm context [id [mods]] Like
context-spec-music, but only descending.
- Function:
determine-split-listevl1 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-fingercontext 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-stringsand specified fingeringsdefined-fingers. Only a fingering of 0 will affect the fret selection, as it specifies an open string. Ifdefined-stringsis'(), the context propertydefaultStringsis used as a list of defined strings. Looks for predefined fretboards ifpredefinedFretboardTableis not#f. If rest is present, it contains theFretBoardgrob, and a fretboard gets created. Otherwise, a list of(string fret finger)lists is returned.If the context-property
supportNonIntegerFretis set#t, micro-tones are supported forTabStaff, but not not forFretBoards.
- 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, or1, where-1represents left or down,1represents right or up, and0represents a neutral direction.
- Function:
dir-basenamefile rest … Strip suffixes in rest, but leave directory component for file.
- Function:
ly:directeddirection magnitude -
Calculate an
(x . y)pair with optional magnitude (defaulting to1.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:
ly:disconnect-dispatchersto from -
Stop the dispatcher to listening to events from from.
- Function:
ly:dispatcher?x Is x a smob of class
Dispatcher?
- Function:
display-lily-musicexpr [port] Display the music expression expr using LilyPond syntax.
- Function:
display-musicmusic [port] Display music, not done with
music-mapfor clarity of presentation.
- Function:
display-scheme-musicobj [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-rulecontext 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->stringdur -
Convert dur to a string.
- Function:
ly:duration-compressdur factor -
Compress dur by rational factor.
- Function:
ly:duration-dot-countdur -
Extract the dot count from dur.
- Function:
duration-dot-factordotcount 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-factordur -
Extract the compression factor from dur. Return it as a pair.
- Function:
ly:duration-lengthdur -
The length of the duration as a
moment.
- Function:
duration-lengthdur Return the overall length of a duration, as a number of whole notes. (Not to be confused with
ly:duration-length, which returns a less usefulMomentobject.)
- Function:
duration-line::calcgrob Return list of values needed to print a stencil for
DurationLine.
- Function:
duration-line::printgrob Return the stencil of
DurationLine.
- Function:
ly:duration-logdur -
Extract the duration log from dur.
- Function:
duration-log-factorlognum Given a logarithmic duration number, return the length of the duration, as a number of whole notes.
- Function:
ly:duration-scaledur -
Extract the compression factor from dur. Return it as a rational.
- Function:
duration-visualdur 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-lengthdur 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-breakinggrob Monitor left bound of
DynamicTextSpannerfor absolute dynamics. If found, ensureDynamicTextdoes not collide with spanner text by changing'attach-dirand'padding. Reads the'right-paddingproperty ofDynamicTextto fine-tune space between the two text elements.
- Function:
ly:effective-prefix -
Return effective prefix. 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-hairpincoords mirrored? Create hairpin based on a list of coords in
(cons x y)form.xis the portion of the width consumed for a given line andyis 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-stencilstencil 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-grobengraver 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-grobengraver 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-itemengraver grob-name cause -
Same as
ly:engraver-make-grob, but always create a grob with theItemclass. This is useful when the same grob definition is used to create grobs of differing classes.
- Function:
ly:engraver-make-spannerengraver grob-name cause -
Same as
ly:engraver-make-grob, but always create a grob with theSpannerclass. This is useful when the same grob definition is used to create grobs of differing classes.
- Function:
ly:engraver-make-stickyengraver grob-name host cause -
Utility function to create a grob sticking to another grob. This acts like either
ly:engraver-make-itemorly: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-interfaceinterface, see sticky-grob-interface.
- Function:
ly:errorstr 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-carefullysymbol 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)
Eventobject?
- Function:
event-chord-notesevent-chord Return a list of all notes from event-chord.
- Function:
event-chord-pitchesevent-chord Return a list of all pitches from event-chord.
- Function:
event-chord-reducemusic 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-copym -
Copy m and all sub-expressions of m.
- Function:
event-has-articulation?event-type stream-event Is event-type in the
articulationslist of the music causing stream-event?
- Function:
ly:event-lengthevent moment -
Return the length of a stream event. If
momentis not given, this is just the event’slengthproperty. Ifmomentis 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 atmomentis returned.
- Function:
ly:event-propertysev 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
pitchor a drum type indrum-type) the pitch(es) from the predecessor note/chord if available.
- Function:
ly:expect-warningstr rest -
A Scheme callable function to register a warning to be expected and subsequently suppressed. If the warning is not encountered, a warning about the missing warning is shown. The message should be translated with
(_ ...)and changing parameters given after the format string.
- Function:
extract-beam-exceptionsmusic Create a value useful for setting
beamExceptionsfrom music.
- Function:
extract-musicmusic pred? Return a flat list of all music matching pred? inside of music, not recursing into matches themselves.
- Function:
extract-named-musicmusic 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-collectioncollection-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-musicmusic 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::printgrob Callback for
BassFigureContinuationgrobs.
- Function:
ly:find-filename 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-propsprop-name grob-descriptions Used by
\magnifyMusicand\magnifyStaff. If grob-descriptions is equal to theall-grob-descriptionsalist (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-entrykeysig pitch accept-global accept-local Return the first entry in keysig that matches pitch by notename 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,
#fis returned.
- Function:
finger-glide::printgrob The stencil printing procedure for grob
FingerGlideSpanner. Depending on the grob propertystyleseveral forms of appearance are printed. Possible settings for grob propertystylearezigzag,trill,dashed-line,dotted-line,stub-left,stub-right,stub-both,bow,noneandline, which is the default.
- Function:
first-assockeys 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-membermembers lst Return first successful member (of member) from members in lst.
- Function:
flat-flaggrob A callback function for
Flag.stencilto get a flat flag.The up-stem and down-stem angles of the flags are both 0 degrees. If the caller sets the
stroke-styleproperty of grob to the string"grace", add a slash through the flag.This function returns a stencil.
- Function:
flat-zip-longestlsts … 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-listx Unnest list.
- Function:
flip-stencilaxis stil Flip stencil stil in the direction of axis. Value
X(or0) for axis flips it horizontally. ValueY(or1) flips it vertically. stil is flipped in place; its position, the coordinates of its bounding box, remains the same.
- Function:
fold-some-musicpred? proc init music This works recursively on music like
folddoes on a list, calling ‘(pred? music)’ on every music element. If#fis 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-valuesproc lst inits … A variant of
foldthat 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, unlikefold.
- Function:
ly:font-config-add-directorydir -
Add directory dir to FontConfig.
- Function:
ly:font-config-add-fontfont -
Add font font to FontConfig.
- Function:
ly:font-config-display-fontsport -
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-filename -
Get the file for font name, as found by FontConfig.
- Function:
ly:font-design-sizefont -
Given the font metric font, return the design size, relative to the current
output-scale.
- Function:
ly:font-file-namefont -
Given the font metric font, return the corresponding file name.
- Function:
ly:font-get-glyphfont 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 encodingsfetaMusicandfetaBraces, respectively.
- Function:
ly:font-glyph-name-to-indexfont 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 encodingsfetaMusicandfetaBraces, respectively.
- Function:
ly:font-index-to-charcodefont 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 encodingsfetaMusicandfetaBraces, respectively.
- Function:
ly:font-magnificationfont -
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-namefont -
Given the font metric font, return the corresponding name.
- Function:
font-name-splitfont-name Return
(font-name . design-size)from font-name string or#f.
- Function:
for-some-musicstop? music Walk through music, process all elements calling stop? and only recurse if this returns
#f.
- Function:
ly:formatstr rest -
LilyPond specific format function, supporting
~aand~[0-9]f. Basic support for~sis also provided.
- Function:
ly:format-outputcontext -
Given a global context in its final state, process it and return the
Music_outputobject in its final state.
- Function:
format-segno-mark-considering-bar-linessegno-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->pitchfret Calculate a pitch given fret for the harmonic.
- Function:
fret-parse-terse-definition-stringprops 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-chainarg 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-stencilpaper-book Returns a stencil for the cropped output of the given Paper_book
- Function:
generate-preview-stencilpaper-book Returns a stencil for a preview of given Paper_book
- Function:
ly:generic-bound-extentgrob 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-interfacesproperty 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-headsspanner Take a spanner grob and return a pair containing all note heads of the initial starting and the final
NoteColumn.
- Function:
ly:get-cff-offsetfont-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-shapeshape-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-modscontextmod -
Returns the list of context modifications stored in contextmod.
- Function:
ly:get-font-formatfont-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-optionvar -
Get a global option setting.
- Function:
get-postscript-bboxstring Extract the bounding box from string, or return
#fif not present.
- Function:
ly:get-spacing-specfrom-scm to-scm -
Return the spacing spec going between the two given grobs, from-scm and to-scm.
- Function:
get-tweakable-musicmus When tweaking music, return a list of music expressions where the tweaks should be applied. Relevant for music wrappers and event chords.
- Function:
glyph-flagflag-style A callback for function
default-flagto get a flag glyph.This function actually constructs a function returning a stencil, expecting a single argument, grob.
It looks up glyph
flags.StyleDirLogin 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
grobhas thestroke-styleproperty 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-objectsgrob Return a list of the names and contents of all properties having type
ly:grob?orly:grob-array?for all interfaces supported by grob grob.
- Function:
grob::compose-functionfunc 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::display-objectsgrob Display all objects stored in properties of grob grob.
- Function:
grob::inherit-parent-propertyaxis 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::namegrob Return the name of the grob grob as a symbol.
- Function:
grob::offset-functionfunc 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
#for'(), it is not included in the sum.
- Function:
grob::relay-other-propertyproperty grob callback generator for returning the value of another property, which is identified by the symbol property.
- Function:
grob::rhythmic-locationgrob Return a pair consisting of the measure number and moment within the measure of grob grob.
- Function:
grob::unpure-Y-extent-from-stencilpure-function The unpure height will come from a stencil whereas the pure height will come from
pure-function.
- Function:
grob::whengrob Return the global timestep (a
Moment) of grob grob.
- Function:
ly:grob-alist-chaingrob 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->listgrob-arr -
Return the elements of grob-arr as a Scheme list.
- Function:
ly:grob-array-lengthgrob-arr -
Return the length of grob-arr.
- Function:
ly:grob-array-refgrob-arr index -
Retrieve the indexth element of grob-arr.
- Function:
ly:grob-basic-propertiesgrob -
Get the immutable properties of grob.
- Function:
ly:grob-chain-callbackgrob 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-refpointgrob other axis -
Find the common refpoint of grob and other for axis.
- Function:
ly:grob-common-refpoint-of-arraygrob others axis -
Find the common refpoint of grob and others (a grob-array) for axis.
- Function:
ly:grob-default-fontgrob -
Return the default font for grob grob.
- Function:
ly:grob-extentgrob refp axis -
Get the extent in axis direction of grob relative to the grob refp.
- Function:
ly:grob-get-vertical-axis-group-indexgrob -
Get the index of the vertical axis group the grob grob belongs to; return
-1if none is found.
- Function:
ly:grob-interfacesgrob -
Return the interfaces list of grob grob.
- Function:
ly:grob-layoutgrob -
Get
\layoutdefinition from grob grob.
- Function:
ly:grob-list->grob-arraygrob-list -
Convert a Scheme list of grobs to a grob array.
- Function:
ly:grob-objectgrob 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 astemproperty, 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-originalgrob -
Return the unbroken original grob of grob, grob may be an item or spanner.
- Function:
ly:grob-parentgrob axis def -
Get the parent of grob. axis is
0for the x axis,1for 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-propertygrob 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-datagrob sym -
Return the value for property sym of grob, but do not process callbacks.
- Function:
ly:grob-pure-heightgrob 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-propertygrob 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-coordinategrob refp start end -
Return the pure vertical coordinate of grob relative to refp between start and end.
- Function:
ly:grob-relative-coordinategrob refp axis -
Get the coordinate in axis direction of grob relative to the grob refp.
- Function:
ly:grob-robust-relative-extentgrob 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-lessa 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-intervalgrob -
Return a pair with the
rankof the furthest left column and therankof the furthest right column spanned bygrob.
- Function:
ly:grob-staff-positionsg -
Return the y position of sg relative to the staff.
- Function:
ly:grob-suicide!grob -
Kill grob.
- Function:
ly:grob-systemgrob -
Return the system grob of grob.
- Function:
grob-transformerproperty 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-rangeslst 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-filefilename [size] Same as
ly:gulp-file-utf8, but decode the file as Latin 1. Warning: this is rarely what you want; consider usingly:gulp-file-utf8instead.
- Function:
ly:gulp-file-utf8filename [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-keystab -
Return a list of keys in tab.
- Function:
headers-property-alist-chainheaders Take a list of
\headerblocks (Guile modules). Return an alist chain containing all of their bindings where the names have been prefixed withheader:. This alist chain is suitable for interpreting a markup in the context of these headers.
- Function:
hook-stencilx 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:
ly:in-event-class?ev cl Does event ev belong to event class cl?
- Function:
ly:inchnum -
num inches.
- Function:
index-mapf 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-locationssip -
Return input location in sip as
(file-name first-line first-column last-line last-column)
- Function:
ly:input-file-line-char-columnsip -
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-messagesip 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-warningsip 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-listn [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
\\layoutblock. props is an alist chain, i.e., a list of alists. markup is the markup text to be processed. See alsogrob-interpret-markup.
- Function:
ly:interpret-music-expressionmus ctx -
Interpret the music expression mus in the global context ctx. The context is returned in its final state.
- Function:
interval-centerx Center the number pair x, if an interval.
- Function:
interval-indexinterval dir Interpolate interval between between left (dir=
-1) and right (dir=+1).
- Function:
interval-lengthx Length of the number pair x, if an interval.
- Function:
ly:intlog2d -
The 2-logarithm of 1/d.
- Function:
invalidate-alterationscontext Invalidate alterations in context.
Elements of
'localAlterationscorresponding to local alterations of the key signature have the form'((octave . notename) . (alter barnum . end-mom)). Replace them with a version wherealteris set to'clefto force a repetition of accidentals.Entries that conform with the current key signature are not invalidated.
- Function:
ly:item?g -
Is g an
Itemobject?
- Function:
item::extra-spacing-height-including-staffgrob Return a value for
extra-spacing-heightthat augments the extent of the grob to the extent of the staff.
- Function:
ly:item-break-dirit -
The break status direction of item it.
-1means end of line,0unbroken, and1beginning of line.
- Function:
ly:item-get-columnit -
Return the
PaperColumnorNonMusicalPaperColumnassociated with thisItem.
- Function:
ly:iterator?x Is x a smob of class
Music_iterator?
- Function:
layout-line-thicknessgrob Get the line thickness of the grob’s corresponding layout.
- Function:
layout-set-absolute-staff-sizesz Set the absolute staff size inside of a
\layout{}block. sz is in points.
- Function:
layout-set-staff-sizesz Set the staff size inside of a
\layout{}block. sz is in points.
- Function:
left-align-at-split-notesgrob Left-align
LyricTextif the parentNoteHeadis split byCompletion_heads_engraver
- Function:
ly:lengthx 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-mainfiles 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::linegrob startx starty endx endy -
Make a line using layout information from grob grob.
- Function:
list-insert-separatorlst between Create new list, inserting between between elements of lst.
- Function:
list-joinlst intermediate Put intermediate between all elements of lst.
- Function:
list-pad-leftlst len filler fillers … Same as
list-pad-right, but add padding on the left.
- Function:
list-pad-rightlst 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-typesdisp -
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-commandcode Return
(function . signature)for a markup command code, or return#f.
- Function:
lyric-hyphen::vaticana-stylegrob Draw a
LyricHyphengrob as needed for Gregorian chant in Editio Vaticana style, that is, apply it once, flush-left. If thetextproperty ofLyricHyphenis set, print this markup. If the property is not set, use a hyphen character.
- Function:
lyric-text::printgrob Allow interpretation of tildes as lyric tieing marks.
- Function:
make-accidental-dodecaphonic-ruleoctaveness laziness Variation on function make-accidental-rule that creates an dodecaphonic accidental rule.
- Function:
make-accidental-ruleoctaveness laziness Create an accidental rule that makes its decision based on the octave of the note and a laziness value.
octaveness is either
'same-octaveor'any-octaveand defines whether the rule should respond to accidental changes in other octaves than the current.'same-octaveis 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-octavelooks at the last active pitch in any octave.laziness states over how many bars an accidental should be remembered.
0is 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.-1is ‘forget immediately’, that is, only look at key signature.#tis ‘forever’.
- Function:
ly:make-bookpaper header scores -
Make a
\bookof paper and header (which may be#fas well) containing\scores.
- Function:
ly:make-book-partscores -
Make a
\bookpartcontaining\scores.
- Function:
make-bow-stencilstart 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-markupfraction Make markup for the ‘C’ time signature style.
- Function:
make-circle-stencilradius thickness fill Make a circle of radius radius and thickness thickness.
- Function:
make-clef-setclef-name Generate the clef setting commands for a clef with name clef-name.
- Function:
make-connected-linepoints grob Take a list of points, points. Return a line connecting points, using
ly:line-interface::lineand getting layout information from grob.
- Function:
make-connected-path-stencilpointlist 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-modmod-list -
Create a context modification, optionally initialized via the list of modifications mod-list.
- Function:
make-cue-clef-setclef-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-durationlength 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-lengthmoment Make duration of the given
momentlength.
- Function:
make-ellipse-stencilx-radius y-radius thickness fill Make an ellipse of x radius x-radius, y radius
y-radius, and thickness thickness with fill defined byfill.
- 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-stencilxext yext Make a filled box.
- Function:
ly:make-global-contextoutput-def -
Set up a global interpretation context, using the output block output-def. The context is returned.
- Function:
ly:make-global-translatorglobal -
Create a translator group and connect it to the global context global. The translator group is returned.
- Function:
make-glyph-time-signature-markupstyle 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-propertiesalist -
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-overridegrob gprop val Make a
Musicexpression that overrides gprop to val in grob. This is a\temporary \override, making it possible to\revertto any previous value afterwards.
- Function:
make-grob-property-revertgrob gprop Revert the grob property gprop for grob.
- Function:
make-grob-property-setgrob gprop val Make a
Musicexpression that overrides a gprop to val in grob. Does a pop first, i.e., this is not a\temporary \override.
- Function:
make-harmonicmus Convert music variable mus to harmonics.
- Function:
make-line-stencilwidth startx starty endx endy Make a line stencil of given line width and set its extents accordingly.
- Function:
ly:make-listenercallback This is a compatibility wrapper for creating a ‘listener’ for use with
ly:add-listenerfrom a callback taking a single argument. Since listeners are equivalent to callbacks, this is no longer needed.
- Function:
make-modal-inverteraround to scale Wrapper function for
inverter-factory.
- Function:
make-modal-transposerfrom to scale Wrapper function for
transposer-factory.
- Function:
ly:make-momentm 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-musicprops -
Make a C++
Musicobject 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-musicname 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-functionsignature 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-stencilx-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-markerlabel -
Return page marker with label label.
- Function:
ly:make-page-permission-markersymbol permission -
Return page marker with page breaking and turning permissions.
- Function:
ly:make-paper-outputterport 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-changesstate-machine split-list Generate a sequence of part combiner context changes from a split list.
- Function:
make-part-combine-marksstate-machine split-list Generate a sequence of part combiner events from a split list.
- Function:
make-partial-ellipse-stencilx-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-stencilpath 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-scaleis that this scaling does not change the thickness). fill is a boolean argument that specifies whether the path should be filled. Valid path commands aremoveto 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 andprocess-acknowledged.
- Function:
ly:make-pitchoctave 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-probtype init rest -
Create a
Probobject.
- Function:
ly:make-regexpattern -
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
\relativeeven 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,\relativeis 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\relativeon 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-repeatname times main alts Create a repeat music expression, with all properties initialized properly.
- Function:
ly:make-rotationangle 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-scalesteps -
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-scalingscale 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-scoremusic -
Return score with music encapsulated in it.
- Function:
make-semitone->pitchpitches 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-skylinesegments 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-springideal min-dist -
Make a spring. ideal is the ideal distance of the spring, and min-dist is the minimum distance.
- Function:
ly:make-stencilexpr xext yext -
Stencils are device independent output expressions. They carry two pieces of information:
- A specification of how to print this object. This specification is processed by the output backends, for example scm/output-ps.scm.
- The vertical and horizontal extents of the object, given as pairs. If an
extent is unspecified (or if you use
empty-intervalas its value), it is taken to be empty.
- Function:
make-stencil-boxerthickness padding callback Return function that adds a box around the grob passed as argument.
- Function:
make-stencil-circlerthickness padding callback Return function that adds a circle around the grob passed as argument.
- Function:
ly:make-stream-eventcl proplist -
Create a stream event of class cl with the given mutable property list.
- Function:
make-tmpfiledir Return a temporary file (as a Scheme port). If dir is
#f, a file in the directory given by the environment variable$TMPDIRis created.
- Function:
ly:make-transformxx 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, andly:make-translation.
- Function:
ly:make-translationx 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-translatoraccepts forms where the first element is either an argument list starting with the respective symbol, followed by the function body (comparable to the waydefineis 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, andfinalize. Symbols mapping to another alist specified in the same manner arelistenerswith 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, withequal?).
- Function:
make-transparent-box-stencilxext yext Make a transparent box.
- Function:
ly:make-unpure-pure-containerunpure 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-keysfunction 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-musicmap? music Walk through music, transform all elements calling map? and only recurse if this returns
#f.elementsorarticulationsthat are not music expressions are discarded: this allows some amount of filtering.map-some-musicmay overwrite the original music.
- Function:
marked-up-headfootwhat-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-titlewhat 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
markupmacro provides a LilyPond-like syntax for building markups using Scheme keywords, replacing\commandwith#: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->stringm #: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-methodlayout props args … The default
markup->stringhandler for markups, used whenmarkup->stringencounters a markup that has no specialas-stringexpression defined. This appliesmarkup->stringon 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-lambdabut defines a markup list command that, when interpreted, returns a list of stencils instead of a single one.
- Function:
matrix-rotate-counterclockwisematrix Return a copy of matrix rotated counterclockwise. matrix is a 2-dimensional array without non-zero lower bounds in its shape.
- Function:
measure-counter::textgrob 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-flaggrob A callback for function
default-flagto 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:messagestr 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-programinstrument Return the program of the instrument.
- Function:
ly:minimal-breakingpaper-book -
Break (pages and lines) the
Paper_bookobject paper-book without looking for optimal spacing: stack as many lines on a page before moving to the next one.
- Function:
minmax/cmpcmp arg args … Like
minormax, 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:mmnum -
num mm.
- Function:
mmrest-of-lengthmus Create a multi-measure rest of exactly the same length as mus.
- Function:
modern-straight-flaggrob A callback function for
Flag.stencilto 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 thestroke-styleproperty of grob to the string"grace", add a slash through the flag.This function returns a stencil.
- Function:
ly:module->alistmod -
Dump the contents of module mod as an alist.
- Function:
ly:module-copydest src -
Copy all bindings from module src into dest.
- Function:
ly:modules-lookupmodules sym def -
Look up sym in the list modules, returning the first occurrence. If not found, return def or
#fif 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-adda b -
Add two moments.
- Function:
ly:moment-diva b -
Divide moment a by a number b (or by the main part of another moment).
- Function:
ly:moment-gracemom -
Extract grace timing as a rational number from mom.
- Function:
ly:moment-grace-denominatormom -
Extract denominator from grace timing.
- Function:
ly:moment-grace-numeratormom -
Extract numerator from grace timing.
- Function:
ly:moment-mainmom -
Extract main timing as a rational number from mom.
- Function:
ly:moment-main-denominatormom -
Extract denominator from main timing.
- Function:
ly:moment-main-numeratormom -
Extract numerator from main timing.
- Function:
ly:moment-moda b -
Modulo of two moments.
- Function:
ly:moment-mula b -
Multiply moment a by a number b (or by the main part of another moment).
- Function:
ly:moment-suba b -
Subtract two moments.
- Function:
ly:music?obj -
Is obj a
Musicobject?
- Function:
music->make-musicobj 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-clonemusic 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-compressmus scale Compress mus by scale.
- Function:
ly:music-deep-copym 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-compressmus fact -
Compress mus by factor fact, which is a
Moment.
- Function:
ly:music-duration-lengthmus -
Extract the duration field from mus and return the length.
- Function:
music-filterpred? 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-extractx -
Return the Scheme function inside x.
- Function:
ly:music-function-signaturex -
Return the function signature inside x.
- Function:
music-is-of-type?mus type Does mus belong to the music class type?
- Function:
ly:music-lengthmus -
Get the length of music expression mus and return it as a
Momentobject.
- Function:
ly:music-list?lst -
Is lst a list of music objects?
- Function:
music-mapfunction 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-propertiesmus -
Return an alist containing the mutable properties of mus. The immutable properties are not available, since they are constant and initialized by the
make-musicfunction.
- Function:
ly:music-output?x Is x a smob of class
Music_output?
- Function:
music-pitchesmusic Return a list of all pitches from music.
- Function:
ly:music-propertymus 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-filterdescend? 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-mapdescend? 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-startmus -
Get the start of music expression mus and return it as a
Momentobject.
- Function:
ly:music-transposem p -
Transpose m such that central C is mapped to p. Return m.
- Function:
music-type-predicatetypes Return a predicate function that can be used for checking music to have one of the types listed in types.
- Function:
neo-modern-accidental-rulecontext 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-flaggrob A callback for function
default-flag, indicating ‘no flag’.This function simply returns an empty stencil.
- Function:
ly:non-fatal-errorstr 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-flaggrob A callback for function
default-flagto get a ‘normal’ flag.See function
glyph-flagfor the naming scheme of flag glyphs (with argument flag-style set to the empty string).This function returns a stencil.
- Function:
normalize-colorcolor 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-accidentalsnote-column -
Return the
AccidentalPlacementgrob from note-column if any, orSCM_EOLotherwise.
- Function:
ly:note-column-dot-columnnote-column -
Return the
DotColumngrob from note-column if any, orSCM_EOLotherwise.
- Function:
ly:note-extra-source-filefilename parser -
Register a file, e.g., an image file, as being needed to compile the current file. This is used for the
-dembed-source-codeoption. 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-attachmentfont-metric glyph-name direction -
Get attachment in font-metric for attaching a stem to notehead glyph-name in the direction direction (default
UP).
- Function:
note-name->markuppitch lowercase? Return pitch markup for pitch, including accidentals printed as glyphs. If lowercase? is set to false, the note names are capitalized.
- Function:
note-name->stringpitch language … Return pitch string for pitch, without accidentals or octaves. Current input language is used for pitch names, except if an other language is specified.
- Function:
ly:note-scale?x Is x a smob of class
Scale?
- Function:
note-to-clustermusic Replace
NoteEventsbyClusterNoteEvents.
- Function:
ly:number->strings -
Convert s to a string without generating many decimals.
- Function:
number-formatnumber-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), androman-upper.For
custom, custom-format must be present; it gets applied to num.
- Function:
offset-fretfret-offset diagram-definition Add fret-offset to each fret indication in diagram-definition and return the resulting verbose
fret-diagram-definition.
- Function:
offsetterproperty offsets Apply offsets to the default values of property of grob. Offsets are restricted to immutable properties and values of type
number,number-pair, ornumber-pair-list.
- Function:
old-straight-flaggrob A callback function for
Flag.stencilto 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-styleproperty of grob to the string"grace", add a slash through the flag.This function returns a stencil.
- Function:
ly:one-line-auto-height-breakingpaper-book -
Put each score on a single line, and put each line on its own page. Modify the
paper-widthsetting so that every page is wider than the widest line. Modify thepaper-heightsetting to fit the height of the tallest line.
- Function:
ly:one-line-breakingpaper-book -
Put each score on a single line, and put each line on its own page. Modify the
paper-widthsetting so that every page is wider than the widest line.
- Function:
ly:one-page-breakingpaper-book -
Put each score on a single page. The
paper-heightsettings 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-breakingpaper-book -
Optimally break (pages and lines) the
Paper_bookobject paper-book to minimize badness for both vertical and horizontal spacing.
- Function:
ly:option-usageport internal -
Print
ly:set-optionusage. Optional port argument for the destination defaults to current output port. Specify internal to get doc for internal options.
- Function:
ly:otf->cffotf-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-infofont glyph -
Given the font metric font of an OpenType font, return the information about named glyph glyph (a string).
- Function:
ly:otf-font-table-datafont tag -
Extract a table tag from font. Return empty string for non-existent tag.
- Function:
ly:otf-glyph-countfont -
Return the number of glyphs in font.
- Function:
ly:otf-glyph-listfont -
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-clonedef -
Clone output definition def.
- Function:
ly:output-def-lookupdef 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-parentoutput-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-scopedef -
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-descriptionoutput-def -
Return the description of translators in output-def.
- Function:
ly:output-find-context-defoutput-def context-name -
Return an alist of all context defs (matching context-name if given) in output-def.
- Function:
output-module?module Return
#tif module belongs to an output module usually carrying context definitions (\midior\layout).
- Function:
ly:outputter-closeoutputter -
Close port of outputter.
- Function:
ly:outputter-dump-stenciloutputter stencil -
Dump stencil expr onto outputter.
- Function:
ly:outputter-dump-stringoutputter str -
Dump str onto outputter.
- Function:
ly:outputter-output-schemeoutputter expr -
Output expr to the paper outputter.
- Function:
ly:outputter-portoutputter -
Return output port for outputter.
- Function:
oval-stencilstencil thickness x-padding y-padding Add an oval around
stencil, padded by the padding pair, producing a new stencil.
- Function:
override-head-styleheads style Override style for heads to style.
- Function:
override-time-signature-settingtime-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-breakingpaper-book -
Optimally break (pages and lines) the
Paper_bookobject 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-fontsf -
Return alist of
(ps-name file-name font-index)lists for Pango font f.
- Function:
pango-pf-file-namepango-pf Return the file name of the Pango physical font pango-pf.
- Function:
pango-pf-font-namepango-pf Return the font name of the Pango physical font pango-pf.
- Function:
pango-pf-fontindexpango-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-headerpb -
Return the header definition (
\header) inPaper_bookobject pb.
- Function:
ly:paper-book-pagespb -
Return pages in
Paper_bookobject pb.
- Function:
ly:paper-book-paperpb -
Return the paper output definition (
\paper) inPaper_bookobject pb.
- Function:
ly:paper-book-performancespb -
Return performances in
Paper_bookobject pb.
- Function:
ly:paper-book-scopespb -
Return scopes in
Paper_bookobject pb.
- Function:
ly:paper-book-systemspb -
Return systems in
Paper_bookobject pb.
- Function:
ly:paper-column::break-align-widthcol 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-symbolproperty), or a list of such symbols. For example,(ly:paper-column::break-align-width col '(key-signature staff-bar))
tries to find a
BreakAlignGroupof key signatures, but falls back on bar lines if there are no key signatures or if the extent of theBreakAlignGroupcontaining them is empty (for example, if they are omitted).The special symbol
break-alignmentmeans 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
PaperColumnorNonMusicalPaperColumn. 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-fontsdef -
Return a list containing the fonts from output definition def (e.g.,
\paper).
- Function:
ly:paper-get-fontdef 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-numberdef sym -
Return the value of variable sym in output definition def as a double.
- Function:
ly:paper-outputscaledef -
Return the
output-scalefor output definition def.
- Function:
ly:paper-score-paper-systemspaper-score -
Return vector of
paper_systemobjects from paper-score.
- Function:
ly:paper-system?obj -
Is obj a C++
Probobject of typepaper-system?
- Function:
parenthesize-stencilstencil half-thickness width angularity padding Add parentheses around stencil, returning a new stencil.
- Function:
ly:parse-filename -
Parse a single
.lyfile. Upon failure, throwly-file-failedkey.
- Function:
ly:parse-initname -
Parse the init file name.
- Function:
ly:parse-string-expressionparser-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-stringterse-definition Parse a
fret-diagram-tersedefinition 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-clear-errorparser -
Clear error flag for parser, defaulting to current parser.
- Function:
ly:parser-cloneclosures 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!symbol val -
Bind symbol to val in current parser’s module.
- Function:
ly:parser-errormsg 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-stringly-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-lookupsymbol -
Look up symbol in current parser’s module. Return
'()if not defined.
- Function:
ly:parser-output-nameparser -
Return the base name of the output file. If parser is left off, use currently active parser.
- Function:
ly:parser-parse-stringparser-smob ly-code -
Parse the string ly-code with parser-smob. Upon failure, throw
ly-file-failedkey.
- Function:
ly:parser-set-note-namesnames -
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
#tif the instrument should use MIDI channel 9.
- Function:
ly:perform-text-replacementsprops input-string -
A string transformer to perform text replacements using the
replacement-alistfrom the property alist chain props.
- Function:
ly:performance-headersperformance -
Return the list of headers with the innermost first.
- Function:
ly:performance-writeperformance 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:
ly:pitch-alterationpp -
Extract the alteration from pitch pp.
- Function:
ly:pitch-diffpitch root -
Return pitch delta such that root transposed by delta equals pitch.
- Function:
ly:pitch-negatep -
Negate pitch p.
- Function:
ly:pitch-notenamepp -
Extract the note name from pitch pp.
- Function:
ly:pitch-octavepp -
Extract the octave from pitch pp.
- Function:
ly:pitch-quartertonespp -
Calculate the number of quarter tones of pitch pp from middle C.
- Function:
ly:pitch-semitonespp -
Calculate the number of semitones of pitch pp from middle C.
- Function:
ly:pitch-stepsp -
Number of steps counted from middle C of the pitch p.
- Function:
ly:pitch-tonespp -
Calculate the number of tones of pitch pp from middle C as a rational number.
- Function:
ly:pitch-transposep delta -
Transpose pitch p by the amount delta, where delta is relative to middle C.
- Function:
ly:png->eps-dumpfile-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-dimensionsfile-name -
Read the PNG image under file-name and return its dimensions as a pair of integers, or
#fif there was an error (a warning is printed in this case).
- Function:
ly:pointer-group-interface::add-grobgrob sym grob-element -
Add grob-element to grob’s sym grob array.
- Function:
polar->rectangularradius 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-chainkey 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-propertiesprob -
Retrieve an alist of immutable properties.
- Function:
ly:prob-mutable-propertiesprob -
Retrieve an alist of mutable properties.
- Function:
ly:prob-propertyprob 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-errorstr 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:progressstr 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-statssym -
Return hash table with a property access corresponding to sym. Choices are
prob,grob, andcontext.
- Function:
ly:ptnum -
num printer points.
- Function:
ly:pure-calldata 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-callbackgrob 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:
ly:randomize-rand-seed -
Randomize C random generator.
- Function:
ratio->fretratio Calculate a fret number given ratio for the harmonic.
- Function:
ratio->pitchratio Calculate a pitch given ratio for the harmonic.
- Function:
read-lily-expressionchr 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-emulatemusic odef Interpret music according to odef, but store all events in a chronological list, similar to the
Recording_group_engraverin LilyPond version 2.8 and earlier.
- Function:
ly:regex?x Is x a smob of class
Regex?
- Function:
ly:regex-execregex string -
Scan string for a match of the regular expression object regex (constructed with
ly:make-regex). Return a match object or#f. Seely: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->listregex 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-positionsmatch [index] Retrieve the start and end of a capturing group in a regular expression match object, returned as a pair, or
#f. Seely:regex-match-substringfor details. The index argument is optional, defaulting to 0.
- Function:
ly:regex-match-prefixm Retrieve the part of the target string before the regex match m.
- Function:
ly:regex-match-substringm [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
aaagainst the regex(a+)|(b+)),#fis returned.
- Function:
ly:regex-match-suffixm Retrieve the part of the target string after the regex match m.
- Function:
ly:regex-quotestring -
Escape special characters in string, forming a regular expression pattern that matches exactly string.
Example:
(ly:regex-quote "$2") ⇒ "\\$2"
- Function:
ly:regex-replaceregex 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-splitregex str Split str into non-overlapping occurrences of the regex regex, returning a list of the substrings.
- Function:
ly:register-stencil-expressionsymbol -
Add symbol as head of a stencil expression.
- Function:
ly:register-translatorcreator 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-extentelements common axis -
Determine the extent of elements relative to common in the axis direction.
- Function:
remove-grace-propertycontext-name grob sym Remove all sym for grob in context-name.
- Function:
remove-whitespacestrg Remove characters satisfying
char-whitespace?from string strg.
- Function:
ly:rename-fileoldname newname -
Rename oldname to newname. In contrast to Guile’s
rename-filefunction, 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-optionsalist -
Reset all program options to the values in alist.
- Function:
retrieve-glyph-flagflag-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-musicmusic Return music in retrograde (reversed) order.
- Function:
revert-fontSizefunc-name mag Used by
\magnifyMusicand\magnifyStaff. Calculate the previousfontSizevalue (before scaling) by factoring out the magnification factor mag (if func-name is'magnifyMusic), or by factoring out the context propertymagnifyStaffValue(if func-name is'magnifyStaff). Revert thefontSizein the appropriate context accordingly.With
\magnifyMusic, the scaling is reverted after the music block it operates on.\magnifyStaffdoes 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-styleheads Revert style for heads.
- Function:
revert-propsfunc-name mag props Used by
\magnifyMusicand\magnifyStaff. Revert each prop in props in the appropriate context. func-name is either'magnifyMusicor'magnifyStaff. The props list is formatted like:'((Stem thickness) (Slur line-thickness) ...)
- Function:
ly:round-filled-boxxext yext blot -
Make a
Stencilobject that prints a black box of dimensions xext, yext and roundness blot.
- Function:
ly:round-polygonpoints blot extroversion filled -
Make a
Stencilobject 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-stencilstencil thickness padding blot Add a rounded box around stencil, producing a new stencil.
- Function:
ly:run-translatormus 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:
scale-beam-thicknessmag Used by
\magnifyMusic. ScalingBeam.beam-thicknessexactly to the mag value will not work. This uses two reference values forbeam-thicknessto determine an acceptable value when scaling, then does the equivalent of a\temporary \overridewith the new value.
- Function:
scale-fontSizefunc-name mag Used by
\magnifyMusicand\magnifyStaff. Look up the currentfontSizein the appropriate context and scale it by the magnification factor mag. func-name is either'magnifyMusicor'magnifyStaff.
- Function:
scale-layoutpaper scale Return a clone of paper, scaled by the given scale factor.
- Function:
scale-propsfunc-name mag allowed-to-shrink? props Used by
\magnifyMusicand\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 \overridewith 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'magnifyMusicor'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-formatscore layout -
Run score through layout (an output definition) scaled to correct
output-scalealready, returning a list of layout lines.
- Function:
ly:score-error?score -
Was there an error in the score?
- Function:
ly:score-headerscore -
Return score header.
- Function:
ly:score-musicscore -
Return score music.
- Function:
ly:score-output-defsscore -
All output definitions in a score.
- Function:
ly:score-set-header!score module -
Set the score header.
- Function:
scorify-musicmusic Preprocess music.
- Function:
seconds->moments context Return a moment equivalent to s seconds at the current tempo.
- Function:
select-head-glyphstyle log Select a note head glyph string based on note head style style and duration log log.
- Function:
self-alignment-interface::self-aligned-on-breakablegrob Return the
X-offsetthat places grob according to itsself-alignment-Xover the reference point defined by thebreak-align-anchor-alignmentof abreak-aligneditem such as aClef.
- Function:
sequential-music-to-chord-exceptionsseq rest … Transform sequential music seq of type
<<c d e>>-\markup{ foobar }to
(cons cde-pitches foobar-markup), or to(cons de-pitches foobar-markup)if omit-root is given and non-false.
- Function:
set-accidental-stylestyle rest … Set accidental style to style. Optionally take a context argument, e.g.,
'Staffor'Voice. The context defaults toStaff, except for piano styles, which useGrandStaffas a context.
- Function:
set-default-paper-sizename 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 stringlandscapeto the name of the paper size itself (example:"a4landscape").This function can only be used at top level; it must come before any
\paperblock. See also functionset-paper-size.
- Function:
ly:set-default-scalescale 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-sizesz Set the default staff size, where sz is thought to be in points.
- Function:
ly:set-grob-creation-callbackcb -
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
#fas argument to unset the callback.
- Function:
ly:set-grob-modification-callbackcb -
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
#fas argument to unset the callback.
- Function:
ly:set-middle-C!context -
Set the
middleCPositionvariable in context based on the variablesmiddleCClefPositionandmiddleCOffset.
- Function:
set-mus-properties!m alist Set all of alist as properties of m.
- Function:
ly:set-optionvar val -
Set a program 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 fororiginare a music expression which is then used as the source of location information, or#for'()in which case no action is performed. The return value is m itself.
- Function:
set-output-propertygrob-name symbol val Usage example:
\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1))
- Function:
set-paper-sizename rest … Set the paper size within
\paperto 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 stringlandscapeto the name of the paper size itself (example:"a4landscape").This function can only be used within a
\paperblock; it must come before any other functions used within the same\paperblock. See also functionset-default-paper-size.
- Function:
ly:set-property-cache-callbackcb -
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
#fas argument to unset the callback.
- Function:
shift-one-duration-logmusic shift dot Add shift to
duration-logof'durationin 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-beging Shift an item to the right, but only at the start of the line.
- Function:
shift-semitone->pitchkey 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->restmus Replace mus by
RestEventof the same duration if it is aSkipEvent. Useful for extracting parts from crowded scores.
- Function:
skip-of-lengthmus Create a skip of exactly the same length as mus.
- Function:
skip-of-moment-spanstart-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->pointsskyline 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-distanceskyline 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-heightskyline x -
Return the height of skyline at point x.
- Function:
ly:skyline-max-heightskyline -
Return the maximum height found in skyline.
- Function:
ly:skyline-max-height-positionskyline -
Return the position at which skyline reaches its maximum height.
- Function:
ly:skyline-mergeskyline1 skyline2 -
Merge the two given skylines.
- Function:
ly:skyline-padskyline horizon-padding -
Return a version of skyline padded by horizon-padding along the horizon.
- Function:
ly:skyline-touching-pointskyline 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-stencilstencil 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-skylinesproperty if axis isX, and forhorizontal-skylinesif axis isY).
- Function:
ly:smob-protects -
Return LilyPond’s internal smob protection list.
- Function:
ly:solve-spring-rod-problemsprings 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
#ffor 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-filesparser-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-breakinggrob A dummy callback that kills the
Grobgrob if it contains no elements.
- Function:
ly:span-bar::calc-anchorgrob 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-namegrob Return the
'glyph-nameof the correspondingBarLinegrob. The correspondingSpanBarglyph is computed withinspan-bar::compound-bar-line.
- Function:
span-bar::compound-bar-linegrob bar-glyph extent Build the stencil of the span bar.
- Function:
ly:span-bar::printgrob The print routine for span bars.
- Function:
ly:span-bar::widthgrob Compute the width of the
SpanBarstencil.
- Function:
Span_stem_engraverctx Connect cross-staff stems to the stems above in the system.
- Function:
ly:spanner?g -
Is g a spanner object?
- Function:
ly:spanner-boundspanner dir def -
Get one of the bounds of spanner. dir is
-1for left, and1for 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-intospanner -
Return broken-into list for spanner.
- Function:
ly:spanner-broken-neighborspanner 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:spawncommand rest -
Simple Scheme interface to the GLib function
g_spawn_sync. If an error occurs, format it withformatand rest.
- Function:
split-list-by-group-lengthslst 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-separatorlst 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-linesdir padding baseline stils Stack stencils vertically with a baseline skip.
- Function:
stack-stencil-linespace 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-stencilsaxis dir padding stils Stack stencils stils in direction axis, dir, using padding.
- Function:
stack-stencils-padding-listaxis dir paddings stils Stack stencils stils in direction axis, dir, using a list of paddings.
- Function:
staff-ellipsis::calc-y-extentgrob Callback for
StaffEllipsisgrob, which is used withskipTypesetting.
- Function:
staff-ellipsis::printgrob Callback for
StaffEllipsisgrob, which is used withskipTypesetting.
- Function:
ly:staff-symbol-line-thicknessgrob -
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-radiusgrob -
Return the radius of the staff associated with grob.
- Function:
ly:staff-symbol-staff-spacegrob -
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-redirectfd-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:stencil?x Is x a smob of class
Stencil?
- Function:
ly:stencil-addargs -
Combine stencils. Takes any number of arguments.
- Function:
ly:stencil-aligned-tostil axis dir -
Align stencil stil using its own extents. dir is a number.
-1and1are left and right, respectively. Other values are interpolated (so0means the center).
- Function:
ly:stencil-combine-at-edgefirst axis direction second padding -
Construct a stencil by putting second next to first. axis can be
0(x axis) or1(y axis). direction can be-1(left or down) or1(right or up). The stencils are juxtaposed with padding as extra space. first and second may also be'()or#f.
- 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-exprstil -
Return the expression of stencil stil.
- Function:
ly:stencil-extentstil axis -
Return a pair of numbers signifying the extent of stencil stil in axis direction (
0or1for x and y axis, respectively).
- Function:
ly:stencil-outlinestil outline -
Return a stencil with the stencil expression (inking) of stencil stil but with outline and dimensions from stencil outline.
- Function:
stencil-pad-aroundamount stencil Add a padding of amount around stencil, returning a new stencil.
- Function:
ly:stencil-rotatestil 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-absolutestil angle x y -
Return a stencil stil rotated by angle degrees around point (x, y), given in absolute coordinates.
- Function:
ly:stencil-scalestil 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:
ly:stencil-stackfirst axis direction second padding mindist -
Construct a stencil by stacking second next to first. axis can be
0(x axis) or1(y axis). direction can be-1(left or down) or1(right or up). The stencils are juxtaposed with padding as extra space. first and second may also be'()or#f. As opposed toly: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, padding and mindist do not apply.
- Function:
ly:stencil-translatestil offset -
Return a copy of stencil stil but translated by offset (a pair of numbers).
- Function:
ly:stencil-translate-axisstil amount axis -
Return a copy of stencil stil but translated by amount in axis direction.
- Function:
stencil-true-extentstencil axis Return the extent of the actual printed ink of stencil on axis.
- Function:
stencil-whiteoutstil [style [thickness [line-thickness]]] White-out a stencil (i.e., add a white background around it).
style, thickness and line-thickness are optional arguments. If set, style determines the shape of the white background. Given
'outlinethe white background is produced bystencil-whiteout-outline, given'rounded-boxit is produced bystencil-whiteout-boxwith rounded corners, given other arguments (e.g.,'box) or when unspecified it defaults tostencil-whiteout-boxwith square corners. If thickness is specified it determines how far, as a multiple of line-thickness, the white background extends past the extents of stencil stil. If thickness has not been specified, an appropriate default is chosen based on style.
- Function:
stencil-whiteout-boxstil [thickness [blot [color]]] White-out a stencil by printing it on top of a white (or color) rectangle.
thickness is how far, as a multiple of
line-thickness, the white outline extends past the extents of stencil stil.
- Function:
stencil-whiteout-outlinestil [thickness [color [angle-increments [radial-increments]]]] White-out a stencil by surrounding it with white (or color) around its outline.
This function works by creating a series of white or color stencils radially offset from the original stencil with angles from 0 to 2*pi, at an increment of
angle-inc, and with radii fromradial-incto thickness. thickness is how big the white outline is, as a multiple ofline-thickness. radial-increments is how many copies of the white stencil we make on our way out to thickness. angle-increments is how many copies of the white stencil we make between 0 and 2*pi.
- Function:
stencil-with-colorstencil color Return a modified version of the given stencil that is colored with the given color. See
normalize-colorfor possible color formats.
- Function:
straight-flagflag-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-styleproperty 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, andflat-flag.
- Function:
ly:stream-event?obj -
Is obj a
Stream_eventobject?
- Function:
string->string-liststr 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 typestring?, return a list containing"".
- Function:
ly:string-percent-encodestr -
Encode all characters in string str with hexadecimal percent escape sequences, with the following exceptions: characters ‘-./_’ and characters in ranges
0-9,A-Z, anda-z.
- Function:
ly:string-substitutea b s -
Replace string a by string b in string s.
- Function:
style-note-headsheads style music Set style for all heads in music. Works both inside of and outside of chord construct.
- Function:
suggest-convert-ly-messageversion-seen Internally used when the file has an error, to suggest usage of
convert-lyif the\versionstatement is considered outdated compared to the LilyPond version that is running.
- Function:
symbol-concatenatenames … Like
string-concatenate, but for symbols.
- Function:
ly:system-font-loadname -
Load the OpenType system font name.otf. Fonts loaded with this command must contain two additional SFNT font tables called
LILCandLILY, needed for typesetting musical elements. Currently, only the Emmentaler and the Emmentaler-Brace fonts fulfill these requirements.Note that only
ly:font-get-glyphand derived code (like\lookup) can access glyphs from the system fonts; text strings are handled exclusively via the Pango interface.
- Function:
tag-group-gettag Return the tag group (as a list of symbols) that the given tag symbol belongs to,
#fif none.
Return a predicate that returns
#ffor any music that is to be removed by\keepWithTagon the given symbol or list of symbols tags.
Return a predicate that returns
#ffor any music that is to be removed by\removeWithTagon the given symbol or list of symbols tags.
- Function:
teaching-accidental-rulecontext 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
\\layoutblock. props is an alist chain, i.e., a list of alists. markup is the markup text to be processed. See alsogrob-interpret-markup.
- Function:
ly:time-signature::printgrob Print routine for time signatures.
- Function:
ly:time-signature::print-xgrob Print routine for an X-shaped sign indicating no time signature.
- Function:
to-staff-spacesize [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:
ly:transform?x Is x a smob of class
Transform?
- Function:
ly:transform->listtransform -
Convert a transform matrix to a list of six values. Values are xx, yx, xy, yy, x0, y0.
- Function:
ly:translate-cpp-warning-schemestr -
Translate a string in C++
printfformat and modify it to use it for Scheme formatting.
- Function:
ly:translator?x Is x a smob of class
Translator?
- Function:
ly:translator-contexttrans -
Return the context of the translator object trans.
- Function:
ly:translator-descriptioncreator -
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-namecreator -
Return the type name of the translator definition creator. The name is a symbol.
- Function:
ly:transpose-key-alistl pit -
Make a new key alist of l transposed by pitch pit.
- Function:
ly:ttf->pfattf-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-namettf-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
#fon the clones, but#ton the originals.
- Function:
unfold-repeatstypes music Replace repeats of the types given by types with unfolded repeats. If types is an empty list,
repeated-musicis taken, unfolding all.
- Function:
unfold-repeats-fullymusic Unfold repeats and expand the resulting
unfolded-repeated-music.
- Function:
uniq-listlst Remove doublets from list lst (i.e., make its elements unique), assuming that it is sorted. Uses
equal?for comparisons.
- Function:
uniqued-alistalist [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-multimeasurecontext dur Given a context and a duration, return
1if the duration is longer than themeasureLengthin that context, and#fotherwise. This supports historic use ofCompletion_heads_engraverto splitc1*3into three whole notes.
- Function:
ly:unpure-calldata 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-partpc -
Return the pure part of pc.
- Function:
ly:unpure-pure-container-unpure-partpc -
Return the unpure part of pc.
- Function:
ly:usage -
Print usage message.
- Function:
value-for-spanner-pieceproperty 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-musicm [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-visibilitybar-glyph Determine the visibility of the volta bracket end hook, returning
#tif no hook should be drawn.
- Function:
ly:volta-bracket::calc-shorten-pairgrob Calculate the
shorten-pairvalues for an ideal placement of the volta brackets relative to the bar lines.
- Function:
volta-spec-musicnumber-list music Add \volta number-list to music.
- Function:
ly:warningstr 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-locatedlocation 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-8wc -
Encode the Unicode codepoint wc, an integer, as UTF-8.
- Function:
write-memessage x Return x. Display message and write x. Handy for debugging, possibly turned off.
| [ << Backend ] | [Top][Contents][Index] | [ Indices >> ] |
| [ < Internal backend properties ] | [ Up : Top ] | [ Indices > ] |