lilypond-user
[Top][All Lists]
Advanced

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

Re: Understanding marks in 2.24


From: Saul Tobin
Subject: Re: Understanding marks in 2.24
Date: Tue, 31 Jan 2023 14:53:44 -0800

I realized that the duplication is actually not an issue when using a MarkLine context, since it isn't collecting the events from multiple contexts, it's just listening to the event from the MarkLine itself. I guess I'll just stick with this way of doing things.

\version "2.24.0"
\language "english"

\layout {
  \context {
    \name "MarkLine"
    \type "Engraver_group"
    \consists Axis_group_engraver
    \consists Mark_engraver
    \consists Metronome_mark_engraver
    \consists Text_mark_engraver
    \override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \context {
    \Score
    \accepts MarkLine
    \remove Mark_engraver
    \remove Metronome_mark_engraver
    \remove Text_mark_engraver
  }
}

global = {
  \mark\default
  \tempo "foo"
  s1
  \mark\default
  \tempo "foo"
  s1
  \mark\default
  \tempo "foo"
  s1
  \textMark "foo"
  s1
}

music = \relative c'' {
  bf4 a c b
  bf4 a c b
  bf''4 a,, c b
  bf4 a c b
}

\score {
  <<
    \new MarkLine \global
    \new StaffGroup <<
      \new Staff << \global \music >>
      \new Staff << \global \music >>
    >>
  >>
}

On Tue, Jan 31, 2023 at 1:55 PM Saul Tobin <saul.james.tobin@gmail.com> wrote:
IMO deduplication wouldn't really be semantically contradictory, because the goal of allowing multiple simultaneous marks is to allow for multiple *different* marks at the same moment. And you could always have a context property to switch deduplication on/off.

The scheme evaluation challenges seem like the bigger issue.

Typically, the way I structure a score is to have a \global variable containing skips + all the information shared across all players, such as key, time, and marks. It goes a bit counter to that structure to either separate out \textMarks into their own variable or to use tagging to control where they display in the full score. Certainly doable, but IMO it would be worth at least clarifying in the documentation.

Thanks for the detailed response!

On Tue, Jan 31, 2023 at 1:48 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
On 31/01/2023 22:33, Jean Abou Samra wrote:
> Uh, why did I just write this already? The latter wouldn't
> be a problem. assign_event_once uses "equal?" The former,
> with procedures, is indeed a problem.
>
> Sorry for the noise.


Looking a bit more into define-markup-commands.scm, this
will occur at least with

\markup \score
\markup \score-lines
\markup \stencil
\markup \on-the-fly
\markup \with-string-transformer
\markup \if
\markup \unless

e.g.

<<
  \new Staff { \mark \markup A c' }
  \new Staff { \mark \markup A c' }
>>

vs.

<<
  \new Staff { \mark \markup \score { c' } c' }
  \new Staff { \mark \markup \score { c' } c' }
>>


Also, allowing several text marks at the same moment
is one of the root motivations for \textMark, so
deduplicating based on markup equality would feel
(IMHO) surprising.



reply via email to

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