1 @c -*- coding: utf-8; mode: texinfo; -*-
4 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
6 When revising a translation, copy the HEAD committish of the
7 version that you are working on. See TRANSLATION for details.
12 @node Interfaces for programmers
13 @chapter Interfaces for programmers
15 Advanced tweaks may be performed by using Scheme. If you are
16 not familiar with Scheme, you may wish to read our
17 @ref{Scheme tutorial}.
22 * Contexts for programmers::
23 * Callback functions::
24 * Inline Scheme code::
30 @section Music functions
32 Music functions are scheme functions that are used to
33 automatically create music expressions. They can be used to
34 greatly simplify the input file.
37 * Music function syntax::
38 * Simple substitution functions::
39 * Intermediate substitution functions::
40 * Mathematics in functions::
42 * Functions without arguments::
45 @node Music function syntax
46 @subsection Music function syntax
48 The general syntax of a music function is:
52 #(define-music-function (parser location @var{var_1} @var{var_2}...@var{var_n})
53 (@var{var_1-type?} @var{var_2-type?}...@var{var_n-type?})
54 @var{...valid music expression...})
60 @multitable @columnfractions .33 .66
61 @item @var{var_i} @tab @var{i}th variable
62 @item @var{var_i-type?} @tab type of @var{i}th variable
63 @item @var{...valid music expression...} @tab expression that returns
64 valid music, generally in the form of a Scheme expression. There is
65 also special syntax that allows LilyPond input code in this music
69 The variable type checkers are scheme procedures that will return
70 @code{#t} if a variable is of a given type. Some common types
71 are shown in the table below. Other types can be found in the files
72 @file{lily/music-scheme.cc} and @file{scm/c++.scm}.
74 @multitable @columnfractions .33 .66
75 @headitem Input type @tab @var{vari-type?} notation
76 @item Integer @tab @code{integer?}
77 @item Float (decimal number) @tab @code{number?}
78 @item Text string @tab @code{string?}
79 @item Markup @tab @code{markup?}
80 @item Music expression @tab @code{ly:music?}
81 @item A pair of variables @tab @code{pair?}
84 The @code{parser} and @code{location} arguments are mandatory.
85 The @code{parser} argument is used in the body of the function
86 to gain access to the value of another LilyPond variable.
87 The @code{location} argument is used to set the @q{origin}
88 of the music expression that is built by the music function,
89 so that in case of a syntax error LilyPond
90 can tell the user an appropriate place to look in the input file.
92 @node Simple substitution functions
93 @subsection Simple substitution functions
95 A simple substitution function is a music function whose output music
96 expression is written in LilyPond code, but with an input variable
97 substituted into the LilyPond code. The general form of these functions is
101 #(define-music-function (parser location @var{var1})
104 @emph{... LilyPond input code with} @code{#$var1} @emph{for substition ...}
108 Note that the special characters @code{#@{} and @code{#@}} surround the
111 @multitable @columnfractions .33 .66
112 @item @var{vari} @tab @var{i}th variable
113 @item @var{vari-type?} @tab type of @var{i}th variable
114 @item @var{...music...} @tab normal LilyPond input, using
115 variables as @code{#$var1}, etc.
118 For example, a function can be defined that simplifies
119 setting the padding of a TextScript:
121 @lilypond[quote,verbatim,ragged-right]
122 padText = #(define-music-function (parser location padding) (number?)
124 \once \override TextScript #'padding = #$padding
132 c4^"piu mosso" fis a g
136 In addition to numbers, we can use music expressions such
137 as notes for arguments to music functions:
139 @lilypond[quote,verbatim,ragged-right]
140 custosNote = #(define-music-function (parser location note)
143 \once \override Voice.NoteHead #'stencil =
144 #ly:text-interface::print
145 \once \override Voice.NoteHead #'text =
146 \markup \musicglyph #"custodes.mensural.u0"
147 \once \override Voice.Stem #'stencil = ##f
152 @node Intermediate substitution functions
153 @subsection Intermediate substitution functions
155 Slightly more complicated than simple substitution function,
156 intermediate substitution functions involve a mix of Scheme code and
157 LilyPond code in the music expression to be
160 Some @code{\override} commands require an argument consisting of
161 a pair of numbers (called a @code{cons cell} in Scheme).
163 The pair can be directly passed into the music function,
164 using a @code{pair?} variable:
169 #(define-music-function (parser location beg-end)
172 \once \override Beam #'positions = #$beg-end
176 \manualBeam #'(3 . 6) c8 d e f
181 Alternatively, the numbers making up the pair can be
182 passed as separate arguments, and the Scheme code
183 used to create the pair can be included in the
186 @lilypond[quote,verbatim,ragged-right]
188 #(define-music-function (parser location beg end)
191 \once \override Beam #'positions = #(cons $beg $end)
195 \manualBeam #3 #6 c8 d e f
200 @node Mathematics in functions
201 @subsection Mathematics in functions
203 Music functions can involve Scheme programming in
204 addition to simple substitution,
206 @lilypond[quote,verbatim,ragged-right]
207 AltOn = #(define-music-function (parser location mag) (number?)
208 #{ \override Stem #'length = #$(* 7.0 mag)
209 \override NoteHead #'font-size =
210 #$(inexact->exact (* (/ 6.0 (log 2.0)) (log mag))) #})
213 \revert Stem #'length
214 \revert NoteHead #'font-size
217 { c'2 \AltOn #0.5 c'4 c'
218 \AltOn #1.5 c' c' \AltOff c'2 }
222 This example may be rewritten to pass in music expressions,
224 @lilypond[quote,verbatim,ragged-right]
225 withAlt = #(define-music-function (parser location mag music) (number? ly:music?)
226 #{ \override Stem #'length = #$(* 7.0 mag)
227 \override NoteHead #'font-size =
228 #$(inexact->exact (* (/ 6.0 (log 2.0)) (log mag)))
230 \revert Stem #'length
231 \revert NoteHead #'font-size #})
233 { c'2 \withAlt #0.5 {c'4 c'}
234 \withAlt #1.5 {c' c'} c'2 }
238 @subsection Void functions
240 A music function must return a music expression, but sometimes we
241 may want to have a function that does not involve music (such as
242 turning off Point and Click). To do this, we return a @code{void}
246 that is returned is the @code{(make-music ...)}. With the
247 @code{'void} property set to @code{#t}, the parser is told to
248 actually disregard this returned music
249 expression. Thus the important part of the void music function is the
250 processing done by the function, not the music expression that is
255 #(define-music-function (parser location) ()
256 (ly:set-option 'point-and-click #f)
257 (make-music 'SequentialMusic 'void #t))
259 \noPointAndClick % disable point and click
263 @node Functions without arguments
264 @subsection Functions without arguments
266 In most cases a function without arguments should be written
270 dolce = \markup@{ \italic \bold dolce @}
273 However, in rare cases it may be useful to create a music function
278 #(define-music-function (parser location) ()
279 (if (eq? #t (ly:get-option 'display-bar-numbers))
280 #@{ \once \override Score.BarNumber #'break-visibility = ##f #@}
284 To actually display bar numbers where this function is called,
285 invoke @command{lilypond} with
288 lilypond -d display-bar-numbers FILENAME.ly
293 @node Markup functions
294 @section Markup functions
296 Markups are implemented as special Scheme functions which produce a
297 @code{Stencil} object given a number of arguments.
300 * Markup construction in Scheme::
301 * How markups work internally::
302 * New markup command definition::
303 * New markup list command definition::
307 @node Markup construction in Scheme
308 @subsection Markup construction in Scheme
310 @cindex defining markup commands
312 The @code{markup} macro builds markup expressions in Scheme while
313 providing a LilyPond-like syntax. For example,
315 (markup #:column (#:line (#:bold #:italic "hello" #:raise 0.4 "world")
316 #:larger #:line ("foo" "bar" "baz")))
322 \markup \column @{ \line @{ \bold \italic "hello" \raise #0.4 "world" @}
323 \larger \line @{ foo bar baz @} @}
327 This example demonstrates the main translation rules between regular
328 LilyPond markup syntax and Scheme markup syntax.
331 @multitable @columnfractions .3 .3
332 @item @b{LilyPond} @tab @b{Scheme}
333 @item @code{\markup markup1} @tab @code{(markup markup1)}
334 @item @code{\markup @{ markup1 markup2 ... @}} @tab
335 @code{(markup markup1 markup2 ... )}
336 @item @code{\markup-command} @tab @code{#:markup-command}
337 @item @code{\variable} @tab @code{variable}
338 @item @code{\center-column @{ ... @}} @tab @code{#:center-column ( ... )}
339 @item @code{string} @tab @code{"string"}
340 @item @code{#scheme-arg} @tab @code{scheme-arg}
344 The whole Scheme language is accessible inside the
345 @code{markup} macro. For example, You may use function calls inside
346 @code{markup} in order to manipulate character strings. This is
347 useful when defining new markup commands (see
348 @ref{New markup command definition}).
353 The markup-list argument of commands such as @code{#:line},
354 @code{#:center}, and @code{#:column} cannot be a variable or
355 the result of a function call.
358 (markup #:line (function-that-returns-markups))
362 is invalid. One should use the @code{make-line-markup},
363 @code{make-center-markup}, or @code{make-column-markup} functions
367 (markup (make-line-markup (function-that-returns-markups)))
371 @node How markups work internally
372 @subsection How markups work internally
377 \raise #0.5 "text example"
381 @code{\raise} is actually represented by the @code{raise-markup}
382 function. The markup expression is stored as
385 (list raise-markup 0.5 (list simple-markup "text example"))
388 When the markup is converted to printable objects (Stencils), the
389 @code{raise-markup} function is called as
394 @var{list of property alists}
396 @var{the "text example" markup})
399 The @code{raise-markup} function first creates the stencil for the
400 @code{text example} string, and then it raises that Stencil by 0.5
401 staff space. This is a rather simple example; more complex examples
403 of this section, and in @file{scm/@/define@/-markup@/-commands@/.scm}.
406 @node New markup command definition
407 @subsection New markup command definition
409 New markup commands can be defined
410 with the @code{define-markup-command} Scheme macro.
413 (define-markup-command (@var{command-name} @var{layout} @var{props} @var{arg1} @var{arg2} ...)
414 (@var{arg1-type?} @var{arg2-type?} ...)
422 @var{i}th command argument
424 a type predicate for the i@var{th} argument
426 the @q{layout} definition
428 a list of alists, containing all active properties.
431 As a simple example, we show how to add a @code{\smallcaps} command,
432 which selects a small caps font. Normally we could select the
436 \markup @{ \override #'(font-shape . caps) Text-in-caps @}
440 This selects the caps font by setting the @code{font-shape} property to
441 @code{#'caps} for interpreting @code{Text-in-caps}.
443 To make the above available as @code{\smallcaps} command, we must
444 define a function using @code{define-markup-command}. The command should
445 take a single argument of type @code{markup}. Therefore the start of the
446 definition should read
449 (define-markup-command (smallcaps layout props argument) (markup?)
454 What follows is the content of the command: we should interpret
455 the @code{argument} as a markup, i.e.,
458 (interpret-markup layout @dots{} argument)
462 This interpretation should add @code{'(font-shape . caps)} to the active
463 properties, so we substitute the following for the @dots{} in the
467 (cons (list '(font-shape . caps) ) props)
471 The variable @code{props} is a list of alists, and we prepend to it by
472 cons'ing a list with the extra setting.
475 Suppose that we are typesetting a recitative in an opera and
476 we would like to define a command that will show character names in a
477 custom manner. Names should be printed with small caps and moved a
478 bit up and to the left. We will define a @code{\character} command
479 which takes into account the necessary translation and uses the newly
480 defined @code{\smallcaps} command:
483 #(define-markup-command (character layout props name) (string?)
484 "Print the character name in small caps, translated to the left and
485 top. Syntax: \\character #\"name\""
486 (interpret-markup layout props
487 (markup #:hspace 0 #:translate (cons -3 1) #:smallcaps name)))
490 There is one complication that needs explanation: texts above and below
491 the staff are moved vertically to be at a certain distance (the
492 @code{padding} property) from the staff and the notes. To make sure
493 that this mechanism does not annihilate the vertical effect of our
494 @code{#:translate}, we add an empty string (@code{#:hspace 0}) before the
495 translated text. Now the @code{#:hspace 0} will be put above the notes,
497 @code{name} is moved in relation to that empty string. The net effect is
498 that the text is moved to the upper left.
500 The final result is as follows:
504 c''^\markup \character #"Cleopatra"
505 e'^\markup \character #"Giulio Cesare"
509 @lilypond[quote,ragged-right]
510 #(define-markup-command (smallcaps layout props str) (string?)
511 "Print the string argument in small caps. Syntax: \\smallcaps #\"string\""
512 (interpret-markup layout props
515 (if (= (string-length s) 0)
517 (markup #:large (string-upcase (substring s 0 1))
518 #:translate (cons -0.6 0)
519 #:tiny (string-upcase (substring s 1)))))
520 (string-split str #\Space)))))
522 #(define-markup-command (character layout props name) (string?)
523 "Print the character name in small caps, translated to the left and
524 top. Syntax: \\character #\"name\""
525 (interpret-markup layout props
526 (markup #:hspace 0 #:translate (cons -3 1) #:smallcaps name)))
529 c''^\markup \character #"Cleopatra" c'' c'' c''
530 e'^\markup \character #"Giulio Cesare" e' e' e'
534 We have used the @code{caps} font shape, but suppose that our font
535 does not have a small-caps variant. In that case we have to fake
536 the small caps font by setting a string in uppercase with the
537 first letter a little larger:
540 #(define-markup-command (smallcaps layout props str) (string?)
541 "Print the string argument in small caps."
542 (interpret-markup layout props
545 (if (= (string-length s) 0)
547 (markup #:large (string-upcase (substring s 0 1))
548 #:translate (cons -0.6 0)
549 #:tiny (string-upcase (substring s 1)))))
550 (string-split str #\Space)))))
553 The @code{smallcaps} command first splits its string argument into
554 tokens separated by spaces (@code{(string-split str #\Space)}); for
555 each token, a markup is built with the first letter made large and
556 upcased (@code{#:large (string-upcase (substring s 0 1))}), and a
557 second markup built with the following letters made tiny and upcased
558 (@code{#:tiny (string-upcase (substring s 1))}). As LilyPond
559 introduces a space between markups on a line, the second markup is
560 translated to the left (@code{#:translate (cons -0.6 0) ...}). Then,
561 the markups built for each token are put in a line by
562 @code{(make-line-markup ...)}. Finally, the resulting markup is passed
563 to the @code{interpret-markup} function, with the @code{layout} and
564 @code{props} arguments.
566 Note: there is now an internal command @code{\smallCaps} which can
567 be used to set text in small caps. See
568 @ruser{Text markup commands}, for details.
572 Currently, the available combinations of arguments (after the standard
573 @var{layout} and @var{props} arguments) to a markup command defined with
574 @code{define-markup-command} are limited as follows.
580 @itemx @var{markup markup}
582 @itemx @var{scm markup}
584 @itemx @var{scm scm markup}
585 @itemx @var{scm scm markup markup}
586 @itemx @var{scm markup markup}
587 @itemx @var{scm scm scm}
591 In the above table, @var{scm} represents native Scheme data types like
592 @q{number} or @q{string}.
594 As an example, it is not possible to use a markup command @code{foo} with
595 four arguments defined as
598 #(define-markup-command (foo layout props
600 (number? string? number? string?)
605 If you apply it as, say,
608 \markup \foo #1 #"bar" #2 #"baz"
611 @cindex Scheme signature
612 @cindex signature, Scheme
614 @command{lilypond} complains that it cannot parse @code{foo} due to its
615 unknown Scheme signature.
618 @node New markup list command definition
619 @subsection New markup list command definition
620 Markup list commands are defined with the
621 @code{define-markup-list-command} Scheme macro, which is similar to the
622 @code{define-markup-command} macro described in
623 @ref{New markup command definition}, except that where the latter returns
624 a single stencil, the former returns a list of stencils.
626 In the following example, a @code{\paragraph} markup list command is
627 defined, which returns a list of justified lines, the first one being
628 indented. The indent width is taken from the @code{props} argument.
630 #(define-markup-list-command (paragraph layout props args) (markup-list?)
631 (let ((indent (chain-assoc-get 'par-indent props 2)))
632 (interpret-markup-list layout props
633 (make-justified-lines-markup-list (cons (make-hspace-markup indent)
637 Besides the usual @code{layout} and @code{props} arguments, the
638 @code{paragraph} markup list command takes a markup list argument, named
639 @code{args}. The predicate for markup lists is @code{markup-list?}.
641 First, the function gets the indent width, a property here named
642 @code{par-indent}, from the property list @code{props}. If the
643 property is not found, the default value is @code{2}. Then, a
644 list of justified lines is made using the
645 @code{make-justified-lines-markup-list} function, which is related
646 to the @code{\justified-lines} built-in markup list command. A
647 horizontal space is added at the beginning using the
648 @code{make-hspace-markup} function. Finally, the markup list is
649 interpreted using the @code{interpret-markup-list} function.
651 This new markup list command can be used as follows:
655 The art of music typography is called \italic @{(plate) engraving.@}
656 The term derives from the traditional process of music printing.
657 Just a few decades ago, sheet music was made by cutting and stamping
658 the music into a zinc or pewter plate in mirror image.
660 \override-lines #'(par-indent . 4) \paragraph @{
661 The plate would be inked, the depressions caused by the cutting
662 and stamping would hold ink. An image was formed by pressing paper
663 to the plate. The stamping and cutting was completely done by
669 @node Contexts for programmers
670 @section Contexts for programmers
673 * Context evaluation::
674 * Running a function on all layout objects::
677 @node Context evaluation
678 @subsection Context evaluation
680 @cindex calling code during interpreting
681 @funindex \applyContext
683 Contexts can be modified during interpretation with Scheme code. The
686 \applyContext @var{function}
689 @var{function} should be a Scheme function that takes a single
690 argument: the context in which the @code{\applyContext} command is
691 being called. The following code will print the current bar
692 number on the standard output during the compile:
697 (format #t "\nWe were called in barnumber ~a.\n"
698 (ly:context-property x 'currentBarNumber)))
703 @node Running a function on all layout objects
704 @subsection Running a function on all layout objects
707 @cindex calling code on layout objects
708 @funindex \applyOutput
711 The most versatile way of tuning an object is @code{\applyOutput}. Its
714 \applyOutput @var{context} @var{proc}
718 where @var{proc} is a Scheme function, taking three arguments.
720 When interpreted, the function @var{proc} is called for every layout
721 object found in the context @var{context}, with the following
724 @item the layout object itself,
725 @item the context where the layout object was created, and
726 @item the context where @code{\applyOutput} is processed.
730 In addition, the cause of the layout object, i.e., the music
731 expression or object that was responsible for creating it, is in the
732 object property @code{cause}. For example, for a note head, this is a
733 @rinternals{NoteHead} event, and for a @rinternals{Stem} object,
734 this is a @rinternals{NoteHead} object.
736 Here is a function to use for @code{\applyOutput}; it blanks
737 note-heads on the center-line:
739 @lilypond[quote,verbatim,ragged-right]
740 #(define (blanker grob grob-origin context)
741 (if (and (memq 'note-head-interface (ly:grob-interfaces grob))
742 (eq? (ly:grob-property grob 'staff-position) 0))
743 (set! (ly:grob-property grob 'transparent) #t)))
746 e4 g8 \applyOutput #'Voice #blanker b d2
751 @node Callback functions
752 @section Callback functions
754 Properties (like @code{thickness}, @code{direction}, etc.) can be
755 set at fixed values with @code{\override}, e.g.
758 \override Stem #'thickness = #2.0
761 Properties can also be set to a Scheme procedure,
763 @lilypond[fragment,verbatim,quote,relative=2]
764 \override Stem #'thickness = #(lambda (grob)
765 (if (= UP (ly:grob-property grob 'direction))
772 In this case, the procedure is executed as soon as the value of the
773 property is requested during the formatting process.
775 Most of the typesetting engine is driven by such callbacks.
776 Properties that typically use callbacks include
780 The printing routine, that constructs a drawing for the symbol
782 The routine that sets the horizontal position
784 The routine that computes the width of an object
787 The procedure always takes a single argument, being the grob.
789 If routines with multiple arguments must be called, the current grob
790 can be inserted with a grob closure. Here is a setting from
791 @code{AccidentalSuggestion},
795 ,(ly:make-simple-closure
797 ,(ly:make-simple-closure
798 (list ly:self-alignment-interface::centered-on-x-parent))
799 ,(ly:make-simple-closure
800 (list ly:self-alignment-interface::x-aligned-on-self)))))
804 In this example, both @code{ly:self-alignment-interface::x-aligned-on-self} and
805 @code{ly:self-alignment-interface::centered-on-x-parent} are called
806 with the grob as argument. The results are added with the @code{+}
807 function. To ensure that this addition is properly executed, the whole
808 thing is enclosed in @code{ly:make-simple-closure}.
810 In fact, using a single procedure as property value is equivalent to
813 (ly:make-simple-closure (ly:make-simple-closure (list @var{proc})))
817 The inner @code{ly:make-simple-closure} supplies the grob as argument
818 to @var{proc}, the outer ensures that result of the function is
819 returned, rather than the @code{simple-closure} object.
822 @node Inline Scheme code
823 @section Inline Scheme code
825 The main disadvantage of @code{\tweak} is its syntactical
826 inflexibility. For example, the following produces a syntax error.
829 F = \tweak #'font-size #-3 -\flageolet
837 In other words, @code{\tweak} doesn't behave like an articulation
838 regarding the syntax; in particular, it can't be attached with
839 @code{^} and @code{_}.
841 Using Scheme, this problem can be avoided. The route to the
842 result is given in @ref{Adding articulation to notes (example)},
843 especially how to use @code{\displayMusic} as a helping guide.
846 F = #(let ((m (make-music 'ArticulationEvent
847 'articulation-type "flageolet")))
848 (set! (ly:music-property m 'tweaks)
850 (ly:music-property m 'tweaks)))
859 Here, the @code{tweaks} properties of the flageolet object
860 @code{m} (created with @code{make-music}) are extracted with
861 @code{ly:music-property}, a new key-value pair to change the
862 font size is prepended to the property list with the
863 @code{acons} Scheme function, and the result is finally
864 written back with @code{set!}. The last element of the
865 @code{let} block is the return value, @code{m} itself.
869 @node Difficult tweaks
870 @section Difficult tweaks
872 There are a few classes of difficult adjustments.
878 One type of difficult adjustment involves the appearance of
879 spanner objects, such as slurs and ties. Usually, only one
880 spanner object is created at a time, and it can be adjusted with
881 the normal mechanism. However, occasionally a spanner crosses a
882 line break. When this happens, the object is cloned. A separate
883 object is created for every system in which the spanner appears.
884 The new objects are clones of the original object and inherit all
885 properties, including @code{\override}s.
888 In other words, an @code{\override} always affects all pieces of a
889 broken spanner. To change only one part of a spanner at a line break,
890 it is necessary to hook into the formatting process. The
891 @code{after-line-breaking} callback contains the Scheme procedure that
892 is called after the line breaks have been determined and layout
893 objects have been split over different systems.
895 In the following example, we define a procedure
896 @code{my-callback}. This procedure
900 determines if the spanner has been split across line breaks
902 if yes, retrieves all the split objects
904 checks if this grob is the last of the split objects
906 if yes, it sets @code{extra-offset}.
909 This procedure is installed into @rinternals{Tie}, so the last part
910 of the broken tie is repositioned.
912 @lilypond[quote,verbatim,ragged-right]
913 #(define (my-callback grob)
915 ; have we been split?
916 (orig (ly:grob-original grob))
918 ; if yes, get the split pieces (our siblings)
919 (siblings (if (ly:grob? orig)
920 (ly:spanner-broken-into orig) '() )))
922 (if (and (>= (length siblings) 2)
923 (eq? (car (last-pair siblings)) grob))
924 (ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))
927 \override Tie #'after-line-breaking =
934 When applying this trick, the new @code{after-line-breaking} callback
935 should also call the old one @code{after-line-breaking}, if there is
936 one. For example, if using this with @code{Hairpin},
937 @code{ly:hairpin::after-line-breaking} should also be called.
940 @item Some objects cannot be changed with @code{\override} for
941 technical reasons. Examples of those are @code{NonMusicalPaperColumn}
942 and @code{PaperColumn}. They can be changed with the
943 @code{\overrideProperty} function, which works similar to @code{\once
944 \override}, but uses a different syntax.
948 #"Score.NonMusicalPaperColumn" % Grob name
949 #'line-break-system-details % Property name
950 #'((next-padding . 20)) % Value
953 Note, however, that @code{\override}, applied to
954 @code{NonMusicalPaperColumn} and @code{PaperColumn}, still works as
955 expected within @code{\context} blocks.
959 @node LilyPond Scheme interfaces
960 @chapter LilyPond Scheme interfaces
962 This chapter covers the various tools provided by LilyPond to help
963 Scheme programmers get information into and out of the music streams.
965 TODO -- figure out what goes in here and how to organize it