|
From: | Lukas-Fabian Moser |
Subject: | Re: Three-note tremolo in 4/4 |
Date: | Tue, 16 Mar 2021 21:33:22 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
Hi Jan,
But it only works if there's no clash with the time signature. So you can have three arguments in a 3/4 or 3/2 or 6/8 but not in a 4/4. Conversely, you can have four tremolo pitches in a 4/4 but not 3 -- at least not without the kind of hack devised by Lukas in the first response to my email.
And then again, to do so without generating warnings from LP, I suppose you would indeed have to modify tremolo properties on a more fundamental level. That's currently beyond my LP knowledge, however.
I think we needn't worry too much about that warning: It states that some calculation of stem lengths (which make sense for the "c32 g f" _expression_ if taken without the \repeat tremolo) yields an unlikely value. I don't understand the internals at the moment, and I agree that it would be nice to have a solution that does not trigger warnings, but I wouldn't mind just suppressing the warning.
Thanks to Aaron Hill, there's even a nice way to suppress the
right amount (3) of expected instances of that warning (taken from
https://lists.gnu.org/archive/html/lilypond-user/2019-09/msg00326.html).
So, what about:
\version "2.22.0"
#(define ly:expect-warning-times
(lambda args
(for-each (lambda _ (apply ly:expect-warning (cdr args)))
(iota (car args)))))
\new Staff \relative {
a'4 b c d
\omit Dots
\once\override Beam.positions = #'(2 . 1)
#(ly:expect-warning-times 3 "weird stem size, check for narrow
beams")
\repeat tremolo 16 { { c32*2/3 g f } }
\undo\omit Dots
a4 b c d
}
I'm not even convinced that I would call this solution a "hack" (of course it's no use arguing about that term):
- It is the correct music (try exchanging "tremolo" by
"unfold"!).
- The dots that I had to suppress manually actually make sense: 16
groups of notes consisting of three 32's each do amount to 3*16/32
= 3/2 of a whole measure, after all. So, what we generate is a
1.*2/3, and I don't mind having to tell LilyPond explicitly to
engrave this by just omitting the dot.
- But I concede that LilyPond's default positioning of the beams
isn't good enough. That might qualify as a bug, and the fact that
manually supplying the placement triggers a warning doesn't help
things - and of course having to suppress a warning is a bit
hack-ish... :-)
I think what I want to say is that none of this involves, for
example, deviating from the actual semantics of entered music
("hijacking staccato dots and turning them into flower-symbols"),
or explicitly abusing side-effects of commands, etc. Instead, we
write the actual music we want to hear and force-set only those
layout parameters that LilyPond isn't at the moment ready to
supply automagically.
Lukas
[Prev in Thread] | Current Thread | [Next in Thread] |