lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: Feathered Beam Timing


From: Steph Phillips
Subject: Re[2]: Feathered Beam Timing
Date: Sat, 11 May 2024 17:42:46 +0000
User-agent: eM_Client/9.2.2157.0

So after a little toying around with the suggestions from this thread, I've come up with the following:

%%%%%%%%%%%%%%%%%%%%

\once \override TupletNumber.text = \markup { \note-by-number #1 #0 #UP }
    \once \override TupletBracket.bracket-visibility = ##t
    \once \override TupletBracket.visible-over-note-heads = ##t
    \once \override TupletBracket.Y-offset = #-1.5
    \tupletUp \tuplet 6/8 {
        \once \override Beam.grow-direction = #LEFT
        \featherDurations 2/1 { d16[-. d-. d-. d-. d-. d]-. }
    }

%%%%%%%%%%%%%%%%%%%%

Pretty happy with how that looks, but now I'm having trouble converting it to a function. The following is what I've put together, but I can't seem to shake the compiler error.

%%%%%%%%%%%%%%%%%%%%

\version "2.24.2"

customTuplet = #(define-music-function
(parser location displayed-note y-off beam-left tuplet-up feather-ratio tuplet-ratio notes)
  (number? number? boolean? boolean? moment? moment? ly:music?)
   #{
\once \override TupletNumber.text = \markup { \note-by-number #displayed-note #0 #UP }
     \once \override TupletBracket.bracket-visibility = ##t
     \once \override TupletBracket.visible-over-note-heads = ##t
     \once \override TupletBracket.Y-offset = #y-off
     \once \override Beam.grow-direction = #(if beam-left LEFT RIGHT)
     #(if tuplet-up
        #{ \tupletUp \tuplet #tuplet-ratio {
             \featherDurations #feather-ratio { $notes }
           } #}
        #{ \tupletDown \tuplet #tuplet-ratio {
             \featherDurations #feather-ratio { $notes }
           } #}
     )
   #})

\score {
  \relative c'' {
    \time 4/4

\customTuplet #1 #-1.5 ##t ##t #(ly:make-moment 2/1) #(ly:make-moment 6/8) {
      d16[-. d-. d-. d-. d-. d]-.
    }

\customTuplet #2 #-1.5 ##f ##f #(ly:make-moment 2/1) #(ly:make-moment 5/8) {
      e16[-. e-. e-. e-. e-. e]-.
    }
  }
}

%%%%%%%%%%%%%%%%%%%%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]