lilypond-user
[Top][All Lists]
Advanced

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

Re: A notice about \mark when Mark_engraver is moved


From: Mats Bengtsson
Subject: Re: A notice about \mark when Mark_engraver is moved
Date: Thu, 23 Mar 2017 17:27:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 2017-03-23 10:18,  wrote:
Hello all!
I had need of printing marks on several staves, so I moved the
Mark_engraver to the Staff context, all according to LilyPond NR, see
snippet below. Then I noticed, that I could not control the contents of
Rehearsal marks any more, except for the first one. All successors were
follow in sequence from the start id just as  were they all defined as
\default. Hence the hash mark has no influence contrary to when the
Mark_engraver resides in Score. The only possibility to get another id
is to define it as a text mark.

In the IR manual they say that the Staff_collecting_engraver must be
moved together with the Mark_engraver so I did, but could see no effect
from that. I have also tested to move the engraver to the Voice context,
but with the the same result.

I am running version 2.18.2, and have not tested any newer version.

This is my example:|

|

|\version "2.18.2" A = { \mark #3 a'4 a' | \mark #6 a' a' | \mark
\markup "Z" a' \mark \default a' | a' } \score { << \new Staff \with {
\consists "Mark_engraver" \consists "Staff_collecting_engraver" } {
\time 2/4 \new Voice { \A } } >> \layout { indent = #0 \context { \Score
\remove "Mark_engraver" \remove "Staff_collecting_engraver" } } }|

||Result when Mark_engraver is moved

Any experience?
Well, by default, the \mark command is defined as (in .../ly/music-functions-init.ly)

mark =
#(define-music-function
   (label) ((number-or-markup?))
  "Make the music for the \\mark command."
  (let* ((set (and (integer? label)
(context-spec-music (make-property-set 'rehearsalMark label)
                                      'Score)))
         (ev (make-music 'MarkEvent
                         'origin (*location*))))

    (if set
        (make-sequential-music (list set ev))
        (begin
          (if label (set! (ly:music-property ev 'label) label))
          ev))))


If you copy this definition into the top of your file and replace 'Score by 'Staff, it should behave as you expect.

    /Mats



reply via email to

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