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;
29 %% optargs for lambda*;
30 %% regex for string-match
31 #(use-modules (srfi srfi-1)
35 %% TODO: using define-music-function in a .scm causes crash.
38 #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic
39 (_i "Create an acciaccatura from the following music expression"))
41 %% keep these two together
42 "instrument-definitions" = #'()
43 addInstrumentDefinition =
44 #(define-music-function
45 (parser location name lst) (string? list?)
46 (_i "Create instrument @var{name} with properties @var{list}.")
47 (set! instrument-definitions (acons name lst instrument-definitions))
48 (make-music 'SequentialMusic 'void #t))
51 #(define-music-function (parser location name music) (string? ly:music?)
52 (_i "Define @var{music} as a quotable music expression named
54 (add-quotable parser name music)
55 (make-music 'SequentialMusic 'void #t))
57 %% keep these two together
58 afterGraceFraction = #(cons 6 8)
60 #(define-music-function (parser location main grace) (ly:music? ly:music?)
61 (_i "Create @var{grace} note(s) after a @var{main} music expression.")
62 (let ((main-length (ly:music-length main))
63 (fraction (ly:parser-lookup parser 'afterGraceFraction)))
64 (make-simultaneous-music
67 (make-sequential-music
70 (make-music 'SkipMusic
71 'duration (ly:make-duration
73 (* (ly:moment-main-numerator main-length)
75 (* (ly:moment-main-denominator main-length)
77 (make-music 'GraceMusic
81 %% music identifiers not allowed at top-level,
82 %% so this is a music-function instead.
84 #(define-music-function (location parser) ()
85 (_i "Allow a page turn. May be used at toplevel (ie between scores or
86 markups), or inside a score.")
87 (make-music 'EventChord
89 'page-turn-permission 'allow
90 'elements (list (make-music 'PageTurnEvent
91 'break-permission 'allow))))
94 #(define-music-function (parser location proc) (procedure?)
95 (_i "Modify context properties with Scheme procedure @var{proc}.")
96 (make-music 'ApplyContext
101 #(define-music-function (parser location func music) (procedure? ly:music?)
102 (_i"Apply procedure @var{func} to @var{music}.")
106 #(define-music-function (parser location ctx proc) (symbol? procedure?)
107 (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
108 (make-music 'ApplyOutputEvent
114 #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
115 (_i "Create an appoggiatura from @var{music}"))
117 % for regression testing purposes.
119 #(define-music-function (parser location l r) (pair? pair?)
120 (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
121 (make-grob-property-override 'Beam 'positions
122 (ly:make-simple-closure
123 (ly:make-simple-closure
125 (list chain-grob-member-functions `(,cons 0 0))
126 (check-quant-callbacks l r))))))
128 % for regression testing purposes.
130 #(define-music-function (parser location comp) (procedure?)
131 (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
132 (make-grob-property-override 'Beam 'positions
133 (ly:make-simple-closure
134 (ly:make-simple-closure
136 (list chain-grob-member-functions `(,cons 0 0))
137 (check-slope-callbacks comp))))))
140 #(define-music-function (parser location music) (ly:music?)
141 (_i "Make voices that switch between staves automatically")
142 (make-autochange-music parser music))
147 #(define-music-function (parser location grob-name offset text)
148 (symbol? number-pair? markup?)
149 (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
150 (use like @code{\\once})")
151 (make-music 'AnnotateOutputEvent
153 'X-offset (car offset)
154 'Y-offset (cdr offset)
158 #(define-music-function (parser location offset text) (number-pair? markup?)
159 (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
160 (make-music 'AnnotateOutputEvent
161 'X-offset (car offset)
162 'Y-offset (cdr offset)
166 #(define-music-function (parser location type) (string?)
167 (_i "Insert a bar line of type @var{type}")
169 (make-property-set 'whichBar type)
173 #(define-music-function (parser location n) (integer?)
174 (_i "Print a warning if the current bar number is not @var{n}.")
175 (make-music 'ApplyContext
179 (let ((cbn (ly:context-property c 'currentBarNumber)))
180 (if (and (number? cbn) (not (= cbn n)))
181 (ly:input-message location
182 "Barcheck failed got ~a expect ~a"
186 #(define-music-function (parser location delta) (real?)
187 (_i "Create a fall or doit of pitch interval @var{delta}.")
188 (make-music 'BendAfterEvent
192 #(define-music-function (parser location newfilename) (string?)
193 (_i "Direct output for the current book block to @var{newfilename}.")
194 (set! book-filename newfilename)
195 (make-music 'SequentialMusic 'void #t))
198 #(define-music-function (parser location newsuffix) (string?)
199 (_i "Set the output filename suffix for the current book block to
201 (set! book-output-suffix newsuffix)
202 (make-music 'SequentialMusic 'void #t))
206 #(define-music-function (parser location) ()
207 (_i "Insert a breath mark.")
208 (make-music 'EventChord
210 'elements (list (make-music 'BreathingEvent))))
215 #(define-music-function (parser location type) (string?)
216 (_i "Set the current clef to @var{type}.")
217 (make-clef-set type))
220 #(define-music-function
221 (parser location what dir main-music) (string? ly:dir? ly:music?)
222 (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
223 in a CueVoice oriented by @var{dir}.")
224 (make-music 'QuoteMusic
226 'quoted-context-type 'Voice
227 'quoted-context-id "cue"
228 'quoted-music-name what
229 'quoted-voice-direction dir
235 #(define-music-function (parser location music) (ly:music?)
236 (_i "Display the LilyPond input representation of @var{music}
239 (display-lily-music music parser)
243 #(define-music-function (parser location music) (ly:music?)
244 (_i "Display the internal representation of @var{music} to the console.")
246 (display-scheme-music music)
252 #(define-music-function (parser location music) (ly:music?)
253 (_i "Terminate the next spanner prematurely after exactly one note
254 without the need of a specific end spanner.")
255 (if (eq? (ly:music-property music 'name) 'EventChord)
256 (let* ((elts (ly:music-property music 'elements))
257 (start-span-evs (filter (lambda (ev)
258 (and (music-has-type ev 'span-event)
259 (equal? (ly:music-property ev 'span-direction)
264 (let ((c (music-clone m)))
265 (set! (ly:music-property c 'span-direction) STOP)
268 (end-ev-chord (make-music 'EventChord
269 'elements stop-span-evs))
270 (total (make-music 'SequentialMusic
271 'elements (list music
275 (ly:input-message location (_ "argument endSpanners is not an EventChord: ~a" music))))
280 #(define-music-function (parser location factor argument) (ly:moment? ly:music?)
281 (_i "Adjust durations of music in @var{argument} by rational @var{factor}.")
282 (let ((orig-duration (ly:music-length argument))
283 (multiplier (ly:make-moment 1 1)))
287 (if (and (eq? (ly:music-property mus 'name) 'EventChord)
288 (< 0 (ly:moment-main-denominator (ly:music-length mus))))
290 (ly:music-compress mus multiplier)
291 (set! multiplier (ly:moment-mul factor multiplier))))
297 (ly:moment-div orig-duration (ly:music-length argument)))
304 #(def-grace-function startGraceMusic stopGraceMusic
305 (_i "Insert @var{music} as grace notes."))
310 #(define-music-function
311 (parser location name) (string?)
312 (_i "Switch instrument to @var{name}, which must be predefined with
313 @code{\\addInstrumentDefinition}.")
314 (let* ((handle (assoc name instrument-definitions))
315 (instrument-def (if handle (cdr handle) '())))
318 (ly:input-message location "No such instrument: ~a" name))
320 (make-music 'SimultaneousMusic
332 #(define-music-function (parser location tag music) (symbol? ly:music?)
333 (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
336 (let* ((tags (ly:music-property m 'tags))
337 (res (memq tag tags)))
344 #(define-music-function (parser location music) (ly:music?)
345 (_i "Remove cue notes from @var{music}.")
348 (if (and (string? (ly:music-property mus 'quoted-music-name))
349 (string=? (ly:music-property mus 'quoted-context-id "") "cue"))
350 (ly:music-property mus 'element)
357 #(define-music-function (parser location label) (symbol?)
358 (_i "Create @var{label} as a bookmarking label.")
359 (make-music 'EventChord
362 'elements (list (make-music 'LabelEvent
363 'page-label label))))
367 #(define-music-function (parser location str) (string?)
368 (_i "Select note-names language.")
369 ;; This function is a hack around the old language
370 ;; selection system, using separate .ly files for each
371 ;; supported languages.
372 ;; TODO: re-implement language selection in a cleaner way.
373 (let* ((file-name (string-append (string-downcase! str) ".ly"))
375 ; Ugh. ly:gulp-file's "file not found" error message
376 ; won't be much informative in this specific case.
377 (raw-string (ly:gulp-file file-name))
379 ; extract the pitchnames alist.
380 (delim-alist (string-match "`\\(.*\\)\\)\\s[ |\n]?\\)" raw-string ))
381 (extract-alist (if delim-alist
382 (match:substring delim-alist)
387 (if (ly:get-option 'verbose)
388 (ly:message (_ "Using ~a note names...") str))
389 (ly:parser-set-note-names parser (eval-string extract-alist)))
390 (ly:error (_ "Cannot process ~a as a language file.
391 Use \\include \"~a\" instead.") file-name file-name))
396 #(define-music-function (parser location arg) (ly:music?)
397 (_i "Display chords in @var{arg} as clusters.")
398 (music-map note-to-cluster arg))
401 #(define-music-function (parser location proc mus) (procedure? ly:music?)
402 (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
403 (music-map proc mus))
407 %% noPageBreak and noPageTurn are music functions (not music indentifiers),
408 %% because music identifiers are not allowed at top-level.
410 #(define-music-function (location parser) ()
411 (_i "Forbid a page break. May be used at toplevel (i.e., between scores or
412 markups), or inside a score.")
413 (make-music 'EventChord
415 'page-break-permission 'forbid
416 'elements (list (make-music 'PageBreakEvent
417 'break-permission '()))))
420 #(define-music-function (location parser) ()
421 (_i "Forbid a page turn. May be used at toplevel (i.e., between scores or
422 markups), or inside a score.")
423 (make-music 'EventChord
425 'page-turn-permission 'forbid
426 'elements (list (make-music 'PageTurnEvent
427 'break-permission '()))))
432 #(define-music-function (parser location pitch-note) (ly:music?)
434 (make-music 'RelativeOctaveCheck
436 'pitch (pitch-of-note pitch-note)))
439 #(define-music-function (parser location octave) (integer?)
440 (_i "Set the octavation.")
441 (make-music 'OttavaMusic
442 'ottava-number octave))
444 overrideTimeSignatureSettings =
445 #(define-music-function
446 (parser location context time-signature base-moment beat-structure beam-exceptions)
447 (symbol? pair? pair? cheap-list? cheap-list?)
449 (_i "Override @code{timeSignatureSettings} in @var{context}
450 for time signatures of @var{time-signature} to have settings
451 of @var{base-moment}, @var{beat-structure}, and @var{beam-exceptions}.")
453 ;; TODO -- add warning if largest value of grouping is
454 ;; greater than time-signature.
455 (let ((setting (make-setting base-moment beat-structure beam-exceptions)))
456 (override-time-signature-setting time-signature setting context)))
459 #(define-music-function (parser location name property value)
460 (string? symbol? scheme?)
462 (_i "Set @var{property} to @var{value} in all grobs named @var{name}.
463 The @var{name} argument is a string of the form @code{\"Context.GrobName\"}
464 or @code{\"GrobName\"}.")
466 (let ((name-components (string-split name #\.))
467 (context-name 'Bottom)
470 (if (> 2 (length name-components))
471 (set! grob-name (string->symbol (car name-components)))
473 (set! grob-name (string->symbol (list-ref name-components 1)))
474 (set! context-name (string->symbol (list-ref name-components 0)))))
476 (make-music 'ApplyOutputEvent
478 'context-type context-name
480 (lambda (grob orig-context context)
482 (cdr (assoc 'name (ly:grob-property grob 'meta)))
484 (set! (ly:grob-property grob property) value))))))
488 %% pageBreak and pageTurn are music functions (iso music indentifiers),
489 %% because music identifiers are not allowed at top-level.
491 #(define-music-function (location parser) ()
492 (_i "Force a page break. May be used at toplevel (i.e., between scores or
493 markups), or inside a score.")
494 (make-music 'EventChord
496 'line-break-permission 'force
497 'page-break-permission 'force
498 'elements (list (make-music 'LineBreakEvent
499 'break-permission 'force)
500 (make-music 'PageBreakEvent
501 'break-permission 'force))))
504 #(define-music-function (location parser) ()
505 (_i "Force a page turn between two scores or top-level markups.")
506 (make-music 'EventChord
508 'line-break-permission 'force
509 'page-break-permission 'force
510 'page-turn-permission 'force
511 'elements (list (make-music 'LineBreakEvent
512 'break-permission 'force)
513 (make-music 'PageBreakEvent
514 'break-permission 'force)
515 (make-music 'PageTurnEvent
516 'break-permission 'force))))
519 #(define-music-function (parser location voice-ids music) (list? ly:music?)
520 (_i "Define parallel music sequences, separated by '|' (bar check signs),
521 and assign them to the identifiers provided in @var{voice-ids}.
523 @var{voice-ids}: a list of music identifiers (symbols containing only letters)
525 @var{music}: a music sequence, containing BarChecks as limiting expressions.
530 \\parallelMusic #'(A B C) {
540 (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
541 (current-voices voices)
542 (current-sequence (list)))
545 (define (push-music m)
546 "Push the music expression into the current sequence"
547 (set! current-sequence (cons m current-sequence)))
548 (define (change-voice)
549 "Stores the previously built sequence into the current voice and
550 change to the following voice."
551 (list-set! current-voices 0 (cons (make-music 'SequentialMusic
552 'elements (reverse! current-sequence))
553 (car current-voices)))
554 (set! current-sequence (list))
555 (set! current-voices (cdr current-voices)))
556 (define (bar-check? m)
557 "Checks whether m is a bar check."
558 (eq? (ly:music-property m 'name) 'BarCheck))
559 (define (music-origin music)
560 "Recursively search an origin location stored in music."
561 (cond ((null? music) #f)
562 ((not (null? (ly:music-property music 'origin)))
563 (ly:music-property music 'origin))
564 (else (or (music-origin (ly:music-property music 'element))
565 (let ((origins (remove not (map music-origin
566 (ly:music-property music 'elements)))))
567 (and (not (null? origins)) (car origins)))))))
569 ;; first, split the music and fill in voices
570 (map-in-order (lambda (m)
572 (if (bar-check? m) (change-voice)))
573 (ly:music-property music 'elements))
574 (if (not (null? current-sequence)) (change-voice))
575 ;; un-circularize `voices' and reorder the voices
576 (set! voices (map-in-order (lambda (dummy seqs)
580 ;; set origin location of each sequence in each voice
581 ;; for better type error tracking
582 (for-each (lambda (voice)
583 (for-each (lambda (seq)
584 (set! (ly:music-property seq 'origin)
585 (or (music-origin seq) location)))
589 ;; check sequence length
590 (apply for-each (lambda* (#:rest seqs)
591 (let ((moment-reference (ly:music-length (car seqs))))
592 (for-each (lambda (seq moment)
593 (if (not (equal? moment moment-reference))
594 (ly:music-message seq
595 "Bars in parallel music don't have the same length")))
596 seqs (map-in-order ly:music-length seqs))))
599 ;; bind voice identifiers to the voices
600 (map (lambda (voice-id voice)
601 (ly:parser-define! parser voice-id
602 (make-music 'SequentialMusic
606 ;; Return an empty sequence. This function is actually a "void" function.
607 (make-music 'SequentialMusic 'void #t))
610 #(define-music-function (parser loc arg) (ly:music?)
611 (_i "Tag @var{arg} to be parenthesized.")
613 (if (memq 'event-chord (ly:music-property arg 'types))
614 ;; arg is an EventChord -> set the parenthesize property
615 ;; on all child notes and rests
618 (if (or (memq 'note-event (ly:music-property ev 'types))
619 (memq 'rest-event (ly:music-property ev 'types)))
620 (set! (ly:music-property ev 'parenthesize) #t)))
621 (ly:music-property arg 'elements))
622 ;; No chord, simply set property for this expression:
623 (set! (ly:music-property arg 'parenthesize) #t))
627 #(define-music-function (parser location part1 part2) (ly:music? ly:music?)
628 (_i "Take the music in @var{part1} and @var{part2} and typeset so
629 that they share a staff.")
630 (make-part-combine-music parser
633 #(define (symbol-or-boolean? x) (or (symbol? x) (boolean? x)))
635 #(define-music-function (location parser type once) (symbol-or-boolean? boolean?)
636 (_i "Override the part-combiner.")
637 (make-music 'EventChord
638 'elements (list (make-music 'PartCombineForceEvent
641 partcombineApart = \partcombineForce #'apart ##f
642 partcombineApartOnce = \partcombineForce #'apart ##t
643 partcombineChords = \partcombineForce #'chords ##f
644 partcombineChordsOnce = \partcombineForce #'chords ##t
645 partcombineUnisono = \partcombineForce #'unisono ##f
646 partcombineUnisonoOnce = \partcombineForce #'unisono ##t
647 partcombineSoloI = \partcombineForce #'solo1 ##f
648 partcombineSoloIOnce = \partcombineForce #'solo1 ##t
649 partcombineSoloII = \partcombineForce #'solo2 ##f
650 partcombineSoloIIOnce = \partcombineForce #'solo2 ##t
651 partcombineAutomatic = \partcombineForce ##f ##f
652 partcombineAutomaticOnce = \partcombineForce ##f ##t
656 #(define-music-function
657 (parser location main-note secondary-note)
658 (ly:music? ly:music?)
659 (_i "Print a trill with @var{main-note} as the main note of the trill and
660 print @var{secondary-note} as a stemless note head in parentheses.")
661 (let* ((get-notes (lambda (ev-chord)
663 (lambda (m) (eq? 'NoteEvent (ly:music-property m 'name)))
664 (ly:music-property ev-chord 'elements))))
665 (sec-note-events (get-notes secondary-note))
666 (trill-events (filter (lambda (m) (music-has-type m 'trill-span-event))
667 (ly:music-property main-note 'elements))))
669 (if (pair? sec-note-events)
671 (let* ((trill-pitch (ly:music-property (car sec-note-events) 'pitch))
672 (forced (ly:music-property (car sec-note-events) 'force-accidental)))
674 (if (ly:pitch? trill-pitch)
675 (for-each (lambda (m)
676 (ly:music-set-property! m 'pitch trill-pitch)) trill-events)
678 (ly:warning (_ "Second argument of \\pitchedTrill should be single note: "))
679 (display sec-note-events)))
682 (for-each (lambda (m)
683 (ly:music-set-property! m 'force-accidental forced))
688 #(define-music-function (parser location what main-music) (string? ly:music?)
689 (_i "Indicate a section of music to be quoted. @var{what} indicates the name
690 of the quoted voice, as specified in an @code{\\addQuote} command.
691 @var{main-music} is used to indicate the length of music to be quoted;
692 usually contains spacers or multi-measure rests.")
693 (make-music 'QuoteMusic
695 'quoted-music-name what
699 #(define-music-function (parser location tag music) (symbol? ly:music?)
700 (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
703 (let* ((tags (ly:music-property m 'tags))
704 (res (memq tag tags)))
708 resetRelativeOctave =
709 #(define-music-function (parser location reference-note) (ly:music?)
710 (_i "Set the octave inside a \\relative section.")
712 (let* ((notes (ly:music-property reference-note 'elements))
713 (pitch (ly:music-property (car notes) 'pitch)))
715 (set! (ly:music-property reference-note 'elements) '())
716 (set! (ly:music-property reference-note 'to-relative-callback)
717 (lambda (music last-pitch)
722 revertTimeSignatureSettings =
723 #(define-music-function
724 (parser location context time-signature)
727 (_i "Revert @code{timeSignatureSettings} in @var{context}
728 for time signatures of @var{time-signature}.")
729 (revert-time-signature-setting time-signature context))
732 #(define-music-function (parser location finger) (number-or-string?)
733 (_i "Apply @var{finger} as a fingering indication.")
742 (list 'digit finger)))))
747 #(define-music-function (parser location fraction music)
748 (number-pair? ly:music?)
749 (_i "Multiply the duration of events in @var{music} by @var{fraction}.")
750 (ly:music-compress music
751 (ly:make-moment (car fraction) (cdr fraction))))
754 #(define-music-function (parser location dur dots arg)
755 (integer? integer? ly:music?)
756 (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.")
760 (shift-one-duration-log x dur dots)) arg))
763 #(define-music-function (parser location parameters) (list?)
764 (_i "Set the system stretch, by reading the 'system-stretch property of
765 the `parameters' assoc list.")
767 \overrideProperty #"Score.NonMusicalPaperColumn"
768 #'line-break-system-details
769 #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
770 (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
774 #(define-music-function (parser location style heads music)
775 (symbol? list-or-symbol? ly:music?)
776 (_i "Set @var{heads} in @var{music} to @var{style}.")
777 (style-note-heads heads style music))
782 #(define-music-function (parser location) ()
783 (_i "Include the string information in a chord repetition.")
784 (ly:parser-set-repetition-function parser tab-repeat-chord)
785 (make-music 'SequentialMusic 'void #t))
788 #(define-music-function (parser location tag arg) (symbol? ly:music?)
790 (_i "Add @var{tag} to the @code{tags} property of @var{arg}.")
793 (ly:music-property arg 'tags)
795 (ly:music-property arg 'tags)))
798 transposedCueDuring =
799 #(define-music-function
800 (parser location what dir pitch-note main-music)
801 (string? ly:dir? ly:music? ly:music?)
803 (_i "Insert notes from the part @var{what} into a voice called @code{cue},
804 using the transposition defined by @var{pitch-note}. This happens
805 simultaneously with @var{main-music}, which is usually a rest. The
806 argument @var{dir} determines whether the cue notes should be notated
807 as a first or second voice.")
809 (make-music 'QuoteMusic
811 'quoted-context-type 'Voice
812 'quoted-context-id "cue"
813 'quoted-music-name what
814 'quoted-voice-direction dir
815 'quoted-transposition (pitch-of-note pitch-note)
819 #(define-music-function (parser location pitch-note) (ly:music?)
820 (_i "Set instrument transposition")
823 (make-property-set 'instrumentTransposition
824 (ly:pitch-negate (pitch-of-note pitch-note)))
828 #(define-music-function (parser location sym val arg)
829 (symbol? scheme? ly:music?)
830 (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.")
832 (if (equal? (object-property sym 'backend-type?) #f)
834 (ly:warning (_ "cannot find property type-check for ~a") sym)
835 (ly:warning (_ "doing assignment anyway"))))
837 (ly:music-property arg 'tweaks)
839 (ly:music-property arg 'tweaks)))
845 #(define-music-function (parser location music) (ly:music?)
846 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or
847 @code{\\repeat percent} commands in @var{music} to be interpreted
848 as @code{\\repeat unfold}.")
849 (unfold-repeats music))
854 #(define-music-function (parser location sym val music)
855 (symbol? scheme? ly:music?)
856 (_i "Set @var{sym} to @var{val} in @var{music}.")
858 (set! (ly:music-property music sym) val)