LEFT | RIGHT |
(no file at all) | |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 2008--2012 Reinhold Kainhofer <reinhold@kainhofer.com> | 3 ;;;; Copyright (C) 2008--2012 Reinhold Kainhofer <reinhold@kainhofer.com> |
4 ;;;; | 4 ;;;; |
5 ;;;; LilyPond is free software: you can redistribute it and/or modify | 5 ;;;; LilyPond is free software: you can redistribute it and/or modify |
6 ;;;; it under the terms of the GNU General Public License as published by | 6 ;;;; it under the terms of the GNU General Public License as published by |
7 ;;;; the Free Software Foundation, either version 3 of the License, or | 7 ;;;; the Free Software Foundation, either version 3 of the License, or |
8 ;;;; (at your option) any later version. | 8 ;;;; (at your option) any later version. |
9 ;;;; | 9 ;;;; |
10 ;;;; LilyPond is distributed in the hope that it will be useful, | 10 ;;;; LilyPond is distributed in the hope that it will be useful, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 ((#\o) ; Next pedal should be circled | 114 ((#\o) ; Next pedal should be circled |
115 (process-pedal (cdr remaining) prev-x stencils #t space)) | 115 (process-pedal (cdr remaining) prev-x stencils #t space)) |
116 (else | 116 (else |
117 (ly:warning "Unhandled entry in harp-pedal: ~a"· | 117 (ly:warning "Unhandled entry in harp-pedal: ~a"· |
118 (car remaining)) | 118 (car remaining)) |
119 (process-pedal (cdr remaining)· | 119 (process-pedal (cdr remaining)· |
120 prev-x stencils circled space)))))) | 120 prev-x stencils circled space)))))) |
121 (final-x (car result)) | 121 (final-x (car result)) |
122 (stencils (cdr result))) | 122 (stencils (cdr result))) |
123 ; Add the horizontal line and combine all stencils: | 123 ; Add the horizontal line and combine all stencils: |
124 (apply ly:stencil-add | 124 (box-stencil |
125 (cons | 125 (apply ly:stencil-add |
126 (make-line-stencil line-width 0 0 final-x 0) | 126 (cons |
127 stencils)))) | 127 (make-line-stencil line-width 0 0 final-x 0) |
| 128 stencils)) |
| 129 0.0 |
| 130 0.0))) |
128 | 131 |
129 ;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o
and #\| | 132 ;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o
and #\| |
130 (define (harp-pedals-parse-string definition-string) | 133 (define (harp-pedals-parse-string definition-string) |
131 "Parse a harp pedals diagram string and return a list containing 1, 0, -1, #\\o
or #\\|" | 134 "Parse a harp pedals diagram string and return a list containing 1, 0, -1, #\\o
or #\\|" |
132 (map (lambda (c) | 135 (map (lambda (c) |
133 (case c | 136 (case c |
134 ((#\^) 1) | 137 ((#\^) 1) |
135 ((#\v) -1) | 138 ((#\v) -1) |
136 ((#\-) 0) | 139 ((#\-) 0) |
137 ((#\| #\o) c) | 140 ((#\| #\o) c) |
(...skipping 20 matching lines...) Expand all Loading... |
158 "Perform some sanity checks for harp pedals (7 pedals, divider after third)" | 161 "Perform some sanity checks for harp pedals (7 pedals, divider after third)" |
159 (let ((info (harp-pedal-info pedal-list))) | 162 (let ((info (harp-pedal-info pedal-list))) |
160 ; 7 pedals: | 163 ; 7 pedals: |
161 (if (not (equal? (car info) 7)) | 164 (if (not (equal? (car info) 7)) |
162 (ly:warning "Harp pedal diagram contains ~a pedals rather than the usual 7
." (car info))) | 165 (ly:warning "Harp pedal diagram contains ~a pedals rather than the usual 7
." (car info))) |
163 ; One divider after third pedal: | 166 ; One divider after third pedal: |
164 (if (null? (cdr info)) | 167 (if (null? (cdr info)) |
165 (ly:warning "Harp pedal diagram does not contain a divider (usually after
third pedal).") | 168 (ly:warning "Harp pedal diagram does not contain a divider (usually after
third pedal).") |
166 (if (not (equal? (cdr info) '(3))) | 169 (if (not (equal? (cdr info) '(3))) |
167 (ly:warning "Harp pedal diagram contains dividers at positions ~a. Norm
ally, there is only one divider after the third pedal." (cdr info)))))) | 170 (ly:warning "Harp pedal diagram contains dividers at positions ~a. Norm
ally, there is only one divider after the third pedal." (cdr info)))))) |
LEFT | RIGHT |