On 2022-11-11 6:37 am, Joel C. Salomon wrote:
can

    r8 es \duration_subtract{2.}{8} f2 …

be made to work?  (With whatever syntax.)

Similarly, I have music that would benefit from:

    dyn_part = {
      % \p at start, \f at third bar, \p at second-to last bar
      <>\p
      \after 1*2 \f
      \after \duration_subtract {\skip \mus_part} {1*2} \p
      \skip \mus_part
    }

Is this useful?

%%%%
durations =
#(define-scheme-function
  (op left right)
  ((symbol? 'add) duration-or-music? duration-or-music?)
  (make-duration-of-length
    (apply
      (case op
        ((add) ly:moment-add)
        ((subtract) ly:moment-sub))
      (map
        (lambda (x)
          (if (ly:duration? x)
            (ly:duration-length x)
            (ly:music-length x)))
        (list left right)))))

fiz = { 4 4 }
baz = { 2 }
buz = { \tuplet 3/2 { 8 8 } }

\after
  \durations subtract
    \durations \fiz \baz
    \buz
  { \voiceTwo \buz }
  { \fiz \baz }
%%%%


-- Aaron Hill

Reply via email to