OLD | NEW |
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-event-function (parser location text offset grob-name footnote) | 345 #(define-music-function (parser location mark offset grob-name footnote music) |
346 ((markup?) number-pair? (symbol? '()) markup?) | 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 (make-music | 354 if they have @var{music} as their ultimate cause; by default all grobs |
355 'FootnoteEvent | 355 having @var{music} as their @emph{direct} cause will be marked, |
356 'X-offset (car offset) | 356 similar to the way @code{\\tweak} works. |
357 'Y-offset (cdr offset) | 357 |
358 'automatically-numbered (not text) | 358 If @var{music} is given as @code{\\default}, a footnote event |
359 'text (or text (make-null-markup)) | 359 affecting @emph{all} grobs matching @var{grob-name} at a given time |
360 'footnote-text footnote | 360 step is generated. This may be required for creating footnotes on |
361 'symbol grob-name)) | 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{-}.") |
| 367 (let ((mus (make-music |
| 368 » 'FootnoteEvent |
| 369 » 'X-offset (car offset) |
| 370 » 'Y-offset (cdr offset) |
| 371 » 'automatically-numbered (not mark) |
| 372 » 'text (or mark (make-null-markup)) |
| 373 » 'footnote-text footnote |
| 374 » 'symbol (or grob-name '())))) |
| 375 (if music |
| 376 » (begin |
| 377 » (set! (ly:music-property music 'tweaks) |
| 378 » » (acons (if grob-name |
| 379 » » » (cons grob-name 'footnote-music) |
| 380 » » » 'footnote-music) |
| 381 » » » mus |
| 382 » » » (ly:music-property music 'tweaks))) |
| 383 » music) |
| 384 » mus))) |
362 | 385 |
363 grace = | 386 grace = |
364 #(def-grace-function startGraceMusic stopGraceMusic | 387 #(def-grace-function startGraceMusic stopGraceMusic |
365 (_i "Insert @var{music} as grace notes.")) | 388 (_i "Insert @var{music} as grace notes.")) |
366 | 389 |
367 grobdescriptions = | 390 grobdescriptions = |
368 #(define-scheme-function (parser location descriptions) (list?) | 391 #(define-scheme-function (parser location descriptions) (list?) |
369 (_i "Create a context modification from @var{descriptions}, a list | 392 (_i "Create a context modification from @var{descriptions}, a list |
370 in the format of @code{all-grob-descriptions}.") | 393 in the format of @code{all-grob-descriptions}.") |
371 (ly:make-context-mod | 394 (ly:make-context-mod |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 transposition = | 1135 transposition = |
1113 #(define-music-function (parser location pitch) (ly:pitch?) | 1136 #(define-music-function (parser location pitch) (ly:pitch?) |
1114 (_i "Set instrument transposition") | 1137 (_i "Set instrument transposition") |
1115 | 1138 |
1116 (context-spec-music | 1139 (context-spec-music |
1117 (make-property-set 'instrumentTransposition | 1140 (make-property-set 'instrumentTransposition |
1118 (ly:pitch-negate pitch)) | 1141 (ly:pitch-negate pitch)) |
1119 'Staff)) | 1142 'Staff)) |
1120 | 1143 |
1121 tweak = | 1144 tweak = |
1122 #(define-music-function (parser location sym val arg) | 1145 #(define-music-function (parser location grob prop value music) |
1123 (symbol? scheme? ly:music?) | 1146 ((string?) symbol? scheme? ly:music?) |
1124 (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.") | 1147 (_i "Add a tweak to the following @var{music}. |
1125 | 1148 Layout objects created by @var{music} get their property @var{prop} |
1126 (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?)) |
1127 (begin | 1157 (begin |
1128 » (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) |
1129 (ly:warning (_ "doing assignment anyway")))) | 1159 (ly:warning (_ "doing assignment anyway")))) |
1130 (set! | 1160 (set! |
1131 (ly:music-property arg 'tweaks) | 1161 (ly:music-property music 'tweaks) |
1132 (acons sym val | 1162 (acons (if grob (cons (string->symbol grob) prop) prop) |
1133 » (ly:music-property arg 'tweaks))) | 1163 » value |
1134 arg) | 1164 » (ly:music-property music 'tweaks))) |
1135 | 1165 music) |
1136 | |
1137 | 1166 |
1138 unfoldRepeats = | 1167 unfoldRepeats = |
1139 #(define-music-function (parser location music) (ly:music?) | 1168 #(define-music-function (parser location music) (ly:music?) |
1140 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or | 1169 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or |
1141 @code{\\repeat percent} commands in @var{music} to be interpreted | 1170 @code{\\repeat percent} commands in @var{music} to be interpreted |
1142 as @code{\\repeat unfold}.") | 1171 as @code{\\repeat unfold}.") |
1143 (unfold-repeats music)) | 1172 (unfold-repeats music)) |
1144 | 1173 |
1145 void = | 1174 void = |
1146 #(define-void-function (parser location arg) (scheme?) | 1175 #(define-void-function (parser location arg) (scheme?) |
1147 (_i "Accept a scheme argument, return a void expression. | 1176 (_i "Accept a scheme argument, return a void expression. |
1148 Use this if you want to have a scheme expression evaluated | 1177 Use this if you want to have a scheme expression evaluated |
1149 because of its side-effects, but its value ignored.")) | 1178 because of its side-effects, but its value ignored.")) |
1150 | 1179 |
1151 withMusicProperty = | 1180 withMusicProperty = |
1152 #(define-music-function (parser location sym val music) | 1181 #(define-music-function (parser location sym val music) |
1153 (symbol? scheme? ly:music?) | 1182 (symbol? scheme? ly:music?) |
1154 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1183 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1155 | 1184 |
1156 (set! (ly:music-property music sym) val) | 1185 (set! (ly:music-property music sym) val) |
1157 music) | 1186 music) |
OLD | NEW |