Left: | ||
Right: |
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--2014 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 %%%% Copyright (C) 2003--2014 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 (assoc-get 'interfaces | 120 (assoc-get 'interfaces |
121 (assoc-get 'meta description)))) | 121 (assoc-get 'meta description)))) |
122 #{ | 122 #{ |
123 \override #item . #property = | 123 \override #item . #property = |
124 #(value-for-spanner-piece arg) | 124 #(value-for-spanner-piece arg) |
125 #} | 125 #} |
126 (begin | 126 (begin |
127 (ly:input-warning location (_ "not a spanner name, `~a'") name) | 127 (ly:input-warning location (_ "not a spanner name, `~a'") name) |
128 (make-music 'Music)))))) | 128 (make-music 'Music)))))) |
129 | 129 |
130 alternatingTimeSignatures = | |
Keith
2014/05/10 23:50:11
The function does not do what its name implies, al
uliska
2014/05/12 07:31:37
After some consideration I agree that it is better
| |
131 #(define-music-function (parser location timesigs)(list?) | |
132 (_i "Print alternating time signatures. The argument is a Scheme list | |
133 of lists. Each list describes one fraction to be printed. | |
134 When the function has executed the first of the given time signatures | |
135 will be the effective @code{\\time}, while the following are simply graphical. | |
136 When using it you will want to use @code{\\omit Score.TimeSignature} | |
137 before the next use of @code{\\time}. Please note that this does not | |
138 perform any checks regarding the used time signatures, so you're | |
139 responsible yourself to write consistent music. To return to normal | |
140 use of time signatures use @code{\\undo \\omit Score.TimeSignature}.") | |
141 (let ((first-effective-timesig (cons | |
142 (caar timesigs) | |
143 (cadar timesigs)))) | |
144 #{ \once\override Staff.TimeSignature.stencil = | |
janek
2014/05/10 20:49:09
Shouldn't this override be at Score level?
uliska
2014/05/10 22:38:29
Any other ideas?
I have the impression that Staff.
Keith
2014/05/10 23:50:12
Well, if there are many staves, your function chan
uliska
2014/05/12 07:31:37
That's true and a case I missed to check. So overr
| |
145 #(lambda (grob) | |
146 (grob-interpret-markup grob | |
147 #{ \markup \override #'(baseline-skip . 0) | |
148 \number | |
149 #(map (lambda (x) #{ \markup \center-column #(map number->string x) #}) | |
janek
2014/05/10 20:49:08
This assumes that the user will input lists of 2 e
uliska
2014/05/10 22:38:29
Entering more than two numbers seems gracefully en
| |
150 timesigs) | |
151 #})) | |
152 \time #first-effective-timesig #})) | |
153 | |
130 appendToTag = | 154 appendToTag = |
131 #(define-music-function (parser location tag more music) | 155 #(define-music-function (parser location tag more music) |
132 (symbol? ly:music? ly:music?) | 156 (symbol? ly:music? ly:music?) |
133 (_i "Append @var{more} to the @code{elements} of all music | 157 (_i "Append @var{more} to the @code{elements} of all music |
134 expressions in @var{music} that are tagged with @var{tag}.") | 158 expressions in @var{music} that are tagged with @var{tag}.") |
135 (music-map (lambda (m) | 159 (music-map (lambda (m) |
136 (if (memq tag (ly:music-property m 'tags)) | 160 (if (memq tag (ly:music-property m 'tags)) |
137 (set! (ly:music-property m 'elements) | 161 (set! (ly:music-property m 'elements) |
138 (append (ly:music-property m 'elements) | 162 (append (ly:music-property m 'elements) |
139 (list more)))) | 163 (list more)))) |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
747 (if (symbol? property) | 771 (if (symbol? property) |
748 (list property) | 772 (list property) |
749 property)) | 773 property)) |
750 parser location | 774 parser location |
751 #:default 'Bottom #:min 3 #:max 3))) | 775 #:default 'Bottom #:min 3 #:max 3))) |
752 (if prop-path | 776 (if prop-path |
753 #{ | 777 #{ |
754 \override #prop-path = #(offsetter (third prop-path) offsets) | 778 \override #prop-path = #(offsetter (third prop-path) offsets) |
755 #} | 779 #} |
756 (make-music 'Music))))) | 780 (make-music 'Music))))) |
757 | 781 |
758 omit = | 782 omit = |
759 #(define-music-function (parser location item) (symbol-list-or-music?) | 783 #(define-music-function (parser location item) (symbol-list-or-music?) |
760 (_i "Set @var{item}'s @samp{stencil} property to @code{#f}, | 784 (_i "Set @var{item}'s @samp{stencil} property to @code{#f}, |
761 effectively omitting it without taking up space. | 785 effectively omitting it without taking up space. |
762 | 786 |
763 If @var{item} is a symbol list of form @code{GrobName} or | 787 If @var{item} is a symbol list of form @code{GrobName} or |
764 @code{Context.GrobName}, the result is an override for the grob name | 788 @code{Context.GrobName}, the result is an override for the grob name |
765 specified by it. If @var{item} is a music expression, the result is | 789 specified by it. If @var{item} is a music expression, the result is |
766 the same music expression with an appropriate tweak applied to it.") | 790 the same music expression with an appropriate tweak applied to it.") |
767 #{ \tweak stencil ##f #item #}) | 791 #{ \tweak stencil ##f #item #}) |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1600 Use this if you want to have a scheme expression evaluated | 1624 Use this if you want to have a scheme expression evaluated |
1601 because of its side-effects, but its value ignored.")) | 1625 because of its side-effects, but its value ignored.")) |
1602 | 1626 |
1603 withMusicProperty = | 1627 withMusicProperty = |
1604 #(define-music-function (parser location sym val music) | 1628 #(define-music-function (parser location sym val music) |
1605 (symbol? scheme? ly:music?) | 1629 (symbol? scheme? ly:music?) |
1606 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1630 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1607 | 1631 |
1608 (set! (ly:music-property music sym) val) | 1632 (set! (ly:music-property music sym) val) |
1609 music) | 1633 music) |
OLD | NEW |