| [ << 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:
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-music-fontsnode family name brace design-size-alist factor Set up music fonts.
Arguments:
- node is the font tree to modify.
- family is the family name of the music font.
- name is the basename for the music font. ‘name-<designsize>.otf’ should be the music font.
- brace is the basename for the brace font. ‘brace-brace.otf’ should have piano braces.
-
design-size-alist is a list of
(rounded . designsize). rounded is a suffix for font filenames, while designsize should be the actual design size. The latter is used for text fonts loaded through pango/fontconfig. - factor is a size factor relative to the default size that is being used. This is used to select the proper design size for the text fonts.
- 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 internal description -
Add a program option sym. val is the default value and description is a string description.
- 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 Load and add a stroke (represented by a glyph in the font) to the given flag stencil.
- Function:
add-stroke-straightstencil grob dir log stroke-style offset length thickness stroke-thickness Add the stroke for acciaccatura to the given flag stencil. The stroke starts for up-flags at ‘upper-end-of-flag + (0,length/2)’ and ends at ‘(0, vertical-center-of-flag-end) - (flag-x-width/2, flag-x-width + flag-thickness)’. Here ‘length’ is the whole length, while ‘flag-x-width’ is just the x extent and thus depends on the angle! Other combinations don’t look as good.
For down-stems the y coordinates are simply mirrored.
- 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-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:
allow-volta-hookbar-glyph Allow the volta bracket hook being drawn over bar line bar-glyph.
- 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:
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?.
- 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::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, thickness. The blot is calculated bybar-line::calc-blot, which needs extent and grob. y-ext is not necessarily of same value as extent.
- 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: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:
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:
box-grob-stencilgrob Make a box of exactly the extents of the grob. The box precisely encloses the contents.
- 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:
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:
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:
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-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:
collect-music-auxscore-handler music Pass music to score-handler, with preprocessing for page layout instructions.
- 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:
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-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-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-namecontext -
Return the name of context, i.e., for
\context Voice = "one" …return the symbolVoice.
- 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-set-property!context name val -
Set value of property name in context context to val.
- 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:
create-glyph-flagflag-style dir-modifier grob Create a flag stencil by looking up the glyph from the font.
- Function:
cross-staff-connectstem Set cross-staff property of the stem to this function to connect it to other stems automatically
- 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. Its style is derived from the
'styleFlag property. By default,lilyponduses a C++ Function (which is slightly faster) to do exactly the same as this function. However, if one wants to modify the default flags, this function can be used to obtain the default flag stencil, which can then be modified at will. The correct way to do this is:\override Flag #'stencil = #default-flag \override Flag #'style = #'mensural
- 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:
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:
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:
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:
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:
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-log-factorlognum Given a logarithmic duration number, return the length of the duration, as a number of whole notes.
- 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:
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:
event-has-articulation?event-type stream-event Is event-type in the
articulationslist of the music causing stream-event?
- 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:
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:
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-broken-spanner?spanner Is spanner broken and the first of its broken siblings? See also
unbroken-or-first-broken-spanner?.
- 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:
ly:font-design-sizefont -
Given the font metric font, return the design size, relative to the current
output-scale.
- 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-charcodefont name -
Return the character code for glyph 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-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-sub-fontsfont -
Given the font metric font of an OpenType font, return the names of the subfonts within font.
- 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-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:
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:
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:
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 Simulatesthe default way of generating flags: Look up glyphs
flags.style[ud][1234]from the feta font and use it for the flag stencil.
- 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::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::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:
ly:grob-alist-chaingrob global -
Get an alist chain for grob grob, with global as the global default. If unspecified,
font-defaultsfrom the layout block is taken.
- 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-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-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-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-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-set-nested-property!grob symlist val -
Set nested property symlist 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-spanned-column-rank-intervalgrob -
Return a pair with the
rankof the furthest left column and therankof the furthest right column spanned bygrob.
- 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:gulp-filename size -
Read size characters from the file name, and return its contents in a string. If size is undefined, the entire file is read. The file is looked up using the search path.
- Function:
ly:gulp-file-utf8name size -
Read size characters from the file name, and return its contents in a string decoded from UTF-8. If size is undefined, the entire file is read. The file is looked up using the search path.
- 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:
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: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-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:
interpret-markup_ _ _ - LilyPond procedure: ly:text-interface::interpret-markup Convert a text markup into a stencil. Takes three arguments, layout, props, and markup.
layout is a
\layoutblock; it may be obtained from a grob withly:grob-layout. props is an alist chain, i.e., a list of alists. This is typically obtained with(ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults)). markup is the markup text to be processed.
- 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-indexinterval dir Interpolate interval between between left (dir=
-1) and right (dir=+1).
- 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:
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:
layout-set-absolute-staff-sizesz Set the absolute staff size inside of a
\layout{}block. sz is in points.
- 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:
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:
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:
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:
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-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:
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-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:
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-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-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:
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:
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-permission-markersymbol permission -
Return page marker with page breaking and turning permissions.
- Function:
ly:make-pango-description-stringchain size -
Make a
PangoFontDescriptionstring for the property alist chain at size size.
- 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.
- Macro:
make-relative… The list of pitch or music variables in variables is used as a sequence for creating relativable music from music.
When the constructed music is used outside of
\relative, it just reflects plugging in the variables into music.The action inside of
\relative, however, is determined by first relativizing the surrogate reference with the variables plugged in and then using the variables relativized as a side effect of relativizing reference for evaluating music.Since pitches don’t have the object identity required for tracing the effect of the reference call, they are replaced only for the purpose of evaluating reference with simple pitched note events.
The surrogate reference expression has to be written with that in mind. In addition, it must not contain copies of music that is supposed to be relativized but rather the originals. This includes the pitch expressions. As a rule, inside of
#{…#}variables must only be introduced using#, never via the copying construct$. The reference expression will usually just be a sequential or chord expression naming all variables in sequence, implying that following music will be relativized according to the resulting pitch of the last or first variable, respectively.Since the usual purpose is to create more complex music from general arguments and since music expression parts must not occur more than once, one does generally need to use copying operators in the replacement expression music when using an argument more than once there. Using an argument more than once in reference, in contrast, does not make sense.
There is another fine point to mind: music must only contain freshly constructed elements or copied constructs. This will be the case anyway for regular LilyPond code inside of
#{…#}, but any other elements (apart from the variables themselves which are already copied) must be created or copied as well.The reason is that it is usually permitted to change music in-place as long as one does a ly:music-deep-copy on it, and such a copy of the whole resulting expression will not be able to copy variables/values inside of closures where the information for relativization is being stored.
- 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:
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:
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 markup, with properties reflecting the variables in the page’s layout and header modules.
- Function:
marked-up-titlewhat Read variables what-odd and what-even from the page’s layout. Interpret either of them as markup, with properties reflecting the variables 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.
- 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:
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 Mensural flags: Create the flag stencil by loading the glyph from the font. Flags are always aligned with staff lines, so we need to check the end point of the stem: For stems ending on staff lines, use different flags than for notes between staff lines. The idea is that flags are always vertically aligned with the staff lines, regardless of whether the note head is on a staff line or between two staff lines. In other words, the inner end of a flag always touches a staff line.
- 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:
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:
modern-straight-flaggrob Modern straight flag style (for composers like Stockhausen, Boulez, etc.). The angles are 18 and 22 degrees and thus smaller than for the ancient style of Bach, etc.
- 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:
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-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-lengthmus -
Get the length of music expression mus and return it as a
Momentobject.
- 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-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:
ly:music-startmus -
Get the start of music expression mus and return it as a
Momentobject.
- 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:
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:
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.
- 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:
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 Old straight flag style (for composers like Bach). The angles of the flags are both 45 degrees.
- 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-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: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-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:
oval-stencilstencil thickness x-padding y-padding Add an oval around
stencil, padded by the padding pair, producing a new stencil.
- 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-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-physical-fontsf -
Return alist of
(ps-name file-name font-index)lists for Pango font f.
- Function:
ly:paper-book-paperpb -
Return the paper output definition (
\paper) inPaper_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-score-paper-systemspaper-score -
Return vector of
paper_systemobjects from paper-score.
- Function:
ly:paper-system-minimum-distancesys1 sys2 -
Measure the minimum distance between two paper system
Probs sys1 and sys2, using their stored skylines if possible and falling back to their extents otherwise.
- Function:
parenthesize-stencilstencil half-thickness width angularity padding Add parentheses around stencil, returning a new stencil.
- 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-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-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:
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-writeperformance filename name -
Write performance to filename storing name as the name of the performance in the file metadata.
- Function:
ly:pitch-diffpitch root -
Return pitch delta such that root transposed by delta equals pitch.
- 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: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-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: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: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:
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: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:
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:
retrieve-glyph-flagflag-style dir dir-modifier grob Load the correct flag glyph from the font.
- 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-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-scm -
Make a
Stencilobject that prints a black polygon with corners at the points defined by points (list of coordinate pairs) and roundness blot. Optional extroversion shifts the outline outward, with the default of 0 keeping the middle of the line just on 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-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-embedded-formatscore layout -
Run score through layout (an output definition) scaled to correct
output-scalealready, returning a list of layout lines.
- 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:
ly:set-color-namesalist -
Define named colors for
ly:stencil-in-color. alist has the entries of the format(name . color), where color is a list of length 3 (RGB) or 4 (RGB+alpha).
- 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:
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:
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:
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-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->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-max-height-positionskyline -
Return the position at which skyline reaches its maximum height.
- 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: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-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:
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-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-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-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-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-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-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-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-in-colorstc r g b a -
Put stencil stc in a different color. Accepts either three values for r, g, b and an optional value for a, or a single CSS-like string.
- 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:
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:
straight-flagflag-thickness flag-spacing upflag-angle upflag-length downflag-angle downflag-length Create a stencil for a straight flag. 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.
- 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:
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:
ly:system-font-loadname -
Load the OpenType system font ‘name.otf’. Fonts loaded with this command must contain three additional SFNT font tables called
LILC,LILF, andLILY, 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.
- Function:
tags-keep-predicatetags Return a predicate that returns
#ffor any music that is to be removed by\keepWithTagon the given symbol or list of symbols tags.
- Function:
tags-remove-predicatetags 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. Takes three arguments, layout, props, and markup.
layout is a
\layoutblock; it may be obtained from a grob withly:grob-layout. props is an alist chain, i.e., a list of alists. This is typically obtained with(ly:grob-alist-chain grob (ly:output-def-lookup layout 'text-font-defaults)). markup is the markup text to be processed.
- 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-descriptioncreator -
Return an alist of properties of translator definition creator.
- Function:
ly:translator-namecreator -
Return the type name of the translator definition creator. The name is a symbol.
- 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:type1->pfatype1-file-name -
Convert the contents of a Type 1 font in PFB format to PFA format. If the file is already in PFA format, pass it through.
- 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:
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:
value-for-spanner-pieceproperty args Associate a piece of broken spanner grob with an element of list arg.
- 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:
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:
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 > ] |