X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fdeclarations-init.ly;h=f3f5eef6689e383abf610af6aad1af062c055afc;hb=3852b13cd07997ca007f51fc5c42d0d3630c8453;hp=26d8cc733c21eaf82942364a388a89c85b330643;hpb=145e00c60212ec6da3c52351418822e766b1daf9;p=lilypond.git diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 26d8cc733c..f3f5eef668 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -1,147 +1,160 @@ -#(ly:set-option 'old-relative) - -\version "2.1.36" +%%%% This file is part of LilyPond, the GNU music typesetter. +%%%% +%%%% Copyright (C) 1996--2012 Han-Wen Nienhuys +%%%% Jan Nieuwenhuizen +%%%% +%%%% LilyPond is free software: you can redistribute it and/or modify +%%%% it under the terms of the GNU General Public License as published by +%%%% the Free Software Foundation, either version 3 of the License, or +%%%% (at your option) any later version. +%%%% +%%%% LilyPond is distributed in the hope that it will be useful, +%%%% but WITHOUT ANY WARRANTY; without even the implied warranty of +%%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +%%%% GNU General Public License for more details. +%%%% +%%%% You should have received a copy of the GNU General Public License +%%%% along with LilyPond. If not, see . + +\version "2.17.25" + +%% named durations breve = #(ly:make-duration -1 0) -longa = #(ly:make-duration -2 0 ) +longa = #(ly:make-duration -2 0) maxima = #(ly:make-duration -3 0) -\include "nederlands.ly" % dutch -\include "drumpitch-init.ly" +\include "music-functions-init.ly" +\include "toc-init.ly" + +%% default note names are dutch +#(set! default-language "nederlands") +#(note-names-language parser default-language) + +\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 - -%{ +\include "chord-repetition-init.ly" -should also set allowBeamBreak, but how to do it "portably"? (ie. also -working with lyric sections) +#(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))) -%} -break =#(make-event-chord (list (make-penalty-music -10001))) -noBreak = #(make-event-chord (list (make-penalty-music 10001))) +% 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 \override Beam.breakable, but how to do it "portably"? (ie. also +%% working with lyric sections) +%% +%% try \once \override Score.Beam.breakable = ##t + +%% rather name \newline, \pageBreak ? +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-span-event 'StaffSpanEvent STOP) +startStaff = #(make-span-event 'StaffSpanEvent START) + + +% +% Code articulation definitions +% +noBeam = #(make-music 'BeamForbidEvent) +"|" = #(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) -noBeam = #(make-music 'BeamForbidEvent) -pipeSymbol = #(make-music 'BarCheck) \include "scale-definitions-init.ly" -melisma = #(make-span-event 'ManualMelismaEvent START) -melismaEnd = #(make-span-event 'ManualMelismaEvent STOP) - -\include "grace-init.ly" - -% ugh -\include "midi-init.ly" - - -% Do units first; must be done before any units are specified. -\paper { - unit = #(ly:unit) - mm = 1.0 - in = 25.4 - pt = #(/ in 72.27) - cm = #(* 10 mm) - - inputencoding = #"TeX" - raggedright = ##f - raggedlast = ##f - packed = ##f - - #(define $is-paper #t) - - #(define font-defaults - '((font-encoding . fetaMusic)) - ) - - #(define text-font-defaults - '((font-encoding . latin1) - (baseline-skip . 2) - (word-space . 0.6) - )) - - #(define page-breaking ly:ragged-page-breaks) - %#(define page-breaking ly:optimal-page-breaks) - - \include "engraver-init.ly" -} - -#(set-default-paper-size "a4") - +melisma = #(context-spec-music (make-property-set 'melismaBusy #t) 'Bottom) +melismaEnd = #(context-spec-music (make-property-unset 'melismaBusy) 'Bottom) -%{ +laissezVibrer = #(make-music 'LaissezVibrerEvent) +repeatTie = #(make-music 'RepeatTieEvent) -; note: -; you can add fonts manually in the paper block by issuing - -#(set! fonts (append ...myfonts... fonts)) - -for the format of myfonts, see font.scm - -%} - -paperEleven = \paper { - #(paper-set-staff-size (* 11.0 pt)) -} +\include "dynamic-scripts-init.ly" +\include "spanners-init.ly" -paperThirteen = \paper { - #(paper-set-staff-size (* 13.0 pt)) -} +%% 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) +#(define toplevel-music-handler collect-music-for-book) +#(define toplevel-score-handler collect-scores-for-book) +#(define toplevel-text-handler collect-scores-for-book) + +#(define book-bookpart-handler ly:book-add-bookpart!) +#(define book-music-handler collect-book-music-for-book) +#(define book-score-handler ly:book-add-score!) +#(define book-text-handler ly:book-add-score!) + +#(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" -paperSixteen = \paper { - #(paper-set-staff-size (* 16.0 pt)) -} +\include "grace-init.ly" +\include "midi-init.ly" +\include "paper-defaults-init.ly" +\include "context-mods-init.ly" -paperEightteen = \paper { - #(paper-set-staff-size (* 18.0 pt)) -} +\layout { + mm = #(ly:output-def-lookup $defaultpaper 'mm) + unit = #(ly:output-def-lookup $defaultpaper 'unit) -paperTwenty = \paper { - #(paper-set-staff-size (* 20.0 pt)) -} + in = #(* 25.4 mm) + pt = #(/ in 72.27) + cm = #(* 10 mm) -paperTwentythree = \paper { - #(paper-set-staff-size (* 23.0 pt)) -} + \include "engraver-init.ly" -paperTwentysix = \paper { - #(paper-set-staff-size (* 26.0 pt)) + #(set-paper-dimension-variables (current-module)) } -\paper { \paperTwenty } - -partCombineListener = \paper { - \context { - \VoiceContext - \consists Note_heads_engraver - \consists Rest_engraver - \type "Recording_group_engraver" - recordEventSequence = #notice-the-events-for-pc - } - \context { \ScoreContext skipTypesetting = ##t } +#(set-default-paper-size (ly:get-option 'paper-size)) +partCombineListener = \layout { + \context { + \Score + skipTypesetting = ##t + ignoreBarChecks = ##t + \alias "Timing" + } } -#(set-part-combine-listener partCombineListener) - -\include "dynamic-scripts-init.ly" -\include "spanners-init.ly" - -\include "property-init.ly" - - - -% reset default duration -unusedEntry = \notes { c4 } - - -% must have size argument for GUILE 1.6 compat. -#(define musicQuotes (make-hash-table 29)) +setDefaultDurationToQuarter = { c4 }