[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \fixed and \relative
From: |
David Kastrup |
Subject: |
Re: \fixed and \relative |
Date: |
Thu, 18 Mar 2021 15:17:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Aaron Hill <lilypond@hillvisions.com> writes:
> On 2021-03-18 5:24 am, David Kastrup wrote:
>> So "a feature I would like \fixed to have" is more a function of
>> persuading a significant majority that your interpretation of \fixed
>> f''
>> is clearly the best for the sake of all users.
>
> I would hope I made a good initial argument already. But to add to
> it, such proposed behavior would be backwards compatible providing
> folks currently follow the convention to only use C as the note name.
> And even then, convert-ly probably could change any existing incorrect
> usage to the appropriate form using C as the note name. The trick
> would be knowing what \language the user has set so that "do" gets
> used when appropriate.
There is an expansive convert-ly rule for converting \relative ... { to
\relative { in the history. It was reverted immediately after
application because it was not, strictly speaking, "necessary" but put
our code and documentation base into a more "recommended practice"
state.
Let me check.
commit c46d53772b63822bfefa08ce4e1d8ee4a4c0aeb2
Author: David Kastrup <dak@gnu.org>
Date: Mon May 18 00:02:12 2015 +0200
Revert "Issue 3229: Prefer \relative { ... } over \relative x'' { ... }"
This reverts commit 94644b3a701073c99eabb88d95b20cd3f3ac5af0.
commit d36171e34d236d890f5dc511b895037188c6c7cb
Author: David Kastrup <dak@gnu.org>
Date: Sun May 17 19:28:06 2015 +0200
Run scripts/auxiliar/update-with-convert-ly.sh
Afterwards revert all changes in Documentation/snippets/*.ly (thus
retaining Documentation/snippets/new), then run
scripts/auxiliar/makelsr.py, leaving only the files in
Documentation/snippets/new and their versions in Documentation/snippets
converted: if we don't want to retain the automatic conversion rule, we
only want to keep those files which do not get reconverted on reimport.
commit 94644b3a701073c99eabb88d95b20cd3f3ac5af0
Author: David Kastrup <dak@gnu.org>
Date: Thu Mar 7 00:23:16 2013 +0100
Issue 3229: Prefer \relative { ... } over \relative x'' { ... }
As a followup to the commits for issue 3245, this conversion rule
replaces uses of \relative with reference pitch by those without
reference pitch for a number of patterns where convert-ly can detect the
first actual note reliably.
The rule is prepared to skip over files containing \include or \language
with a non-c-using notename language since the patterns do not work for
them.
However, this part of the rule is disabled in this commit as it turns
out that the LilyPond code base converts well (and more thoroughly)
without it.
>> And then you still need to think about how to implement it. That's not
>> trivial either.
>
> At a quick glance, this could likely be nothing more than comparing
> pitch step numbers. Anytime a pitch whose octave is to be adjusted
> has a lower step number than the reference pitch, you need to shift up
> one more octave to compensate for the scale starting on a different
> note. Something I have not investigated is how the reference octave
> is currently being stored.
It isn't. Take a look at how \relative is implemented...
> If it is just an octave number, then additional data will need to be
> persisted so the proposed \fixed could work.
--
David Kastrup