lilypond-devel
[Top][All Lists]
Advanced

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

Re: \fine, pre-process-in-final-translation-timestep & co.


From: Jean Abou Samra
Subject: Re: \fine, pre-process-in-final-translation-timestep & co.
Date: Wed, 20 Jul 2022 00:46:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Le 18/07/2022 à 22:21, Dan Eble a écrit :
Imagining myself in the position of a user looking at a black box, I would not have much 
respect for a developer trying to make me believe that LilyPond needs more information 
than "\volta 2 \fine" to determine that the work ends there.  I don't want to 
be that developer.

I would give these examples:


\version "2.23.11"

\repeat segno 2 {
  \repeat volta 2 {
    c'1 1 1 1 1 1 1 1
  }
  \volta 2 \fine
  \mark \default
  c'1 1 1 1 1
}


vs.


\repeat segno 2 {
  \repeat volta 2 {
    c'1 1 1 1 1 1 1 1
    \tweak self-alignment-X #RIGHT \mark "Ad lib"
  }
  \volta 2 \fine
  c'1 1 1 1 1
}
-----


\repeat segno 2 {
  \repeat volta 2 {
    c'1 1 1 1 1 1 1
  }
  \volta 2 \fine
  \tempo "Lento"
  c'1 1 1 1 1
}


vs.


\repeat segno 2 {
  \repeat volta 2 {
    c'1 1 1 1 1 1 1
    \tweak self-alignment-X #RIGHT \tweak font-size -3 \tempo "La seconda volta 
accelerando"
  }
  \volta 2 \fine
  c'1 1 1 1 1
}


-------


\repeat segno 2 {
  \repeat volta 2 {
    \once \override Staff.BarLine.color = red
    \bar ".|:"
    c'1 1 1 1
    \mark \markup \with-color #red "Repeated twice"
    1 1 1
    \once \override Staff.BarLine.color = red
  }
  \volta 2 \fine
  c'1 1 1 1 1
}


vs.


\repeat segno 2 {
  c'1 1 1 1 1 1 1
  \volta 2 {
    \tweak font-size -4 \mark \markup \with-color #red "Always use a double bar line 
at the end"
    \once \override Staff.BarLine.color = red
    \fine
  }
  c'1 1 1 1 1
}




In an earlier message, you wrote:

and "fully" explicit makes me chuckle in light of issue #34.


I'm not sure what your reasoning is, but mine leads me to the opposite.
The more I think about it, the more I prefer this option. The problem
in issue #34 is exactly that the input does not specify how to order
graces and events in other voices, so LilyPond is left to guess.

As you can see from the examples above, we're not at risk of finding
a perfect solution to that guessing game anytime soon. We are left with
creating heuristics.

At this point, I think I have exhausted my creativity for inventing
such heuristics, without a satisfactory solution emerging that doesn't
require a large rewrite of the code base that I won't be investing time
into in the near future.

Then we have the style of solution found in !1451, with per-engraver
heuristics. I honestly dislike this. I don't want to sound harsh, but
although a very nice feature, \fine is just one among hundreds of features
in LilyPond. I'm not a fan of letting it spill all over the code base
and requiring people who write and modify engravers (including users writing
engravers in Scheme) to think about it. Is the benefit of slightly less
verbose syntax really worth it?

Not to mention that we probably need a way for the user to override
the built-in heuristics if they fail.

If you're really bothered by the redundancy, I think it should be possible
to make this work:

\repeat segno 2 {
  ...
  \alternative { % maybe, or maybe not require this
    \volta 1 {
      ...
    }
  }
}


Actually, this doesn't yield anything useful:

\repeat volta 2 {
  c'1 1 1 1
  \volta 2 \fine
  c'1 1 1
}

whereas this does:

\repeat volta 2 {
  c'1 1 1 1
  \alternative {
    \volta 1 {
      c'1 1 1
    }
  }
}

(and I wonder if \alternative should really be necessary, as discussed
elsewhere). So this syntax looks more consistent to me, as it works
similarly with \repeat volta and \repeat segno.

That said, it's not that I really care all that much about the syntax.
Above all, I would like to avoid adding logic to all/many unrelated
engravers.


PS: thinking again about this

After all, it might be the only fully correct of doing it. Imagine a hairpin
starting before fine and ending after. How steep the change in MIDI volume
should be depends on its end moment and the absolute dynamic that is there,
which can’t be known if translation is aborted at \fine.

I have not found a meaningful case where it would occur.





reply via email to

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