From 8aa5426335c7c482c46ac99a0c3d810ddce14e0c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 31 Jul 2004 18:48:01 +0000 Subject: [PATCH] * lily/staff-symbol-referencer.cc (get_position): emergency fallback: use coordinate * 2. * input/no-notation/midi-scales.ly: move from test/ * scm/define-markup-commands.scm (score): remove debugging code. * input/test/incipit.ly (violin): remove. * lily/system-start-delimiter.cc (print): only draw system delimiter to staves that reach up to left bound of the delimiter. * input/no-notation/embedded-scm.ly: move from test/ * input/test/follow-voice.ly: remove * input/no-notation/dynamic-absolute-volume.ly: move from test/. * input/test/count-systems.ly: remove. * input/regression/baerenreiter-sarabande.ly: move file. * scm/define-grobs.scm (all-grob-descriptions): use fetaMusic encoding for accidental. * Documentation/user/notation.itely (Educational use): new section --- ChangeLog | 33 +++++ Documentation/user/notation.itely | 4 +- .../dynamic-absolute-volume.ly | 0 input/{test => no-notation}/embedded-scm.ly | 0 input/{test => no-notation}/midi-scales.ly | 0 input/regression/accidental-cautionary.ly | 8 +- .../baerenreiter-sarabande.ly | 0 input/test/blank-paper.ly | 22 --- input/test/cautionaries.ly | 21 --- input/test/chord-names-german.ly | 23 +-- input/test/chords-without-melody.ly | 36 ++--- input/test/count-systems.ly | 55 ------- input/test/divisiones.ly | 26 ++-- input/test/drarn-slurs.ly | 23 --- input/test/drarn.ly | 29 ---- input/test/embedded-tex.ly | 15 +- input/test/feathered-beam.ly | 28 ++-- input/test/follow-voice.ly | 29 ---- input/test/header-ifelse.ly | 15 +- input/test/incipit.ly | 70 --------- input/test/lilypond-testpage.ly | 8 +- input/test/lyrics-skip-notes.ly | 16 +- input/test/markup-score.ly | 9 +- input/test/music-box.ly | 137 +++++++++--------- input/test/title.ly | 48 ------ lily/staff-symbol-referencer.cc | 5 +- lily/system-start-delimiter.cc | 28 +++- scm/define-grobs.scm | 31 ++-- scm/define-markup-commands.scm | 4 - 29 files changed, 231 insertions(+), 492 deletions(-) rename input/{test => no-notation}/dynamic-absolute-volume.ly (100%) rename input/{test => no-notation}/embedded-scm.ly (100%) rename input/{test => no-notation}/midi-scales.ly (100%) rename input/{mutopia/J.S.Bach => regression}/baerenreiter-sarabande.ly (100%) delete mode 100644 input/test/blank-paper.ly delete mode 100644 input/test/cautionaries.ly delete mode 100644 input/test/count-systems.ly delete mode 100644 input/test/drarn-slurs.ly delete mode 100644 input/test/drarn.ly delete mode 100644 input/test/follow-voice.ly delete mode 100644 input/test/incipit.ly delete mode 100644 input/test/title.ly diff --git a/ChangeLog b/ChangeLog index ce203337e3..bbdbe6d601 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,38 @@ 2004-07-31 Han-Wen Nienhuys + * lily/staff-symbol-referencer.cc (get_position): emergency + fallback: use coordinate * 2. + + * input/no-notation/midi-scales.ly: move from test/ + + * scm/define-markup-commands.scm (score): remove debugging code. + + * input/test/incipit.ly (violin): remove. + + * lily/system-start-delimiter.cc (print): only draw system + delimiter to staves that reach up to left bound of the delimiter. + + * input/no-notation/embedded-scm.ly: move from test/ + + * input/test/follow-voice.ly: remove + + * input/no-notation/dynamic-absolute-volume.ly: move from test/. + + * input/test/drarn*: remove + + * input/test/count-systems.ly: remove. + + * input/regression/baerenreiter-sarabande.ly: move file. + + * lily/bar-line.cc (compound_barline): fix : for staff without + lines. + + * lily/accidental.cc (print): use music_font_alist_chain(). This + fixes smaller cautionaries. + + * scm/define-grobs.scm (all-grob-descriptions): use fetaMusic + encoding for accidental. + * Documentation/user/notation.itely (Educational use): new section * input/test/*.ly: clean up directory: move examples into manual diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index ee13e3fe0c..142bcb576b 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -4122,7 +4122,9 @@ chart}. Turning on these styles is described in the input file Examples: @inputfileref{input/regression,chord-name-major7.ly}, @inputfileref{input/regression,chord-name-exceptions.ly}, @inputfileref{input/test,chord-names-jazz.ly}, -@inputfileref{input/test,chord-names-german.ly}. +@inputfileref{input/test,chord-names-german.ly}, +@inputfileref{input/test,chords-without-melody.ly}. + Init files: @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}. diff --git a/input/test/dynamic-absolute-volume.ly b/input/no-notation/dynamic-absolute-volume.ly similarity index 100% rename from input/test/dynamic-absolute-volume.ly rename to input/no-notation/dynamic-absolute-volume.ly diff --git a/input/test/embedded-scm.ly b/input/no-notation/embedded-scm.ly similarity index 100% rename from input/test/embedded-scm.ly rename to input/no-notation/embedded-scm.ly diff --git a/input/test/midi-scales.ly b/input/no-notation/midi-scales.ly similarity index 100% rename from input/test/midi-scales.ly rename to input/no-notation/midi-scales.ly diff --git a/input/regression/accidental-cautionary.ly b/input/regression/accidental-cautionary.ly index c98bd362b4..e8bd66233c 100644 --- a/input/regression/accidental-cautionary.ly +++ b/input/regression/accidental-cautionary.ly @@ -8,16 +8,14 @@ parentheses (default) or smaller accidentals. } -\score { - { +\paper { raggedright = ##t } + +{ c''4 cis''?4 \override Staff.Accidental #'cautionary-style = #'smaller cis''?4 \override Staff.Accidental #'cautionary-style = #'parentheses cis''?4 - } - -\paper { raggedright = ##t } } diff --git a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly b/input/regression/baerenreiter-sarabande.ly similarity index 100% rename from input/mutopia/J.S.Bach/baerenreiter-sarabande.ly rename to input/regression/baerenreiter-sarabande.ly diff --git a/input/test/blank-paper.ly b/input/test/blank-paper.ly deleted file mode 100644 index 2ca793a97c..0000000000 --- a/input/test/blank-paper.ly +++ /dev/null @@ -1,22 +0,0 @@ -\version "2.3.8" -\header { - texidoc="@cindex Blank Paper - -A blank music paper can be produced also by using invisible notes, and removing -@code{Bar_number_engraver}. - -" } - - -\new Score \with { - \override TimeSignature #'transparent = ##t - \override NoteHead #'transparent = ##t - defaultBarType = #"" - \remove Bar_number_engraver -} { - %% \clef treble - \clef bass - \repeat unfold 3 { c1 \break } -} - - diff --git a/input/test/cautionaries.ly b/input/test/cautionaries.ly deleted file mode 100644 index 7018440a47..0000000000 --- a/input/test/cautionaries.ly +++ /dev/null @@ -1,21 +0,0 @@ -\version "2.3.8" -\header{ - texidoc="@cindex Cautionary Accidentals -Cautinary accidentals are displayed in slurs by default. They can be -shown also with accidentals of smaller size. -" } -\score { \context Staff \transpose c c'' { - \key d \major -% \set Staff.autoReminders = #'cautionary - \override Staff.Accidental #'font-size = #0 - 1 cis?2 d? - \override Staff.Accidental #'cautionary-style = #'smaller - 1 cis?2 d? - \override Staff.Accidental #'cautionary-style = #'parentheses - 1 cis?2 d? - -} -\paper{raggedright = ##t} -} - - diff --git a/input/test/chord-names-german.ly b/input/test/chord-names-german.ly index 6370fee786..8647409d3f 100644 --- a/input/test/chord-names-german.ly +++ b/input/test/chord-names-german.ly @@ -15,18 +15,23 @@ scm = \chords { b/b bis/bis bes/bes % beses/beses } -\score { - << - \context ChordNames { \scm } + + +\paper { + raggedright = ##t + \context {\ChordNames \consists Instrument_name_engraver } +} + +<< + \new ChordNames { + \set instrument = #"default" + \scm + } \new ChordNames { \set instrument = #"german" \germanChords \scm } \new ChordNames { \set instrument = #"semi-german" \semiGermanChords \scm } - \context Voice { \scm } >> -\paper { - raggedright = ##t - \context {\ChordNames \consists Instrument_name_engraver }} - -} + \context Voice { \scm } +>> diff --git a/input/test/chords-without-melody.ly b/input/test/chords-without-melody.ly index f80965d020..1c92c7f2e5 100644 --- a/input/test/chords-without-melody.ly +++ b/input/test/chords-without-melody.ly @@ -1,29 +1,25 @@ \version "2.3.8" \header { -texidoc = "Jazz chord names can also be printed without notes." + texidoc = "Jazz chord names can also be printed without notes." } +\paper{ + \context{ + \ChordNames -\score{ - \context ChordNames \chords{ + \override BarLine #'bar-size = #4 - \repeat volta 2 { - f1:maj f:7 bes:7 - c:maj es - } - } - \paper{ - \context{ - \ChordNames - - \override BarLine #'bar-size = #4 - - - \consists Bar_engraver - \consists "Volta_engraver" - } - raggedright = ##t - } + + \consists Bar_engraver + \consists "Volta_engraver" + } + raggedright = ##t } +\context ChordNames \chords { + \repeat volta 2 { + f1:maj f:7 bes:7 + c:maj es + } +} diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly deleted file mode 100644 index 94e4dc811a..0000000000 --- a/input/test/count-systems.ly +++ /dev/null @@ -1,55 +0,0 @@ - -\version "2.3.8" -\header{ - - texidoc="@cindex Count Systems -After a line break, some function may called by overriding -@code{after-line-breaking-callback}. This can be most useful to assertain -that a piece uses a specified number of lines; typically the number of -lines (or systems) is not engraved, but it can be printed to console when -generating the output. The number of lines may be associated either -to the number of systems or the system number of a grob. -" } - -%% -- jcn: -%% See, e.g., input/mutopia/J.S.Bach/baerenreiter-sarabande.ly for -%% an application: - -%% We want this to perfectly match the Baerenreiter spacing. -%% If we're not using 6 systems, there's definately a problem. -%% #(define (assert-system-count smob n) ... - -#(define (display-systemno smob) - (let* ((this-system (ly:grob-system smob)) - (systems (ly:spanner-broken-into - (ly:grob-original this-system)))) - (display smob) - (display systems) - (display this-system) - - (display (list-index systems this-system)) - (newline))) - - -#(define (display-system-count smob) - (display (length - (ly:spanner-broken-into - (ly:grob-original - (ly:grob-system smob)))))) - - - -\score{ - \relative c''{ - \override NoteHead #'after-line-breaking-callback - = #display-system-count -% = #display-systemno - c1 - d - } - \paper{ indent = 0.0\mm - linewidth = 10.0\mm - raggedright = ##t - } -} - diff --git a/input/test/divisiones.ly b/input/test/divisiones.ly index 3f328bcb4f..ca268a71eb 100644 --- a/input/test/divisiones.ly +++ b/input/test/divisiones.ly @@ -1,10 +1,12 @@ % possible rename to ancient- or gregorian- ? \header { texidoc = "@cindex Divisiones + Divisiones are gregorian variants of breathing signs. Choices are @code{divisioMinima}, @code{divisioMaior}, @code{divisioMaxima} and @code{finalis}, @code{virgula} and @code{caesura}. + " } \version "2.3.8" @@ -19,35 +21,27 @@ Choices are @code{divisioMinima}, @code{divisioMaior}, \override TextScript #'padding = #3 \override Staff.BarLine #'transparent = ##t \override Stem #'transparent = ##t - g4( a) g e( f) e - ^\markup { "divisio minima" } + g4( a) g^\markup { "divisio minima" } \divisioMinima - g4( a) g e( f) e - ^\markup { "divisio maior" } + g4( a) g^\markup { "divisio maior" } \divisioMaior - g4( a) g e( f) e - ^\markup { "divisio maxima" } + g4( a) g^\markup { "divisio maxima" } \divisioMaxima - g4( a) g e( f) e - ^\markup { "finalis" } + g4( a) g^\markup { " finalis" } \finalis - g4( a) g e( f) e - + g4( a) g ^\markup { "virgula" } \virgula - g4( a) g e( f) e + g4( a) g ^\markup { "caesura" } \caesura - g4( a) g e( f) e + g4( a) g } \lyricsto "" \new Lyrics \lyrics { Blah blub, blah blam. Blah blub, blah blam. Blah blub, blah blam. - Blah blub, blah blam. - Blah blub, blah blam. - Blah blub, blah blam. - Blah blub, blah blam. + Blah blub. } >> } diff --git a/input/test/drarn-slurs.ly b/input/test/drarn-slurs.ly deleted file mode 100644 index 0fbd3054b6..0000000000 --- a/input/test/drarn-slurs.ly +++ /dev/null @@ -1,23 +0,0 @@ - -\version "2.3.8" -% possible rename to slurs-? -% TODO: find out what drarn means, and if there's an overlap with drarn.ly -\header{ -texidoc="@cindex Drarn Slurs -Slurs can be forced to always attach to note heads. -" -} - -fragment = { - \override Slur #'direction = #1 - \override Slur #'attachment = #'(head . head) - g''16(g)(g)(g)(d')(d)(d)(d) -} - -\paper { raggedright = ##t} - -\score { - \relative c \fragment - \paper { raggedright = ##t} -} - diff --git a/input/test/drarn.ly b/input/test/drarn.ly deleted file mode 100644 index 8c983ee8f5..0000000000 --- a/input/test/drarn.ly +++ /dev/null @@ -1,29 +0,0 @@ - -\version "2.3.8" -\header{texidoc="@cindex Drarn -You can attach slurs and ties to noteheads. -" } - -\score { - \context Staff << - - \relative c'' { -\time 3/8 - \override Stem #'direction = #1 - \override Tie #'direction = #1 - \override Slur #'direction = #1 - \override Slur #'attachment = #'(head . head) - c8~c(c) - }\\ - \relative c'' { - \override Stem #'direction = #-1 - \override Tie #'direction = #-1 - \override Slur #'direction = #-1 - \override Slur #'attachment = #'(head . head) - a8(a)~a - } - >> - \paper { linewidth = 40*\staffspace - raggedright = ##t } -} - diff --git a/input/test/embedded-tex.ly b/input/test/embedded-tex.ly index 1ea30a42f1..fee8f475a5 100644 --- a/input/test/embedded-tex.ly +++ b/input/test/embedded-tex.ly @@ -3,14 +3,13 @@ \header{ texidoc="@cindex Embedded Tex You can embed Tex commands in your score. "} -fragment = { - a''^"3 $\\times$ \\`a deux" -} - \paper { raggedright = ##t} -\score { - \relative c \fragment - \paper { raggedright = ##t } -} +\paper { + raggedright = ##t + inputencoding = "TeX" +} +\relative c { + a''^"$\\int_0^\infty e^{-x^2} dx$" +} diff --git a/input/test/feathered-beam.ly b/input/test/feathered-beam.ly index d0bfd39e9a..ef3c134146 100644 --- a/input/test/feathered-beam.ly +++ b/input/test/feathered-beam.ly @@ -5,16 +5,22 @@ beams: manually make two beams overlap. This uses tuplets to condense the spacing." } +\paper { raggedright = ##t } -\score { - \relative c' { - \context Voice { << { \stemUp \once \override Voice.Beam #'positions = #'(0 . 0.5) - \once \override Voice.TupletBracket #'number-visibility = ##f - \times 1/2 { c8[ c c c c c c c]} } \\ - { \stemUp \once \override Voice.Beam #'positions = #'(0 . -0.5) - \once \override Voice.TupletBracket #'number-visibility = ##f - \times 1/2 { c[ c c c c c c c] }} >> } r2 - } - \paper { raggedright = ##t } +\relative \new Staff << + \new Voice + { + \stemUp + \once \override Voice.Beam #'positions = #'(0 . 0.5) + \once \override Voice.TupletBracket #'number-visibility = ##f + \times 1/2 { c8[ c c c c c c c] + } + } + \new Voice { + \stemUp + \once \override Voice.Beam #'positions = #'(0 . -0.5) + \once \override Voice.TupletBracket #'number-visibility = ##f + \times 1/2 { c[ c c c c c c c] } + } +>> -} diff --git a/input/test/follow-voice.ly b/input/test/follow-voice.ly deleted file mode 100644 index f1fc702317..0000000000 --- a/input/test/follow-voice.ly +++ /dev/null @@ -1,29 +0,0 @@ -\version "2.3.8" -% MERGED: stuff from follow-break.ly to follow-thread.ly - -% followVoice: connect note heads with line when thread switches staff -\header{ texidoc="@cindex followVoice Voice -Voices can be traced automatically when they switch staves by setting -@code{followVoice}. " } - - -\score { - \relative c { - \new PianoStaff << - \set PianoStaff.followVoice = ##t - \context Staff=one \context Voice { - \override VoiceFollower #'style = #'dashed-line - c'1 - \change Staff=two - b2 a -% these lines from follow-break.ly: - \change Staff=one - a1 - } - \context Staff=two {\clef bass \skip 1*3 } - >> - } - - \paper { raggedright = ##t } -} - diff --git a/input/test/header-ifelse.ly b/input/test/header-ifelse.ly index 98b4a9e0e4..3f0a95c595 100644 --- a/input/test/header-ifelse.ly +++ b/input/test/header-ifelse.ly @@ -2,23 +2,20 @@ #(if (not (defined? 'pieceTagLine)) - (define pieceTagLine (string-append "Jeremie " (lilypond-version) " was here"))) + (define pieceTagLine (string-append "Title has version " (lilypond-version)))) \header{ - - tagline = \pieceTagLine + title = \pieceTagLine texidoc = " -High level functionality (eg. conditional defines), -can be accomplished with GUILE. +High level functionality (eg. conditional defines), can be +accomplished with GUILE. -This example puts the current version in the tagline via Scheme, -however, the tagline is not printed to the collated webpage snippets. +This example puts the current version in the title via Scheme. " } -\score{ { c'4 } \paper {raggedright=##t} -} +{ c'4 } diff --git a/input/test/incipit.ly b/input/test/incipit.ly deleted file mode 100644 index 4a6c96bc84..0000000000 --- a/input/test/incipit.ly +++ /dev/null @@ -1,70 +0,0 @@ -\version "2.3.8" -\header { texidoc = "@cindex Incipit -This example shows how to make an ``incipit'' to indicate -scordatora tuning of a violin part, by overriding the @code{style} of -a @code{TimeSignature}. -Here are the two first bars of Biber's Rosary sonata III. " } - - - - -violinincipit = \relative c''{ - \clef "french" - \time 2/2 - \override Staff.TimeSignature #'style = #'old - a4. b8 c4 fis | -% 1 - \override Staff.TimeSignature #'style = #'C -} - -bcincipit = \relative c{ - \clef bass - \override Staff.TimeSignature #'style = #'old - b2. cis4 | - \override Staff.TimeSignature #'style = #'C -} - -violin = \relative c''{ -% Key signatures with different alterations in different octaves -% are broken since 1.3.58! -% \specialkey \keysignature f' fis'' g' gis'' - \key d \major - \time 2/2 - \clef treble - - a4. b8 c4 fis | - gis~ gis8 fis16^\trill (e) b8 c - <<{ a d}\\ { es,4}>>| -} - -BC = \relative c{ - \key d \major - \time 2/2 - \clef "bass" - - \key \default - b2. cis4 | - d e fis g | -} - -\score{ - << - \context Staff = violin {{ - \override Staff.Clef #'transparent = ##t - \violinincipit \bar ".|" - \revert Staff.Clef #'transparent - \endincipit - \violin - }} - \new Staff {{ - \override Staff.Clef #'transparent = ##t - \bcincipit \bar ".|" - \revert Staff.Clef #'transparent - \endincipit - \BC - }} - >> - \paper { raggedright = ##t } -} - - diff --git a/input/test/lilypond-testpage.ly b/input/test/lilypond-testpage.ly index 974d24e76b..e53a976d01 100644 --- a/input/test/lilypond-testpage.ly +++ b/input/test/lilypond-testpage.ly @@ -17,11 +17,11 @@ metre = "metre" opus = "opus" piece = "piece" poet = "poet" -texidoc = "In the generated output for printing, there are several titles which do not appear in the web pages. " +texidoc = "All header fields with special meanings." + copyright = "public domain" + enteredby = "jcn" + source = "urtext" -% -% todo: check whether title.ly does the same. --hwn -% } diff --git a/input/test/lyrics-skip-notes.ly b/input/test/lyrics-skip-notes.ly index 27460a6ebf..2fea413130 100644 --- a/input/test/lyrics-skip-notes.ly +++ b/input/test/lyrics-skip-notes.ly @@ -1,7 +1,7 @@ \header { -texidoc =" + texidoc =" By inserting @code{\\skip} statements into lyric lines, one can attach less lyric syllables to a melody. @@ -10,15 +10,15 @@ less lyric syllables to a melody. } -% shorthand for Skip Lyric + % shorthand for Skip Lyric sl = { \skip 4 } \version "2.3.8" \score { - << - \context Voice = "A" {c4 c c c} - \lyricsto "A" \context Lyrics=A \lyrics { foo __ \sl \sl bar } - \lyricsto "A" \context Lyrics=B \lyrics { foo -- \sl baz bar } - \lyricsto "A" \context Lyrics=C \lyrics { foo -- baz -- baaz bar } - >> + << + \context Voice = "A" \relative { c4 c c c } + \lyricsto "A" \new Lyrics { foo __ \sl \sl bar } + \lyricsto "A" \new Lyrics { foo -- \sl baz bar } + \lyricsto "A" \new Lyrics { foo -- baz -- baaz bar } + >> } diff --git a/input/test/markup-score.ly b/input/test/markup-score.ly index d2e510b744..64998db3d4 100644 --- a/input/test/markup-score.ly +++ b/input/test/markup-score.ly @@ -1,4 +1,3 @@ - \header { texidoc = "Use \\score block as markup command." } @@ -26,10 +25,8 @@ tuning = \markup { \relative { \time 4/8 \times 2/3 { c'8 d e } \times 2/3 {c d e} - \time 4/8 - - % todo: tempo change example. - - g8 a8 g8 a \break + \times 2/3 { c8 d e } \times 2/3 {c d e} + g8 a8 g8 a + g8 a8 g8 a } diff --git a/input/test/music-box.ly b/input/test/music-box.ly index 662f357433..908fc02a13 100644 --- a/input/test/music-box.ly +++ b/input/test/music-box.ly @@ -9,8 +9,7 @@ using Scheme functions to avoid typing work. " } #(define (transform music) (let* ((es (ly:music-property music 'elements)) - (n (ly:music-name music)) - ) + (n (ly:music-name music))) (if (not (equal? n "Sequential_music")) (ly:warn "transform needs sequential music!") (begin @@ -20,14 +19,9 @@ using Scheme functions to avoid typing work. " } ((trans (ly:music-property (cadr elts) 'elements)) (car elts)) (set-cdr! elts (cddr elts)) (recurse (cdr elts)) - ) - ) - ) - ) - ) + ))))) music - ) - ) + )) #(define ((trans pitches) music) (let* ((es (ly:music-property music 'elements)) @@ -52,11 +46,8 @@ using Scheme functions to avoid typing work. " } (pnew (ly:music-property (car pes) 'pitch)) ) (ly:music-set-property! music 'pitch pnew) - ) - ) - music - ) - ) + )) + music)) @@ -82,63 +73,65 @@ endc = {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata } \score { \transpose c c' \context PianoStaff << - \context Staff=up { \clef "G" } - \context Staff=down { \clef "F" } - { \applymusic #transform {\pat {c e g c' e' } - \pat {c d a d' f' } - \pat {h, d g d' f' } - \pat {c e g c' e' } - } - - %{ - %Etc. - - %we get the idea now. - - - - \pat {c e a e' a' } - \pat {c d fis a d' } - \pat {h, d g d' g' } - \pat {h, c e g c' } - \pat {a, c e g c' } - \pat {d, a, d fis c' } - \pat {g, h, d g h } - \pat {g, b, e g cis' } - \pat {f, a, d a d' } - \pat {f, as, d f h } - \pat {e, g, c g c' } - \pat {e, f, a, c f } - \pat {d, f, a, c f } - - \pat {g,, d, g, h, f } - \pat {c, e, g, c e } - \pat {c, g, b, c e } - \pat {f,, f, a, c e } - \pat {fis,, c, a, c es } - \pat {as,, f, h, c d } - \pat {g,, f, g, h, d } - \pat {g,, e, g, c e } - \pat {g,, d, g, c f } - \pat {g,, d, g, h, f } - \pat {g,, es, a, c fis } - \pat {g,, e, g, c g } - \pat {g,, d, g, c f } - \pat {g,, d, g, h, f } - \pat {c,, c, g, b, e } - %} - } - >> - \paper { - \context { - \PianoStaff - \override VerticalAlignment #'forced-distance = #10 - } - - linewidth = 18.0 \cm - } - \midi { - \tempo 4 = 80 - } + \context Staff=up { \clef "G" } + \context Staff=down { \clef "F" } + { \applymusic #transform { + \pat {c e g c' e' } + \pat {c d a d' f' } + } + +%{ + %Etc. + + %we get the idea now. + + + \pat {h, d g d' f' } + \pat {c e g c' e' } + + \pat {c e a e' a' } + \pat {c d fis a d' } + \pat {h, d g d' g' } + \pat {h, c e g c' } + \pat {a, c e g c' } + \pat {d, a, d fis c' } + \pat {g, h, d g h } + \pat {g, b, e g cis' } + \pat {f, a, d a d' } + \pat {f, as, d f h } + \pat {e, g, c g c' } + \pat {e, f, a, c f } + \pat {d, f, a, c f } + + \pat {g,, d, g, h, f } + \pat {c, e, g, c e } + \pat {c, g, b, c e } + \pat {f,, f, a, c e } + \pat {fis,, c, a, c es } + \pat {as,, f, h, c d } + \pat {g,, f, g, h, d } + \pat {g,, e, g, c e } + \pat {g,, d, g, c f } + \pat {g,, d, g, h, f } + \pat {g,, es, a, c fis } + \pat {g,, e, g, c g } + \pat {g,, d, g, c f } + \pat {g,, d, g, h, f } + \pat {c,, c, g, b, e } +%} + } + >> + + \paper { + \context { + \PianoStaff + \override VerticalAlignment #'forced-distance = #10 + } + linewidth = 18.0 \cm + } + + \midi { + \tempo 4 = 80 + } } diff --git a/input/test/title.ly b/input/test/title.ly deleted file mode 100644 index 4478db44b1..0000000000 --- a/input/test/title.ly +++ /dev/null @@ -1,48 +0,0 @@ -\version "2.3.8" -% MERGE with lilypond- -\header { - filename = "title.ly" - dedication = "dedication" - title = "Title" - subtitle = "Subtitle" - subsubtitle = "Subsubtitle" - composer = "Composer (xxxx-yyyy)" - instrument = "Instrument" - arranger = "Arranger" - poet = "Poet" - % ugr: warning: Identifier name is a keyword: `translator' - % translator = "Translator" - texttranslator = "Translator" - copyright = "public domain" - enteredby = "jcn" - source = "urtext" - - texidoc ="This example tests titling. By processing with @code{lilypond} - (not @code{lilypond-book}), you will see all the titles." -} - -\score { - \context Staff \relative c' { - \repeat unfold 10 { - c d e f f e d c \break - c d e f f e d c - } - } - \header { - opus = "Opus 0" - piece = "Piece I" - } -} - -\score { - \relative c' { - f e d c c d e f \break - f e d c c d e f - } - \header { - opus = "Opus 1" - piece = "Piece II" - } -} - - diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 629d796cee..9fbe6f8b43 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -80,7 +80,10 @@ Staff_symbol_referencer::get_position (Grob *me) p += 2.0 * y / Staff_symbol::staff_space (st); return p; } - + else if (!st) + { + return me->relative_coordinate (me->get_parent (Y_AXIS), Y_AXIS) * 2; + } return robust_scm2double (me->get_property ("staff-position"), p); } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index 4977fa0ddc..aec3166bb4 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -8,6 +8,7 @@ */ #include +#include "spanner.hh" #include "axis-group-interface.hh" #include "system-start-delimiter.hh" #include "output-def.hh" @@ -106,16 +107,35 @@ MAKE_SCHEME_CALLBACK (System_start_delimiter,print,1); SCM System_start_delimiter::print (SCM smob) { - Grob * me = unsmob_grob (smob); - + Spanner * me = unsmob_spanner (smob); + if (!me) + return SCM_EOL; + SCM s = me->get_property ("glyph"); if (!ly_c_string_p (s)) return SCM_EOL; SCM gsym = scm_string_to_symbol (s) ; Real staff_space = Staff_symbol_referencer::staff_space (me); - Interval ext = ly_scm2interval (Axis_group_interface::group_extent_callback - (me->self_scm (), scm_int2num (Y_AXIS))); + + SCM elts = me->get_property ("elements"); + Grob * common = common_refpoint_of_list (elts, me, Y_AXIS); + + Interval ext; + for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s)) + { + Spanner * sp = unsmob_spanner (ly_car (s)); + if (sp && + sp->get_bound (LEFT) == me->get_bound (LEFT)) + { + Interval dims = sp->extent (common, Y_AXIS); + if (!dims.is_empty ()) + ext.unite (dims); + } + } + + ext -= me->relative_coordinate (common, Y_AXIS); + Real l = ext.length () / staff_space; if (ext.is_empty () diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 1c028c320c..eba1fe7d4a 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -17,7 +17,6 @@ (Accidental . ( (print-function . ,Accidental_interface::print) - (font-family . music) (cautionary-style . parentheses) (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface font-interface)))) )) @@ -351,21 +350,20 @@ (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface )))) )) - (DoublePercentRepeat . - ( - (print-function . ,Percent_repeat_item_interface::double_percent) - (breakable . #t) - (slope . 1.0) - (font-encoding . fetaMusic) - (width . 2.0) - (thickness . 0.48) - (break-align-symbol . staff-bar) - (break-visibility . ,begin-of-line-invisible) - (meta . ((interfaces . (font-interface - break-aligned-interface - percent-repeat-interface item-interface )))) - )) - + (DoublePercentRepeat + . ( + (print-function . ,Percent_repeat_item_interface::double_percent) + (breakable . #t) + (slope . 1.0) + (font-encoding . fetaMusic) + (width . 2.0) + (thickness . 0.48) + (break-align-symbol . staff-bar) + (break-visibility . ,begin-of-line-invisible) + (meta . ((interfaces . (font-interface + break-aligned-interface + percent-repeat-interface item-interface )))) + )) (DynamicText . ( (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) @@ -624,7 +622,6 @@ (thick-thickness . 6.6) (hair-thickness . 2.0) (padding . 1) - (font-encoding . fetaMusic) (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface)))) )) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 637c76055e..abcb7e3313 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -23,10 +23,6 @@ (stencil (ly:paper-system-stencil 1st)) ) (ly:stencil-align-to! stencil Y CENTER) - (display (ly:stencil-extent stencil X)) - (display (ly:stencil-extent stencil Y)) -; (set! stencil (ly:stencil-translate-axis stencil -20 X)) -; (set! stencil (ly:stencil-translate-axis stencil 20 Y)) stencil)) (def-markup-command (simple paper props str) (string?) -- 2.39.2