OLD | NEW |
1 ;; Accordion registration is tricky, partly because no two instruments | 1 ;; Accordion registration is tricky, partly because no two instruments |
2 ;; offer the same registers. In particular bass registers are not | 2 ;; offer the same registers. In particular bass registers are not |
3 ;; standardized at all and often left unspecified (orchestra scores | 3 ;; standardized at all and often left unspecified (orchestra scores |
4 ;; don't use bass notes anyway). | 4 ;; don't use bass notes anyway). |
5 ;; | 5 ;; |
6 ;; registration is indicated by using a control sequence name | 6 ;; registration is indicated by using a control sequence name |
7 ;; indicating the register set as either a markup function or a music | 7 ;; indicating the register set as either a markup function or a music |
8 ;; function, taking a string as argument. The music function is a | 8 ;; function, taking a string as argument. The music function is a |
9 ;; standalone music event since register changes usually occur before | 9 ;; standalone music event since register changes usually occur before |
10 ;; note onset. It is currently implemented as a text superscript on | 10 ;; note onset. It is currently implemented as a text superscript on |
11 ;; an empty chord but could conceivably become some kind of per-staff | 11 ;; an empty chord but could conceivably become some kind of per-staff |
12 ;; rehearsal mark at one point of time. | 12 ;; rehearsal mark at one point of time. |
13 | 13 |
14 (define-module (scm accreg)) | 14 (define-module (scm accreg)) |
15 | 15 |
16 (use-modules (lily) (srfi srfi-1) (ice-9 optargs)) | 16 (use-modules (lily) (srfi srfi-1) (ice-9 optargs)) |
17 | 17 |
18 (defmacro* define-register-set (set-symbol doc #:optional definition) | 18 (defmacro* define-register-set (set-symbol doc #:optional definition) |
19 "Defines markup command named with @var{set-symbol} for creating | 19 "Defines markup command named with @var{set-symbol} for creating |
20 accordion register markups as well as a music function of the same | 20 accordion register markups as well as a music function of the same |
21 name. | 21 name. |
22 | 22 |
23 @var{doc} is the optional documentation string followed by the actual | 23 @var{doc} is the optional documentation string followed by the actual |
24 @var{definition}. See existing definitions in @file{scm/accreg.scm} | 24 @var{definition}. See existing definitions in @file{scm/accreg.scm} |
25 for examples." | 25 for examples." |
26 `(begin | 26 `(begin |
27 (define-markup-command (,set-symbol layout props name) (string?) | 27 (define-markup-command-compilable (,set-symbol layout props name) (string?) |
28 #:properties (translate-scaled-markup) | 28 #:properties (translate-scaled-markup) |
29 #:category accordion-registers | 29 #:category accordion-registers |
30 ;; It would be nice to generate the documentation string | 30 ;; It would be nice to generate the documentation string |
31 ;; automatically containing all possible registrations but this | 31 ;; automatically containing all possible registrations but this |
32 ;; is a hen-and-egg problem. When the macro is being executed, | 32 ;; is a hen-and-egg problem. When the macro is being executed, |
33 ;; the register definition has not yet been evaluated. It | 33 ;; the register definition has not yet been evaluated. It |
34 ;; would be feasible to not ever evaluate it and consider it | 34 ;; would be feasible to not ever evaluate it and consider it |
35 ;; final. But that seems like a somewhat unfriendly interface. | 35 ;; final. But that seems like a somewhat unfriendly interface. |
36 ,(if definition doc "Undocumented.") | 36 ,(if definition doc "Undocumented.") |
37 (let* ((instrument ,(or definition doc)) | 37 (let* ((instrument ,(or definition doc)) |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 @end lilypond | 542 @end lilypond |
543 " | 543 " |
544 '((glyph . "accordion.freebass") | 544 '((glyph . "accordion.freebass") |
545 (reedbank | 545 (reedbank |
546 (L (dots (0 . 0.5))) | 546 (L (dots (0 . 0.5))) |
547 (M (dots (0 . 1.5)))) | 547 (M (dots (0 . 1.5)))) |
548 (register | 548 (register |
549 ("1" (reedbanks L)) | 549 ("1" (reedbanks L)) |
550 ("10" (reedbanks M)) | 550 ("10" (reedbanks M)) |
551 ("11" (reedbanks L M))))) | 551 ("11" (reedbanks L M))))) |
OLD | NEW |