]> git.donarmstrong.com Git - lilypond.git/blob - ly/declarations-init.ly
Reorganize language files and add a new \language command.
[lilypond.git] / ly / declarations-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 1996--2010 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.12.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 \include "language-init.ly"
33
34 \include "drumpitch-init.ly"
35 \include "chord-modifiers-init.ly"
36 \include "script-init.ly"
37
38 \include "chord-repetition-init.ly"
39
40 % declarations for standard directions
41 left = #-1
42 right = #1
43 up = #1
44 down = #-1
45 start = #-1
46 stop = #1
47 smaller = #-1
48 bigger = #1
49 center = #0
50
51 %% FIXME
52 %% should also set \override Beam #'breakable, but how to do it "portably"? (ie. also
53 %% working with lyric sections)
54 %%
55 %% try \once \override Score.Beam #'breakable = ##t
56
57 %% rather name \newline, \pageBreak ?
58 break = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force)))
59 noBreak = #(make-event-chord (list (make-music 'LineBreakEvent 'break-permission '())))
60 %% \pageBreak, \noPageBreak, \pageTurn, \noPageTurn, \allowPageTurn are defined
61 %% as music functions
62
63 stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP)))
64 startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START)))
65
66
67 %
68 % Code articulation definitions
69 %
70 noBeam = #(make-music 'BeamForbidEvent)
71 pipeSymbol = #(make-music 'BarCheck)
72 bracketOpenSymbol = #(make-span-event 'BeamEvent START)
73 bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
74 tildeSymbol = #(make-music 'TieEvent)
75 parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
76 parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
77 escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
78 escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
79 escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
80 escapedBiggerSymbol = #(make-span-event 'DecrescendoEvent START)
81 escapedSmallerSymbol = #(make-span-event 'CrescendoEvent START)
82
83
84 #(define default-fret-table (make-hash-table 100))
85 #(define chord-shape-table (make-hash-table 100))
86
87 \include "scale-definitions-init.ly"
88
89 melisma = #(context-spec-music (make-property-set 'melismaBusy #t) 'Bottom)
90 melismaEnd = #(context-spec-music (make-property-unset 'melismaBusy) 'Bottom)
91
92 laissezVibrer = #(make-music 'LaissezVibrerEvent)
93 repeatTie = #(make-music 'RepeatTieEvent)
94
95 \include "grace-init.ly"
96 \include "midi-init.ly"
97 \include "paper-defaults-init.ly"
98
99 \layout {
100     mm = #(ly:output-def-lookup $defaultpaper 'mm)
101     unit = #(ly:output-def-lookup $defaultpaper 'unit)
102
103     in = #(* 25.4 mm)
104     pt = #(/  in 72.27)
105     cm = #(* 10 mm)
106
107     \include "engraver-init.ly"
108
109     #(set-paper-dimension-variables (current-module))
110 }
111
112 #(set-default-paper-size (ly:get-option 'paper-size))
113
114 partCombineListener = \layout {
115     \context {
116         \Score
117         skipTypesetting = ##t
118         ignoreBarChecks = ##t
119         \alias "Timing"
120     }
121 }
122
123 \include "dynamic-scripts-init.ly"
124 \include "spanners-init.ly"
125 \include "property-init.ly"
126
127 setDefaultDurationToQuarter = { c4 }
128
129 %% MAKE-HASH-TABLE in GUILE 1.6 takes mandatory size parameter.
130 #(define musicQuotes (make-hash-table 29))
131
132 #(define toplevel-book-handler print-book-with-defaults)
133 #(define toplevel-bookpart-handler collect-bookpart-for-book)
134 #(define toplevel-music-handler collect-music-for-book)
135 #(define toplevel-score-handler collect-scores-for-book)
136 #(define toplevel-text-handler collect-scores-for-book)
137
138 #(define book-bookpart-handler ly:book-add-bookpart!)
139 #(define book-music-handler collect-book-music-for-book)
140 #(define book-score-handler ly:book-add-score!)
141 #(define book-text-handler ly:book-add-score!)
142
143 #(define bookpart-score-handler ly:book-add-score!)
144 #(define bookpart-text-handler ly:book-add-score!)
145 #(define bookpart-music-handler collect-book-music-for-book)
146
147 \include "predefined-fretboards-init.ly"