I understand. My expectation was that \tripletFeel would know about the \partial measure at the beginning of the piece and figure out the offset automatically, but that is not the case. Unfortunately in my application the \tripletFeel is applied in a file separate from the music definition. It looks like I will have to figure out a way to pass that offset as a parameter, unless there is a way to examine the music object to determine if it has a partial measure at the beginning.
On Wed, Mar 5, 2025 at 12:52 AM Thomas Morley <thomasmorle...@gmail.com> wrote: > Am Mi., 5. März 2025 um 02:32 Uhr schrieb Eric Benson <ebseat...@gmail.com > >: > > > > Here's a minimal example: > > > > \include "swing.ly" > > > > > > \score { > > > > \tripletFeel 8 { > > > > \partial 8 e8 | a2. \tuplet 3/2 { e8 e8 e8 } | > > > > } > > > > \midi{} > > > > } > > > > produces > > > > xx.ly:5:19: warning: bar check failed at: 1/24 > > > > > > Not a bug, but expected behaviour, look for `applySwingWithOffset´ in NR. > > Below your fixed example, additional a redefined `tripletFeel` which > takes the offset as optional argument. > > \version "2.25.24" > > \include "swing.ly" > > \score { > \applySwingWithOffset 8 #'(2 1) \musicLength 8 > { \partial 8 e8 | a2. \tuplet 3/2 { e8 e8 e8 } | } > \midi{} > } > > %% redefined > tripletFeel = > #(define-music-function > (offset swingDiv music) > ((ly:moment? ZERO-MOMENT) ly:duration? ly:music?) > (apply-swing > (ly:duration->number swingDiv) > '(2 1) > offset > music)) > > > \score { > \tripletFeel \musicLength 8 8 > { \partial 8 e8 | a2. \tuplet 3/2 { e8 e8 e8 } | } > \midi{} > } > > \score { > \tripletFeel 8 > { a2. \tuplet 3/2 { e8 e8 e8 } | } > \midi{} > } > > HTH, > Harm >