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