Add beaming rules (take 1)
[opus_libre.git] / lib / liblayout.scm
blob498ec9c7298883929eca2a7e6c4fb621882dd48f
1 ;------------------------------------------------------------------;
2 ; opus_libre -- liblayout.scm                                      ;
3 ;                                                                  ;
4 ; (c) 2008-2011 Valentin Villenave <valentin@villenave.net>        ;
5 ;                                                                  ;
6 ;     opus_libre is a free framework for GNU LilyPond: you may     ;
7 ; redistribute it and/or modify it under the terms of the GNU      ;
8 ; General Public License as published by the Free Software         ;
9 ; Foundation, either version 3 of the License, or (at your option) ;
10 ; any later version.                                               ;
11 ;     This program is distributed WITHOUT ANY WARRANTY; without    ;
12 ; even the implied warranty of MERCHANTABILITY or FITNESS FOR A    ;
13 ; PARTICULAR PURPOSE.  You should have received a copy of the GNU  ;
14 ; General Public License along with this program (typically in the ;
15 ; share/doc/ directory).  If not, see http://www.gnu.org/licenses/ ;
16 ;                                                                  ;
17 ;------------------------------------------------------------------;
20 ; Layout functions.
23 (define modern-accidentals-style
24   `(Staff ,(make-accidental-rule 'same-octave 0)
25           ,(make-accidental-rule 'any-octave 0)
26           ,(make-accidental-rule 'same-octave 1)
27           ,neo-modern-accidental-rule))
29 (define modern-cautionaries-style
30   `(Staff ,(make-accidental-rule 'same-octave 1)
31           ,(make-accidental-rule 'any-octave 1)))
33 (define modern-script-alist
34   (let* ((new-alist default-script-alist)
35          (set-prio! (lambda (script prio) (assoc-set! new-alist script
36                               (acons 
37                                     'script-priority prio
38                                      (assoc-get script default-script-alist))))))
39      ;(set-prio! "staccato" -100)
40      (set-prio! "accent" -105)
41      (set-prio! "tenuto" -110)
42      new-alist))
44 (define modern-time-signature-settings
45   (append default-time-signature-settings
46     '(
47       ((3 . 16) .
48                 ((beamExceptions . ((end . (((1 . 16) . (3))))))))
49       ((7 . 16) .
50                 ((baseMoment . (1 . 16))
51                  (beatStructure . (4 3)))))))