Thank you very much!

Am Samstag, dem 19.07.2025 um 00:47 +0200 schrieb Thomas Morley:
> Am Fr., 18. Juli 2025 um 19:06 Uhr schrieb Stefan Kägi
> <ska...@hispeed.ch>:
> > 
> > Hi,
> > 
> > it would be quite handy for me if I could use \featherDurations
> > when
> > specifying manual syllable durations:
> > 
> > \version "2.24.4"
> > 
> > music = \relative c' {
> > 
> >   \override Beam.grow-direction = #RIGHT
> >   \featherDurations 2/3
> >   \times 4/5 { c16[ c c c c ] }
> > }
> > 
> > words = \lyricmode {
> >   \featherDurations 2/3 { d16 d c d c }
> > }
> > 
> > 
> > \new Staff
> > <<
> > 
> >   \new Voice = "test" {
> >     \music
> >   }
> > 
> >   \new Lyrics
> > 
> >   {
> >     \words
> >   }
> > 
> > > > 
> > 
> > 
> > As far as I can tell this is not possible. I know, I could use
> > addlyrics, but in the rest of the piece it works better for me if I
> > can
> > specify the duration of each syllable manually.
> > 
> > Does anyone have an idea how to make this work or could someone
> > help me
> > with the math? Although I have read a thread about the calculation
> > of
> > feathered beams from a few years ago I am a bit struggling.
> > 
> > Thanks!
> > 
> 
> featherDurations=
> #(define-music-function (scale music) (scale? ly:music?)
>    (_i "Adjust feathered beam durations in @var{music} by
> @var{scale}.")
>    (let ((orig-duration (ly:music-length music))
>          (factor (scale->factor scale))
>          (multiplier 1))
>      (for-each
>       (lambda (mus)
>         (if (< 0 (ly:moment-main-denominator (ly:music-length mus)))
>             (begin
>               (ly:music-compress mus multiplier)
>               (set! multiplier (* factor multiplier)))))
>       (extract-named-music
>         music '(EventChord NoteEvent RestEvent SkipEvent
> LyricEvent)))
>      (ly:music-compress
>       music
>       (ly:moment-div orig-duration (ly:music-length music)))))
> 
> 
> music = \relative c' {
> 
>   \override Beam.grow-direction = #RIGHT
>   \featherDurations 2/3
>   \times 4/5 { c16[ c c c c ] }
> }
> 
> words = \lyricmode {
>   \featherDurations 2/3 { d16*4/5 d c d c }
> }
> 
> 
> \new Staff
> <<
> 
>   \new Voice = "test" {
>     \music
>   }
> 
>   \new Lyrics
> 
>   {
>     \words
>   }
> 
> > > 
> 
> HTH,
>  Harm

Reply via email to