lilypond-user
[Top][All Lists]
Advanced

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

Re: Ghost" trills


From: Flaming Hakama by Elaine
Subject: Re: Ghost" trills
Date: Thu, 6 Aug 2020 13:31:55 -0700



From: David Sumbler <david@aeolia.co.uk>
To: lilypond-user@gnu.org
Date: Thu, 06 Aug 2020 18:11:43 +0100
Subject: "Ghost" trills
Having implemented some of the methods shown in Vaughan's marvellous
tutorial at
https://lists.gnu.org/archive/html/lilypond-user/2020-06/msg00114.html
I have been making rapid progress in setting the orchestral piece which
is my latest project.

But suddenly I came across a problem which, try as I might, I can't
figure out or solve.   I have managed to work around it.  Despite that
I should very much like to understand what is going on here so that I
will be better able to deal with similar or related problems in future.
Also the work-around makes my input code considerably more complex, and
may not work well if line breaks get moved around.

The problem is that, after using trillspanners, sometimes the trill
reappears later on after a change of staff setup.  The code below
reproduces this problem.  I have also attached a pdf file containing
the output.

In this example, it is quite easy to get rid of the unwanted
trillspanners in the second line by making small, apparently random,
alterations in the input.  For instance, if the 4th bar in the upper
instrument is changed to 2 minims, or the same bar in the lower
instrument is changed to a semibreve, the rogue trillspanners
disappear.  However, it is not true  to say that the trillspanners
always disappear whenever the rhythms in the two instruments are
exactly the same, and of course it wouldn't be a useful solution to the
problem even if it were true.  In fact, in my actual score the 2
instruments do have identical rhythms, but I still get these unwanted
trills in the next system.

My work-around, incidentally, involves creating another pair of staves
with a different VerticalAxisGroup.remove-layer value, and changing
\instScorePlan to use the first pair up to and including the trills,
and the replacement pair thereafter.  Not very elegant, and if there
were many trill passages it would quickly become unwieldy in the
extreme.

Can anyone figure out why these spare trills are appearing, and how one
can get rid of them reasonably simply?

David

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.21.2"

instOne = \relative {
  a'1 | a | a |
  a1 \startTrillSpan | a1 \stopTrillSpan |
  a | a | a | a | a | a | a |
}

instTwo = \relative {
  f'1 | f | f |
  f2 \startTrillSpan f2 \startTrillSpan | f1 \stopTrillSpan |
  f | f | f | f | f | f | f |
}

targetStaff = #(define-scheme-function (ctx) (string?)
  #{
    \set Staff.keepAliveInterfaces = #'()
    \context Staff = #ctx { \unset Staff.keepAliveInterfaces }
  #})

instScorePlan = {
  \targetStaff clarinetI s1*4
  \targetStaff bothClarinets s1*3
  \break s1*5 \break s1*5
}

\score {
    \new StaffGroup \with {
    \consists "Keep_alive_together_engraver" }
  <<
    \new Staff = bothClarinets \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 40 }
    << \partCombine \instOne \instTwo \instScorePlan >>
    %% Clarinets on 2 staves:
    \new Staff = clarinetI \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 20 }
    << \instOne \instScorePlan >>
    \new Staff = clarinetII \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 20 }
     << \instTwo \instScorePlan >>
  >>
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


I'm still on 2.19, but this reproduced there, too.
I'm surprised this syntax works, since it seems like it would be introducing unbalanced start/stop:

      f2 \startTrillSpan f2 \startTrillSpan | f1 \stopTrillSpan |

But even adjusting that to stop the first trill, the problem was still there.

      f2 \startTrillSpan f2 \stopTrillSpan \startTrillSpan | f1 \stopTrillSpan |


I'm not sure what the purpose of the targetStaff is, but seems like you get the desired output if you just comment it out.

Must be there for some other reason.  I guess you need a less minimal MWE to show why you need that.


\version "2.19.81"

instOne = \relative {
  a'1 | a | a |
  a1 \startTrillSpan | a1 \stopTrillSpan |
  a | a | a | a | a | a | a |
}

instTwo = \relative {
  f'1 | f | f |
  f2 \startTrillSpan f2 \stopTrillSpan \startTrillSpan | f1 \stopTrillSpan |
  f | f | f | f | f | f | f |
}

targetStaff = #(define-scheme-function (ctx) (string?)
  #{
    % \set Staff.keepAliveInterfaces = #'()
    % \context Staff = #ctx { \unset Staff.keepAliveInterfaces }
  #})

instScorePlan = {
  \targetStaff clarinetI s1*4
  \targetStaff bothClarinets s1*3
  \break s1*5 \break s1*5
}

\score {
    \new StaffGroup \with {
    \consists "Keep_alive_together_engraver" }
  <<
    \new Staff = bothClarinets \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 40 }
    << \partcombine \instOne \instTwo \instScorePlan >>
    %% Clarinets on 2 staves:
    \new Staff = clarinetI \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 20 }
    << \instOne \instScorePlan >>
    \new Staff = clarinetII \with {
      \RemoveAllEmptyStaves
      \override VerticalAxisGroup.remove-layer = 20 }
     << \instTwo \instScorePlan >>
  >>
}


HTH, 

Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

reply via email to

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