[ << Notation manual tables ] | [Top][Contents][Index][ ? ] | [ Cheat sheet >> ] | ||
[ < LilyPond exported predicates ] | [ Up : Notation manual tables ] | [ Cheat sheet > ] |
A.22 Scheme functions
- Function: ly:add-context-mod contextmods modification
Adds the given context modification to the list contextmods of context modifications.
- Function: ly:add-interface iface desc props
Add a new grob interface. iface is the interface name, desc is the interface description, and props is the list of user-settable properties for the interface.
- Function: ly:add-listener callback disp cl
Add the single-argument procedure callback as listener to the dispatcher disp. Whenever disp hears an event of class cl, it calls callback with it.
- Function: ly:add-option sym val description
Add a program option sym. val is the default value and description is a string description.
- Function: ly:angle x y
Calculates 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: ly:assoc-get key alist default-value strict-checking
Return value if key in alist, else default-value (or
#f
if not specified). If strict-checking is set to#t
and key is not in alist, a programming_error is output.
- Function: ly:axis-group-interface::add-element grob grob-element
Set grob the parent of grob-element on all axes of grob.
- Function: ly:basic-progress str rest
A Scheme callable function to issue a basic progress message str. The message is formatted with
format
and rest.
- Function: ly:book-process book-smob default-paper default-layout output
Print book. output is passed to the backend unchanged. For example, it may be a string (for file based outputs) or a socket (for network based output).
- Function: ly:book-process-to-systems book-smob default-paper default-layout output
Print book. output is passed to the backend unchanged. For example, it may be a string (for file based outputs) or a socket (for network based output).
- Function: ly:bracket a iv t p
Make a bracket in direction a. The extent of the bracket is given by iv. The wings protrude by an amount of p, which may be negative. The thickness is given by t.
- Function: ly:chain-assoc-get key achain default-value strict-checking
Return value for key from a list of alists achain. If no entry is found, return default-value or
#f
if default-value is not specified. With strict-checking set to#t
, a programming_error is output in such cases.
- Function: ly:check-expected-warnings
Check whether all expected warnings have really been triggered.
- Function: ly:context-def-lookup def sym val
Return the value of sym in context definition def (e.g.,
\Voice
). If no value is found, return val or'()
if val is undefined. sym can be any of ‘default-child’, ‘consists’, ‘description’, ‘aliases’, ‘accepts’, ‘property-ops’, ‘context-name’, ‘group-type’.
- Function: ly:context-def-modify def mod
Return the result of applying the context-mod mod to the context definition def. Does not change def.
- Function: ly:context-events-below context
Return a
stream-distributor
that distributes all events from context and all its subcontexts.
- Function: ly:context-find context name
Find a parent of context that has name or alias name. Return
#f
if not found.
- Function: ly:context-grob-definition context name
Return the definition of name (a symbol) within context as an alist.
- Function: ly:context-id context
Return the ID string of context, i.e., for
\context Voice = "one" …
return the stringone
.
- Function: ly:context-matched-pop-property context grob cell
This undoes a particular
\override
,\once \override
or\once \revert
when given the specific alist pair to undo.
- Function: ly:context-name context
Return the name of context, i.e., for
\context Voice = "one" …
return the symbolVoice
.
- Function: ly:context-property context 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-defined context name
Return the context above context where name is defined.
- Function: ly:context-pushpop-property context grob eltprop val
Do
\temporary \override
or\revert
operation in context. The grob definition grob is extended with eltprop (if val is specified) or reverted (if unspecified).
- Function: ly:context-set-property! context name val
Set value of property name in context context to val.
- Function: ly:debug str rest
A Scheme callable function to issue a debug message str. The message is formatted with
format
and rest.
- Function: ly:dimension? d
Return d as a number. Used to distinguish length variables from normal numbers.
- Function: ly:dir? s
Is s a direction? Valid directions are
-1
,0
, or1
, where-1
represents left or down,1
represents right or up, and0
represents a neutral direction.
- Function: ly:directed direction magnitude
Calculates an
(x . y)
pair with optional magnitude (defaulting to1.0
) and direction specified either as an angle in degrees or a coordinate pair giving the direction. If magnitude is a pair, the respective coordinates are scaled independently, useful for ellipse drawings.
- Function: ly:encode-string-for-pdf str
Encode the given string to either Latin1 (which is a subset of the PDFDocEncoding) or if that’s not possible to full UTF-16BE with Byte-Order-Mark (BOM).
- Function: ly:engraver-announce-end-grob engraver grob cause
Announce the end of a grob (i.e., the end of a spanner) originating from given engraver instance, with grob being a grob. cause should either be another grob or a music event.
- Function: ly:engraver-make-grob engraver grob-name cause
Create a grob originating from given engraver instance, with given grob-name, a symbol. cause should either be another grob or a music event.
- Function: ly:error str rest
A Scheme callable function to issue the error str. The error is formatted with
format
and rest.
- Function: ly:event-property sev sym val
Get the property sym of stream event sev. If sym is undefined, return val or
'()
if val is not specified.
- Function: ly:expect-warning str 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 will be shown. The message should be translated with
(_ ...)
and changing parameters given after the format string.
- Function: ly:font-design-size font
Given the font metric font, return the design size, relative to the current output-scale.
- Function: ly:font-get-glyph font name
Return a stencil from font for the glyph named name. If the glyph is not available, return an empty stencil.
Note that this command can only be used to access glyphs from fonts loaded with
ly:system-font-load
; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodingsfetaMusic
andfetaBraces
, respectively.
- Function: ly:font-glyph-name-to-charcode font 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 encodingsfetaMusic
andfetaBraces
, respectively.
- Function: ly:font-glyph-name-to-index font name
Return the index for name in font.
Note that this command can only be used to access glyphs from fonts loaded with
ly:system-font-load
; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodingsfetaMusic
andfetaBraces
, respectively.
- Function: ly:font-index-to-charcode font index
Return the character code for index in font.
Note that this command can only be used to access glyphs from fonts loaded with
ly:system-font-load
; currently, this means either the Emmentaler or Emmentaler-Brace fonts, corresponding to the font encodingsfetaMusic
andfetaBraces
, respectively.
- Function: ly:font-magnification font
Given the font metric font, return the magnification, relative to the current output-scale.
- Function: ly:font-sub-fonts font
Given the font metric font of an OpenType font, return the names of the subfonts within font.
- Function: ly:format str rest
LilyPond specific format, supporting
~a
and~[0-9]f
. Basic support for~s
is also provided.
- Function: ly:format-output context
Given a global context in its final state, process it and return the
Music_output
object in its final state.
- Function: ly:generic-bound-extent grob common
Determine the extent of grob relative to common along the X axis, finding its extent as a bound when it a has
bound-alignment-interfaces
property list set and otherwise the full extent.
- Function: ly:get-all-function-documentation
Get a hash table with all LilyPond Scheme extension functions.
- Function: ly:get-cff-offset font-file-name idx
Get the offset of ’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: ly:get-context-mods contextmod
Returns the list of context modifications stored in contextmod.
- Function: ly:get-font-format font-file-name idx
Get the font format for font_file_name, returning it as a symbol. The optional idx argument is useful for TrueType Collections (TTC) and OpenType/CFF collections (OTC) only; it specifies the font index within the TTC/OTC. The default value of idx is 0.
- Function: ly:get-spacing-spec from-scm to-scm
Return the spacing spec going between the two given grobs, from_scm and to_scm.
- Function: ly:grob-alist-chain grob global
Get an alist chain for grob grob, with global as the global default. If unspecified,
font-defaults
from the layout block is taken.
- Function: ly:grob-chain-callback grob proc sym
Find the callback that is stored as property sym of grob grob and chain proc to the head of this, meaning that it is called using grob and the previous callback’s result.
- Function: ly:grob-common-refpoint grob other axis
Find the common refpoint of grob and other for axis.
- Function: ly:grob-common-refpoint-of-array grob others axis
Find the common refpoint of grob and others (a grob-array) for axis.
- Function: ly:grob-extent grob refp axis
Get the extent in axis direction of grob relative to the grob refp.
- Function: ly:grob-get-vertical-axis-group-index grob
Get the index of the vertical axis group the grob grob belongs to; return
-1
if none is found.
- Function: ly:grob-object grob sym
Return the value of a pointer in grob grob of property sym. It returns
'()
(end-of-list) if sym is undefined in grob.
- Function: ly:grob-parent grob axis
Get the parent of grob. axis is 0 for the X-axis, 1 for the Y-axis.
- Function: ly:grob-property grob sym val
Return the value for property sym of grob. If no value is found, return val or
'()
if val is not specified.
- Function: ly:grob-property-data grob sym
Return the value for property sym of grob, but do not process callbacks.
- Function: ly:grob-pure-height grob refp beg end val
Return the pure height of grob given refpoint refp. If no value is found, return val or
'()
if val is not specified.
- Function: ly:grob-pure-property grob sym beg end val
Return the pure value for property sym of grob. If no value is found, return val or
'()
if val is not specified.
- Function: ly:grob-relative-coordinate grob refp axis
Get the coordinate in axis direction of grob relative to the grob refp.
- Function: ly:grob-robust-relative-extent grob refp axis
Get the extent in axis direction of grob relative to the grob refp, or
(0,0)
if empty.
- Function: ly:grob-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 the parent of grob grob in axis axis.
- Function: ly:grob-spanned-rank-interval grob
Returns a pair with the
rank
of the furthest left column and therank
of the furthest right column spanned bygrob
.
- Function: ly:gulp-file name 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:has-glyph-names? font-file-name idx
Does the font for font_file_name have glyph names? The optional idx argument is useful for TrueType Collections (TTC) and OpenType/CFF collections (OTC) only; it specifies the font index within the TTC/OTC. The default value of idx is 0.
- Function: ly:input-both-locations sip
Return input location in sip as
(file-name first-line first-column last-line last-column)
.
- Function: ly:input-file-line-char-column sip
Return input location in sip as
(file-name line char column)
.
- Function: ly:input-message sip msg rest
Print msg as a GNU compliant error message, pointing to the location in sip. msg is interpreted similar to
format
’s argument, using rest.
- Function: ly:input-warning sip msg rest
Print msg as a GNU compliant warning message, pointing to the location in sip. msg is interpreted similar to
format
’s argument, using rest.
- Function: ly:interpret-music-expression mus ctx
Interpret the music expression mus in the global context ctx. The context is returned in its final state.
- Function: ly:interpret-stencil-expression expr func arg1 offset
Parse expr, feed bits to func with first arg arg1 having offset offset.
- Function: ly:item-break-dir it
The break status direction of item it.
-1
means end of line,0
unbroken, and1
beginning of line.
- Function: ly:item-get-column it
Return the
PaperColumn
orNonMusicalPaperColumn
associated with thisItem
.
- Function: ly:length x y
Calculates magnitude of given vector. With one argument, x is a number pair indicating the vector. With two arguments, x and y specify the respective coordinates.
- Function: ly:lexer-keywords lexer
Return a list of
(KEY . CODE)
pairs, signifying the LilyPond reserved words list.
- Function: ly:line-interface::line grob startx starty endx endy
Make a line using layout information from grob grob.
- Function: ly:make-book paper header scores
Make a
\book
of paper and header (which may be#f
as well) containing\scores
.
- Function: ly:make-context-mod mod-list
Creates a context modification, optionally initialized via the list of modifications mod-list.
- Function: ly:make-duration length dotcount num den
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: ly:make-global-context output-def
Set up a global interpretation context, using the output block output-def. The context is returned.
- Function: ly:make-global-translator global
Create a translator group and connect it to the global context global. The translator group is returned.
- Function: ly:make-grob-properties alist
This packages the given property list alist in a grob property container stored in a context property with the name of a grob.
- Function: ly:make-moment m g gn gd
Create the moment with rational main timing m, and optional grace timing g.
A moment is a point in musical time. It consists of a pair of rationals (m, g), where m is the timing for the main notes, and g the timing for grace notes. In absence of grace notes, g is zero.
For compatibility reasons, it is possible to write two numbers specifying numerator and denominator instead of the rationals. These forms cannot be mixed, and the two-argument form is disambiguated by the sign of the second argument: if it is positive, it can only be a denominator and not a grace timing.
- Function: ly:make-music props
Make a C++
Music
object and initialize it with props.This function is for internal use and is only called by
make-music
, which is the preferred interface for creating music objects.
- Function: ly:make-music-function signature func
Make a function to process music, to be used for the parser. func is the function, and signature describes its arguments. signature’s cdr is a list containing either
ly:music?
predicates or other type predicates. Its car is the syntax function to call.
- Function: ly:make-page-permission-marker symbol permission
Return page marker with page breaking and turning permissions.
- Function: ly:make-pango-description-string chain size
Make a
PangoFontDescription
string for the property alist chain at size size.
- Function: ly:make-paper-outputter port format
Create an outputter that evaluates within
output-
format, writing to port.
- Function: ly:make-pitch octave note alter
octave is specified by an integer, zero for the octave containing middle C. note is a number indexing the global default scale, with 0 corresponding to pitch C and 6 usually corresponding to pitch B. Optional alter is a rational number of 200-cent whole tones for alteration.
- Function: ly:make-scale steps
Create a scale. The argument is a vector of rational numbers, each of which represents the number of 200 cent tones of a pitch above the tonic.
- Function: ly:make-spring ideal min-dist
Make a spring. ideal is the ideal distance of the spring, and min-dist is the minimum distance.
- Function: ly:make-stencil expr xext yext
Stencils are device independent output expressions. They carry two pieces of information:
- 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-interval
as its value), it is taken to be empty.
- Function: ly:make-stream-event cl proplist
Create a stream event of class cl with the given mutable property list.
- Function: ly:make-undead object
This packages object in a manner that keeps it from triggering "Parsed object should be dead" messages.
- Function: ly:make-unpure-pure-container unpure pure
Make an unpure-pure container. unpure should be an unpure expression, and pure should be a pure expression. If pure is omitted, the value of unpure will be used twice, except that a callback is given two extra arguments that are ignored for the sake of pure calculations.
- Function: ly:message str rest
A Scheme callable function to issue the message str. The message is formatted with
format
and rest.
- Function: ly:minimal-breaking pb
Break (pages and lines) the
Paper_book
object pb without looking for optimal spacing: stack as many lines on a page before moving to the next one.
- Function: ly:modules-lookup modules sym def
Look up sym in the list modules, returning the first occurence. If not found, return def or
#f
if def isn’t specified.
- Function: ly:music-deep-copy m origin
Copy m and all sub expressions of m. m may be an arbitrary type; cons cells and music are copied recursively. If origin is given, it is used as the origin for one level of music by calling
ly:set-origin!
on the copy.
- Function: ly:music-length mus
Get the length of music expression mus and return it as a
Moment
object.
- Function: ly:music-mutable-properties mus
Return an alist containing the mutable properties of mus. The immutable properties are not available, since they are constant and initialized by the
make-music
function.
- Function: ly:music-property mus sym val
Return the value for property sym of music expression mus. If no value is found, return val or
'()
if val is not specified.
- Function: ly:note-column-accidentals note-column
Return the
AccidentalPlacement
grob from note-column if any, orSCM_EOL
otherwise.
- Function: ly:note-column-dot-column note-column
Return the
DotColumn
grob from note-column if any, orSCM_EOL
otherwise.
- Function: ly:note-head::stem-attachment font-metric glyph-name
Get attachment in font-metric for attaching a stem to notehead glyph-name.
- Function: ly:one-line-auto-height-breaking pb
Put each score on a single line, and put each line on its own page. Modify the paper-width setting so that every page is wider than the widest line. Modify the paper-height setting to fit the height of the tallest line.
- Function: ly:one-line-breaking pb
Put each score on a single line, and put each line on its own page. Modify the paper-width setting so that every page is wider than the widest line.
- Function: ly:one-page-breaking pb
Put each score on a single page. The paper-height settings are modified so each score fits on one page, and the height of the page matches the height of the full score.
- Function: ly:optimal-breaking pb
Optimally break (pages and lines) the
Paper_book
object pb to minimize badness in bother vertical and horizontal spacing.
- Function: ly:option-usage port
Print
ly:set-option
usage. Optional port argumentfor the destination defaults to current output port.
- Function: ly:otf->cff otf-file-name idx
Convert the contents of an OTF file to a CFF file, returning it as a string. The optional idx argument is useful for OpenType/CFF collections (OTC) only; it specifies the font index within the OTC. The default value of idx is 0.
- Function: ly:otf-font-glyph-info font glyph
Given the font metric font of an OpenType font, return the information about named glyph glyph (a string).
- Function: ly:otf-font-table-data font tag
Extract a table tag from font. Return empty string for non-existent tag.
- Function: ly:output-def-lookup def sym val
Return the value of sym in output definition def (e.g.,
\paper
). If no value is found, return val or'()
if val is undefined.
- Function: ly:output-find-context-def output-def context-name
Return an alist of all context defs (matching context-nameif given) in output-def.
- Function: ly:page-turn-breaking pb
Optimally break (pages and lines) the
Paper_book
object pb such that page turns only happen in specified places, returning its pages.
- Function: ly:pango-font-physical-fonts f
Return alist of
(ps-name file-name font-index)
lists for Pango font f.
- Function: ly:paper-book-paper pb
Return the paper output definition (
\paper
) inPaper_book
object pb.
- Function: ly:paper-column::break-align-width col align-syms
Determine the extent along the X-axis of a grob used for break-alignment organized by column col. The grob is specified by align-syms, which contains either a single
break-align-symbol
or a list of such symbols.
- Function: ly:paper-column::print
Optional stencil for
PaperColumn
orNonMusicalPaperColumn
. Draws therank number
of each column, its moment in time, a blue arrow showing the ideal distance, and a red arrow showing the minimum distance between columns.
- Function: ly:paper-fonts def
Return a list containing the fonts from output definition def (e.g.,
\paper
).
- Function: ly:paper-get-font def chain
Find a font metric in output definition def satisfying the font-qualifiers in alist chain chain, and return it. (An alist chain is a list of alists, containing grob properties.)
- Function: ly:paper-get-number def sym
Return the value of variable sym in output definition def as a double.
- Function: ly:paper-score-paper-systems paper-score
Return vector of
paper_system
objects from paper-score.
- Function: ly:paper-system-minimum-distance sys1 sys2
Measure the minimum distance between these two paper-systems, using their stored skylines if possible and falling back to their extents otherwise.
- Function: ly:parse-string-expression parser-smob ly-code filename line
Parse the string ly-code with parser-smob. Return the contained music expression. filename and line are optional source indicators.
- Function: ly:parsed-undead-list!
Return the list of objects that have been found live that should have been dead, and clear that list.
- Function: ly:parser-clone closures location
Return a clone of current parser. An association list of port positions to closures can be specified in closures in order to have
$
and#
interpreted in their original lexical environment. If location is a valid location, it becomes the source of all music expressions inside.
- Function: ly:parser-error msg input
Display an error message and make current parser fail. Without a current parser, trigger an ordinary error.
- Function: ly:parser-has-error? parser
Does parser (defaulting to current parser) have an error flag?
- Function: ly:parser-include-string ly-code
Include the string ly-code into the input stream for current parser. Can only be used in immediate Scheme expressions (
$
instead of#
).
- Function: ly:parser-lookup symbol
Look up symbol in current parser’s module. Return
'()
if not defined.
- Function: ly:parser-output-name parser
Return the base name of the output file. If
parser
is left off, use currently active parser.
- Function: ly:parser-parse-string parser-smob ly-code
Parse the string ly-code with parser-smob. Upon failure, throw
ly-file-failed
key.
- Function: ly:parser-set-note-names names
Replace current note names in parser. names is an alist of symbols. This only has effect if the current mode is notes.
- Function: ly:performance-write performance filename name
Write performance to filename storing name as the name of the performance in the file metadata.
- Function: ly:pitch-diff pitch root
Return pitch delta such that root transposed by delta equals pitch.
- Function: ly:pitch-transpose p delta
Transpose p by the amount delta, where delta is relative to middle C.
- Function: ly:pointer-group-interface::add-grob grob sym grob-element
Add grob-element to grob’s sym grob array.
- 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: ly:prob-property prob sym val
Return the value for property sym of Prob object prob. If no value is found, return val or
'()
if val is not specified.
- Function: ly:programming-error str rest
A Scheme callable function to issue the internal warning str. The message is formatted with
format
and rest.
- Function: ly:progress str rest
A Scheme callable function to print progress str. The message is formatted with
format
and rest.
- Function: ly:property-lookup-stats sym
Return hash table with a property access corresponding to sym. Choices are
prob
,grob
, andcontext
.
- Function: ly:pure-call data grob start end rest
Convert property data (unpure-pure container or procedure) to value in a pure context defined by grob, start, end, and possibly rest arguments.
- Function: ly:register-translator creator name description
Register a translator creator (usually a descriptive alist or a function/closure returning one when given a context argument) with the given symbol name and the given description alist.
- Function: ly:relative-group-extent elements common axis
Determine the extent of elements relative to common in the axis direction.
- Function: ly:round-filled-box xext yext blot
Make a
Stencil
object that prints a black box of dimensions xext, yext and roundness blot.
- Function: ly:round-filled-polygon points blot extroversion
Make a
Stencil
object that prints a black polygon with corners at the points defined by points (list of coordinate pairs) and roundness blot. Optionalextroversion shifts the outline outward, with thedefault of-1.0
keeping the outer boundary ofthe outline just inside of the polygon.
- Function: ly:run-translator mus output-def
Process mus according to output-def. An interpretation context is set up, and mus is interpreted with it. The context is returned in its final state.
Optionally, this routine takes an object-key to to uniquely identify the score block containing it.
- Function: ly:score-embedded-format score layout
Run score through layout (an output definition) scaled to correct output-scale already, returning a list of layout-lines.
- Function: ly:separation-item::print
Optional stencil for
PaperColumn
orNonMusicalPaperColumn
. Draws thehorizontal-skylines
of eachPaperColumn
, showing the shapes used to determine the minimum distances betweenPaperColumns
at the note-spacing step, before staves have been spaced (vertically) on the page.
- Function: ly:set-default-scale scale
Set the global default scale. This determines the tuning of pitches with no accidentals or key signatures. The first pitch is C. Alterations are calculated relative to this scale. The number of pitches in this scale determines the number of scale steps that make up an octave. Usually the 7-note major scale.
- Function: ly:set-grob-modification-callback cb
Specify a procedure that will be called every time LilyPond modifies a grob property. The callback will receive 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.
- Function: ly:set-middle-C! context
Set the
middleCPosition
variable in context based on the variablesmiddleCClefPosition
andmiddleCOffset
.
- Function: ly:set-origin! m origin
This sets the origin given in origin to m. m will typically be 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 fororigin
are a music expression which is then used as the source of location information, or#f
or'()
in which case no action is performed. The return value is m itself.
- Function: ly:set-property-cache-callback cb
Specify a procedure that will be called whenever lilypond calculates a callback function and caches the result. The callback will receive 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.
- Function: ly:solve-spring-rod-problem springs rods length ragged
Solve a spring and rod problem for count objects, that are connected by count-1 springs, and an arbitrary number of rods. count is implicitly given by springs and rods. The springs argument has the format
(ideal, inverse_hook)
and rods is of the form(idx1, idx2, distance)
.length is a number, ragged a boolean.
The function returns a list containing the force (positive for stretching, negative for compressing and
#f
for non-satisfied constraints) followed by spring-count+1 positions of the objects.
- Function: ly:source-files parser-smob
A list of LilyPond files being processed;a PARSER may optionally be specified.
- Function: ly:spanner-bound spanner dir
Get one of the bounds of spanner. dir is
-1
for left, and1
for right.
- Function: ly:spanner-set-bound! spanner dir item
Set grob item as bound in direction dir for spanner.
- Function: ly:spawn command rest
Simple interface to g_spawn_sync str. The error is formatted with
format
and rest.
- 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: ly:staff-symbol-line-thickness grob
Returns 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-space grob
Returns 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:start-environment
Return the environment (a list of strings) that was in effect at program start.
- Function: ly:stencil-aligned-to stil axis dir
Align stil using its own extents. dir is a number.
-1
and1
are left and right, respectively. Other values are interpolated (so0
means the center).
- Function: ly:stencil-combine-at-edge first axis direction second padding
Construct a stencil by putting second next to first. axis can be 0 (x-axis) or 1 (y-axis). direction can be -1 (left or down) or 1 (right or up). The stencils are juxtaposed with padding as extra space. first and second may also be
'()
or#f
.
- 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-extent stil axis
Return a pair of numbers signifying the extent of stil in axis direction (
0
or1
for x and y axis, respectively).
- Function: ly:stencil-outline stil outline
Return a stencil with the stencil expression (inking) of stencil stil but with outline and dimensions from stencil outline.
- Function: ly:stencil-rotate stil angle x y
Return a stencil stil rotated angle degrees around the relative offset (x, y). E.g., an offset of (-1, 1) will rotate the stencil around the left upper corner.
- Function: ly:stencil-rotate-absolute stil angle x y
Return a stencil stil rotated angle degrees around point (x, y), given in absolute coordinates.
- Function: ly:stencil-scale stil x y
Scale stencil stil using the horizontal and vertical scaling factors x and y. Negative values will flip or mirror stil without changing its origin; this may result in collisions unless it is repositioned.
- Function: ly:stencil-stack first axis direction second padding mindist
Construct a stencil by stacking second next to first. axis can be 0 (x-axis) or 1 (y-axis). direction can be -1 (left or down) or 1 (right or up). The stencils are juxtaposed with padding as extra space. first and second may also be
'()
or#f
. As opposed 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-translate stil offset
Return a stil, but translated by offset (a pair of numbers).
- Function: ly:stencil-translate-axis stil amount axis
Return a copy of stil but translated by amount in axis direction.
- Function: ly:string-percent-encode str
Encode all characters in string str with hexadecimal percent escape sequences, with the following exceptions: characters
-
,.
,/
, and_
; and characters in ranges0-9
,A-Z
, anda-z
.
- Function: ly:system-font-load name
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-glyph
and derived code (like\lookup
) can access glyphs from the system fonts; text strings are handled exclusively via the Pango interface.
- Function: ly:text-interface::interpret-markup
Convert a text markup into a stencil. Takes three arguments, layout, props, and markup.
layout is a
\layout
block; 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:translate-cpp-warning-scheme str
Translates a string in C++ printf format and modifies it to use it for scheme formatting.
- Function: ly:translator-description creator
Return an alist of properties of translator definition creator.
- Function: ly:translator-name creator
Return the type name of the translator definition creator. The name is a symbol.
- Function: ly:ttf->pfa ttf-file-name idx
Convert the contents of a TrueType font file to PostScript Type 42 font, returning it as a string. The optional idx argument is useful for TrueType collections (TTC) only; it specifies the font index within the TTC. The default value of idx is 0.
- Function: ly:ttf-ps-name ttf-file-name idx
Extract the PostScript name from a TrueType font. The optional idx argument is useful for TrueType collections (TTC) only; it specifies the font index within the TTC. The default value of idx is 0.
- Function: ly:type1->pfa type1-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 through it.
- Function: ly:unpure-call data grob rest
Convert property data (unpure-pure container or procedure) to value in an unpure context defined by grob and possibly rest arguments.
- Function: ly:warning str rest
A Scheme callable function to issue the warning str. The message is formatted with
format
and rest.
- Function: ly:warning-located location str rest
A Scheme callable function to issue the warning str at the specified location in an input file. The message is formatted with
format
and rest.
[ << Notation manual tables ] | [Top][Contents][Index][ ? ] | [ Cheat sheet >> ] | ||
[ < LilyPond exported predicates ] | [ Up : Notation manual tables ] | [ Cheat sheet > ] |
Jiné jazyky: català, deutsch, español, français, italiano, 日本語.
About automatic language selection.