Am Mi., 5. März 2025 um 02:32 Uhr schrieb Eric Benson <[email protected]>:
>
> 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

Reply via email to