lilypond-user
[Top][All Lists]
Advanced

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

Re: \harmonicsOff


From: David Kastrup
Subject: Re: \harmonicsOff
Date: Mon, 21 Jan 2013 15:08:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Noeck <address@hidden> writes:

> Am 21.01.2013 14:19, schrieb David Kastrup:
>> Noeck <address@hidden> writes:
>>> Am 21.01.2013 09:16, schrieb Eluze:
>>>> \harmonicsOn/Off seem to work at a Voice level, so writing
>>>> \new Voice {\harmonicsOn … \harmonicsOff … }
>>>> will probably do it
>>>
>>> As you say, it works with '\new Voice' but does not without.
>>> I always thought that implicitely a Voice context is created
>> 
>> When?  \harmonicsOn is not a context creating command.
>
> In the example quoted above, like:
> {\harmonicsOn a \harmonicsOff a} % ex. 1
>
>> 
>>> and that a command applies to the lowest context (which is Voice here)
>> 
>> No, it is Score.  And since the Staff created when the implicit Voice
>> gets created at the first note has its own idea of noteheads, and since
>> Staff settings overrule Score settings, you don't get to see anything.
>
> Ok, do I understand it right:
> in the ex. 1 above, a score is created at '{ \harmonicsOn' and that has
> no effect, because \harmonicsOn only applies to Voices.

So, it has no effect because the Staff created later has its own
noteheads setting.  \harmonicsOn sets properties in the current context,
and whatever context deals with the note events will look at the active
properties.  And since noteheads are usually engraved at the voice
level, any staff-level setting (unless empty) will override the score
settings.

> Then the 'a' creates a Voice context and this does not know about the
> \harmonicsOn.
>
> That sounds a bit like a trap for beginners.
>
>
>>> If that is no special feature with a good reason,
>> 
>> \new Staff { \harmonicsOn ...
>> 
>> is able to affect _all_ Voices in a Staff.  
> With that information, I thought the following would yield the same
> (since there is only one Voice in the Staff):
> \new Voice { \harmonicsOn a \harmonicsOff a }
> \new Staff { \harmonicsOn a \harmonicsOff a }
>
> But it doesn't. In the Staff context, the \harmonicsOn works, but the
> harmonicsOff does not (probably, because there is a Voice by then and
> the harmonics are set on staff level before and the Staff settings
> override the Voice settings).

The Staff settings don't override the Voice settings, but \harmonicsOff
just clears out the current settings in the current context.  And there
are none in Voice to clear.  Try

\new Staff { \harmonicsOn a \context Staff \harmonicsOff a }

>> \new Staff \with { \harmonicsOn } ...
> With that syntax being possible with the current version, I would
> suggest to consider a change, because the current implementation has
> serveral pitfalls.

A changed implementation would have different pitfalls.  It does not
seem like a good idea to do a far-reaching change like that without even
an attempt of analyzing the results.

-- 
David Kastrup




reply via email to

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