## Scheme functions

— Function: ly:add-interface a b c

> Add an interface description.

— Function: ly:add-moment a b

> Add two moments.

— Function: ly:all-grob-interfaces

> Get a hash table with all interface descriptions.

— Function: ly:bracket a iv t p

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

— 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-id context

> Return the id string of context, i.e. for `\context Voice = one ..` return the string `one`.

— Function: ly:context-name context

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

— Function: ly:context-parent context

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

— Function: ly:context-property c name

> Return the value of name from context c

— 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 a single `\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:context-unset-property context name

> Unset value of property name in context context.

— Function: ly:context? x

> Is x a `Context` object?

— Function: ly:dimension? d

> Return d is a number. Used to distinguish length variables from normal numbers.

— Function: ly:dir? s

> type predicate. A direction is `-1`, `0` or `1`, where `-1` represents left or down and `1` represents right or up.

— Function: ly:div-moment a b

> Divide two moments.

— Function: ly:duration-dot-count dur

> Extract the dot count from dur

— Function: ly:duration-factor dur

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

— Function: ly:duration-log dur

> Extract the duration log from dur

— Function: ly:duration<? p1 p2

> Is p1 shorter than p2?

— Function: ly:duration? x

> Is x a `Duration` object?

— Function: ly:export arg

> Export a Scheme object to the parser, so it is treated as an identifier.

— Function: ly:find-glyph-by-name font name

> This function retrieves a Stencil for the glyph named name in font. The font must be available as an AFM file. If the glyph is not found, `#f` is returned.

— Function: ly:font-metric? x

> Is x a `Font_metric` object?

— Function: ly:fontify-atom met f

> Add a font selection command for the font metric met to f.

— Function: ly:format-output context outname

> Given a Score context in its final state,process it and return the (rendered) result.

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

> Get a hash table with all lilypond Scheme extension functions.

— Function: ly:get-all-translators

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

— Function: ly:get-default-font grob

> Return the default font for grob gr.

— Function: ly:get-glyph font index

> This function retrieves a Stencil for the glyph numbered index in font.

— Function: ly:get-option var

> Get a global option setting. Supported options include

> `old-relative-used`
>   Report whether old-relative compatibility mode is necessary
> `old-relative`
>   Report whether old-relative compatibility mode is used
> `verbose`
>   Report whether we are running in verbose mode

— Function: ly:grob-alist-chain g global

> Get an alist chain for grob g, with global as the global default. If unspecified, `font-defaults` from the paper block is taken.

— Function: ly:grob-extent grob refp axis

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

— Function: ly:grob-original grob

> Return the unbroken original Grob of grob.

— Function: ly:grob-paper g

> Get `\paper` definition from grob g.

— 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-pq-less? a b

> Compare 2 grob priority queue entries. Internal

— Function: ly:grob-property grob sym

> Return the value of a value in grob g of property sym. It will return `' ()` (end-of-list) if sym is undefined in g.

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

> Compare two grobs by script priority. For internal use.

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

> Set sym in grob grob to value val

— Function: ly:grob-staff-position sg

> Return the Y-position of sg relative to the staff.

— Function: ly:grob-suicide g

> Kill g.

— Function: ly:grob-system g

> Return the System Grob of g.

— Function: ly:grob-translate-axis! g d a

> Translate g on axis a over distance d.

— Function: ly:grob? x

> Is x a `Grob` object?

— Function: ly:gulp-file name

> Read the file name, and return its contents in a string. The file is looked up using the search path.

— Function: ly:input-location sip

> Return input location in sip as (filename line column).

— Function: ly:input-location? x

> Return #t if x is an input location.

— Function: ly:input-message sip msg

> Print msg as a GNU compliant error message, pointing to thelocation in sip.

— Function: ly:intlog2 d

> The 2-logarithm of 1/d.

— Function: ly:item-break-dir it

> The break status dir of item it. `-1` is end of line, `0` unbroken, and `1` begin of line.

— Function: ly:item? g

> Is g an `Item` object?

— Function: ly:iterator? x

> Is x a `Music_iterator` object?

— Function: ly:make-bare-music type props

> Make a C++ music object of type type, initialize 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-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 num and den.

> 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-moment n d gn gd

> Create the rational number with main timing n/d, and optional grace timin gn/gd.

> Moment is a point in musical time. It is 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.

— Function: ly:make-pitch octave note alter

> octave is specified by an integer, zero for the octave containing middle C. note is a number from 0 to 6, with 0 corresponding to C and 6 corresponding to B. The alter is zero for a natural, negative for flats, or positive for sharps.

— Function: ly:make-stencil expr xext yext

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

> 1: a specification of how to print this object. This specification is processed by the output backends, for example scm/output-tex.scm.

> 2: the vertical and horizontal extents of the object.

— Function: ly:moment<? a b

> Compare two moments.

— Function: ly:moment? x

> Is x a `Moment` object?

— Function: ly:mul-moment a b

> Multiply two moments.

— Function: ly:music-compress m factor

> Compress music object m by moment factor.

— Function: ly:music-deep-copy m

> Copy m and all sub expressions of m

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

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

— Function: ly:music-duration-length mus

> Extract the duration field from mus, and return the length.

— Function: ly:music-length mus

> Get the length of music expression mus, and return as a `Moment` object.

— Function: ly:music-list? lst

> Type predicate: return true if lst is a list of music objects.

— 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-name mus

> Return the name of music.

— Function: ly:music-property mus sym

