X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fdeclarations-init.ly;h=89a9a893dc49bb8081aaa9d3e84d5e7c68951595;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=08ff4d21a39f923ec02ef0a6a2845a23c57f68b2;hpb=75cdeeefba1e4762a29b5f418b8d6294a0eba18e;p=lilypond.git diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 08ff4d21a3..89a9a893dc 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -1,6 +1,6 @@ %%%% This file is part of LilyPond, the GNU music typesetter. %%%% -%%%% Copyright (C) 1996--2010 Han-Wen Nienhuys +%%%% Copyright (C) 1996--2015 Han-Wen Nienhuys %%%% Jan Nieuwenhuizen %%%% %%%% LilyPond is free software: you can redistribute it and/or modify @@ -16,10 +16,7 @@ %%%% You should have received a copy of the GNU General Public License %%%% along with LilyPond. If not, see . -\version "2.12.0" - -%% < 1.8 compatibility switch -#(ly:set-option 'old-relative) +\version "2.17.25" %% named durations breve = #(ly:make-duration -1 0) @@ -41,6 +38,10 @@ maxima = #(ly:make-duration -3 0) #(define default-fret-table (make-hash-table 101)) #(define chord-shape-table (make-hash-table 29)) +#(call-after-session + (lambda () + (hash-clear! default-fret-table) + (hash-clear! chord-shape-table))) % declarations for standard directions left = #-1 @@ -54,36 +55,40 @@ bigger = #1 center = #0 %% FIXME -%% should also set \override Beam #'breakable, but how to do it "portably"? (ie. also +%% should also set \override Beam.breakable, but how to do it "portably"? (ie. also %% working with lyric sections) %% -%% try \once \override Score.Beam #'breakable = ##t +%% try \once \override Score.Beam.breakable = ##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 '()))) +break = #(make-music 'LineBreakEvent 'break-permission 'force) +noBreak = #(make-music 'LineBreakEvent 'break-permission '()) %% \pageBreak, \noPageBreak, \pageTurn, \noPageTurn, \allowPageTurn are defined %% as music functions -stopStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent STOP))) -startStaff = #(make-event-chord (list (make-span-event 'StaffSpanEvent START))) +stopStaff = #(make-span-event 'StaffSpanEvent STOP) +startStaff = #(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) +"|" = #(make-music 'BarCheck) +"[" = #(make-span-event 'BeamEvent START) +"]" = #(make-span-event 'BeamEvent STOP) +"~" = #(make-music 'TieEvent) +"(" = #(make-span-event 'SlurEvent START) +")" = #(make-span-event 'SlurEvent STOP) +"\\!" = #(make-span-event 'CrescendoEvent STOP) +"\\(" = #(make-span-event 'PhrasingSlurEvent START) +"\\)" = #(make-span-event 'PhrasingSlurEvent STOP) +"\\>" = #(make-span-event 'DecrescendoEvent START) +"\\<" = #(make-span-event 'CrescendoEvent START) +"\\[" = #(make-span-event 'LigatureEvent START) +"\\]" = #(make-span-event 'LigatureEvent STOP) +"\\~" = #(make-music 'PesOrFlexaEvent) +"\\\\" = #(make-music 'VoiceSeparator) \include "scale-definitions-init.ly" @@ -94,42 +99,14 @@ melismaEnd = #(context-spec-music (make-property-unset 'melismaBusy) 'Bottom) laissezVibrer = #(make-music 'LaissezVibrerEvent) repeatTie = #(make-music 'RepeatTieEvent) -\include "grace-init.ly" -\include "midi-init.ly" -\include "paper-defaults-init.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 { - \Score - skipTypesetting = ##t - ignoreBarChecks = ##t - \alias "Timing" - } -} - \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)) +#(call-after-session + (lambda () + (hash-clear! musicQuotes))) #(define toplevel-book-handler print-book-with-defaults) #(define toplevel-bookpart-handler collect-bookpart-for-book) @@ -145,5 +122,39 @@ setDefaultDurationToQuarter = { c4 } #(define bookpart-score-handler ly:book-add-score!) #(define bookpart-text-handler ly:book-add-score!) #(define bookpart-music-handler collect-book-music-for-book) +#(define output-def-music-handler context-defs-from-music) +#(define context-mod-music-handler context-mod-from-music) \include "predefined-fretboards-init.ly" +\include "string-tunings-init.ly" +\include "property-init.ly" + +\include "grace-init.ly" +\include "midi-init.ly" +\include "paper-defaults-init.ly" +\include "context-mods-init.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 { + \Score + skipTypesetting = ##t + ignoreBarChecks = ##t + \alias "Timing" + } +} + +setDefaultDurationToQuarter = { c4 }