]> git.donarmstrong.com Git - lilypond.git/blob - ly/declarations-init.ly
Imported Upstream version 2.14.2
[lilypond.git] / ly / declarations-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 %%%%                          Jan Nieuwenhuizen <janneke@gnu.org>
5 %%%%
6 %%%% LilyPond is free software: you can redistribute it and/or modify
7 %%%% it under the terms of the GNU General Public License as published by
8 %%%% the Free Software Foundation, either version 3 of the License, or
9 %%%% (at your option) any later version.
10 %%%%
11 %%%% LilyPond is distributed in the hope that it will be useful,
12 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
13 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 %%%% GNU General Public License for more details.
15 %%%%
16 %%%% You should have received a copy of the GNU General Public License
17 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 \version "2.14.0"
20
21 %% < 1.8 compatibility switch
22 #(ly:set-option 'old-relative)
23
24 %% named durations
25 breve = #(ly:make-duration -1 0)
26 longa = #(ly:make-duration -2 0)
27 maxima = #(ly:make-duration -3 0)
28
29 \include "music-functions-init.ly"
30 \include "toc-init.ly"
31
32 %% default note names are dutch
33 #(set! default-language "nederlands")
34 #(note-names-language parser default-language)
35
36 \include "drumpitch-init.ly"
37 \include "chord-modifiers-init.ly"
38 \include "script-init.ly"
39
40 \include "chord-repetition-init.ly"
41
42 #(define default-fret-table (make-hash-table 101))
43 #(define chord-shape-table (make-hash-table 29))
44
45 % declarations for standard directions
46 left = #-1
47 right = #1
48 up = #1
49 down = #-1
50 start = #-1
51 stop = #1
52 smaller = #-1
53 bigger = #1
54 center = #0
55
56 %% FIXME
57 %% should also set \override Beam #'breakable, but how to do it "portably"? (ie. also
58 %% working with lyric sections)
59 %%
60 %% try \once \override Score.Beam #'breakable = ##t
61
62 %% rather name \newline, \pageBreak ?
63 break = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force)))
64 noBreak = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission '())))
65 %% \pageBreak, \noPageBreak, \pageTurn, \noPageTurn, \allowPageTurn are defined
66 %% as music functions
67
68 stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP)))
69 startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START)))
70
71
72 %
73 % Code articulation definitions
74 %
75 noBeam = #(make-music 'BeamForbidEvent)
76 pipeSymbol = #(make-music 'BarCheck)
77 bracketOpenSymbol = #(make-span-event 'BeamEvent START)
78 bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
79 tildeSymbol = #(make-music 'TieEvent)
80 parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
81 parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
82 escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
83 escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
84 escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
85 escapedBiggerSymbol = #(make-span-event 'DecrescendoEvent START)
86 escapedSmallerSymbol = #(make-span-event 'CrescendoEvent START)
87
88
89 \include "scale-definitions-init.ly"
90
91 melisma = #(context-spec-music (make-property-set 'melismaBusy #t) 'Bottom)
92 melismaEnd = #(context-spec-music (make-property-unset 'melismaBusy) 'Bottom)
93
94 laissezVibrer = #(make-music 'LaissezVibrerEvent)
95 repeatTie = #(make-music 'RepeatTieEvent)
96
97 \include "dynamic-scripts-init.ly"
98 \include "spanners-init.ly"
99
100 %% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter.
101 #(define musicQuotes (make-hash-table 29))
102
103 #(define toplevel-book-handler print-book-with-defaults)
104 #(define toplevel-bookpart-handler collect-bookpart-for-book)
105 #(define toplevel-music-handler collect-music-for-book)
106 #(define toplevel-score-handler collect-scores-for-book)
107 #(define toplevel-text-handler collect-scores-for-book)
108
109 #(define book-bookpart-handler ly:book-add-bookpart!)
110 #(define book-music-handler collect-book-music-for-book)
111 #(define book-score-handler ly:book-add-score!)
112 #(define book-text-handler ly:book-add-score!)
113
114 #(define bookpart-score-handler ly:book-add-score!)
115 #(define bookpart-text-handler ly:book-add-score!)
116 #(define bookpart-music-handler collect-book-music-for-book)
117
118 \include "predefined-fretboards-init.ly"
119 \include "string-tunings-init.ly"
120 \include "property-init.ly"
121
122 \include "grace-init.ly"
123 \include "midi-init.ly"
124 \include "paper-defaults-init.ly"
125
126 \layout {
127     mm = #(ly:output-def-lookup $defaultpaper 'mm)
128     unit = #(ly:output-def-lookup $defaultpaper 'unit)
129
130     in = #(* 25.4 mm)
131     pt = #(/  in 72.27)
132     cm = #(* 10 mm)
133
134     \include "engraver-init.ly"
135
136     #(set-paper-dimension-variables (current-module))
137 }
138
139 #(set-default-paper-size (ly:get-option 'paper-size))
140 partCombineListener = \layout {
141     \context {
142         \Score
143         skipTypesetting = ##t
144         ignoreBarChecks = ##t
145         \alias "Timing"
146     }
147 }
148
149 setDefaultDurationToQuarter = { c4 }
150
151
152