lilypond-user
[Top][All Lists]
Advanced

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

Re: Fermata above and below bar line generates warnings


From: Thomas Morley
Subject: Re: Fermata above and below bar line generates warnings
Date: Sun, 26 Feb 2017 11:40:31 +0100

2017-02-26 2:15 GMT+01:00 Knute Snortum <address@hidden>:
> On Sat, Feb 25, 2017 at 2:07 PM, Thomas Morley <address@hidden>
> wrote:
>>
>> 2017-02-25 22:42 GMT+01:00 Knute Snortum <address@hidden>:
>> > The following code produces the correct output of fermatas above and
>> > below
>> > the bar line, but it also emits warnings.  Is there another way to do
>> > this
>> > without warnings, or can the warnings be suppressed?  I got this code
>> > from:
>> >
>> > http://lsr.di.unimi.it/LSR/Snippet?id=10
>> >
>> > \version "2.19.55"
>> >
>> > \score {
>> >   \new GrandStaff <<
>> >     \context Staff = one {
>> >       c'1 \bar "|."
>> >       \override Score.RehearsalMark.break-visibility =
>> > #begin-of-line-invisible
>> >       \mark \markup { \musicglyph #"scripts.ufermata" }
>> >     }
>> >     \context Staff = two \with { \consists "Mark_engraver" } {
>> >       c'1
>> >       \override Staff.RehearsalMark.direction = #DOWN
>> >       \mark \markup { \musicglyph #"scripts.dfermata" }
>> >     }
>> >   >>
>> > }
>> >
>> > ---
>> > Knute Snortum
>> > (via Gmail)
>>
>>
>> Hi,
>>
>> the warning happens because two different RehearsalMarks are read by
>> the Mark_engraver in Score-context, one of them is dropped, again: in
>> Score-context!!
>> But the Mark_engraver is in the Staff-context of the lower Staff as
>> well. So this engraver prints the fermata below.
>>
>> A naughty coding, not working around but using this behaviour would be:
>>
>> \version "2.19.52"
>>
>> \score {
>>   \new GrandStaff <<
>>     \context Staff = one {
>>       c'1 \bar "|."
>>     }
>>     \context Staff = two \with { \consists "Mark_engraver" } {
>>       c'1
>>       \override Score.RehearsalMark.break-visibility =
>> #begin-of-line-invisible
>>       \override Staff.RehearsalMark.direction = #DOWN
>>       \override Staff.RehearsalMark.rotation = #'(180 0 0)
>>       \mark \markup { \musicglyph #"scripts.ufermata" }
>>     }
>>   >>
>> }
>>
>>
>>
>> Cheers,
>>   Harm
>
>
> Wow, that code confuses me, I admit it!  Is the Mark_engraver printing the
> upper *and* lower fermata in context "two"?

Be aware there are two(!) Mark_engravers present.
One in score, the default.
And the second in the lower Staff.

The Score-Mark_engraver prints the RehearsalMark as usual above the
topmost Staff

<<
  \new Staff { c'1 }
  \new Staff {
    c'1
    \override Score.RehearsalMark.break-visibility = ##(#t #f #f)
    \mark "X"
  }
>>

Any override for RehearsalMark in _Staff_-context will do nothing.

<<
  \new Staff { c'1 }
  \new Staff {
    c'1
    \override Score.RehearsalMark.break-visibility = ##(#t #f #f)
    \override Staff.RehearsalMark.color = #red
    \mark "X"
  }
>>

So far the default.

Adding the Mark_engraver to the lower _Staff_ will print he
RehearsalMark again, but at Staff-level.

<<
  \new Staff { c'1 }
  \new Staff \with { \consists "Mark_engraver" } {
    c'1
    \override Score.RehearsalMark.break-visibility = ##(#t #f #f)
    \mark "X"
  }
>>

Now you can override the appearance of the Staff-level-RehearsalMark
_without_ disturbing the Score-level-RehearsalMark.

Other example:

<<
  \new Staff { c'1 }
  \new Staff \with { \consists "Mark_engraver" } {
    c'1
    \override Score.RehearsalMark.break-visibility = ##(#t #f #f)
    \override Staff.RehearsalMark.direction = #DOWN
    \override Staff.RehearsalMark.stencil =
    #(lambda (grob) (grob-interpret-markup grob "I'm below"))
    \mark "I'm above"
  }
>>

Cheers,
  Harm



reply via email to

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