lilypond-user
[Top][All Lists]
Advanced

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

Re: Suggestion to make sharps and flats persistent


From: David Kastrup
Subject: Re: Suggestion to make sharps and flats persistent
Date: Sat, 16 May 2020 13:32:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Paul McKay <address@hidden> writes:

> Hi David
> I agree that searching backwards would be horrific. I was not thinking it
> would be implemented that way. Suppose one could write something like the
> following:
>
> itsInDmajor = { \override Voice.pitchTweaks = #( (f fs) (c cs) )
>
> music = { \ itsInDmajor d4 f a c d }
>
> and implement it where *pitchTweaks* is a list property of Voice or perhaps
> Score too. If missing or empty, it would do nothing. There would need to be
> 3 methods on this object: *addOrReplace(pitchInput, pitchOutput);
> remove(pitchInput); *and *tweaked Pitch(pitchInput);*
> The *tweakedPitch* method would return the *pitchInput* unless that pitch
> was in the list.
>
> As soon as the parser has recognized something as an input pitch it would
> substitute the tweaked  pitch. Putting fS in the music would be syntactic
> sugar for:
>
>    - create  Voice.pitchTweaks if necessary
>    - Voice.pitchTweaks.addOrReplace(f, fs)
>
> I can't program Scheme or Python and don't know the internals of LilyPond
> so I'm sure to have got some syntax errors in the above, but I hope it
> explains better what I've been thinking.

Putting aside that we are not talking about "syntax errors" but a lot of
misconceptions about parser and interpretation, we could boil the
essentials down to a pitch's alteration having the ability to not just
be numerical (like 0, 1/2, -1/2) but also "unspecified" (like #f or so),
with the ultimate assignment happening at music execution time.

This would be a complete nightmare for transposition (turning
transposition into some weird key-dependent mixture of ordinary and
modal transposition), tablature, thematic variation (transposing by a
fourth would only work if you also changed key signature, and nobody
does that), pitch comparison (is f-unspecified higher or lower than
e-sharp ?) and a number of other things.  The situation of how input is
done in WYSIWYG programs is somewhat different: generally the program
will have a concept of the actual pitch and changing a key signature
will consequently add/remove/change accidentals of the covered music.

When this is not the case (and if I remember correctly, it wasn't even
in the text-based input of ancient "SCORE"), automated transposition of
motives is not really feasible, nor is changing of accidental notation
conventions (like LilyPond's \accidentalStyle does).

-- 
David Kastrup



reply via email to

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