On 17/05/2020 00:04, David Kastrup wrote:
antlists <antli...@youngman.org.uk> writes:
On 16/05/2020 23:19, David Kastrup wrote:
As I say, I think this function or something similar has made its way
into lilypond proper.
What advantage over the solution using make-relative that I posted do
you see here?
Because if I understand the OP correctly, what he wants is
\resetRelativeOctave, which is already a standard part of lilypond?
What he wants is music used twice within a function not to end up in
different octaves.
Isn't that what \resetRelativeOctave does? His description seems exactly
to match my problem with Pennsylvania 6-5-0-0-0
I'm guessing Han Wen's resetOctave is its predecessor.
So I guess - at the third attempt - my solution is the best because it
doesn't need a custom function at all :-)
make-relative has been part of LilyPond in its current form since
2.18.0. I am not sure what you call "custom function" in this context.
Particularly since your proposal contained a large amount of code.
It was an example which - obviously - predated both \resetRelativeOctave
and \makeRelative (you did notice the "version 2.8.0" at the start?)
I couldn't remember what \resetRelativeOctave was, so I was trying to
give him the clues he needed to find it. I did explicitly say "I think
it's now a standard part of lilypond" (implying it wasn't when that code
was written).
So let's give a very simple example of what I think he was trying to
achieve ...
arpeggio = { c e g c }
\new Staff {
\relative c' {
\arpeggio \resetRelativeOctave c'
\arpeggio \resetRelativeOctave c'
\arpeggio
}
}
Despite being in relative mode, all the arpeggios will now start on
middle C. The OP's eXample is more complicated but as far as I can tell
this is what he's aiming at.
Oh - and I believe
arpeggio = { \resetRelativeOctave c' c e g c }
would also work. I don't know for certain because I haven't had this
problem since Pennsylvania.
Cheers,
Wol