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: Wed, 13 May 2020 17:38:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Paul McKay <address@hidden> writes:

> Hi
> I can't help thinking that this has probably been suggested before, but in
> case it hasn't I've set out my thoughts here. In the past I've used
> Sibelius and I like the way that it applies sharps and flats from the key
> signature automatically. This really doesn't seem to conform to the way
> Lilypond does things, but my suggested change, I think, should do much the
> same. I habitually use English as the Lilypond \language, so please bear
> with me.
>
> If I'm writing music in F, then I suggest that I be able to use *bF*  as a
> pitch instead of *bf*. The *F* would indicate that all subsequent *b*s
> would be flattened until one is encountered with a different accidental or
> until the end of the current music expression.

<< \new Staff \new Voice { b { b \repeat unfold bF b } b } { b } >>

What is the current music expression?  Where does it end?

> It should have the same scope as \stemUp or similar.

\stemUp does not have a scope.  It is an override.  Its effects are
bound to the current _context_ which may extend into music expressions
defined arbitrarily far behind or before the current music expression.

The effects of a \key statement extend to the current _Staff_ context
even if given only in a single Voice.  It decides during iteration which
of the pitches in the music is in need of an accidental and which not,
according to accidental rules.

> As I see it, the changes in the parser would be small: we would need
> to introduce an explicit 'natural' indication and to recognize
> capitalized accidentals. (In the case of accidentals with more than
> one letter, then I leave it to the implementors to decide whether all
> need to be capitalized or just one.)

Before one even states "the changes in the parser would be small", one
has to figure out whether it is in the interest of the user to implement
this kind of thing in the _parser_: typesetting transposition is
implemented as a music function and thus basically operates during
parsing parser, midi transposition happens during iteration, repeat
chords and pitching of unpitched rhythms happens during scorification,
relative mode works via a music function and consequently during
parsing, pitches without duration get the default duration
parser-internally and so on: this is half a dozen can of worms that is
comparatively tricky to distribute across LilyPond in a manner where it
tends not to interfere with user expectations all too much.


What's with

music = { b a c bS }

{ b bF \music b b }

for example?  Which b should be natural? Which b should be sharp ?
Which flat?

> You will notice that although the key signature will be the most
> probable reason for using this idea, I'm simply suggesting an
> extension to the way of expressing which pitches I want in a way which
> is independent of key signature and in keeping with the way Lilypond
> does this (at least the way I use it 🙂 ) It also means that all
> current scores continue to work without modifications.

Given the number of English-speaking LilyPond users who all share the
somewhat strange habit of calling a b-flat "b" if there is a flat in the
key signature, it is sort of a safe bet that you are not the first to
make this kind of proposal.

I will not rule out that at some point of time LilyPond's notename
implementation will be flexible enough that one could implement one
basic version of that idea on top of it.  It would not make it less of a
bad idea, however.

-- 
David Kastrup



reply via email to

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