Am Fr., 26. Okt. 2018 um 18:26 Uhr schrieb David Sumbler <da...@aeolia.co.uk>: > > Below I have shown a compile-able 93 lines (sorry it can't be made much > shorter) from the files for a much longer piece. > > In this particular passage the harpsichord plays 4 bars in strict tempo > whilst the flute plays 4 bars rubato. (The 2 lines do not fit and are > meant to sound terrible together!) > > After much effort I have managed to get a layout in the score which > mimics the original manuscript, but there is one problem I cannot > solve. Although these 4 bars can just about be made to fit on to one > line, there actually needs to be a page break at some point. This is > because there is a narrator who has a short speech during the pause at > the end of the extract. This will require an inch or two of horizontal > space, and the 4 bars in question will then be too compressed. The > page break should come at the end of one of the harpsichord's bars, > which correspond to the bars in the rest of the orchestra. (I have > only included 1 violin line here; none of the other instruments play > during the 4 bars in question.) > > Unfortunately, every time I ask for a \break Lilypond gives me the > dreaded > > "warning: forced break was overridden by some other event, should you > be using bar checks?" > > I have looked at the Lilypond Snippet "Printing music with different > time signatures [0.35714]" as well as another relevant snippet, and > have compiled it successfully. The line break works as expected. Yet > my code produces the warning and refuses to make a line break. > > What have I missed? > > David > > %%%%%%%%%%%%%%%%%%%%%%%% > \version "2.19.81" > > \language "english" > > #(set-global-staff-size 16) > > gliss = \markup { \larger \italic "gliss." } > > FifteenFlute = { > << > { \relative { > R1 | R1\fermataMarkup | > \override Staff.TimeSignature.stencil = ##f > \time 25/16 > \scaleDurations 8/4 { bf''8[(\mf a16]) r } > \scaleDurations 7/4 { bf8[( a16]) r } > \scaleDurations 6/4 { bf8[( a16]) r } > bf8[( a16]) r > \time 4/4 > \tuplet 5/4 { bf8( c df ef e } fs2 > \time 7/8 > \scaleDurations 7/8 { e4 ds cs bs) } > \time 9/16 > R1*9/16\fermataMarkup > \time 4/4 > } } > >> > } > > ScoreFifteenFirstViolinA = { > << > { \relative { > d'8(\p\>\glissando^\gliss g)\! r4 > \override DynamicText.X-offset = #-2 > g8(\mp\>\glissando^\gliss b)\! r4 | > b8(\mf\>\glissando^\gliss d)\! r4 > \revert DynamicText.X-offset > d8(\f\>\glissando^\gliss e)\! r4\fermata | > R1*3 | R1\fermataMarkup | > } } > >> > } > > FifteenHarpsUpper = { > << > { \relative { > R1 | R1\fermataMarkup | > \key a \major > a''16\mf \repeat unfold 9 { gs a } b bs cs d ds e cs a e cs e gs a | > \repeat unfold 9 { b as } b cs ds e b gs e8 r \acciaccatura ds' e > r\fermata | > } } > >> > } > > FifteenHarpsLower = { > << > \clef bass > { \relative { > R1 | R1\fermataMarkup | > \key a \major > \clef treble > \repeat unfold 4 { a16 e' cs e a e cs e } | \repeat unfold 2 { a, fs' d > fs a fs d fs } | > gs, e' d e gs e d e gs,8 r \clef bass \acciaccatura ds e r\fermata | > } } > >> > } > > \score { > << > \new Staff \with { instrumentName = "Flute" } \FifteenFlute > \new PianoStaff \with { instrumentName = "Harpsichord" } << > \new Staff \FifteenHarpsUpper > \new Staff \FifteenHarpsLower >> > \new Staff \with { instrumentName = "Violins I" } > \ScoreFifteenFirstViolinA > >> > \layout { > \context { \Score > \remove "Timing_translator" > \remove "Default_bar_line_engraver" > } > \context { > \Staff > \consists "Timing_translator" > \consists "Default_bar_line_engraver" > } > \context { > \Voice > \remove "Forbid_line_break_engraver" > } > indent = 26\mm > } > } > %%%%%%%%%%%%%%%%%%%%%%%%
Hi, you likely know lily breaks only at matching BarLines. So you have to insert a \bar "" at appropriate place. Which is tricky here, because there is _no_ appropriate place. Well, then create one, i.e. instead of the original event, insert same simultaneous music like << e { s \bar "" s } >> and then figure out which duration the first skip must have. Which is tricky as well. For that purpose I use: ctxMom = \applyContext #(lambda (ctx) (format #t "\nin context~a: ~a" ctx (ly:context-current-moment ctx))) and insert \ctxMom where I wrote \break (below I've did it in FifteenHarpsUpper) and before the second skip of the inserted simultaneous music in FifteenFlute. Now I can scale the duration of the first skip until both values of \ctxMom match. %%%%%%%%%%%%%%%%%%%%%%%% \version "2.19.81" ctxMom = \applyContext #(lambda (ctx) (format #t "\nin context~a: ~a" ctx (ly:context-current-moment ctx))) \language "english" #(set-global-staff-size 16) gliss = \markup { \larger \italic "gliss." } FifteenFlute = { << { \relative { R1 | R1\fermataMarkup | \override Staff.TimeSignature.stencil = ##f \time 25/16 \scaleDurations 8/4 { bf''8[(\mf a16]) r } \scaleDurations 7/4 { bf8[( a16]) r } \scaleDurations 6/4 { bf8[( a16]) r } bf8[( a16]) r \time 4/4 \tuplet 5/4 { bf8( c df ef << e { s1*15/320 \bar "" \ctxMom s } >> } fs2 \time 7/8 \scaleDurations 7/8 { e4 ds cs bs) } \time 9/16 R1*9/16\fermataMarkup \time 4/4 } } >> } ScoreFifteenFirstViolinA = { << { \relative { d'8(\p\>\glissando^\gliss g)\! r4 \override DynamicText.X-offset = #-2 g8(\mp\>\glissando^\gliss b)\! r4 | b8(\mf\>\glissando^\gliss d)\! r4 \revert DynamicText.X-offset d8(\f\>\glissando^\gliss e)\! r4\fermata | R1*3 | R1\fermataMarkup | } } >> } FifteenHarpsUpper = { << { \relative { R1 | R1\fermataMarkup | \key a \major a''16\mf \repeat unfold 9 { gs a } b bs cs d ds e cs a e cs e gs a | \break \ctxMom \repeat unfold 9 { b as } b cs ds e b gs e8 r \acciaccatura ds' e r\fermata | } } >> } FifteenHarpsLower = { << \clef bass { \relative { R1 | R1\fermataMarkup | \key a \major \clef treble \repeat unfold 4 { a16 e' cs e a e cs e } | \repeat unfold 2 { a, fs' d fs a fs d fs } | gs, e' d e gs e d e gs,8 r \clef bass \acciaccatura ds e r\fermata | } } >> } \score { << \new Staff \with { instrumentName = "Flute" } \FifteenFlute \new PianoStaff \with { instrumentName = "Harpsichord" } << \new Staff \FifteenHarpsUpper \new Staff \FifteenHarpsLower >> \new Staff \with { instrumentName = "Violins I" } \ScoreFifteenFirstViolinA >> \layout { \context { \Score \remove "Timing_translator" \remove "Default_bar_line_engraver" } \context { \Staff \consists "Timing_translator" \consists "Default_bar_line_engraver" } \context { \Voice \remove "Forbid_line_break_engraver" } indent = 26\mm } } %%%%%%%%%%%%%%%%%%%%%%%% HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user