Le 27/10/2022 à 12:10, Paul Hodges a écrit :
This is not (yet) a specific query, I'm afraid. My new project is going to push my usage of LilyPond way beyond what I've done up till now. I have already found solutions for a couple of new challenges, and a partial solution to a third.But my main issue is polyrhythms. There are two instruments, and some of the time they play in sync, with the same barring, and barlines which join across the system; then at other times they separate, and may play a section at different speeds and barring, coming together again later. I know that I have to move the Timing_translator engraver from Score context to Staff, but so far my searching has not shown me how to work further with this. How, for instance, do I indicate the points at which the parts meet (within a polyrhythmic section), and how to change between synchronised and polyrhythmic sections?Does anyone have any hints, guidance, or experience which might help get me started? I have attached a bad scan of a couple of lines of the MS to give an idea of what I'm facing.
For a start, have a look at the documentation: https://lilypond.org/doc/v2.22/Documentation/notation/displaying-rhythms#polymetric-notationSeveral techniques related to polyrhythms are explained there with examples, including moving Timing_translator and using \scaleDurations.
From the image you sent, I actually don't understand where the polyrhythms are, can you elaborate?
See attached for .ly code for the beginning of your excerpt (it gave me some busywork to relax…). As you can see, there are unsurprisingly lots of tweaks. I hope this gets you started for the rest.
Best, Jean
\version "2.22.2" \paper { page-breaking = #ly:one-line-auto-height-breaking } tupletText = #(define-scheme-function (num dur) (index? ly:duration?) #{ \markup { #(number->string num) : \smaller \note #dur #UP } #}) beamArrow = \once \override Stem.stencil = #(grob-transformer 'stencil (lambda (grob orig) (let* ((begin-pos (ly:grob-property grob 'stem-begin-position)) (len (ly:grob-property grob 'length)) (dir (ly:grob-property grob 'direction)) (end (+ begin-pos (* dir len))) (half-space (* 1/2 (ly:staff-symbol-staff-space grob)))) (ly:stencil-add orig (ly:stencil-translate (grob-interpret-markup grob #{ \markup \general-align #X #LEFT \fontsize #6 \arrow-head #X #RIGHT ##t #}) (cons (- (interval-end (ly:stencil-extent orig X)) 0.1) (- (* end half-space) ;; could be computed ... 0.7))))))) \layout { \context { \Score \remove Timing_translator \remove Default_bar_line_engraver } \context { \Staff \consists Timing_translator \consists Default_bar_line_engraver } \context { \StaffGroup \name StaffBracket systemStartDelimiter = #'SystemStartBracket \override SystemStartBracket.collapse-height = 0 } \context { \StaffGroup \accepts StaffBracket } } \new StaffGroup \with { systemStartDelimiter = #'SystemStartBar } << \new StaffBracket \new Staff \with { instrumentName = "Fl." } \fixed c'' { \clef treble \time 2/4 \accidentalStyle forget \override Beam.damping = #+inf.0 b32\f\>( ais) cis-. dis'-. cis-. fis( gis) e-. \once \tupletUp \once \override TupletBracket.bracket-visibility = ##t \once \override TupletBracket.positions = #'(7.5 . 7.5) \once \override TupletNumber.text = \tupletText 7 4 \tuplet 7/8 { dis'-. e-. cis( d!) e-. dis'-. e-. } % Is there a better way to have beamed rests? \once \tupletUp \once \override TupletBracket.bracket-visibility = ##t \once \override TupletNumber.text = \tupletText 6 4 \once \override TupletBracket.positions = #'(8 . 8) \tuplet 6/4 { \once \override Beam.positions = #'(-5 . -5) g!16-.[ << \new Voice { \override Rest.staff-position = 0 r } { \once \hide NoteHead e, } >> \acciaccatura dis'8 e16 << \new Voice { \override Rest.staff-position = 0 r } { \once \hide NoteHead e, } >> g-.\p << \new Voice { \override Rest.staff-position = 0 r } { \once \hide NoteHead e,] } >> } r4 \once \override BreathingSign.break-align-symbol = #'staff-bar \once \override BreathingSign.Y-offset = 3 \breathe \stopStaff \once \override Staff.BarLine.bar-extent = #'(-2 . 2) \override Staff.StaffSymbol.line-count = 1 \startStaff \grace s4 \stopStaff \revert Staff.StaffSymbol.line-count \startStaff \bar "|" \once \omit TupletNumber \tuplet 3/2 { s16\f s cis'-_ \tweak outside-staff-priority ##f \tweak staff-padding ##f \tweak padding 0.8 \tweak parent-alignment-X #CENTER _\markup \override #'(baseline-skip . 0) \column { \arrow-head #Y #UP ##t \draw-line #'(0 . -2) \arrow-head #Y #DOWN ##t } } \once \override Staff.BarLine.allow-span-bar = ##f \bar "|" \stopStaff \override Staff.StaffSymbol.line-count = 1 \once \override Staff.BarLine.bar-extent = #'(-2 . 2) \startStaff \newSpacingSection \override Score.SpacingSpanner.spacing-increment = 3 s16 \stopStaff \revert Staff.StaffSymbol.line-count \newSpacingSection \startStaff \bar "|" cis'16->\ff \bar "|" } \new StaffBracket \new Staff \with { instrumentName = "Cb." } \fixed c { \time 2/4 \clef bass \accidentalStyle forget \override Beam.damping = #+inf.0 r4 \once \tupletUp \once \override TupletBracket.bracket-visibility = ##t \once \override TupletNumber.text = \tupletText 9 4 \once \override TupletBracket.positions = #'(8 . 8) \tuplet 9/8 { << \new Voice { \override Rest.staff-position = 0 r32 } { \once \hide NoteHead f,\p\<[ } >> b!( \set stemRightBeamCount = 2 c') \set stemLeftBeamCount = 2 ees'-. aes-. \set stemRightBeamCount = 2 ees'-. \set stemLeftBeamCount = 2 f'( d'! ges)] } \stemDown \once \tupletUp \once \override TupletBracket.bracket-visibility = ##t \once \override TupletBracket.positions = #'(6 . 6) \once \override TupletNumber.text = \tupletText 6 4 \tuplet 6/4 { << \new Voice { \override Rest.staff-position = 0 r16 } { \once \hide NoteHead f,[_\markup \italic \smaller \smaller "c.l. batt." } >> <des ges>-! << \new Voice { \override Rest.staff-position = 0 r16 } { \once \hide NoteHead f, } >> q-! << \new Voice { \override Rest.staff-position = 0 r16 } { \once \hide NoteHead f, } >> q]-! } c'16_\markup \italic \smaller arco ges32( \set stemRightBeamCount = 2 f) \set stemLeftBeamCount = 2 d'!( ees') c'16\! \once \override BreathingSign.direction = #DOWN \once \override BreathingSign.break-align-symbol = #'staff-bar \once \override BreathingSign.Y-offset = -3.5 \breathe \grace { aes8(\f ges) } \stemUp \once \override TupletBracket.bracket-visibility = ##t \once \override TupletNumber.text = \tupletText 3 8 \once \override TupletBracket.positions = #'(8 . 8) \once \override TupletBracket.X-positions = #'(1 . 10) % TODO: could be automatic \tuplet 3/2 { a,!16[_+\< b! << \new Voice { \override Rest.staff-position = 0 r16 } { \once \hide NoteHead \beamArrow b]\! } >> } \stemNeutral \stopStaff \override Staff.StaffSymbol.line-count = 1 \startStaff \once \override Staff.BarLine.bar-extent = #'(-2 . 2) \bar "|" s16 \stopStaff \revert Staff.StaffSymbol.line-count \startStaff \bar "|" a,!16-> \bar "|" } >>
Connolly Tesserae.pdf
Description: Adobe PDF document