lilypond-user
[Top][All Lists]
Advanced

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

Re: Current octave in relative mode


From: David Kastrup
Subject: Re: Current octave in relative mode
Date: Sun, 17 May 2020 01:48:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

antlists <address@hidden> writes:

> On 17/05/2020 00:04, David Kastrup wrote:
>> antlists <address@hidden> 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?

No?  \resetRelativeOctave resets the current relative position to a
specified _absolute_ pitch.  But in the given situation, the function
does not _have_ a specified absolute pitch to revert to.

> 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
>   }
> }

He was writing a _function_ using an expression twice.  Not ad-hoc code.
This function would not know what to use for c' here.

> 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.

In that case, it would make much more sense to write

arpeggio = \relative c' { c e g c }

since then arpeggio does not leave the current relative position lying
around in some obscure location but rather does not touch it at all.

-- 
David Kastrup



reply via email to

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