]> git.donarmstrong.com Git - lilypond.git/blob - ly/declarations-init.ly
Issue #768: Chord repetition shortcut
[lilypond.git] / ly / declarations-init.ly
1 \version "2.12.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 \include "chord-repetition-init.ly"
23
24 % declarations for standard directions
25 left = #-1
26 right = #1
27 up = #1
28 down = #-1
29 start = #-1
30 stop = #1
31 smaller = #-1
32 bigger = #1
33 center = #0
34
35 %% FIXME
36 %% should also set \override Beam #'breakable, but how to do it "portably"? (ie. also
37 %% working with lyric sections)
38 %%
39 %% try \once \override Score.Beam #'breakable = ##t
40
41 %% rather name \newline, \pageBreak ?
42 break = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force)))
43 noBreak = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission '())))
44 %% \pageBreak, \noPageBreak, \pageTurn, \noPageTurn, \allowPageTurn are defined
45 %% as music functions
46
47 stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP)))
48 startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START)))
49
50
51 %
52 % Code articulation definitions
53 %
54 noBeam = #(make-music 'BeamForbidEvent) 
55 pipeSymbol = #(make-music 'BarCheck)
56 bracketOpenSymbol = #(make-span-event 'BeamEvent START)
57 bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
58 tildeSymbol = #(make-music 'TieEvent)
59 parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
60 parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
61 escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
62 escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
63 escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
64 escapedBiggerSymbol = #(make-span-event 'DecrescendoEvent START)
65 escapedSmallerSymbol = #(make-span-event 'CrescendoEvent START)
66
67
68 #(define fretboard-table (make-hash-table 100))
69 #(define chord-shape-table (make-hash-table 100))
70
71 \include "scale-definitions-init.ly"
72
73 melisma = #(context-spec-music (make-property-set 'melismaBusy #t) 'Bottom)
74 melismaEnd = #(context-spec-music (make-property-unset 'melismaBusy) 'Bottom)
75
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-init.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 partCombineListener = \layout {
99     \context {
100         \Score
101         skipTypesetting = ##t
102         ignoreBarChecks = ##t
103         \alias "Timing"
104     }
105 }
106
107 \include "dynamic-scripts-init.ly"
108 \include "spanners-init.ly"
109 \include "property-init.ly"
110
111 setDefaultDurationToQuarter = { c4 }
112
113 %% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter.
114 #(define musicQuotes (make-hash-table 29))
115
116 #(define toplevel-book-handler print-book-with-defaults)
117 #(define toplevel-bookpart-handler collect-bookpart-for-book)
118 #(define toplevel-music-handler collect-music-for-book)
119 #(define toplevel-score-handler collect-scores-for-book)
120 #(define toplevel-text-handler collect-scores-for-book)
121
122 #(define book-bookpart-handler ly:book-add-bookpart!)
123 #(define book-music-handler collect-book-music-for-book)
124 #(define book-score-handler ly:book-add-score!)
125 #(define book-text-handler ly:book-add-score!)
126
127 #(define bookpart-score-handler ly:book-add-score!)
128 #(define bookpart-text-handler ly:book-add-score!)
129 #(define bookpart-music-handler collect-book-music-for-book)
130
131 \include "predefined-fretboards-init.ly"