Next: , Previous: Backend, Up: Top



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:all-tweaks

all tweaks

— Function: ly:assoc-get key alist default-value

Return value if KEY in ALIST, else DEFAULT-VALUE (or #f if not specified).

— Function: ly:bp num

num bigpoints (1/72th inch)

— Function: ly:bracket a iv t p

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

— Function: ly:clone-parser parser-smob

Return a clone of PARSER_SMOB.

— Function: ly:cm num

num cm

— 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 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:dumper-definitions dumper

Return list of key definitions.

— Function: ly:dumper-key-serial dumper key

Return the key serial number key.

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

Return the absolute file name of name, or #f if not found.

— Function: ly:font-design-size font

Given the font metric font, return the design size, relative to the current outputscale.

— Function: ly:font-file-name font

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

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

Return a Stencil from font for the glyph named name. font must be available as an AFM file. If the glyph is not available, return #f.

— Function: ly:font-glyph-name-to-charcode font name

Return the character code for glyph name in font.

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

Return the index for name in font.

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

Return the character code for index font.

— Function: ly:font-load name

Load the font name.

— Function: ly:font-magnification font

Given the font metric font, return the magnification, relative to the current outputscale.

— Function: ly:font-metric? x

Is x a Font_metric object?

— Function: ly:font-name font

Given the font metric font, return the corresponding name.

— 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-output context outname

Given a Global 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

Retrieve 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
resolution
Resolution for the PNG output.
— Function: ly:gettext string

Gettext wrapper.

— 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 layout block is taken.

— Function: ly:grob-basic-properties grob

Get the immutable properties of grob.

— Function: ly:grob-extent grob refp axis

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

— Function: ly:grob-key grob

Return the object-key for grob.

— Function: ly:grob-layout g

Get \layout definition from grob g.

— Function: ly:grob-original grob

Return the unbroken original Grob of 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-pq-less? a b

Compare 2 grob priority queue entries. Internal

— Function: ly:grob-properties grob

Get the mutable proprerties of grob.

— 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:inch num

num inches

— 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-location sip

Return input location in sip as (file-name 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:insert-tweak grob tweak

add new tweak for grob.

— Function: ly:interpret-stencil-expression expr func arg1 offset

Parse EXPR, feed bits to FUNC with first arg ARG1

— 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:kpathsea-expand-variable var

Return the expanded version var.

— Function: ly:kpathsea-find-file name

Return the absolute file name of name, or #f if not found.

— Function: ly:layout-def? def

Is def a layout definition?

— Function: ly:lily-lexer? x

Is x a Lily_lexer object?

— Function: ly:lily-parser? x

Is x a Lily_parser object?

— Function: ly:load-text-dimensions dimension-alist

Load dimensions from TeX in a (KEY . (W H D)) format alist

— 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-book paper header scores

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

— Function: ly:make-dumper

Create a key dumper.

— 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-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 is a list containing either ly:music? predicates or other type predicates.

— Function: ly:make-output-def

Make a output def.

— 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 outname format

Create an outputter that evaluates within output-format, writing to file outname.

— 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:make-undumper

Create a key undumper.

— Function: ly:mm num

num mm

— Function: ly:module->alist mod

Dump the contents of module mod as an alist.

— Function: ly:module-copy dest src

Copy all bindings from module SRC into DEST.

— Function: ly:modules-lookup modules sym def

Lookup sym in the list modules, returning the first occurence. If not found, return default, or #f.

— Function: ly:moment-main-denominator mom

Extract denominator from main timing.

— Function: ly:moment-main-numerator mom

Extract numerator from main timing.

— Function: ly:moment<? 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-scorify music parser

Return MUSIC encapsulated in SCORE.

— 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: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:output-backend

Return name of output backend.

— Function: ly:output-def-clone def

Clone def.

— Function: ly:output-def-lookup pap sym

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

— Function: ly:output-def-parent def

Get the parent output-def of def.

— Function: ly:output-def-scope def

Get the variable scope inside def.

— Function: ly:output-description output-def

Return the description of translators in output-def.

— Function: ly:output-formats

Formats passed to –format as a list of strings, used for the output.

— Function: ly:outputter-close outputter

Close port of outputter.

— Function: ly:outputter-dump-stencil outputter stencil

Dump stencil expr onto outputter.

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

Dump str onto outputter.

— Function: ly:outputter-port outputter

Return output port for outputter.

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

Return alist of (PSNAME . FILENAME) tuples.

— Function: ly:pango-font? f

Is f a pango font?

— Function: ly:paper-book-pages pb

Return pages in book PB.

— Function: ly:paper-book-paper pb

Return pages in book PB.

— Function: ly:paper-book-scopes book

Return pages in layout book book.

— Function: ly:paper-book-systems pb

Return systems in book PB.

— Function: ly:paper-book? x

Is x a Paper_book object?

— Function: ly:paper-fonts bp

Return fonts from the \paper block bp.

— Function: ly:paper-get-font paper-smob 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 layout-smob name

Return the layout variable name.

— Function: ly:paper-outputscale bp

Get outputscale for BP.

— Function: ly:paper-system-break-before-penalty system

Return the score for page break after system.

— Function: ly:paper-system-extent system axis

Return the extent of system.

— Function: ly:paper-system-number system

Return the number of system.

— Function: ly:paper-system-staff-extents system

Return the top and bottom staff refpoint.

— Function: ly:paper-system-stencil system

Return the height of system.

— Function: ly:paper-system-title? system

Is system a title system?

— Function: ly:paper-system? x

Is x a Paper_system object?

— Function: ly:parse-file name

Parse a single .ly file. Upon failure, throw ly-file-failed key.

— Function: ly:parse-string ly-code

Parse the string LY_CODE. Upon failure, throw ly-file-failed key.

— Function: ly:parser-define parser-smob symbol val

Bind SYMBOL to VAL in PARSER_SMOB's module.

— Function: ly:parser-lookup parser-smob symbol

Lookup symbol in parser_smob's module. Undefined is '().

— 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-print-book parser-smob book-smob

Print book.

— Function: ly:parser-print-score parser-smob score-smob

Print score, i.e., the classic way.

— Function: ly:parser-set-note-names parser 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:pfb->pfa pfb-path

Convert the contents of a PFB file to PFA.

— 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:programming-error str rest

Scheme callable function to issue the warning msg. The message is formatted with format and rest.

— Function: ly:protects

Return hash of protected objects.

— Function: ly:pt num

num printer points

— 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 key

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 key

Run score through layout, an output definition, scaled to correct outputscale already, return a list of layout-lines. Take optional Object_key argument.

— Function: ly:score? x

Is x a Score object?

— 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: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 Springs have the format (ideal, hooke) and rods (idx1, idx2, distance) length is a number, ragged a boolean Return: a list containing the force (positive for stretching, negative for compressing and #f for non-satisfied constraints) followed by the spring-count+1 positions of the objects.

— 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.first and second may also be '() or #f.

— Function: ly:stencil-empty? stil

Return whether stil is empty

— Function: ly:stencil-expr stil

Return the expression of stil.

— 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-fonts s

Analyse s, and return a list of fonts used in s.

— 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-origin stil axis

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

— 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:tweak-clear-registry

Clear global tweak registry

— Function: ly:tweak-define-keys keys

Read keys

— Function: ly:tweak-define-tweaks tweaks

Read tweaks

— Function: ly:undumper-lookup undumper serial

Return the object key for number serial.

— Function: ly:undumper-read-keys undumper keys

Read serialized keys into undumper.

— 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 rest

Scheme callable function to issue the warning msg. The message is formatted with format and rest.

Read comments on this page, or add one.

This page is for LilyPond-2.5.11 (development-branch).

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.