1 %%%% -*- Mode: Scheme -*-
3 %%%% This file is part of LilyPond, the GNU music typesetter.
5 %%%% Copyright (C) 2003--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 %%%% Jan Nieuwenhuizen <janneke@gnu.org>
8 %%%% LilyPond is free software: you can redistribute it and/or modify
9 %%%% it under the terms of the GNU General Public License as published by
10 %%%% the Free Software Foundation, either version 3 of the License, or
11 %%%% (at your option) any later version.
13 %%%% LilyPond is distributed in the hope that it will be useful,
14 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
15 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 %%%% GNU General Public License for more details.
18 %%%% You should have received a copy of the GNU General Public License
19 %%%% along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 %% this file is alphabetically sorted.
26 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28 %% need SRFI-1 for filter; optargs for lambda*
29 #(use-modules (srfi srfi-1)
32 %% TODO: using define-music-function in a .scm causes crash.
35 #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
36 (_i "Create an acciaccatura from the following music expression"))
38 %% keep these two together
39 "instrument-definitions" = #'()
40 addInstrumentDefinition =
41 #(define-music-function
42 (parser location name lst) (string? list?)
43 (_i "Create instrument @var{name} with properties @var{list}.")
44 (set! instrument-definitions (acons name lst instrument-definitions))
45 (make-music 'SequentialMusic 'void #t))
48 #(define-music-function (parser location name music) (string? ly:music?)
49 (_i "Define @var{music} as a quotable music expression named
51 (add-quotable parser name music)
52 (make-music 'SequentialMusic 'void #t))
54 %% keep these two together
55 afterGraceFraction = #(cons 6 8)
57 #(define-music-function (parser location main grace) (ly:music? ly:music?)
58 (_i "Create @var{grace} note(s) after a @var{main} music expression.")
59 (let ((main-length (ly:music-length main))
60 (fraction (ly:parser-lookup parser 'afterGraceFraction)))
61 (make-simultaneous-music
64 (make-sequential-music
67 (make-music 'SkipMusic
68 'duration (ly:make-duration
70 (* (ly:moment-main-numerator main-length)
72 (* (ly:moment-main-denominator main-length)
74 (make-music 'GraceMusic
78 %% music identifiers not allowed at top-level,
79 %% so this is a music-function instead.
81 #(define-music-function (location parser) ()
82 (_i "Allow a page turn. May be used at toplevel (ie between scores or
83 markups), or inside a score.")
84 (make-music 'EventChord
86 'page-turn-permission 'allow
87 'elements (list (make-music 'PageTurnEvent
88 'break-permission 'allow))))
91 #(define-music-function (parser location proc) (procedure?)
92 (_i "Modify context properties with Scheme procedure @var{proc}.")
93 (make-music 'ApplyContext
98 #(define-music-function (parser location func music) (procedure? ly:music?)
99 (_i"Apply procedure @var{func} to @var{music}.")
103 #(define-music-function (parser location ctx proc) (symbol? procedure?)
104 (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
105 (make-music 'ApplyOutputEvent
111 #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
112 (_i "Create an appoggiatura from @var{music}"))
114 % for regression testing purposes.
116 #(define-music-function (parser location l r) (pair? pair?)
117 (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
118 (make-grob-property-override 'Beam 'positions
119 (ly:make-simple-closure
120 (ly:make-simple-closure
122 (list chain-grob-member-functions `(,cons 0 0))
123 (check-quant-callbacks l r))))))
125 % for regression testing purposes.
127 #(define-music-function (parser location comp) (procedure?)
128 (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
129 (make-grob-property-override 'Beam 'positions
130 (ly:make-simple-closure
131 (ly:make-simple-closure
133 (list chain-grob-member-functions `(,cons 0 0))
134 (check-slope-callbacks comp))))))
137 #(define-music-function (parser location music) (ly:music?)
138 (_i "Make voices that switch between staves automatically")
139 (make-autochange-music parser music))
144 #(define-music-function (parser location grob-name offset text)
145 (symbol? number-pair? markup?)
146 (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
147 (use like @code{\\once})")
148 (make-music 'AnnotateOutputEvent
150 'X-offset (car offset)
151 'Y-offset (cdr offset)
155 #(define-music-function (parser location offset text) (number-pair? markup?)
156 (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
157 (make-music 'AnnotateOutputEvent
158 'X-offset (car offset)
159 'Y-offset (cdr offset)
163 #(define-music-function (parser location type) (string?)
164 (_i "Insert a bar line of type @var{type}")
166 (make-property-set 'whichBar type)
170 #(define-music-function (parser location n) (integer?)
171 (_i "Print a warning if the current bar number is not @var{n}.")
172 (make-music 'ApplyContext
176 (let ((cbn (ly:context-property c 'currentBarNumber)))
177 (if (and (number? cbn) (not (= cbn n)))
178 (ly:input-message location
179 "Barcheck failed got ~a expect ~a"
183 #(define-music-function (parser location delta) (real?)
184 (_i "Create a fall or doit of pitch interval @var{delta}.")
185 (make-music 'BendAfterEvent
189 #(define-music-function (parser location newfilename) (string?)
190 (_i "Direct output for the current book block to @var{newfilename}.")
191 (set! book-filename newfilename)
192 (make-music 'SequentialMusic 'void #t))
195 #(define-music-function (parser location newsuffix) (string?)
196 (_i "Set the output filename suffix for the current book block to
198 (set! book-output-suffix newsuffix)
199 (make-music 'SequentialMusic 'void #t))
201 %% \breathe is defined as a music function rather than an event identifier to
202 %% ensure it gets useful input location information: as an event identifier,
203 %% it would have to be wrapped in an EventChord to prevent it from being
204 %% treated as a post_event by the parser
206 #(define-music-function (parser location) ()
207 (_i "Insert a breath mark.")
208 (make-music 'BreathingEvent))
213 #(define-music-function (parser location type) (string?)
214 (_i "Set the current clef to @var{type}.")
215 (make-clef-set type))
218 #(define-music-function (parser location type) (string?)
219 (_i "Set the current cue clef to @var{type}.")
220 (make-cue-clef-set type))
222 #(define-music-function (parser location) ()
223 (_i "Unset the current cue clef.")
224 (make-cue-clef-unset))
227 #(define-music-function
228 (parser location what dir main-music) (string? ly:dir? ly:music?)
229 (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
230 in a CueVoice oriented by @var{dir}.")
231 (make-music 'QuoteMusic
233 'quoted-context-type 'Voice
234 'quoted-context-id "cue"
235 'quoted-music-name what
236 'quoted-voice-direction dir))
239 #(define-music-function
240 (parser location what dir clef main-music) (string? ly:dir? string? ly:music?)
241 (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
242 in a CueVoice oriented by @var{dir}.")
243 (make-music 'QuoteMusic
245 'quoted-context-type 'Voice
246 'quoted-context-id "cue"
247 'quoted-music-name what
248 'quoted-music-clef clef
249 'quoted-voice-direction dir))
254 #(define-music-function (parser location music) (ly:music?)
255 (_i "Display the LilyPond input representation of @var{music}
258 (display-lily-music music parser)
262 #(define-music-function (parser location music) (ly:music?)
263 (_i "Display the internal representation of @var{music} to the console.")
265 (display-scheme-music music)
271 #(define-music-function (parser location music) (ly:music?)
272 (_i "Terminate the next spanner prematurely after exactly one note
273 without the need of a specific end spanner.")
274 (if (eq? (ly:music-property music 'name) 'EventChord)
275 (let* ((elts (ly:music-property music 'elements))
276 (start-span-evs (filter (lambda (ev)
277 (and (music-has-type ev 'span-event)
278 (equal? (ly:music-property ev 'span-direction)
283 (let ((c (music-clone m)))
284 (set! (ly:music-property c 'span-direction) STOP)
287 (end-ev-chord (make-music 'EventChord
288 'elements stop-span-evs))
289 (total (make-music 'SequentialMusic
290 'elements (list music
294 (ly:input-message location (_ "argument endSpanners is not an EventChord: ~a" music))))
299 #(define-music-function (parser location factor argument) (ly:moment? ly:music?)
300 (_i "Adjust durations of music in @var{argument} by rational @var{factor}.")
301 (let ((orig-duration (ly:music-length argument))
302 (multiplier (ly:make-moment 1 1)))
306 (if (and (eq? (ly:music-property mus 'name) 'EventChord)
307 (< 0 (ly:moment-main-denominator (ly:music-length mus))))
309 (ly:music-compress mus multiplier)
310 (set! multiplier (ly:moment-mul factor multiplier))))
316 (ly:moment-div orig-duration (ly:music-length argument)))
323 #(def-grace-function startGraceMusic stopGraceMusic
324 (_i "Insert @var{music} as grace notes."))
326 harmonicByFret = #(define-music-function (parser location fret music) (number? ly:music?)
327 (let* ((fret (number->string fret))
328 (pitch (fret->pitch fret)))
329 (make-sequential-music
332 \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label $fret)
335 (calc-harmonic-pitch pitch music))
337 \revert TabNoteHead #'stencil
340 harmonicByRatio = #(define-music-function (parser location ratio music) (number? ly:music?)
341 (let ((pitch (ratio->pitch ratio))
342 (fret (ratio->fret ratio)))
343 (make-sequential-music
346 \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label $fret)
349 (calc-harmonic-pitch pitch music))
351 \revert TabNoteHead #'stencil
355 #(define-music-function
356 (parser location name) (string?)
357 (_i "Switch instrument to @var{name}, which must be predefined with
358 @code{\\addInstrumentDefinition}.")
359 (let* ((handle (assoc name instrument-definitions))
360 (instrument-def (if handle (cdr handle) '())))
363 (ly:input-message location "No such instrument: ~a" name))
365 (make-music 'SimultaneousMusic
377 #(define-music-function (parser location tag music) (symbol? ly:music?)
378 (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
381 (let* ((tags (ly:music-property m 'tags))
382 (res (memq tag tags)))
389 #(define-music-function (parser location music) (ly:music?)
390 (_i "Remove cue notes from @var{music}.")
393 (if (and (string? (ly:music-property mus 'quoted-music-name))
394 (string=? (ly:music-property mus 'quoted-context-id "") "cue"))
395 (ly:music-property mus 'element)
402 #(define-music-function (parser location label) (symbol?)
403 (_i "Create @var{label} as a bookmarking label.")
404 (make-music 'EventChord
407 'elements (list (make-music 'LabelEvent
408 'page-label label))))
412 #(define-music-function (parser location language) (string?)
413 (_i "Set note names for language @var{language}.")
414 (note-names-language parser language)
415 (make-music 'Music 'void #t))
417 languageSaveAndChange =
418 #(define-music-function (parser location language) (string?)
419 (_i "Store the previous pitchnames alist, and set a new one.")
420 (set! previous-pitchnames pitchnames)
421 (note-names-language parser language)
422 (make-music 'Music 'void #t))
425 #(define-music-function (parser location) ()
426 (_i "Restore a previously-saved pitchnames alist.")
427 (if previous-pitchnames
429 (set! pitchnames previous-pitchnames)
430 (ly:parser-set-note-names parser pitchnames))
431 (ly:warning (_ "No other language was defined previously. Ignoring.")))
432 (make-music 'Music 'void #t))
436 #(define-music-function (parser location arg) (ly:music?)
437 (_i "Display chords in @var{arg} as clusters.")
438 (music-map note-to-cluster arg))
441 #(define-music-function (parser location proc mus) (procedure? ly:music?)
442 (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
443 (music-map proc mus))
447 %% noPageBreak and noPageTurn are music functions (not music indentifiers),
448 %% because music identifiers are not allowed at top-level.
450 #(define-music-function (location parser) ()
451 (_i "Forbid a page break. May be used at toplevel (i.e., between scores or
452 markups), or inside a score.")
453 (make-music 'EventChord
455 'page-break-permission 'forbid
456 'elements (list (make-music 'PageBreakEvent
457 'break-permission '()))))
460 #(define-music-function (location parser) ()
461 (_i "Forbid a page turn. May be used at toplevel (i.e., between scores or
462 markups), or inside a score.")
463 (make-music 'EventChord
465 'page-turn-permission 'forbid
466 'elements (list (make-music 'PageTurnEvent
467 'break-permission '()))))
472 #(define-music-function (parser location pitch-note) (ly:music?)
474 (make-music 'RelativeOctaveCheck
476 'pitch (pitch-of-note pitch-note)))
479 #(define-music-function (parser location octave) (integer?)
480 (_i "Set the octavation.")
481 (make-music 'OttavaMusic
482 'ottava-number octave))
484 overrideTimeSignatureSettings =
485 #(define-music-function
486 (parser location time-signature base-moment beat-structure beam-exceptions)
487 (pair? pair? cheap-list? cheap-list?)
489 (_i "Override @code{timeSignatureSettings}
490 for time signatures of @var{time-signature} to have settings
491 of @var{base-moment}, @var{beat-structure}, and @var{beam-exceptions}.")
493 ;; TODO -- add warning if largest value of grouping is
494 ;; greater than time-signature.
495 (let ((setting (make-setting base-moment beat-structure beam-exceptions)))
496 (override-time-signature-setting time-signature setting)))
499 #(define-music-function (parser location name property value)
500 (string? symbol? scheme?)
502 (_i "Set @var{property} to @var{value} in all grobs named @var{name}.
503 The @var{name} argument is a string of the form @code{\"Context.GrobName\"}
504 or @code{\"GrobName\"}.")
506 (let ((name-components (string-split name #\.))
507 (context-name 'Bottom)
510 (if (> 2 (length name-components))
511 (set! grob-name (string->symbol (car name-components)))
513 (set! grob-name (string->symbol (list-ref name-components 1)))
514 (set! context-name (string->symbol (list-ref name-components 0)))))
516 (make-music 'ApplyOutputEvent
518 'context-type context-name
520 (lambda (grob orig-context context)
522 (cdr (assoc 'name (ly:grob-property grob 'meta)))
524 (set! (ly:grob-property grob property) value))))))
528 %% pageBreak and pageTurn are music functions (iso music indentifiers),
529 %% because music identifiers are not allowed at top-level.
531 #(define-music-function (location parser) ()
532 (_i "Force a page break. May be used at toplevel (i.e., between scores or
533 markups), or inside a score.")
534 (make-music 'EventChord
536 'line-break-permission 'force
537 'page-break-permission 'force
538 'elements (list (make-music 'LineBreakEvent
539 'break-permission 'force)
540 (make-music 'PageBreakEvent
541 'break-permission 'force))))
544 #(define-music-function (location parser) ()
545 (_i "Force a page turn between two scores or top-level markups.")
546 (make-music 'EventChord
548 'line-break-permission 'force
549 'page-break-permission 'force
550 'page-turn-permission 'force
551 'elements (list (make-music 'LineBreakEvent
552 'break-permission 'force)
553 (make-music 'PageBreakEvent
554 'break-permission 'force)
555 (make-music 'PageTurnEvent
556 'break-permission 'force))))
559 #(define-music-function (parser location voice-ids music) (list? ly:music?)
560 (_i "Define parallel music sequences, separated by '|' (bar check signs),
561 and assign them to the identifiers provided in @var{voice-ids}.
563 @var{voice-ids}: a list of music identifiers (symbols containing only letters)
565 @var{music}: a music sequence, containing BarChecks as limiting expressions.
570 \\parallelMusic #'(A B C) {
580 (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
581 (current-voices voices)
582 (current-sequence (list)))
585 (define (push-music m)
586 "Push the music expression into the current sequence"
587 (set! current-sequence (cons m current-sequence)))
588 (define (change-voice)
589 "Stores the previously built sequence into the current voice and
590 change to the following voice."
591 (list-set! current-voices 0 (cons (make-music 'SequentialMusic
592 'elements (reverse! current-sequence))
593 (car current-voices)))
594 (set! current-sequence (list))
595 (set! current-voices (cdr current-voices)))
596 (define (bar-check? m)
597 "Checks whether m is a bar check."
598 (eq? (ly:music-property m 'name) 'BarCheck))
599 (define (music-origin music)
600 "Recursively search an origin location stored in music."
601 (cond ((null? music) #f)
602 ((not (null? (ly:music-property music 'origin)))
603 (ly:music-property music 'origin))
604 (else (or (music-origin (ly:music-property music 'element))
605 (let ((origins (remove not (map music-origin
606 (ly:music-property music 'elements)))))
607 (and (not (null? origins)) (car origins)))))))
609 ;; first, split the music and fill in voices
610 (map-in-order (lambda (m)
612 (if (bar-check? m) (change-voice)))
613 (ly:music-property music 'elements))
614 (if (not (null? current-sequence)) (change-voice))
615 ;; un-circularize `voices' and reorder the voices
616 (set! voices (map-in-order (lambda (dummy seqs)
620 ;; set origin location of each sequence in each voice
621 ;; for better type error tracking
622 (for-each (lambda (voice)
623 (for-each (lambda (seq)
624 (set! (ly:music-property seq 'origin)
625 (or (music-origin seq) location)))
629 ;; check sequence length
630 (apply for-each (lambda* (#:rest seqs)
631 (let ((moment-reference (ly:music-length (car seqs))))
632 (for-each (lambda (seq moment)
633 (if (not (equal? moment moment-reference))
634 (ly:music-message seq
635 "Bars in parallel music don't have the same length")))
636 seqs (map-in-order ly:music-length seqs))))
639 ;; bind voice identifiers to the voices
640 (map (lambda (voice-id voice)
641 (ly:parser-define! parser voice-id
642 (make-music 'SequentialMusic
646 ;; Return an empty sequence. This function is actually a "void" function.
647 (make-music 'SequentialMusic 'void #t))
650 #(define-music-function (parser loc arg) (ly:music?)
651 (_i "Tag @var{arg} to be parenthesized.")
653 (if (memq 'event-chord (ly:music-property arg 'types))
654 ;; arg is an EventChord -> set the parenthesize property
655 ;; on all child notes and rests
658 (if (or (memq 'note-event (ly:music-property ev 'types))
659 (memq 'rest-event (ly:music-property ev 'types)))
660 (set! (ly:music-property ev 'parenthesize) #t)))
661 (ly:music-property arg 'elements))
662 ;; No chord, simply set property for this expression:
663 (set! (ly:music-property arg 'parenthesize) #t))
667 #(define-music-function (parser location part1 part2) (ly:music? ly:music?)
668 (_i "Take the music in @var{part1} and @var{part2} and typeset so
669 that they share a staff.")
670 (make-part-combine-music parser
674 #(define-music-function (location parser type once) (symbol-or-boolean? boolean?)
675 (_i "Override the part-combiner.")
676 (make-music 'EventChord
677 'elements (list (make-music 'PartCombineForceEvent
680 partcombineApart = \partcombineForce #'apart ##f
681 partcombineApartOnce = \partcombineForce #'apart ##t
682 partcombineChords = \partcombineForce #'chords ##f
683 partcombineChordsOnce = \partcombineForce #'chords ##t
684 partcombineUnisono = \partcombineForce #'unisono ##f
685 partcombineUnisonoOnce = \partcombineForce #'unisono ##t
686 partcombineSoloI = \partcombineForce #'solo1 ##f
687 partcombineSoloIOnce = \partcombineForce #'solo1 ##t
688 partcombineSoloII = \partcombineForce #'solo2 ##f
689 partcombineSoloIIOnce = \partcombineForce #'solo2 ##t
690 partcombineAutomatic = \partcombineForce ##f ##f
691 partcombineAutomaticOnce = \partcombineForce ##f ##t
695 #(define-music-function
696 (parser location main-note secondary-note)
697 (ly:music? ly:music?)
698 (_i "Print a trill with @var{main-note} as the main note of the trill and
699 print @var{secondary-note} as a stemless note head in parentheses.")
700 (let* ((get-notes (lambda (ev-chord)
702 (lambda (m) (eq? 'NoteEvent (ly:music-property m 'name)))
703 (ly:music-property ev-chord 'elements))))
704 (sec-note-events (get-notes secondary-note))
705 (trill-events (filter (lambda (m) (music-has-type m 'trill-span-event))
706 (ly:music-property main-note 'elements))))
708 (if (pair? sec-note-events)
710 (let* ((trill-pitch (ly:music-property (car sec-note-events) 'pitch))
711 (forced (ly:music-property (car sec-note-events) 'force-accidental)))
713 (if (ly:pitch? trill-pitch)
714 (for-each (lambda (m)
715 (ly:music-set-property! m 'pitch trill-pitch)) trill-events)
717 (ly:warning (_ "Second argument of \\pitchedTrill should be single note: "))
718 (display sec-note-events)))
721 (for-each (lambda (m)
722 (ly:music-set-property! m 'force-accidental forced))
727 #(define-music-function (parser location what main-music) (string? ly:music?)
728 (_i "Indicate a section of music to be quoted. @var{what} indicates the name
729 of the quoted voice, as specified in an @code{\\addQuote} command.
730 @var{main-music} is used to indicate the length of music to be quoted;
731 usually contains spacers or multi-measure rests.")
732 (make-music 'QuoteMusic
734 'quoted-music-name what
738 #(define-music-function (parser location tag music) (symbol? ly:music?)
739 (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
742 (let* ((tags (ly:music-property m 'tags))
743 (res (memq tag tags)))
747 resetRelativeOctave =
748 #(define-music-function (parser location reference-note) (ly:music?)
749 (_i "Set the octave inside a \\relative section.")
751 (let* ((notes (ly:music-property reference-note 'elements))
752 (pitch (ly:music-property (car notes) 'pitch)))
754 (set! (ly:music-property reference-note 'elements) '())
755 (set! (ly:music-property reference-note 'to-relative-callback)
756 (lambda (music last-pitch)
761 revertTimeSignatureSettings =
762 #(define-music-function
763 (parser location time-signature)
766 (_i "Revert @code{timeSignatureSettings}
767 for time signatures of @var{time-signature}.")
768 (revert-time-signature-setting time-signature))
771 #(define-music-function (parser location finger) (number-or-string?)
772 (_i "Apply @var{finger} as a fingering indication.")
781 (list 'digit finger)))))
786 #(define-music-function (parser location fraction music)
787 (number-pair? ly:music?)
788 (_i "Multiply the duration of events in @var{music} by @var{fraction}.")
789 (ly:music-compress music
790 (ly:make-moment (car fraction) (cdr fraction))))
793 #(define-music-function (parser location dur dots arg)
794 (integer? integer? ly:music?)
795 (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.")
799 (shift-one-duration-log x dur dots)) arg))
802 #(define-music-function (parser location parameters) (list?)
803 (_i "Set the system stretch, by reading the 'system-stretch property of
804 the `parameters' assoc list.")
806 \overrideProperty #"Score.NonMusicalPaperColumn"
807 #'line-break-system-details
808 #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
809 (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
813 #(define-music-function (parser location style heads music)
814 (symbol? list-or-symbol? ly:music?)
815 (_i "Set @var{heads} in @var{music} to @var{style}.")
816 (style-note-heads heads style music))
821 #(define-music-function (parser location) ()
822 (_i "Include the string information in a chord repetition.")
823 (ly:parser-set-repetition-function parser tab-repeat-chord)
824 (make-music 'SequentialMusic 'void #t))
827 #(define-music-function (parser location tag arg) (symbol? ly:music?)
829 (_i "Add @var{tag} to the @code{tags} property of @var{arg}.")
832 (ly:music-property arg 'tags)
834 (ly:music-property arg 'tags)))
837 transposedCueDuring =
838 #(define-music-function
839 (parser location what dir pitch-note main-music)
840 (string? ly:dir? ly:music? ly:music?)
842 (_i "Insert notes from the part @var{what} into a voice called @code{cue},
843 using the transposition defined by @var{pitch-note}. This happens
844 simultaneously with @var{main-music}, which is usually a rest. The
845 argument @var{dir} determines whether the cue notes should be notated
846 as a first or second voice.")
848 (make-music 'QuoteMusic
850 'quoted-context-type 'Voice
851 'quoted-context-id "cue"
852 'quoted-music-name what
853 'quoted-voice-direction dir
854 'quoted-transposition (pitch-of-note pitch-note)
858 #(define-music-function (parser location pitch-note) (ly:music?)
859 (_i "Set instrument transposition")
862 (make-property-set 'instrumentTransposition
863 (ly:pitch-negate (pitch-of-note pitch-note)))
867 #(define-music-function (parser location sym val arg)
868 (symbol? scheme? ly:music?)
869 (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.")
871 (if (equal? (object-property sym 'backend-type?) #f)
873 (ly:warning (_ "cannot find property type-check for ~a") sym)
874 (ly:warning (_ "doing assignment anyway"))))
876 (ly:music-property arg 'tweaks)
878 (ly:music-property arg 'tweaks)))
884 #(define-music-function (parser location music) (ly:music?)
885 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or
886 @code{\\repeat percent} commands in @var{music} to be interpreted
887 as @code{\\repeat unfold}.")
888 (unfold-repeats music))
893 #(define-music-function (parser location sym val music)
894 (symbol? scheme? ly:music?)
895 (_i "Set @var{sym} to @var{val} in @var{music}.")
897 (set! (ly:music-property music sym) val)