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