lilypond-devel
[Top][All Lists]
Advanced

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

Re: thoughts on changing \magnifyMusic, please comment


From: Mark Polesky
Subject: Re: thoughts on changing \magnifyMusic, please comment
Date: Wed, 23 Jul 2014 13:26:33 -0700

David Kastrup wrote:
> Does that mean that magnifyStaff would not refer to the
> previous value of properties?  Because if it did,
> \magnifyStaff 1 would seem like a noop.

The first time magnifyStaff is called, it scales everything
as it is, so if the user does this:

  %% default 'thick-thickness is 6
  \override Staff.BarLine.thick-thickness = 4
  %% first use of \magnifyStaff
  \magnifyStaff 0.5

then the new 'thick-thickness will be 2 (and not 3).
Internally, the value of 'thick-thickness will have been
changed to `2' with ly:context-pushpop-property, which does
the equivalent of a \temporary \override.

Subsequent calls to \magnifyStaff will first revert the most
recent layer of temporary overrides, but only if the
magnification value is different from last time.  So unless
the user changed settings mid-stream, we're left with the
user's original settings, which are then scaled anew, using
the new magnification value (but only if the the
magnification value is different from last time), and so on.

Any mid-stream user overrides should be done with \temporary
and should be reverted before changing staff sizes again.  I
should discuss this in the docs.

I chose the above-mentioned design because I feel that this:

  \magnifyStaff 0.75
  ...
  \magnifyStaff 1   % reset to original size

is more intuitive than this:

  \magnifyStaff 0.75
  ...
  \magnifyStaff 1.33  % reset to original size

Also, this way I can add a command \resetStaffSize which
would just be syntactic sugar for `\magnifyStaff 1', if
anyone desires.

> If it doesn't, it might be mapped to a sequence of
> overrides.  If that would be the case, it would mean that
> you could use
>
> \temporary \magnifyStaff 1.3
> ...
> \undo \magnifyStaff 1.3
>
> and indeed \magnifyMusic could then be implemented in such
> a manner if it is still desired, though its size would not
> be relative to the current size.

As it is currently designed, that's not possible, since
\magnifyStaff relies on applyContext, and we get:

  warning: Cannot make ApplyContext revertible

If the current design is unacceptable, please let me know
soon so I can alter it.  Hopefully it's good as it stands.

Thanks for your comments,
Mark


reply via email to

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