[Top][All Lists]

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

Re: \tweak Score.MetronomeMark.X-offset

From: Jean Abou Samra
Subject: Re: \tweak Score.MetronomeMark.X-offset
Date: Thu, 25 Nov 2021 20:28:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Le 25/11/2021 à 20:15, Werner LEMBERG a écrit :
If I want to offset a `\tempo` mark horizontally, only

   \override Score.MetronomeMark.X-offset = #3
     \tempo ...

works.  Writing

   \tweak MetronomeMark.X-offset #3 \tempo ...
has no effect.

For reference, this is

I now wonder whether it would be possible to extend
the `\tweak` command to accept also the context:

   \tweak Score.MetronomeMark.X-offset #3 \tempo ...

It doesn't make sense in the logic of \tweak.
The problem is how to let the user select a
grob on the page from the text input. \override
and \tweak take two different approaches:
while \override applies to all grobs created
at the same moment in a certain scope given
by a context, \tweak looks at the cause of
a grob in the music stream. The cause does
not have anything to do with a context. The
problem with \tweak on \tempo specifications
containing "duration = bpm" is that they are
represented as SequentialMusic containing a
TempoChangeEvent and a \set for tempoWholesPerMinutes
(try \displayMusic \tempo 4 = 80). \tweak should
affect the TempoChangeEvent in this case. I
have not investigated whether it would be saner
to change \tweak's logic or to refactor
\tempo to emit one single event, where
tempoWholePerMinutes would be set by an engraver
listening to this event.

In case this isn't possible it would be nice to document it in the NR
sections about `\tweak` and `\override`– only stems, automatic beams,
accidentals, clefs, and time signatures are mentioned as not working
with `\tweak`.

You can \tweak accidentals, stems and beams with
the \tweak Accidental.blabla syntax (read the next
paragraph in the documentation :-). The problem with
\tweak on clefs or time signatures is exactly the same
as the one with \tempo.


reply via email to

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