lilypond-devel
[Top][All Lists]
Advanced

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

Re: problems with \cueDuring and events


From: Thomas Morley
Subject: Re: problems with \cueDuring and events
Date: Mon, 15 Apr 2019 22:11:15 +0200

Am Mo., 15. Apr. 2019 um 02:26 Uhr schrieb Dan Eble <address@hidden>:
>
> On Apr 14, 2019, at 08:10, Thomas Morley <address@hidden> wrote:
> >
> > As far as I understand, it's the partcombiner at work here.
> > At least:
> >
> > \version "2.21.0"
> >
> > %% use \partcombine with lowercase "c" for lower versions
> > \partCombine
> >  \relative { fis'8 fis4. \repeat tremolo 4 { b16 c } r1 }
> >  \relative { c'8 s2..  cis1 }
> >
> > returns similiar warnings and output.
>
> I wasn’t paying much attention until “partcombiner.”  Now I’m reading through 
> this thread in the archive, but I’m having trouble making the connection.  
> Was the part combiner involved at all before this mention?
>
> Similar warnings could simply indicate a shared cause.
>
> Regards,
>
> Dan
>

Yep, after further research I think it has nothing to do with the
partcombiner itself. Rather the problem with \repeat tremolo is
present here in the quoting-topic _and_ in the partcombiner.

Related issues for the partcombiner:
https://sourceforge.net/p/testlilyissues/issues/5281/
https://sourceforge.net/p/testlilayissues/issues/3374/

For the quoting-stuff I probably found the cause of the trouble,
although I've no clue how to fix.

%% Let's look at an example:

quoteMe =
{ r2 <>\< \repeat tremolo 8 { c''32 d'' } e''1\! }
\addQuote quoteMe \quoteMe

%% And some diagnostic code:

#(define display-some-event-props
  (lambda (ctx event)
    (let ((mus-cause (ly:prob-property event 'music-cause)))
      (format #t "\nFound ~a at ~a with span-direction ~a"
        (ly:prob-property mus-cause 'name)
        (ly:context-current-moment ctx)
        (ly:prob-property mus-cause 'span-direction)))))

eng =
#(lambda (ctx)
  (make-engraver
    (listeners
      ((crescendo-event engraver event)
        (display-some-event-props ctx event))
      ((tremolo-span-event engraver event)
        (display-some-event-props ctx event)))
    (acknowledgers
      ((beam-interface engraver grob source-engraver)
       (format #t "\n\nBeam created by ~a starts at ~a"
         source-engraver
         (ly:context-current-moment ctx))))
    (end-acknowledgers
      ((beam-interface engraver grob source-engraver)
       (format #t "\nBeam created by ~a ends at ~a\n"
         source-engraver
         (ly:context-current-moment ctx))))))

%% Calling the example code

\new Voice \with { \consists \eng } \quoteMe

%% returns in terminal:
%% Found CrescendoEvent at #<Mom 1/2> with span-direction -1
%% Found TremoloSpanEvent at #<Mom 1/2> with span-direction -1
%%
%% Beam created by #<Translator Chord_tremolo_engraver > starts at #<Mom 1/2>
%% Beam created by #<Translator Chord_tremolo_engraver > ends at #<Mom 3/4>
%%
%% Found TremoloSpanEvent at #<Mom 1> with span-direction 1
%% Found CrescendoEvent at #<Mom 1> with span-direction 1

%% Note the ending TremoloSpanEvent at #<Mom 1> (like the crescendo)
%% But the beam ends at #<Mom 3/4>

%% If you now try, i.e. the tremolo-end is _not_ quoted,
\new Voice \with { \consists \eng } { c''2 \quoteDuring "quoteMe" { s2 }  d''1 }

%% then you see in terminal among others:
%%
%% Found CrescendoEvent at #<Mom 1/2> with span-direction -1
%% Found TremoloSpanEvent at #<Mom 1/2> with span-direction -1
%%
%% Beam created by #<Translator Chord_tremolo_engraver > starts at #<Mom 1/2>
%% Beam created by #<Translator Chord_tremolo_engraver > ends at #<Mom 3/4>
%%
%% Beam created by #<Translator Chord_tremolo_engraver > ends at #<Mom 1>

%% Neither tremolo nor crescendo is ended, the Beam is ended twice ... a mess
%% For the Hairpin a warning is done, nothing more,
%% The Chord_tremolo_engraver warns as well but is not that smart later,
%% Several programming errors are thrown.

%% But if you ensure the tremolo-end is quoted as well, all's fine:
\new Voice \with { \consists \eng } { c''2 \quoteDuring "quoteMe" { s1 }  d''2 }


So the culprit seems to be the tremolo is per design ended at the
following timestep, which may or may not be in the quote.

So far my findings, best
  Harm



reply via email to

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