lilypond-user
[Top][All Lists]
Advanced

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

Re: Percent repeat counter in Staff with ChordNames


From: Robert Schmaus
Subject: Re: Percent repeat counter in Staff with ChordNames
Date: Wed, 30 Dec 2015 20:30:29 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

Hi David,

as you pointed out a week ago, this works fine:

\version "2.19.18"

\score {

  \new Staff
  \with {
    \accepts "ChordNames"
    \consists Percent_repeat_engraver
  } {
    % some written out music
    c''4 c'' c'' c''

    % switch to changes
    \chords {
      \set Staff.countPercentRepeats = ##t
\set Staff.repeatCountVisibility = #(every-nth-repeat-count-visible 4)
      \repeat percent 8 { c1 : maj7 }
    }
  }
}


It stops working however, if I go from 2.19.18 to 2.19.34. Feature or bug?

Best, Robert



Am 23/12/15 um 21:03 schrieb David Kastrup:
Robert Schmaus <address@hidden> writes:

Dear Lilyponders,

I have the following problem: Within a staff of "normal" written
music, I include chord names to indicate improvised/soloing
passages. If a chord is repeated over a large-ish number of bars, I'd
like to use percent repeats and possibly the counter, too.
But I can't get the counter to work:

%%%%%%%%%%%%%%%

\version "2.19.18"

\score {

   \new Staff
   \with {
     \accepts "ChordNames"
     \consists Percent_repeat_engraver
   } {
     % some written out music
     c''4 c'' c'' c''

     % switch to changes
     \chords {
       \set countPercentRepeats = ##t
       \set repeatCountVisibility = #(every-nth-repeat-count-visible 4)
       \repeat percent 8 { c1 : maj7 }
     }
   }
}

%%%%%%%%%%%%%%%%

Everything works fine except the Percent Repeat Counter. If I switch
from \chords { ... } to \chordmode { ... }, the counter works, but I
no longer get ChordNames but stacked notes.

Is something missing from the \with { ... } statement?

No, from the \set statements.  They are setting countPercentRepeats and
repeatCountVisibility in the Bottom context while the engraver actually
looking at them is in Staff context and consequently queries the
properties at Staff level which are unfazed by changes at Bottom.

So you need to write

    \set Staff.countPercentRepeats = ...

and similar.




reply via email to

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