]> git.donarmstrong.com Git - lilypond.git/blob - scm/auto-beam.scm
patch::: 1.3.102.jcn1
[lilypond.git] / scm / auto-beam.scm
1 ;;;
2 ;;; auto-beam.scm -- Auto-beam settings
3 ;;;
4 ;;; source file of the GNU LilyPond music typesetter
5 ;;; 
6 ;;; (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
7 ;;;
8
9 ;;; setup for auto-beam engraver
10 ;;;
11 ;;; specify generic beam end times
12
13 ;;; format:
14 ;;;
15 ;;;     [time-signature]'beamAutoEnd'[duration]
16 ;;;
17 ;;; where
18 ;;;
19 ;;;     time-signature = 'time'[numerator]'_'denominator; eg: 3_4
20 ;;;     duration = [numerator]'_'denominator; eg: 3_8, _16
21 ;;;
22
23 ;;; in 3/2 time:
24 ;;;   end beams each 1/2 note
25 ;;;   end beams with 16th notes each 1/4 note
26 ;;;   end beams with 32th notes each 1/8 note
27
28
29 ;;;
30 ;;;UGH UGH. 
31 ;;;
32 ;;;Fixme: should use an alist
33 ;;;
34 ;;;autoBeamSettings = (list
35 ;;;  (cons (list (make-moment MEASURE) TIME-SIGNATURE) (make-moment INTERVAL)
36 ;;;  ..
37 ;;;
38 ;;;  )
39 ;;;
40 ;;;
41
42 (define auto-beam-settings
43   (list
44    `(
45      ((end * * 3 2) . ,(make-moment 1 2))
46      ((end 1 16 3 2) . ,(make-moment 1 4))
47      ((end 1 32 3 2) . ,(make-moment 1 8))
48
49      ((begin 1 8 3 4) . ,(make-moment 1 4))
50
51      ((end * * 3 4) . ,(make-moment 3 4))
52      ((begin 1 16 3 4) . ,(make-moment 1 16))
53      ((end 1 16 3 4) . ,(make-moment 1 4))
54      ;;((begin 1 32 3 4) . ,(make-moment 1 8))
55      ((end 1 32 3 4) . ,(make-moment 1 8))
56
57      ((begin 1 16 3 8) . ,(make-moment 1 8))
58      ((end * * 3 8) . ,(make-moment 3 8))
59
60      ;; in common time:
61      ;;   end beams each 1/2 note
62      ;;   end beams with 32th notes each 1/8 note
63      ;;   end beams with 1/8 triplets each 1/4 note
64
65      ((end * * 4 4) . ,(make-moment 1 2))
66      ((end 1 12 4 4) . ,(make-moment 1 4))
67      ((end 1 16 4 4) . ,(make-moment 1 4))
68      ((end 1 32 4 4) . ,(make-moment 1 8))
69
70      ((end * * 2 4) . ,(make-moment 1 4))
71      ((end 1 12 2 4) . ,(make-moment 1 4))
72      ((end 1 16 2 4) . ,(make-moment 1 4))
73      ((end 1 32 2 4) . ,(make-moment 1 8))
74
75
76      ((end * * 4 8) . ,(make-moment 1 4))
77      ((end 1 16 4 8) . ,(make-moment 1 4))
78      ((end 1 32 4 8) . ,(make-moment 1 8))
79
80      ((end * * 4 16) . ,(make-moment 1 8))
81
82      ((end * * 6 8) . ,(make-moment 3 8))
83      ((end 1 16 6 8) . ,(make-moment 3 8))
84      ((end 1 32 6 8) . ,(make-moment 1 8))
85
86      ((end * * 9 8) . ,(make-moment 3 8))
87      ((end 1 16 9 8) . ,(make-moment 3 8))
88      ((end 1 32 9 8) . ,(make-moment 1 8))
89
90      ((end * * 12 8) . ,(make-moment 3 8))
91      ((end 1 16 12 8) . ,(make-moment 3 8))
92      ((end 1 32 12 8) . ,(make-moment 1 8))
93      )))
94
95 ;;; Users may override in most cases, simply by issuing
96 ;;;
97 ;;;    ;;; from here on consider ending beam every 1/4 note
98 ;;;    \property Voice.beamAutoend1_1 = (make-moment 1 4)
99 ;;;
100 ;;;    ;;; no autobeaming
101 ;;;    \property Voice.beamAuto = f  
102 ;;;
103 ;;;or, more globally, by doing:
104 ;;;
105 ;;; \paper{
106 ;;;        \translator{
107 ;;;            \VoiceContext
108 ;;;            ;;; consider ending beam at every 1/2 note
109 ;;;            beamAutoend1_1 = (make-moment 1 2)
110 ;;;        }
111 ;;;    }
112 ;;;
113 ;;; see also input/test/auto-beam-override.ly
114