\applycontext
#(lambda (x)
(format #t "\nWe were called in barnumber ~a.\n"
- (ly:get-context-property x 'currentBarNumber)))
+ (ly:context-property x 'currentBarNumber)))
@end example
@refbugs
The command @code{\with} has no effect on contexts that already
-exist. Neither can it be used for @internalsref{Score} contexts.
+exist.
@node Engravers and performers
\remove @var{engravername}
@end example
-@cindex \consists
-@cindex \remove
+@cindex @code{\consists}
+@cindex @code{\remove}
@noindent
Here @var{engravername} is a string, the name of an engraver in the
@menu
* Inline Scheme::
* Input variables and Scheme::
-* Scheme datatypes::
+* Scheme data types::
* Assignments::
@end menu
-@node Scheme datatypes
-@subsection Scheme datatypes
+@node Scheme data types
+@subsection Scheme data types
Scheme is used to glue together different program modules. To aid this
glue function, many LilyPond specific object types can be passed as
@item Stencil: Device-independent page output object,
including dimensions.
-@item Syllable_group
-
@item Spring_smob
@item Translator: An object that produces audio objects or Grobs.
This means that the scheme function @var{func} is called with
@var{music} as its argument. The return value of @var{func} is the
result of the entire expression. @var{func} may read and write music
-properties using the functions @code{ly:get-mus-property} and
-@code{ly:set-mus-property!}.
+properties using the functions @code{ly:music-property} and
+@code{ly:music-set-property!}.
An example is a function that reverses the order of elements in
its argument:
@lilypond[verbatim,raggedright]
#(define (rev-music-1 m)
- (ly:set-mus-property! m 'elements (reverse
- (ly:get-mus-property m 'elements)))
+ (ly:music-set-property! m 'elements (reverse
+ (ly:music-property m 'elements)))
m)
\score { \notes \apply #rev-music-1 { c4 d4 } }
@end lilypond
children.
@example
#(define (reverse-music music)
- (let* ((elements (ly:get-mus-property music 'elements))
- (child (ly:get-mus-property music 'element))
+ (let* ((elements (ly:music-property music 'elements))
+ (child (ly:music-property music 'element))
(reversed (reverse elements)))
; set children
- (ly:set-mus-property! music 'elements reversed)
+ (ly:music-set-property! music 'elements reversed)
; recurse
(if (ly:music? child) (reverse-music child))