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) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 ;;;; | 5 ;;;; |
6 ;;;; LilyPond is free software: you can redistribute it and/or modify | 6 ;;;; LilyPond is free software: you can redistribute it and/or modify |
7 ;;;; it under the terms of the GNU General Public License as published by | 7 ;;;; it under the terms of the GNU General Public License as published by |
8 ;;;; the Free Software Foundation, either version 3 of the License, or | 8 ;;;; the Free Software Foundation, either version 3 of the License, or |
9 ;;;; (at your option) any later version. | 9 ;;;; (at your option) any later version. |
10 ;;;; | 10 ;;;; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 (refp (ly:grob-common-refpoint grob dad Y)) | 152 (refp (ly:grob-common-refpoint grob dad Y)) |
153 (stem_ph (ly:grob-pure-height dad refp 0 1000000)) | 153 (stem_ph (ly:grob-pure-height dad refp 0 1000000)) |
154 (my_ph (ly:grob-pure-height grob refp 0 1000000)) | 154 (my_ph (ly:grob-pure-height grob refp 0 1000000)) |
155 ;; only account for distance if stem is on different staff than stu
b | 155 ;; only account for distance if stem is on different staff than stu
b |
156 (dist (if (grob::has-interface refp 'hara-kiri-group-spanner-interf
ace) | 156 (dist (if (grob::has-interface refp 'hara-kiri-group-spanner-interf
ace) |
157 0 | 157 0 |
158 (- (car my_ph) (car stem_ph))))) | 158 (- (car my_ph) (car stem_ph))))) |
159 (if (interval-empty? (interval-intersection stem_ph my_ph)) #f (coord-tr
anslate stem_ph dist))) | 159 (if (interval-empty? (interval-intersection stem_ph my_ph)) #f (coord-tr
anslate stem_ph dist))) |
160 #f)) | 160 #f)) |
161 | 161 |
| 162 ;; FIXME: NEED TO FIND A BETTER WAY TO HANDLE KIEVAN NOTATION |
162 (define-public (note-head::calc-duration-log grob) | 163 (define-public (note-head::calc-duration-log grob) |
163 (min 2 | 164 (let ((style (ly:grob-property grob 'style))) |
164 (ly:duration-log | 165 (if (and (symbol? style) (string-match "kievan*" (symbol->string style))) |
165 » (ly:event-property (event-cause grob) 'duration)))) | 166 (min 3 |
| 167 (ly:duration-log |
| 168 » (ly:event-property (event-cause grob) 'duration))) |
| 169 (min 2 |
| 170 » (ly:duration-log |
| 171 » (ly:event-property (event-cause grob) 'duration)))))) |
166 | 172 |
167 (define-public (dots::calc-dot-count grob) | 173 (define-public (dots::calc-dot-count grob) |
168 (ly:duration-dot-count | 174 (ly:duration-dot-count |
169 (ly:event-property (event-cause grob) 'duration))) | 175 (ly:event-property (event-cause grob) 'duration))) |
170 | 176 |
171 (define-public (dots::calc-staff-position grob) | 177 (define-public (dots::calc-staff-position grob) |
172 (let* ((head (ly:grob-parent grob Y)) | 178 (let* ((head (ly:grob-parent grob Y)) |
173 (log (ly:grob-property head 'duration-log))) | 179 (log (ly:grob-property head 'duration-log))) |
174 | 180 |
175 (cond | 181 (cond |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ((blackpetrucci) | 225 ((blackpetrucci) |
220 (if (< log 0) | 226 (if (< log 0) |
221 (string-append (number->string log) "blackmensural") | 227 (string-append (number->string log) "blackmensural") |
222 (string-append (number->string log) (symbol->string style)))) | 228 (string-append (number->string log) (symbol->string style)))) |
223 ((semipetrucci) | 229 ((semipetrucci) |
224 (if (< log 0) | 230 (if (< log 0) |
225 (string-append (number->string log) "semimensural") | 231 (string-append (number->string log) "semimensural") |
226 (string-append (number->string log) "petrucci"))) | 232 (string-append (number->string log) "petrucci"))) |
227 ((neomensural) | 233 ((neomensural) |
228 (string-append (number->string log) (symbol->string style))) | 234 (string-append (number->string log) (symbol->string style))) |
| 235 ((kievan) |
| 236 (string-append (number->string log) "kievan")) |
229 (else | 237 (else |
230 (if (string-match "vaticana*|hufnagel*|medicaea*" (symbol->string style)) | 238 (if (string-match "vaticana*|hufnagel*|medicaea*" (symbol->string style)) |
231 (symbol->string style) | 239 (symbol->string style) |
232 (string-append (number->string (max 0 log)) | 240 (string-append (number->string (max 0 log)) |
233 (symbol->string style)))))) | 241 (symbol->string style)))))) |
234 | 242 |
235 (define-public (note-head::calc-glyph-name grob) | 243 (define-public (note-head::calc-glyph-name grob) |
236 (let ((style (ly:grob-property grob 'style)) | 244 (let* ((style (ly:grob-property grob 'style)) |
237 » (log (min 2 (ly:grob-property grob 'duration-log)))) | 245 » (log (if (string-match "kievan*" (symbol->string style)) |
238 | 246 » » (min 3 (ly:grob-property grob 'duration-log)) |
| 247 » » (min 2 (ly:grob-property grob 'duration-log))))) |
239 (select-head-glyph style log))) | 248 (select-head-glyph style log))) |
240 | 249 |
241 (define-public (note-head::brew-ez-stencil grob) | 250 (define-public (note-head::brew-ez-stencil grob) |
242 (let* ((log (ly:grob-property grob 'duration-log)) | 251 (let* ((log (ly:grob-property grob 'duration-log)) |
243 (pitch (ly:event-property (event-cause grob) 'pitch)) | 252 (pitch (ly:event-property (event-cause grob) 'pitch)) |
244 (pitch-index (ly:pitch-notename pitch)) | 253 (pitch-index (ly:pitch-notename pitch)) |
245 (note-names (ly:grob-property grob 'note-names)) | 254 (note-names (ly:grob-property grob 'note-names)) |
246 (pitch-string (if (and (vector? note-names) | 255 (pitch-string (if (and (vector? note-names) |
247 (> (vector-length note-names) pitch-index)) | 256 (> (vector-length note-names) pitch-index)) |
248 (vector-ref note-names pitch-index) | 257 (vector-ref note-names pitch-index) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 390 |
382 ;; segno bar lines | 391 ;; segno bar lines |
383 ("S" . ("||" . "S")) | 392 ("S" . ("||" . "S")) |
384 ("|S" . ("|" . "S")) | 393 ("|S" . ("|" . "S")) |
385 ("S|" . ("S" . ())) | 394 ("S|" . ("S" . ())) |
386 (":|S" . (":|" . "S")) | 395 (":|S" . (":|" . "S")) |
387 (":|S." . (":|S" . ())) | 396 (":|S." . (":|S" . ())) |
388 ("S|:" . ("S" . "|:")) | 397 ("S|:" . ("S" . "|:")) |
389 (".S|:" . ("|" . "S|:")) | 398 (".S|:" . ("|" . "S|:")) |
390 (":|S|:" . (":|" . "S|:")) | 399 (":|S|:" . (":|" . "S|:")) |
391 (":|S.|:" . (":|S" . "|:")))) | 400 (":|S.|:" . (":|S" . "|:")) |
| 401 |
| 402 ;; ancient bar lines |
| 403 ("kievan" . ("kievan" . "")))) |
392 | 404 |
393 (define-public (bar-line::calc-glyph-name grob) | 405 (define-public (bar-line::calc-glyph-name grob) |
394 (let* ((glyph (ly:grob-property grob 'glyph)) | 406 (let* ((glyph (ly:grob-property grob 'glyph)) |
395 (dir (ly:item-break-dir grob)) | 407 (dir (ly:item-break-dir grob)) |
396 (result (assoc-get glyph bar-glyph-alist)) | 408 (result (assoc-get glyph bar-glyph-alist)) |
397 (glyph-name (if (= dir CENTER) | 409 (glyph-name (if (= dir CENTER) |
398 glyph | 410 glyph |
399 (if (and result | 411 (if (and result |
400 (string? (index-cell result dir))) | 412 (string? (index-cell result dir))) |
401 (index-cell result dir) | 413 (index-cell result dir) |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 (define-public alteration-vaticana-glyph-name-alist | 683 (define-public alteration-vaticana-glyph-name-alist |
672 '((-1/2 . "accidentals.vaticanaM1") | 684 '((-1/2 . "accidentals.vaticanaM1") |
673 (0 . "accidentals.vaticana0") | 685 (0 . "accidentals.vaticana0") |
674 (1/2 . "accidentals.mensural1"))) | 686 (1/2 . "accidentals.mensural1"))) |
675 | 687 |
676 (define-public alteration-mensural-glyph-name-alist | 688 (define-public alteration-mensural-glyph-name-alist |
677 '((-1/2 . "accidentals.mensuralM1") | 689 '((-1/2 . "accidentals.mensuralM1") |
678 (0 . "accidentals.vaticana0") | 690 (0 . "accidentals.vaticana0") |
679 (1/2 . "accidentals.mensural1"))) | 691 (1/2 . "accidentals.mensural1"))) |
680 | 692 |
| 693 (define-public alteration-kievan-glyph-name-alist |
| 694 '((-1/2 . "accidentals.kievanM1") |
| 695 (1/2 . "accidentals.kievan1"))) |
681 | 696 |
682 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 697 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
683 ;; * Pitch Trill Heads | 698 ;; * Pitch Trill Heads |
684 ;; * Parentheses | 699 ;; * Parentheses |
685 | 700 |
686 (define-public (parentheses-item::calc-parenthesis-stencils grob) | 701 (define-public (parentheses-item::calc-parenthesis-stencils grob) |
687 (let* ((font (ly:grob-default-font grob)) | 702 (let* ((font (ly:grob-default-font grob)) |
688 (lp (ly:font-get-glyph font "accidentals.leftparen")) | 703 (lp (ly:font-get-glyph font "accidentals.leftparen")) |
689 (rp (ly:font-get-glyph font "accidentals.rightparen"))) | 704 (rp (ly:font-get-glyph font "accidentals.rightparen"))) |
690 | 705 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 (list))))) | 1107 (list))))) |
1093 | 1108 |
1094 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1109 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1095 ;; laissez-vibrer tie | 1110 ;; laissez-vibrer tie |
1096 ;; | 1111 ;; |
1097 ;; needed so we can make laissez-vibrer a pure print | 1112 ;; needed so we can make laissez-vibrer a pure print |
1098 ;; | 1113 ;; |
1099 (define-public (laissez-vibrer::print grob) | 1114 (define-public (laissez-vibrer::print grob) |
1100 (ly:tie::print grob)) | 1115 (ly:tie::print grob)) |
1101 | 1116 |
LEFT | RIGHT |