On Sun, Oct 26, 2025 at 8:56 PM David Kastrup <[email protected]> wrote:

> Dan Eble <[email protected]> writes:
>
> > This currently compiles without warnings.
> >
> > ```
> > \version "2.25.30"
> > \new Voice \with {
> >   \propertySet Staff.instrumentName "Quack"
> > } {
> >   \contextPropertyCheck Staff.instrumentName #'()
> >   \contextPropertyCheck Voice.instrumentName "Quack"
> >   R1
> > }
> > ```
> >
> > It seems wrong to set the property in Voice quietly when the user
> > wrote "Staff".
>
> Why?  If the user puts a setting that is normally Staff-wide (like
> \ottava #1) in a \with-block of a Voice, why would you assume that they
> don't know what they are doing?
>

To me as an experienced user who has not followed the evolution of the
usage of \with blocks, it seems a bit surprising that after explicitly
requesting the Staff.instrumentName property to be changed, the
Voice.instrumentName property is what is actually changed.

See my revised code:

\version "2.25.11"
\new Staff \with {
  instrumentName = "QuackStaff"
}{
\new Voice \with {
   \propertySet Staff.instrumentName "Quack"
} {
   \contextPropertyCheck Staff.instrumentName #'()
   \contextPropertyCheck Voice.instrumentName "Quack"
   R1
}
}


This displays the staff instrument name "QuackStaff", not "Quack".  And I
have no idea why the \propertySet doesn't work.

Perhaps warning about it would be useful.  But I'd hate to break the
current working that David describes below.



>
> If they put \hide TimeSignature in the \with-block of a Staff context,
> would you want to warn about it because \hide TimeSignature is
> implemented as \override Bottom.TimeSignature.transparent = #t and Staff
> is no Bottom context?
>
> > What would be ideal?
> >
> > A. warn about it (and do whatever is easily maintained)
> > B. allow setting properties in enclosing contexts
> > C. ...
>
> I'd leave things as they are.
>
> --
> David Kastrup
>


Carl

Reply via email to