> Get the property sym of music expression mus. If sym is undefined, return `' ()`.

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

> Set property sym in music expression mus to val.

— Function: ly:music-transpose m p

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

— Function: ly:music? x

> Is x a `Music` object?

— Function: ly:number->string s

> Convert num to a string without generating many decimals.

— Function: ly:option-usage

> Print ly-set-option usage

— Function: ly:output-def-clone def

> Clone def.

— Function: ly:output-def-scope def

> Get the variable scope inside def.

— Function: ly:paper-book? x

> Is x a `Paper_book` object?

— Function: ly:paper-def? def

> Is def a paper definition?

— Function: ly:paper-get-font paper chain

> Return a font metric satisfying the font-qualifiers in the alist chain chain. (An alist chain is a list of alists, containing grob properties).

— Function: ly:paper-get-number paper name

> Return the paper variable name.

— Function: ly:paper-line-break-score line

> Return the score for breaking after line.

— Function: ly:paper-line-height line

> Return the height of line.

— Function: ly:paper-line-number line

> Return the number of line.

— Function: ly:paper-line? x

> Is x a `Paper_line` object?

— Function: ly:paper-lookup pap sym

> Lookup sym in pap. Return the value or `'()` if undefined.

— Function: ly:pitch-alteration pp

> Extract the alteration from pitch p.

— Function: ly:pitch-diff pitch root

> Return pitch delta such that `pitch` transposed by delta equals root

— Function: ly:pitch-notename pp

> Extract the note name from pitch pp.

— Function: ly:pitch-octave pp

> Extract the octave from pitch p.

— Function: ly:pitch-quartertones pp

> Calculate the number of quarter tones of p from middle C.

— Function: ly:pitch-semitones pp

> calculate the number of semitones of p from middle C.

— Function: ly:pitch-steps p

> Number of steps counted from middle C of the pitch p.

— Function: ly:pitch-transpose p delta

> Transpose p by the amount delta, where delta is relative to middle C.

— Function: ly:pitch<? p1 p2

> Is p1 lexicographically smaller than p2?

— Function: ly:pitch? x

> Is x a `Pitch` object?

— Function: ly:protects

> Return hash of protected objects.

— Function: ly:ragged-page-breaks lines book text first last

> Return a vector with line numbers of page breaks.

— Function: ly:round-filled-box xext yext blot

> Make a `Stencil` that prints a black box of dimensions xext, yext and roundness blot.

— Function: ly:run-translator mus output-def

> Process mus according to output_def. An interpretation context is set up, and mus is interpreted with it. The context is returned in its final state.

— Function: ly:set-option var val

> Set a global option value. Supported options include

> `help`
>   List all options.
> `midi-debug`
>   If set to true, generate human readable MIDI
> `internal-type-checking`
>   Set paranoia for property assignments
> `parse-protect`
>   If protection is switched on, errors in inline scheme are caught in the parser. If off, GUILE will halt on errors, and give a stack trace. Default is protected evaluation.
> `old-relative`
>   Relative for simultaneous music functions similar to chord syntax
> `new-relative`
>   Relative for simultaneous music functions similar to sequential music

> This function is useful to call from the command line: `lilypond -e "(ly-set-option 'midi-debug #t)"`.

— Function: ly:set-point-and-click what

> Set the options for Point-and-click source specials output. The argument is a symbol. Possible options are `none` (no source specials), `line` and `line-column`

— Function: ly:spanner-broken-into spanner

> Return broken-into list for spanner.

— Function: ly:spanner-get-bound slur dir

> Get one of the bounds of spanner. dir is `-1` for left, and `1` for right.

— Function: ly:spanner? g

> Is g a spanner object?

— Function: ly:stencil-add args

> Combine stencils. Takes any number of arguments.

— Function: ly:stencil-align-to! stil axis dir

> Align stil using its own extents. dir is a number -1, 1 are left and right respectively. Other values are interpolated (so 0 means the center.

— Function: ly:stencil-combine-at-edge first axis direction second padding minimum

> 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. If this puts the reference points closer than minimum, they are moved by the latter amount.

— Function: ly:stencil-extent stil axis

> Return a pair of numbers signifying the extent of stil in axis direction (0 or 1 for x and y axis respectively).

— Function: ly:stencil-get-expr stil

> Return the expression of stil.

— Function: ly:stencil-moved-to-edge first axis direction second padding minimum

> Similar to `ly:stencil-combine-edge`, but returns second positioned to be next to first.

— Function: ly:stencil-set-extent! stil axis np

> Set the extent of stil (extent must be a pair of numbers) in axis direction (0 or 1 for x- and y-axis respectively).

— 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:stencil? x

> Is x a `Stencil` object?

— Function: ly:text-dimension font text

> Given the font metric in font and the string text, compute the extents of that text in that font. The return value is a pair of number-pairs.

— Function: ly:translator-description me

> Return an alist of properties of translator me.

— Function: ly:translator-name trans

> Return the type name of the translator object trans. The name is a symbol.

— Function: ly:translator? x

> Is x a `Translator` object?

— Function: ly:transpose-key-alist l pit

> Make a new key alist of l transposed by pitch pit

— Function: ly:unit

> Return the unit used for lengths as a string.

— Function: ly:version

> Return the current lilypond version as a list, e.g. `(1 3 127 uu1)`.

— Function: ly:warn str

> Scheme callable function to issue the warning `msg`.

Read comments on this page, or add one. This page is for LilyPond-2.2.2 (stable-branch).