]> git.donarmstrong.com Git - lilypond.git/blob - ly/declarations-init.ly
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / ly / declarations-init.ly
1 \version "2.7.39"
2
3 %% < 1.8 compatibility switch
4 #(ly:set-option 'old-relative)
5
6 %% named durations
7 breve = #(ly:make-duration -1 0)
8 longa = #(ly:make-duration -2 0)
9 maxima = #(ly:make-duration -3 0)
10
11 \include "music-functions-init.ly"
12
13 %% default note names are dutch
14 \include "nederlands.ly"
15
16 \include "drumpitch-init.ly"            
17 \include "chord-modifiers-init.ly"
18 \include "script-init.ly"
19
20 % declarations for standard directions
21 left = #-1
22 right = #1
23 up = #1
24 down = #-1
25 start = #-1
26 stop = #1
27 smaller = #-1
28 bigger = #1
29 center = #0
30
31 %% FIXME
32 %% should also set allowBeamBreak, but how to do it "portably"? (ie. also
33 %% working with lyric sections)
34 %%
35 %% try \once \set Score.allowBeamBreak = ##t
36
37 %% rather name \newline, \pageBreak ?
38 break = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force)))
39 noBreak = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission '())))
40 pageBreak = #(make-event-chord (list
41                                 (make-music 'LineBreakEvent 'break-permission 'force)
42                                 (make-music 'PageBreakEvent 'break-permission 'force)))
43 noPageBreak = #(make-event-chord (list (make-music 'PageBreakEvent 'break-permission '())))
44 pageTurn = #(make-event-chord (list
45                                 (make-music 'LineBreakEvent 'break-permission 'force)
46                                 (make-music 'PageBreakEvent 'break-permission 'force)
47                                 (make-music 'PageTurnEvent 'break-permission 'force)))
48 noPageTurn = #(make-event-chord (list (make-music 'PageTurnEvent 'break-permission '())))
49
50 stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP)))
51 startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START)))
52
53
54 %
55 % Code articulation definitions
56 %
57 noBeam = #(make-music 'BeamForbidEvent) 
58 pipeSymbol = #(make-music 'BarCheck)
59 bracketOpenSymbol = #(make-span-event 'BeamEvent START)
60 bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
61 tildeSymbol = #(make-music 'TieEvent)
62 parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
63 parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
64 escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
65 escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
66 escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
67 escapedBiggerSymbol = #(make-span-event 'DecrescendoEvent START)
68 escapedSmallerSymbol = #(make-span-event 'CrescendoEvent START)
69
70
71
72 \include "scale-definitions-init.ly"
73
74 melisma = #(make-span-event 'ManualMelismaEvent START)
75 melismaEnd = #(make-span-event 'ManualMelismaEvent STOP)
76 laissezVibrer = #(make-music 'LaissezVibrerEvent)
77 repeatTie = #(make-music 'RepeatTieEvent)
78                   
79 \include "grace-init.ly"
80 \include "midi-init.ly"
81 \include "paper-defaults.ly"
82
83 \layout {
84     mm = #(ly:output-def-lookup $defaultpaper 'mm)
85     unit = #(ly:output-def-lookup $defaultpaper 'unit)
86
87     in = #(* 25.4 mm)
88     pt = #(/  in 72.27)
89     cm = #(* 10 mm)
90     
91     \include "engraver-init.ly"
92
93     #(set-paper-dimension-variables (current-module))
94 }
95
96 #(set-default-paper-size (ly:get-option 'paper-size))
97
98
99 partCombineListener = \layout {
100     \context {
101         \Voice
102         \consists Note_heads_engraver
103         \consists Rest_engraver
104         \type "Recording_group_engraver"
105         recordEventSequence = #notice-the-events-for-pc
106     }
107     \context {
108         \Score
109         skipTypesetting = ##t
110         ignoreBarChecks = ##t 
111     }
112 }
113
114 #(set-part-combine-listener partCombineListener)
115
116 \include "dynamic-scripts-init.ly"
117 \include "spanners-init.ly"
118 \include "property-init.ly"
119
120 setDefaultDurationToQuarter = { c4 }
121
122 %% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter.
123 #(define musicQuotes (make-hash-table 29))
124
125 #(define toplevel-book-handler print-book-with-defaults)
126 #(define toplevel-music-handler collect-music-for-book)
127 #(define toplevel-score-handler collect-scores-for-book)
128 #(define toplevel-text-handler collect-scores-for-book)
129