lilypond-user
[Top][All Lists]
Advanced

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

Re: multiple marks


From: Jacques Menu
Subject: Re: multiple marks
Date: Mon, 12 May 2014 15:14:02 +0200

Hello Carlo,

Adding:

HiddenMeasureAndBarLine = { % from the snippets repository
% the hidden measure and bar line
% \cadenzaOn turns off automatic calculation of bar numbers
\cadenzaOn
% \once \override Score.TimeSignature #'stencil = ##f
\once \omit Score.TimeSignature
\time 1/16
s16 \bar ""
\cadenzaOff
}

and replacing:

\mark "Solo"

with:

\HiddenMeasureAndBarLine
\time 4/4

\mark "Solo"

solves the issue.

But you’ll probably be better of placing the equivalent of this in repeatMark itself?

JM

Le 12 mai 2014 à 14:11:03, Carlo Vanoni <address@hidden> a écrit :

Hi everyone,

I'm using this nice function to add a right-aligned text that states the number of repeats of a repeat block:
repeatMark =
#(define-music-function
     (parser location volte visible)
     (number? boolean?)
     (if visible
   #{
     \once \override Score.RehearsalMark #'break-visibility =
     #begin-of-line-invisible
     \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
     \once \override Score.RehearsalMark #'font-size = #0
     \mark \markup $(string-join (list "repeat" (number->string volte)
     "times"))
   #}
   #{ #}
   ))

It is called with this code at the end of a section
\repeatMark #4 ##t    % writes "repeat 4 times"

I usually wrote section name using a markup on single notes (a1^\markup{ \bold Intro}). Now I'm separating the various song sections in different variables. Since the same section can be used, e.g., as a chorus and during the solo, I need to write the section name using a \mark before the section in the main score. This unfortunately generates a "multiple mark" error when repeats are involved.
Here is an example code:

%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.0"

chorus = \relative c'' { c d e c | c d e c | \break}
verse = \relative c'' { c c d d | c c d d | \break }

repeatMark =
#(define-music-function
     (parser location volte visible)
     (number? boolean?)
     (if visible
   #{
     \once \override Score.RehearsalMark #'break-visibility =
     #begin-of-line-invisible
     \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
     \once \override Score.RehearsalMark #'font-size = #0
     \mark \markup $(string-join (list "repeat" (number->string volte)
     "times"))
   #}
   #{ #}
   ))

song =
{
    \new Staff
    {   
        \verse
        \repeat volta 4
        {
            \mark "Chorus"
            \chorus
            \repeatMark #4 ##t
        }
        \repeat volta 6
        {
            \mark "Solo"
            \chorus
            \repeatMark #6 ##t
        }
    }
}

\score {  
    \song
}
%%%%%%%%%%%%%%%%%%%%%%%

Here, the "Solo" mark is dropped, due to the previous \repeatMark. What I want is to have the "Solo" mark written like the "Chorus" one. And, of course, the "reapeat N times" mark, too.
Is there a better (more correct) approach to get this behavior? Maybe with a little different \repeatMark function...

Thanks!



_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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