From 7567c353ce3a2625d32d3427e414f1f037079327 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Fri, 2 Oct 2009 18:26:35 +0200 Subject: [PATCH] Whitespace: remove trailing spaces --- orchestrallily.ily | 189 ++++++++++++++++++++++++++--------------------------- 1 file changed, 94 insertions(+), 95 deletions(-) diff --git a/orchestrallily.ily b/orchestrallily.ily index dac2121..db0eca5 100644 --- a/orchestrallily.ily +++ b/orchestrallily.ily @@ -122,7 +122,7 @@ conditionalBreak = #(define-music-function (parser location) () ; Percussion ("Perc" "StaffGroup" ("Tim")) -; Strings, they are the same in long and short full score +; Strings, they are the same in long and short full score ("V" "GrandStaff" ("VI" "VII")) ("Str" "StaffGroup" ("V" "Va")) ("VceB" "StaffGroup" ("Vc" "Cb" "VcB")) @@ -141,7 +141,7 @@ conditionalBreak = #(define-music-function (parser location) () ;("Organ" "SimultaneousMusic" ("BCFb" "O")) ("Organ" "ParallelVoicesStaff" ("BCFb" "BC" "FiguredBass")) ("Continuo" "ParallelVoicesStaff" ("BCFb" "BC" "FiguredBass")) - + ("Pfe" "PianoStaff" ("PfeI" "PfeII")) ("O" "PianoStaff" ("OI" "OII")) ("OI" "ParallelVoicesStaff" ("OIa" "OIb")) @@ -182,7 +182,7 @@ conditionalBreak = #(define-music-function (parser location) () (map oly:remove_from_score_structure entry) (set! oly:orchestral_score_structure (assoc-remove! oly:orchestral_score_structure entry)))) -orchestralScoreStructure = #(define-music-function (parser location structure) (list?) +orchestralScoreStructure = #(define-music-function (parser location structure) (list?) (oly:set_score_structure structure) (make-music 'Music 'void #t) ) @@ -206,7 +206,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) % Automatic staff and group generation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% Retrieve all music definitions for the given +% Retrieve all music definitions for the given #(define (oly:get_music_object piece instrument) (namedPieceInstrObject piece instrument "Music") ) @@ -214,16 +214,16 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (filter not-null? (map (lambda (i) (oly:get_music_object piece i)) instruments)) ) -% Given a property name and the extensions, either generate the pair to set +% Given a property name and the extensions, either generate the pair to set % the property or an empty list, if no pre-defined variable could be found #(define (oly:generate_property_pair prop piece instr type) (let* ((val (namedPieceInstrObject piece instr type))) (if (not-null? val) (list 'assign prop val) '() ) ) ) - + #(define (oly:staff_type type) - (cond + (cond ((string? type) (string->symbol type)) ((symbol? type) type) (else 'Staff) @@ -236,7 +236,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (note (if (pair? elems) (car elems))) (pitch (if (ly:music? note) (ly:music-property note 'pitch))) ) - (if (and (not-null? music) (not (ly:pitch? pitch))) + (if (and (not-null? music) (not (ly:pitch? pitch))) (ly:warning "Unable to interpret as a pitch!") ) pitch @@ -264,10 +264,10 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) #(define (oly:musiccontent_for_voice parser piece name music additional) (let* ((musiccontent additional)) - + ; Append the settings, key and clef (if defined) - (map - (lambda (type) + (map + (lambda (type) (let* ((object (namedPieceInstrObject piece name type))) (if (ly:music? object) (set! musiccontent (append musiccontent (list (ly:music-deep-copy object)))) @@ -285,35 +285,35 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (set! musiccontent (make-simultaneous-music (append musiccontent (list music)))) ;(ly:message "Generating staff for ~a" name) (let* ((trpPitch (oly:extractTranspositionPitch piece name))) - (if (ly:pitch? trpPitch) + (if (ly:pitch? trpPitch) (set! musiccontent (ly:music-transpose musiccontent trpPitch)) ) ) musiccontent ) - ; For empty music, return empty + ; For empty music, return empty '() ) ) ) #(define (oly:lyrics_create_single_context parser piece name voicename lyricsid) - ; If we have lyrics, create a lyrics context containing LyricCombineMusic + ; If we have lyrics, create a lyrics context containing LyricCombineMusic ; and add that as second element to the staff's elements list... (let* ((id (string-append "Lyrics" lyricsid)) (lyrics (namedPieceInstrObject piece name id))) (if (ly:music? lyrics) - (context-spec-music (make-music 'LyricCombineMusic - 'element lyrics - 'associated-context voicename) + (context-spec-music (make-music 'LyricCombineMusic + 'element lyrics + 'associated-context voicename) 'Lyrics (oly:generate_object_name piece name id)) '()) ) ) #(define (oly:lyrics_create_contexts parser piece name voicename) - (filter not-null? - (map (lambda (str) + (filter not-null? + (map (lambda (str) (oly:lyrics_create_single_context parser piece name voicename str)) (list "" "I" "II" "III" "IV" "V" "VI")))) @@ -329,7 +329,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ) (cons voice lyrics) ) - ; For empty music, return empty + ; For empty music, return empty '() ) ) @@ -355,14 +355,14 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ) staff ) - ; For empty music, return empty + ; For empty music, return empty '() ) ) #(define (oly:staff_handler parser piece name type children) (let* ((c (if (not-null? children) children (list name))) - (voices (apply append (map (lambda (v) (oly:create_voice parser piece v)) c)) ) + (voices (apply append (map (lambda (v) (oly:create_voice parser piece v)) c)) ) ) (if (not-null? voices) (oly:staff_handler_internal parser piece name type voices) @@ -374,8 +374,8 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) #(define (oly:devnull_handler parser piece name type children) (oly:voice_handler parser piece name type) ) - -#(define (oly:parallel_voices_staff_handler parser piece name type children) + +#(define (oly:parallel_voices_staff_handler parser piece name type children) (let* ( (voices (map (lambda (i) (oly:create_voice parser piece i)) children)) ; get the list of non-empty voices and flatten it! @@ -388,22 +388,22 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ) ) -#(define (oly:part_combined_staff_handler parser piece name type children) +#(define (oly:part_combined_staff_handler parser piece name type children) (let* ((rawmusic (map (lambda (c) (oly:musiccontent_for_voice parser piece name (oly:get_music_object piece c) '())) children)) (music (filter not-null? rawmusic))) (cond ((and (pair? music) (ly:music? (car music)) (not-null? (cdr music)) (ly:music? (cadr music))) ;(ly:message "Part-combine with two music expressions") (oly:staff_handler_internal parser piece name "Staff" (list (make-part-combine-music parser music)))) - ((null? music) + ((null? music) (ly:warning "Part-combine without any music expressions") '()) - ; exactly one is a music expression, simply use that by joining - ((list? music) + ; exactly one is a music expression, simply use that by joining + ((list? music) (ly:message "Part-combine with only one music expressions") (oly:staff_handler_internal parser piece name "Staff" (list (apply append music)))) - (else - ;(ly:message "make_part_combined_staff: ~S ~S ~a" piece instr instruments) + (else + ;(ly:message "make_part_combined_staff: ~S ~S ~a" piece instr instruments) '() ) ) ) @@ -414,13 +414,13 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) % return a (possibly empty) list of all assignments. #(define (oly:staff_handler_properties piece instr) (let* ( - (mapping '( - (instrumentName . "InstrumentName") + (mapping '( + (instrumentName . "InstrumentName") (shortInstrumentName . "ShortInstrumentName") (midiInstrument . "MidiInstrument") )) - (assignments (map - (lambda (pr) + (assignments (map + (lambda (pr) (oly:generate_property_pair (car pr) piece instr (cdr pr)) ) mapping)) @@ -429,7 +429,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) props ) ) - + % Figured bass is a special case, as it can be voice- or staff-type. When % given as a staff type, simply call the voice handler, instead @@ -439,7 +439,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (if (pair? voice) (car voice) ()) ) ) - + #(define (flatten lst) (define (f remaining result) (cond @@ -455,8 +455,8 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) ) (if (not-null? nonemptystaves) (let* ( - (musicexpr (if (= 1 (length nonemptystaves)) - (car nonemptystaves) + (musicexpr (if (= 1 (length nonemptystaves)) + (car nonemptystaves) (make-simultaneous-music nonemptystaves))) (groupname (oly:generate_staff_name piece name)) (grouptype (oly:staff_type type)) @@ -483,7 +483,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (if (not-null? voice) ; Explicit voice variable, use that voice - + (if (not type) ; No entry in structure found => simple voice (oly:voice_handler parser piece name "Voice") @@ -515,11 +515,11 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) (if (not-null? staff) ; Explicit staff variable, use that staff - - (if (not (list? type_from_structure)) + + (if (not (list? type_from_structure)) ; No entry in structure found => simple staff (oly:staff_handler parser piece name "Staff" '()) - + ; Entry found in structure => use the handler for the given type (let* ((type (car type_from_structure)) (handler (assoc-ref oly:staff_handlers type)) @@ -604,7 +604,7 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) #(oly:register_staff_type_handler #t 'oly:part_combined_staff_handler ) #(oly:register_staff_type_handler #f 'oly:parallel_voices_staff_handler ) - + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Automatic score generation @@ -616,18 +616,18 @@ orchestralVoiceTypes = #(define-music-function (parser location types) (list?) % ~~~~~~~~~~~~~~~~~~ % TODO: deprecate -setUseBook = #(define-music-function (parser location usebook) (boolean?) +setUseBook = #(define-music-function (parser location usebook) (boolean?) (ly:warning "\\setUseBook has been deprecated! Books are now automatically handled without any hacks") (make-music 'Music 'void #t) ) -% Two functions to handle midi-blocks: Either don't set one, or set an empty +% Two functions to handle midi-blocks: Either don't set one, or set an empty % one so that MIDI is generated #(define (oly:set_no_midi_block score) '()) -#(define (oly:set_midi_block score) - (let* ((midiblock (if (defined? '$defaultmidi) - (ly:output-def-clone $defaultmidi) +#(define (oly:set_midi_block score) + (let* ((midiblock (if (defined? '$defaultmidi) + (ly:output-def-clone $defaultmidi) (ly:make-output-def)))) (ly:output-def-set-variable! midiblock 'is-midi #t) (ly:score-add-output-def! score midiblock) @@ -646,12 +646,12 @@ setCreateMIDI = #(define-music-function (parser location createmidi) (boolean?) ) -% Two functions to handle layout-blocks: Either don't set one, or set an empty +% Two functions to handle layout-blocks: Either don't set one, or set an empty % one so that a PDF is generated #(define (oly:set_no_layout_block score) '()) -#(define (oly:set_layout_block score) - (let* ((layoutblock (if (defined? '$defaultlayout) - (ly:output-def-clone $defaultlayout) +#(define (oly:set_layout_block score) + (let* ((layoutblock (if (defined? '$defaultlayout) + (ly:output-def-clone $defaultlayout) (ly:make-output-def)))) (ly:output-def-set-variable! layoutblock 'is-layout #t) (ly:score-add-output-def! score layoutblock) @@ -695,7 +695,7 @@ cuefilter = #(define-music-function (parser location music) (ly:music?) (let* ((format-line (lambda (toc-item) (let* ((label (car toc-item)) (text (caddr toc-item)) - (label-page (and (list? label-table) + (label-page (and (list? label-table) (assoc label label-table))) (page (and label-page (cdr label-page)))) (format #f "~a, section, 1, {~a}, ~a" page text label)))) @@ -734,7 +734,7 @@ cuefilter = #(define-music-function (parser location music) (ly:music?) ) (if (null? music) ; No staves, print tacet - (begin + (begin (if (not-null? piecenametacet) (set! piecename piecenametacet)) (if (not-null? piecename) (oly:add-score parser (list (oly:piece-title-markup piecename)) piecename) @@ -810,7 +810,7 @@ namedTransposedCueDuring = #(define-music-function (parser location cuevoice dir ) % set the cue instrument name and clef -setClefCue = #(define-music-function (parser location instr clef) +setClefCue = #(define-music-function (parser location instr clef) (string? ly:music?) #{ \once \override Staff.Clef #'font-size = #-3 $clef @@ -825,9 +825,9 @@ setClefCue = #(define-music-function (parser location instr clef) % typical call: % \cleffedCueDuring #"vIQuote" #UP #"V.I" #"treble" #"Basso" #"bass" { R1*3 } % This adds the notes from vIQuote (defined via \addQuote) to three measures, prints "V.I" at -% the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the +% the beginning of the cue notes and "Basso" at the end. The clef is changed to treble at the % beginning of the cue notes and reset to bass at the end -cleffedCueDuring = #(define-music-function (parser location cuevoice direction instrcue clefcue instr clefinstr cuemusic) +cleffedCueDuring = #(define-music-function (parser location cuevoice direction instrcue clefcue instr clefinstr cuemusic) (string? number? string? ly:music? string? ly:music? ly:music?) #{ \cueDuring #$cuevoice #$direction { \tag #'cued \setClefCue #$instrcue $clefcue $cuemusic \tag #'cued \setClefCue #$instr $clefinstr } @@ -851,7 +851,7 @@ dynamicsX = #(define-music-function (parser location offset) (number?) \once \override DynamicLineSpanner #'Y-offset = #0 #}) -% Move the dynamic sign inside the staff to a fixed staff-relative position +% Move the dynamic sign inside the staff to a fixed staff-relative position % posY (where 0 means vertically starts at the middle staff line) dynamicsAllInside = #(define-music-function (parser location offsetX posY) (number? number?) @@ -900,7 +900,7 @@ hairpinOffset = #(define-music-function (parser location posY) (number?) ffz = #(make-dynamic-script "ffz") pf = #(make-dynamic-script "pf") -sempp = #(make-dynamic-script (markup #:line( #:with-dimensions '(0 . 0) +sempp = #(make-dynamic-script (markup #:line( #:with-dimensions '(0 . 0) '(0 . 0) #:right-align #:normal-text #:italic "sempre" #:dynamic "pp"))) parenf = #(make-dynamic-script (markup #:line(#:normal-text #:italic #:fontsize 2 "(" #:dynamic "f" #:normal-text #:italic #:fontsize 2 ")" ))) parenp = #(make-dynamic-script (markup #:line(#:normal-text #:italic #:fontsize 2 "(" #:dynamic "p" #:normal-text #:italic #:fontsize 2 ")" ))) @@ -929,7 +929,7 @@ decresc = #(make-music 'DecrescendoEvent 'span-direction START 'span-type 'text 'span-text "decresc.") newOrOldClef = #(define-music-function (parser location new old ) (string? string?) - (if (ly:get-option 'old-clefs) #{ \clef $old #} #{ \clef $new #}) + (if (ly:get-option 'old-clefs) #{ \clef $old #} #{ \clef $new #}) ) @@ -999,7 +999,7 @@ perd = \markup {\italic "perdend."} %% \Staff %% \override RestCollision #'positioning-done = #merge-rests-on-positioning %% } -%% } +%% } %% %% Limitations: %% - only handles two voices @@ -1032,7 +1032,7 @@ perd = \markup {\italic "perdend."} (v2-rest (ly:grob-object v2-grob 'rest))) (and (ly:grob? v1-rest) - (ly:grob? v2-rest) + (ly:grob? v2-rest) (let* ((v1-duration-log (ly:grob-property v1-rest 'duration-log)) (v2-duration-log (ly:grob-property v2-rest 'duration-log)) (v1-dot (ly:grob-object v1-rest 'dot)) @@ -1042,7 +1042,7 @@ perd = \markup {\italic "perdend."} (v2-dot-count (and (ly:grob? v2-dot) (ly:grob-property v2-dot 'dot-count -1)))) (set! can-merge - (and + (and (number? v1-duration-log) (number? v2-duration-log) (= v1-duration-log v2-duration-log) @@ -1079,19 +1079,19 @@ perd = \markup {\italic "perdend."} contentsTitle = "Inhalt / Contents" \paper { - tocTitleMarkup = \markup \fill-line{ - \null + tocTitleMarkup = \markup \fill-line{ + \null \column { - \override #(cons 'line-width (* 7 cm)) + \override #(cons 'line-width (* 7 cm)) \line{ \fill-line {\piece-title {\contentsTitle} \null }} \hspace #1 } - \null + \null } - tocItemMarkup = \markup \fill-line { - \null + tocItemMarkup = \markup \fill-line { + \null \column { - \override #(cons 'line-width (* 7 cm )) + \override #(cons 'line-width (* 7 cm )) \line { \fill-line{\fromproperty #'toc:text \fromproperty #'toc:page }} } \null @@ -1127,7 +1127,7 @@ titlePageMarkup = \markup \abs-fontsize #10 \when-property #'header:title \colum \vspace #4 \fill-line { \fontsize #10 \bold \fromproperty #'header:titlepagetitle } \vspace #1 - \fontsize #2 \when-property #'header:titlepagesubtitle { + \fontsize #2 \when-property #'header:titlepagesubtitle { \fill-line { \fromproperty #'header:titlepagesubtitle } \vspace #1 } @@ -1141,7 +1141,7 @@ titlePageMarkup = \markup \abs-fontsize #10 \when-property #'header:title \colum \vspace #1 \fill-line { \fontsize #5 \fromproperty #'header:scoretype } \vspace #8 - \fontsize #2 \when-property #'header:enteredby { + \fontsize #2 \when-property #'header:enteredby { \fill-line { "Herausgegeben von: / Edited by:"} \vspace #0. \fill-line { \fromproperty #'header:enteredby } @@ -1169,7 +1169,7 @@ titleHeaderMarkup = \markup { \fill-line { \with-dimensions #'( 0 . 0) #'( 0 . 1 ) \null } - + % \fill-line { % { \large \bold \fromproperty #'header:instrument } % } @@ -1209,7 +1209,7 @@ titleScoreMarkup = \markup \piece-title \fromproperty #'header:piece thisPageNoHeader = #(define-music-function (parser location) () (let* ((label (gensym "header"))) (set! no-header-table (cons label no-header-table)) - (make-music 'Music + (make-music 'Music 'page-marker #t 'page-label label))) @@ -1227,7 +1227,7 @@ thisPageNoHeader = #(define-music-function (parser location) () thisPageNoFooter = #(define-music-function (parser location) () (let* ((label (gensym "footer"))) (set! no-footer-table (cons label no-footer-table)) - (make-music 'Music + (make-music 'Music 'page-marker #t 'page-label label))) @@ -1248,7 +1248,7 @@ thisPageNoFooter = #(define-music-function (parser location) () thisPageCopyrightFooter = #(define-music-function (parser location) () (let* ((label (gensym "copyrightfooter"))) (set! copyright-footer-table (cons label copyright-footer-table)) - (make-music 'Music + (make-music 'Music 'page-marker #t 'page-label label))) @@ -1308,28 +1308,28 @@ thisPageCopyrightFooter = #(define-music-function (parser location) () -% Interpret the given markup with the header fields added to the props. -% This way, one can re-use the same functions (using fromproperty +% Interpret the given markup with the header fields added to the props. +% This way, one can re-use the same functions (using fromproperty % #'header:field) in the header block and as top-level markup. % -% This function is originally copied from mark-up-title (file scm/titling.scm), -% which is lilypond's internal function to handle the title markups. I needed -% to replace the scopes and manually add the $defaultheader (which is internally -% done in paper-book.cc before calling mark-up-title. Also, I don't extract the +% This function is originally copied from mark-up-title (file scm/titling.scm), +% which is lilypond's internal function to handle the title markups. I needed +% to replace the scopes and manually add the $defaultheader (which is internally +% done in paper-book.cc before calling mark-up-title. Also, I don't extract the % markup from the header block, but use the given markup. % -% I'm not sure if I really need the page properties in props, too... But I +% I'm not sure if I really need the page properties in props, too... But I % suppose it does not hurt, either. #(define-markup-command (markupWithHeader layout props markup) (markup?) - "Interpret the given markup with the header fields added to the props. - This way, one can re-use the same functions (using fromproperty + "Interpret the given markup with the header fields added to the props. + This way, one can re-use the same functions (using fromproperty #'header:field) in the header block and as top-level markup." (let* ( ; TODO: If we are inside a score, add the score's local header block, too! ; Currently, I only use the global header block, stored in $defaultheader (scopes (list $defaultheader)) (alists (map ly:module->alist scopes)) - + (prefixed-alist (map (lambda (alist) (map (lambda (entry) @@ -1411,7 +1411,7 @@ slashedGrace = } \layout { \context { - \ChoirStaff + \ChoirStaff % If only one non-empty staff in a system exists, still print the backet \override SystemStartBracket #'collapse-height = #1 \consists "Instrument_name_engraver" @@ -1463,7 +1463,7 @@ slashedGrace = printKeyCancellation = ##t } \context { - \RemoveEmptyStaffContext + \RemoveEmptyStaffContext } \context { \Lyrics @@ -1487,23 +1487,23 @@ slashedGrace = % So that \cresc works, for example. \alias Voice \consists "Output_property_engraver" - + \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1) pedalSustainStrings = #'("Ped." "*Ped." "*") pedalUnaCordaStrings = #'("una corda" "" "tre corde") - + \consists "Piano_pedal_engraver" \consists "Script_engraver" \consists "Dynamic_engraver" \consists "Text_engraver" - + \override TextScript #'font-size = #2 \override TextScript #'font-shape = #'italic \override DynamicText #'extra-offset = #'(0 . 2.5) \override Hairpin #'extra-offset = #'(0 . 2.5) - + \consists "Skip_event_swallow_translator" - + \consists "Axis_group_engraver" } \context { @@ -1557,5 +1557,4 @@ smallFlageolet = (acons 'font-size -2 (ly:music-property m 'tweaks))) m) - - \ No newline at end of file + -- 2.11.4.GIT