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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 transposition = | 1135 transposition = |
1136 #(define-music-function (parser location pitch) (ly:pitch?) | 1136 #(define-music-function (parser location pitch) (ly:pitch?) |
1137 (_i "Set instrument transposition") | 1137 (_i "Set instrument transposition") |
1138 | 1138 |
1139 (context-spec-music | 1139 (context-spec-music |
1140 (make-property-set 'instrumentTransposition | 1140 (make-property-set 'instrumentTransposition |
1141 (ly:pitch-negate pitch)) | 1141 (ly:pitch-negate pitch)) |
1142 'Staff)) | 1142 'Staff)) |
1143 | 1143 |
1144 tweak = | 1144 tweak = |
1145 #(define-music-function (parser location sym val arg) | 1145 #(define-music-function (parser location grob prop value music) |
1146 (symbol? scheme? ly:music?) | 1146 ((string?) symbol? scheme? ly:music?) |
1147 (_i "Add @code{sym . val} to the @code{tweaks} property of @var{arg}.") | 1147 (_i "Add a tweak to the following @var{music}. |
1148 | 1148 Layout objects created by @var{music} get their property @var{prop} |
1149 (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?)) |
1150 (begin | 1157 (begin |
1151 » (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) |
1152 (ly:warning (_ "doing assignment anyway")))) | 1159 (ly:warning (_ "doing assignment anyway")))) |
1153 (set! | 1160 (set! |
1154 (ly:music-property arg 'tweaks) | 1161 (ly:music-property music 'tweaks) |
1155 (acons sym val | 1162 (acons (if grob (cons (string->symbol grob) prop) prop) |
1156 » (ly:music-property arg 'tweaks))) | 1163 » value |
1157 arg) | 1164 » (ly:music-property music 'tweaks))) |
1158 | 1165 music) |
1159 | |
1160 | 1166 |
1161 unfoldRepeats = | 1167 unfoldRepeats = |
1162 #(define-music-function (parser location music) (ly:music?) | 1168 #(define-music-function (parser location music) (ly:music?) |
1163 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or | 1169 (_i "Force any @code{\\repeat volta}, @code{\\repeat tremolo} or |
1164 @code{\\repeat percent} commands in @var{music} to be interpreted | 1170 @code{\\repeat percent} commands in @var{music} to be interpreted |
1165 as @code{\\repeat unfold}.") | 1171 as @code{\\repeat unfold}.") |
1166 (unfold-repeats music)) | 1172 (unfold-repeats music)) |
1167 | 1173 |
1168 void = | 1174 void = |
1169 #(define-void-function (parser location arg) (scheme?) | 1175 #(define-void-function (parser location arg) (scheme?) |
1170 (_i "Accept a scheme argument, return a void expression. | 1176 (_i "Accept a scheme argument, return a void expression. |
1171 Use this if you want to have a scheme expression evaluated | 1177 Use this if you want to have a scheme expression evaluated |
1172 because of its side-effects, but its value ignored.")) | 1178 because of its side-effects, but its value ignored.")) |
1173 | 1179 |
1174 withMusicProperty = | 1180 withMusicProperty = |
1175 #(define-music-function (parser location sym val music) | 1181 #(define-music-function (parser location sym val music) |
1176 (symbol? scheme? ly:music?) | 1182 (symbol? scheme? ly:music?) |
1177 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1183 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1178 | 1184 |
1179 (set! (ly:music-property music sym) val) | 1185 (set! (ly:music-property music sym) val) |
1180 music) | 1186 music) |
LEFT | RIGHT |