X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fdeclarations-init.ly;h=403bb0d01d8b24bddbfc9386f78153d728ea7547;hb=7d496a828e54ae3ecd0007094e845f1e7c52c5ca;hp=07ade937134ada971ee264d5e8d564b5309427a0;hpb=569f6d76cb725b6d99b4239719d453fdf232b9ab;p=lilypond.git diff --git a/ly/declarations-init.ly b/ly/declarations-init.ly index 07ade93713..403bb0d01d 100644 --- a/ly/declarations-init.ly +++ b/ly/declarations-init.ly @@ -1,124 +1,149 @@ +%%%% This file is part of LilyPond, the GNU music typesetter. +%%%% +%%%% Copyright (C) 1996--2010 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.12.0" + +%% < 1.8 compatibility switch #(ly:set-option 'old-relative) -\version "1.9.8" +%% 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 "music-functions-init.ly" +\include "toc-init.ly" + +\include "language-init.ly" +pitchnames = #default-language +#(ly:parser-set-note-names parser pitchnames) + +\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" -%{ +#(define default-fret-table (make-hash-table 101)) +#(define chord-shape-table (make-hash-table 29)) -should also set allowBeamBreak, but how to do it "portably"? (ie. also -working with lyric sections) +% 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-event-chord (list (make-music 'LineBreakEvent 'break-permission 'force))) +noBreak = #(make-event-chord (list (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))) + + +% +% 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) -%} -break =#(make-event-chord (list (make-penalty-music -10001))) -noBreak = #(make-event-chord (list (make-penalty-music 10001))) \include "scale-definitions-init.ly" -melisma = \property Staff.melismaBusy = ##t -melismaEnd = \property Staff.melismaBusy = ##f +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) \include "grace-init.ly" - -% ugh \include "midi-init.ly" +\include "paper-defaults-init.ly" +\layout { + mm = #(ly:output-def-lookup $defaultpaper 'mm) + unit = #(ly:output-def-lookup $defaultpaper 'unit) -% Do units first; must be done before any units are specified. -\paper { - unit = "mm" - mm = 1.0 - in = 25.4 + in = #(* 25.4 mm) pt = #(/ in 72.27) cm = #(* 10 mm) - texsetting = "" - pssetting = "" - scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"% UGH. - - - #(define font-defaults - '((font-family . music) - (font-shape . upright) - (baseline-skip . 2) - (word-space . 0.6) - (font-series . medium) - )) - \include "engraver-init.ly" -} - -#(set-paper-size "a4") - - -%{ - -; 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)) -} - -paperThirteen = \paper { - #(paper-set-staff-size (* 13.0 pt)) -} - -paperSixteen = \paper { - #(paper-set-staff-size (* 16.0 pt)) -} - -paperEightteen = \paper { - #(paper-set-staff-size (* 18.0 pt)) -} - -paperTwenty = \paper { - #(paper-set-staff-size (* 20.0 pt)) + #(set-paper-dimension-variables (current-module)) } -paperTwentythree = \paper { - #(paper-set-staff-size (* 23.0 pt)) -} +#(set-default-paper-size (ly:get-option 'paper-size)) -paperTwentysix = \paper { - #(paper-set-staff-size (* 26.0 pt)) +partCombineListener = \layout { + \context { + \Score + skipTypesetting = ##t + ignoreBarChecks = ##t + \alias "Timing" + } } -\paper { \paperTwenty } - \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)) +#(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) -% reset default duration -unusedEntry = \notes { c4 } +#(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!) -% music = "\melodic\relative c" +#(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) +\include "predefined-fretboards-init.ly"