From 6f88af063980030706a883f95b20b11cdc7d780b Mon Sep 17 00:00:00 2001 From: Phil Holmes Date: Sun, 17 Mar 2013 13:50:34 +0000 Subject: [PATCH] LSR updates --- ...yles-depending-on-the-step-of-the-scale.ly | 5 +- .../creating-double-digit-fingerings.ly | 7 +- .../snippets/paper-and-layout.snippet-list | 1 + ...g-final-mark-from-removing-final-tuplet.ly | 5 +- ...ancellations-from-key-signature-changes.ly | 2 +- .../snippets/staff-notation.snippet-list | 1 + .../snippets/stand-alone-two-column-markup.ly | 15 +- .../syntax-and-expressions.snippet-list | 1 + ...ith-minimum-accidentals-smart-transpose.ly | 4 +- ...roups-without-connecting-systemstartbar.ly | 352 ++++++++++++++++++ .../snippets/woodwind-diagrams-listing.ly | 11 + 11 files changed, 386 insertions(+), 18 deletions(-) create mode 100644 Documentation/snippets/vertical-aligned-staffgroups-without-connecting-systemstartbar.ly diff --git a/Documentation/snippets/applying-note-head-styles-depending-on-the-step-of-the-scale.ly b/Documentation/snippets/applying-note-head-styles-depending-on-the-step-of-the-scale.ly index 113ee328b7..8cefbedea7 100644 --- a/Documentation/snippets/applying-note-head-styles-depending-on-the-step-of-the-scale.ly +++ b/Documentation/snippets/applying-note-head-styles-depending-on-the-step-of-the-scale.ly @@ -30,7 +30,6 @@ correspondence between harmonic functions and note head styles. doctitle = "Applying note head styles depending on the step of the scale" } % begin verbatim - fragment = { \key c \major c2 d @@ -42,7 +41,7 @@ fragment = { \new Staff { \transpose c d \relative c' { - \set shapeNoteStyles = #'#(do re mi fa + \set shapeNoteStyles = ##(do re mi fa #f la ti) \fragment } @@ -50,7 +49,7 @@ fragment = { \break \relative c' { - \set shapeNoteStyles = #'#(cross triangle fa #f + \set shapeNoteStyles = ##(cross triangle fa #f mensural xcircle diamond) \fragment } diff --git a/Documentation/snippets/creating-double-digit-fingerings.ly b/Documentation/snippets/creating-double-digit-fingerings.ly index 85f596d7ed..4991989e6a 100644 --- a/Documentation/snippets/creating-double-digit-fingerings.ly +++ b/Documentation/snippets/creating-double-digit-fingerings.ly @@ -4,7 +4,7 @@ %% and then run scripts/auxiliar/makelsr.py %% %% This file is in the public domain. -\version "2.17.13" +\version "2.17.11" \header { lsrtags = "editorial-annotations, expressive-marks, scheme-language, staff-notation, tweaks-and-overrides" @@ -28,6 +28,11 @@ fifty = #(make-music 'FingeringEvent 'digit 50) +finger = +#(define-music-function (parser location digit) (integer?) + (make-music 'FingeringEvent + 'digit digit)) + #(define (calc-finger-without-warning grob) (let* ((event (event-cause grob)) (digit (ly:event-property event 'digit))) diff --git a/Documentation/snippets/paper-and-layout.snippet-list b/Documentation/snippets/paper-and-layout.snippet-list index 303b979a8a..e99215262a 100644 --- a/Documentation/snippets/paper-and-layout.snippet-list +++ b/Documentation/snippets/paper-and-layout.snippet-list @@ -6,3 +6,4 @@ creating-blank-staves.ly demonstrating-all-headers.ly setting-system-separators.ly table-of-contents.ly +vertical-aligned-staffgroups-without-connecting-systemstartbar.ly diff --git a/Documentation/snippets/preventing-final-mark-from-removing-final-tuplet.ly b/Documentation/snippets/preventing-final-mark-from-removing-final-tuplet.ly index 89be0cb1d5..45d746657f 100644 --- a/Documentation/snippets/preventing-final-mark-from-removing-final-tuplet.ly +++ b/Documentation/snippets/preventing-final-mark-from-removing-final-tuplet.ly @@ -18,14 +18,13 @@ tuplet marking. This can be overcome by setting @code{TupletBracket doctitle = "Preventing final mark from removing final tuplet" } % begin verbatim - \new Staff { \set tupletFullLength = ##t \time 1/8 \tuplet 3/2 { c'16 c'16 c'16 } \tuplet 3/2 { c'16 c'16 c'16 } \tuplet 3/2 { c'16 c'16 c'16 } - \override Score.RehearsalMark.break-visibility = #'#(#t #t #t) + \override Score.RehearsalMark.break-visibility = ##(#t #t #t) \override Score.RehearsalMark.direction = #DOWN \override Score.RehearsalMark.self-alignment-X = #RIGHT % due to issue 2362 the following line is commented @@ -43,7 +42,7 @@ tuplet marking. This can be overcome by setting @code{TupletBracket \tuplet 3/2 { c'16 c'16 c'16 } \tuplet 3/2 { c'16 c'16 c'16 } \tuplet 3/2 { c'16 c'16 c'16 } - \override Score.RehearsalMark.break-visibility = #'#(#t #t #t) + \override Score.RehearsalMark.break-visibility = ##(#t #t #t) \override Score.RehearsalMark.direction = #DOWN \override Score.RehearsalMark.self-alignment-X = #RIGHT % due to issue 2362 the following line is commented diff --git a/Documentation/snippets/separating-key-cancellations-from-key-signature-changes.ly b/Documentation/snippets/separating-key-cancellations-from-key-signature-changes.ly index 7670ff4ddb..1b060474b2 100644 --- a/Documentation/snippets/separating-key-cancellations-from-key-signature-changes.ly +++ b/Documentation/snippets/separating-key-cancellations-from-key-signature-changes.ly @@ -29,7 +29,7 @@ or the end. \new Staff { \override Score.BreakAlignment.break-align-orders = - #'#((left-edge ambitus breathing-sign clef staff-bar + ##((left-edge ambitus breathing-sign clef staff-bar key-cancellation key-signature time-signature custos) (left-edge ambitus breathing-sign clef key-cancellation diff --git a/Documentation/snippets/staff-notation.snippet-list b/Documentation/snippets/staff-notation.snippet-list index ab14ed7251..a8c9f1bf63 100644 --- a/Documentation/snippets/staff-notation.snippet-list +++ b/Documentation/snippets/staff-notation.snippet-list @@ -37,5 +37,6 @@ time-signature-in-parentheses.ly tweaking-clef-properties.ly use-square-bracket-at-the-start-of-a-staff-group.ly using-autochange-with-more-than-one-voice.ly +vertical-aligned-staffgroups-without-connecting-systemstartbar.ly volta-below-chords.ly volta-multi-staff.ly diff --git a/Documentation/snippets/stand-alone-two-column-markup.ly b/Documentation/snippets/stand-alone-two-column-markup.ly index dd096fe981..dd0005c432 100644 --- a/Documentation/snippets/stand-alone-two-column-markup.ly +++ b/Documentation/snippets/stand-alone-two-column-markup.ly @@ -17,7 +17,6 @@ Stand-alone text may be arranged in several columns using doctitle = "Stand-alone two-column markup" } % begin verbatim - \markup { \fill-line { \hspace #1 @@ -30,13 +29,13 @@ Stand-alone text may be arranged in several columns using \line { Amen. } } \hspace #2 - \column { - \line { \italic { O sacred feast } } - \line { \italic { in which Christ is received, } } - \line { \italic { the memory of His Passion is renewed, } } - \line { \italic { the mind is filled with grace, } } - \line { \italic { and a pledge of future glory is given to us. } } - \line { \italic { Amen. } } + \column \italic { + \line { O sacred feast } + \line { in which Christ is received, } + \line { the memory of His Passion is renewed, } + \line { the mind is filled with grace, } + \line { and a pledge of future glory is given to us. } + \line { Amen. } } \hspace #1 } diff --git a/Documentation/snippets/syntax-and-expressions.snippet-list b/Documentation/snippets/syntax-and-expressions.snippet-list index 7e72565d66..f0e653afb0 100644 --- a/Documentation/snippets/syntax-and-expressions.snippet-list +++ b/Documentation/snippets/syntax-and-expressions.snippet-list @@ -1,2 +1,3 @@ combining-two-parts-on-the-same-staff.ly entering-several-tuplets-using-only-one--times-command.ly +vertical-aligned-staffgroups-without-connecting-systemstartbar.ly diff --git a/Documentation/snippets/transposing-pitches-with-minimum-accidentals-smart-transpose.ly b/Documentation/snippets/transposing-pitches-with-minimum-accidentals-smart-transpose.ly index 9d1e274ff5..2b647d0854 100644 --- a/Documentation/snippets/transposing-pitches-with-minimum-accidentals-smart-transpose.ly +++ b/Documentation/snippets/transposing-pitches-with-minimum-accidentals-smart-transpose.ly @@ -43,10 +43,10 @@ In this manner, the most natural enharmonic notes are chosen. ;; for historical reasons (n (ly:pitch-notename p))) (cond - ((and (> a 1) (or (= n 6) (= n 2))) + ((and (> a 1) (or (eq? n 6) (eq? n 2))) (set! a (- a 2)) (set! n (+ n 1))) - ((and (< a -1) (or (= n 0) (= n 3))) + ((and (< a -1) (or (eq? n 0) (eq? n 3))) (set! a (+ a 2)) (set! n (- n 1)))) (cond diff --git a/Documentation/snippets/vertical-aligned-staffgroups-without-connecting-systemstartbar.ly b/Documentation/snippets/vertical-aligned-staffgroups-without-connecting-systemstartbar.ly new file mode 100644 index 0000000000..af5047fce4 --- /dev/null +++ b/Documentation/snippets/vertical-aligned-staffgroups-without-connecting-systemstartbar.ly @@ -0,0 +1,352 @@ +%% DO NOT EDIT this file manually; it is automatically +%% generated from LSR http://lsr.dsi.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% +%% This file is in the public domain. +\version "2.17.11" + +\header { + lsrtags = "paper-and-layout, staff-notation, syntax-and-expressions" + + texidoc = " +The code of this snippet shows how to achieve vertical aligned +StaffGroups with a SystemStartBar for each StaffGroup, but without +connecting them. This might be helpful for educational uses, but of +course other utilizations are thinkable. + +" + doctitle = "Vertical aligned StaffGroups without connecting SystemStartBar" +} % begin verbatim + +% by Thomas Morley + +#(set-global-staff-size 18) + +\paper { + indent = 0 + ragged-right = ##f + print-all-headers = ##t +} + +\layout { + \context { + \Staff + \consists "Mark_engraver" + \override RehearsalMark.self-alignment-X = #LEFT + } + \context { + \StaffGroup + systemStartDelimiterHierarchy = + #'(SystemStartBrace (SystemStartBracket a b)) + } + \context { + \Score + \override SystemStartBrace.style = #'bar-line + \override SystemStartBar.stencil = ##f + \override SystemStartBrace.padding = #-0.1 + \override SystemStartBrace.thickness = #1.6 + \remove "Mark_engraver" + \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15 + } +} + +%%%% EXAMPLE + +txt = +\lyricmode { + Wer4 nur den lie -- ben Gott läßt wal2 -- ten4 + und4 hof -- fet auf ihn al -- le Zeit2. +} + +% First StaffGroup "exercise" + +eI = +\relative c' { + \mark \markup { + \bold Teacher: + This is a simple setting of the choral. Please improve it. + } + \key a\minor + \time 4/4 + \voiceOne + + \partial 4 + e4 + a b c b + a b gis2 + e4\fermata g! g f + e a a gis + a2.\fermata + \bar ":|." +} + +eII = +\relative c' { + \key a\minor + \time 4/4 + \voiceTwo + \partial 4 + c4 + e e e gis + a f e2 + b4 b d d + c c d d + c2. + \bar ":|." +} + +eIII = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceOne + + \partial 4 + a4 + c b a b + c d b2 + gis4 g g b + c a f e + e2. +} + +eIV = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceTwo + + \partial 4 + a,4 + a' gis a e + a, d e2 + e,4\fermata e' b g + c f d e + a,2.\fermata + \bar ":|." +} + +exercise = +\new StaffGroup = "exercise" +<< + + \new Staff + << + \new Voice \eI + \new Voice \eII + >> + + \new Lyrics \txt + + \new Staff + << + \new Voice \eIII + \new Voice \eIV + >> +>> + +% Second StaffGRoup "simple Bach" + +sbI = +\relative c' { + \mark \markup { \bold" Pupil:" Here's my version! } + \key a\minor + \time 4/4 + \voiceOne + + \partial 4 + e4 + a b c b + a b gis2 + e4\fermata g! g f + e a a gis + a2.\fermata + \bar ":|." +} + +sbII = +\relative c' { + \key a\minor + \time 4/4 + \voiceTwo + \partial 4 + c8 d + e4 e e8 f g4 + f f e2 + b4 b8 c d4 d + e8 d c4 b8 c d4 + c2. + \bar ":|." +} + +sbIII = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceOne + + \partial 4 + a8 b + c4 b a b8 c + d4 d8 c b2 + gis4 g g8 a b4 + b a8 g f4 e + e2. +} + +sbIV = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceTwo + + \partial 4 + a,4 + a' gis a e + f8 e d4 e2 + e,4\fermata e' b a8 g + c4 f8 e d4 e + a,2.\fermata + \bar ":|." +} + +simpleBach = +\new StaffGroup = "simple Bach" +<< + + \new Staff + << + \new Voice \sbI + \new Voice \sbII + >> + + \new Lyrics \txt + + \new Staff + << + \new Voice \sbIII + \new Voice \sbIV + >> +>> + +% Third StaffGroup "chromatic Bach" + +cbI = +\relative c' { + \mark \markup { + \bold "Teacher:" + \column { + "Well, you simply copied and transposed a version of J.S.Bach." + "Do you know this one?" + } + } + \key a\minor + \time 4/4 + \voiceOne + + \partial 4 + e4 + a b c b + a b gis4. fis8 + e4\fermata g! g f + e a a8 b gis4 + a2.\fermata + \bar ":|." +} + +cbII = +\relative c' { + \key a\minor + \time 4/4 + \voiceTwo + \partial 4 + c8 d + e4 e e8 fis gis4 + a8 g! f!4 e2 + b4 e e d + d8[ cis] d dis e fis e4 + e2. + \bar ":|." +} + +cbIII = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceOne + + \partial 4 + a8 b + c[ b] a gis8 a4 d, + e8[ e'] d c b4. a8 + gis4 b c d8 c + b[ a] a b c b b c16 d + c2. +} + +cbIV = +\relative c' { + \key a\minor + \time 4/4 + \clef bass + \voiceTwo + + \partial 4 + a4 + c, e a, b + c d e2 + e4\fermata e a b8 c + gis[ g] fis f e dis e4 + a,2.\fermata + \bar ":|." +} + +chromaticBach = +\new StaffGroup = "chromatic Bach" +<< + + \new Staff + << + \new Voice \cbI + \new Voice \cbII + >> + + \new Lyrics \txt + + \new Staff + << + \new Voice \cbIII + \new Voice \cbIV + >> +>> + + +% Score + +\score { + << + \exercise + \simpleBach + \chromaticBach + >> + \header { + title = \markup + \column { + \vspace #1 + "Exercise: Improve the given choral" + " " + } + } + \layout { + \context { + \Lyrics + \override LyricText.X-offset = #-1 + } + } +} diff --git a/Documentation/snippets/woodwind-diagrams-listing.ly b/Documentation/snippets/woodwind-diagrams-listing.ly index 71a59920cc..db8661d843 100644 --- a/Documentation/snippets/woodwind-diagrams-listing.ly +++ b/Documentation/snippets/woodwind-diagrams-listing.ly @@ -19,6 +19,17 @@ defined in LilyPond. \relative c' { \textLengthOn + c1^ + \markup { + \center-column { + 'tin-whistle + " " + \woodwind-diagram + #'tin-whistle + #'() + } + } + c1^ \markup { \center-column { -- 2.39.5