summaryrefslogtreecommitdiff
path: root/ly/declarations-init.ly
blob: 5a322c2af7ac54496015b5da27c8dd9eb40b2278 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
\version "2.7.39"

%% < 1.8 compatibility switch
#(ly:set-option 'old-relative)

%% named durations
breve = #(ly:make-duration -1 0)
longa = #(ly:make-duration -2 0)
maxima = #(ly:make-duration -3 0)

\include "music-functions-init.ly"

%% default note names are dutch
\include "nederlands.ly"

\include "drumpitch-init.ly"		
\include "chord-modifiers-init.ly"
\include "script-init.ly"

% declarations for standard directions
left = #-1
right = #1
up = #1
down = #-1
start = #-1
stop = #1
smaller = #-1
bigger = #1
center = #0

%% FIXME
%% should also set allowBeamBreak, but how to do it "portably"? (ie. also
%% working with lyric sections)
%%
%% try \once \set Score.allowBeamBreak = ##t

%% rather name \newline, \pageBreak ?
break = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force)))
noBreak = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission '())))
pageBreak = #(make-event-chord (list
				(make-music 'LineBreakEvent 'break-permission 'force)
				(make-music 'PageBreakEvent 'break-permission 'force)))
noPageBreak = #(make-event-chord (list (make-music 'PageBreakEvent 'break-permission '())))
pageTurn = #(make-event-chord (list
				(make-music 'LineBreakEvent 'break-permission 'force)
				(make-music 'PageBreakEvent 'break-permission 'force)
				(make-music 'PageTurnEvent 'break-permission 'force)))
noPageTurn = #(make-event-chord (list (make-music 'PageTurnEvent 'break-permission '())))

stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP)))
startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START)))


%
% Code articulation definitions
%
noBeam = #(make-music 'BeamForbidEvent) 
pipeSymbol = #(make-music 'BarCheck)
bracketOpenSymbol = #(make-span-event 'BeamEvent START)
bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
tildeSymbol = #(make-music 'TieEvent)
parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
escapedBiggerSymbol = #(make-span-event 'DecrescendoEvent START)
escapedSmallerSymbol = #(make-span-event 'CrescendoEvent START)



\include "scale-definitions-init.ly"

melisma = #(make-span-event 'ManualMelismaEvent START)
melismaEnd = #(make-span-event 'ManualMelismaEvent STOP)
laissezVibrer = #(make-music 'LaissezVibrerEvent)
repeatTie = #(make-music 'RepeatTieEvent)
		  
\include "grace-init.ly"
\include "midi-init.ly"
\include "paper-defaults.ly"

\layout {
    mm = #(ly:output-def-lookup $defaultpaper 'mm)
    unit = #(ly:output-def-lookup $defaultpaper 'unit)

    in = #(* 25.4 mm)
    pt = #(/  in 72.27)
    cm = #(* 10 mm)
    
    \include "engraver-init.ly"

    #(set-paper-dimension-variables (current-module))
}

#(set-default-paper-size (ly:get-option 'paper-size))


partCombineListener = \layout {
    \context {
	\Voice
	\consists Note_heads_engraver
	\consists Rest_engraver
	\type "Recording_group_engraver"
	recordEventSequence = #notice-the-events-for-pc
    }
    \context {
	\Score
	skipTypesetting = ##t
	ignoreBarChecks = ##t 
    }
}

#(set-part-combine-listener partCombineListener)

\include "dynamic-scripts-init.ly"
\include "spanners-init.ly"
\include "property-init.ly"

setDefaultDurationToQuarter = { c4 }

%% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter.
#(define musicQuotes (make-hash-table 29))

#(define toplevel-book-handler print-book-with-defaults)
#(define toplevel-music-handler collect-music-for-book)
#(define toplevel-score-handler collect-scores-for-book)
#(define toplevel-text-handler collect-scores-for-book)