LEFT | RIGHT |
1 %%%% -*- Mode: Scheme -*- | 1 %%%% -*- Mode: Scheme -*- |
2 | 2 |
3 %%%% This file is part of LilyPond, the GNU music typesetter. | 3 %%%% This file is part of LilyPond, the GNU music typesetter. |
4 %%%% | 4 %%%% |
5 %%%% Copyright (C) 2003--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 %%%% Copyright (C) 2003--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
6 %%%% Jan Nieuwenhuizen <janneke@gnu.org> | 6 %%%% Jan Nieuwenhuizen <janneke@gnu.org> |
7 %%%% | 7 %%%% |
8 %%%% LilyPond is free software: you can redistribute it and/or modify | 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 | 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 | 10 %%%% the Free Software Foundation, either version 3 of the License, or |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 (ly:music-compress mus multiplier) | 335 (ly:music-compress mus multiplier) |
336 (set! multiplier (ly:moment-mul factor multiplier))))) | 336 (set! multiplier (ly:moment-mul factor multiplier))))) |
337 (extract-named-music argument '(EventChord NoteEvent RestEvent SkipEvent))
) | 337 (extract-named-music argument '(EventChord NoteEvent RestEvent SkipEvent))
) |
338 (ly:music-compress | 338 (ly:music-compress |
339 argument | 339 argument |
340 (ly:moment-div orig-duration (ly:music-length argument))) | 340 (ly:moment-div orig-duration (ly:music-length argument))) |
341 | 341 |
342 argument)) | 342 argument)) |
343 | 343 |
344 footnote = | 344 footnote = |
345 #(define-music-function (parser location text offset grob-name footnote m) | 345 #(define-music-function (parser location mark offset grob-name footnote music) |
346 ((markup?) number-pair? (symbol?) markup? (ly:music?)) | 346 ((markup?) number-pair? (symbol?) markup? (ly:music?)) |
347 (_i "Attach @var{text} at @var{offset} with @var{text} referring to | 347 (_i "Make the markup @var{footnote} a footnote on @var{music}. The |
348 @var{footnote}. If @var{text} is given as @code{\\default}, use | 348 footnote is marked with a markup @var{mark} moved by @var{offset} with |
349 autonumbering instead. Note that, for this to take effect, | 349 respect to the marked music. |
350 auto-numbering must be turned on in the paper block. Otherwise, no | 350 |
351 number will appear. Footnotes are applied like articulations. If a | 351 If @var{mark} is not given or specified as @var{\\default}, it is |
352 symbol @var{grob-name} is specified, all grobs of that kind at the | 352 replaced by an automatically generated sequence number. If a symbol |
353 current time step are affected.") | 353 @var{grob-name} is specified, then grobs of that type will be marked |
| 354 if they have @var{music} as their ultimate cause; by default all grobs |
| 355 having @var{music} as their @emph{direct} cause will be marked, |
| 356 similar to the way @code{\\tweak} works. |
| 357 |
| 358 If @var{music} is given as @code{\\default}, a footnote event |
| 359 affecting @emph{all} grobs matching @var{grob-name} at a given time |
| 360 step is generated. This may be required for creating footnotes on |
| 361 time signatures, clefs, and other items not cooperating with |
| 362 @code{\\tweak}. |
| 363 |
| 364 Like with @code{\\tweak}, if you use a footnote on a following |
| 365 post-event, the @code{\\footnote} command itself needs to be attached |
| 366 to the preceding note or rest as a post-event with @code{-}.") |
354 (let ((mus (make-music | 367 (let ((mus (make-music |
355 'FootnoteEvent | 368 'FootnoteEvent |
356 'X-offset (car offset) | 369 'X-offset (car offset) |
357 'Y-offset (cdr offset) | 370 'Y-offset (cdr offset) |
358 » 'automatically-numbered (not text) | 371 » 'automatically-numbered (not mark) |
359 » 'text (or text (make-null-markup)) | 372 » 'text (or mark (make-null-markup)) |
360 'footnote-text footnote | 373 'footnote-text footnote |
361 'symbol (or grob-name '())))) | 374 'symbol (or grob-name '())))) |
362 (if m | 375 (if music |
363 (begin | 376 (begin |
364 » (set! (ly:music-property m 'tweaks) | 377 » (set! (ly:music-property music 'tweaks) |
365 (acons (if grob-name | 378 (acons (if grob-name |
366 (cons grob-name 'footnote-music) | 379 (cons grob-name 'footnote-music) |
367 'footnote-music) | 380 'footnote-music) |
368 mus | 381 mus |
369 » » » (ly:music-property m 'tweaks))) | 382 » » » (ly:music-property music 'tweaks))) |
370 » m) | 383 » music) |
371 mus))) | 384 mus))) |
372 | 385 |
373 grace = | 386 grace = |
374 #(def-grace-function startGraceMusic stopGraceMusic | 387 #(def-grace-function startGraceMusic stopGraceMusic |
375 (_i "Insert @var{music} as grace notes.")) | 388 (_i "Insert @var{music} as grace notes.")) |
376 | 389 |
377 grobdescriptions = | 390 grobdescriptions = |
378 #(define-scheme-function (parser location descriptions) (list?) | 391 #(define-scheme-function (parser location descriptions) (list?) |
379 (_i "Create a context modification from @var{descriptions}, a list | 392 (_i "Create a context modification from @var{descriptions}, a list |
380 in the format of @code{all-grob-descriptions}.") | 393 in the format of @code{all-grob-descriptions}.") |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 transposition = | 1135 transposition = |
1123 #(define-music-function (parser location pitch) (ly:pitch?) | 1136 #(define-music-function (parser location pitch) (ly:pitch?) |
1124 (_i "Set instrument transposition") | 1137 (_i "Set instrument transposition") |
1125 | 1138 |
1126 (context-spec-music | 1139 (context-spec-music |
1127 (make-property-set 'instrumentTransposition | 1140 (make-property-set 'instrumentTransposition |
1128 (ly:pitch-negate pitch)) | 1141 (ly:pitch-negate pitch)) |
1129 'Staff)) | 1142 'Staff)) |
1130 | 1143 |
1131 tweak = | 1144 tweak = |
1132 #(define-music-function (parser location sym val arg) | 1145 #(define-music-function (parser location grob prop value music) |
1133 (symbol? scheme? ly:music?) | 1146 ((string?) symbol? scheme? ly:music?) |
1134 (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.") | 1147 (_i "Add a tweak to the following @var{music}. |
1135 | 1148 Layout objects created by @var{music} get their property @var{prop} |
1136 (if (equal? (object-property sym 'backend-type?) #f) | 1149 set to @var{value}. If @var{grob} is specified, like with |
| 1150 @example |
| 1151 \\tweak Accidental #'color #red cis' |
| 1152 @end example |
| 1153 an indirectly created grob (@samp{Accidental} is caused by |
| 1154 @samp{NoteHead}) can be tweaked; otherwise only directly created grobs |
| 1155 are affected.") |
| 1156 (if (not (object-property prop 'backend-type?)) |
1137 (begin | 1157 (begin |
1138 » (ly:input-warning location (_ "cannot find property type-check for ~a")
sym) | 1158 » (ly:input-warning location (_ "cannot find property type-check for ~a")
prop) |
1139 (ly:warning (_ "doing assignment anyway")))) | 1159 (ly:warning (_ "doing assignment anyway")))) |
1140 (set! | 1160 (set! |
1141 (ly:music-property arg 'tweaks) | 1161 (ly:music-property music 'tweaks) |
1142 (acons sym val | 1162 (acons (if grob (cons (string->symbol grob) prop) prop) |
1143 » (ly:music-property arg 'tweaks))) | 1163 » value |
1144 arg) | 1164 » (ly:music-property music 'tweaks))) |
1145 | 1165 music) |
1146 | |
1147 | 1166 |
1148 unfoldRepeats = | 1167 unfoldRepeats = |
1149 #(define-music-function (parser location music) (ly:music?) | 1168 #(define-music-function (parser location music) (ly:music?) |
1150 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or | 1169 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or |
1151 @code{\\repeat percent} commands in @var{music} to be interpreted | 1170 @code{\\repeat percent} commands in @var{music} to be interpreted |
1152 as @code{\\repeat unfold}.") | 1171 as @code{\\repeat unfold}.") |
1153 (unfold-repeats music)) | 1172 (unfold-repeats music)) |
1154 | 1173 |
1155 void = | 1174 void = |
1156 #(define-void-function (parser location arg) (scheme?) | 1175 #(define-void-function (parser location arg) (scheme?) |
1157 (_i "Accept a scheme argument, return a void expression. | 1176 (_i "Accept a scheme argument, return a void expression. |
1158 Use this if you want to have a scheme expression evaluated | 1177 Use this if you want to have a scheme expression evaluated |
1159 because of its side-effects, but its value ignored.")) | 1178 because of its side-effects, but its value ignored.")) |
1160 | 1179 |
1161 withMusicProperty = | 1180 withMusicProperty = |
1162 #(define-music-function (parser location sym val music) | 1181 #(define-music-function (parser location sym val music) |
1163 (symbol? scheme? ly:music?) | 1182 (symbol? scheme? ly:music?) |
1164 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1183 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1165 | 1184 |
1166 (set! (ly:music-property music sym) val) | 1185 (set! (ly:music-property music sym) val) |
1167 music) | 1186 music) |
LEFT | RIGHT |