Export to GitHub

lilypond - issue #1214

Cue notes to music that creates a sub-voice does not work


Posted on Aug 11, 2010 by Helpful Horse

I'm running into problems with cue notes when the quoted voice has a section of parallel notes somewhere in the piece. E.g. quoteMeII = \relative c' { c4 c c c | << { \voiceTwo c2 } \new CueVoice { \voiceOne \parenthesize g'2 } >> } r \addQuote quoteMeII \quoteMeII \relative c'' { c4 \cueDuring #"quoteMeII" #DOWN { r2 } c4 | c1 | }

Here you would expect that during the r2 the two c'4 from \quoteMeII are quoted. But actually, no cue notes are shown.

Apparently, if a \new *Voice is created anywhere in the quoted voice, \cueDuring will only recognize the contents of the LAST created voice. In particular, here only the notes from the \new CueVoice will be used!

Sample file is attached, showing this behavior.

I regard this as a bug in our cueDuring/quoteDuring functionality.

Does anyone know a proper fix for this? I'm under some time pressure, as I need to send the final score to my customer as soon as possible...

Cheers, Reinhold

Comment #1

Posted on Aug 12, 2010 by Happy Rhino

Trying to compile this produces an error message.

Could somebody clean up the example and upload a png showing the problem?

Comment #2

Posted on Aug 12, 2010 by Happy Camel

As Reinhold noted, this is a more general issue, since (a) the problem appears with \quoteDuring as well as \cueDuring, and (b) it doesn't matter what kind of context is instantiated in the cued (or quoted) voice.

Here's a simpler example:

%% BEGIN %% \version "2.13.29"

quoteMe = \relative c' { c4 c c c | % Remove explicit instantiation, and the problem goes away \new Voice { c4 c c c } }

\addQuote quoteMe \quoteMe

\relative c'' { c4 \cueDuring #"quoteMe" #DOWN { r2 } c4 } %% END %%

Attachments

Comment #3

Posted on Aug 12, 2010 by Happy Camel

The bug occurs because recording-group-emulate' (scm/part-combiner.scm) returns a list that is inappropriate for using inadd-quotable'.

I assume that the structure of the returned list is suitable for use with part combining, but maybe we should be using something different in `add-quotable' ?

Comment #4

Posted on Aug 13, 2010 by Happy Camel

Please ignore my previous comment. The problem lies elsewhere, possibly in quote-iterator.cc.

Comment #5

Posted on Oct 5, 2010 by Grumpy Dog

A workaround in many cases is to tag the ly statements that create the sub voice(es) and pass the music to \addQuote through \removeWithTag.

Comment #6

Posted on Jun 29, 2011 by Swift Ox

The problem here is that recording-group-emulate returns the list of contexts in reverse order, so the last created voice is returned as the first element of the list -- and the first element of the list is used for quoting...

I don't think it's easy to determine which voice to quote in this case. We only have the list of all contexts created by the expression, so maybe we can somehow extract the first Voice rather than implicitly assuming the the last created context will be the voice that should be quoted.

Comment #7

Posted on Jul 21, 2011 by Swift Ox

Actually, it was rather trivial to fix the problem. The part-combiner already used the proper way (using assoc-get) to extract the voice from the result of recording-group-emulate. Only add-quotable used a completely wrong approach.

Patch is up for review at: http://codereview.appspot.com/4816044/

Comment #8

Posted on Jul 22, 2011 by Quick Kangaroo

Make works but fails on reg test check.

---snip-- Processing /home/jlowe/lilypond-git/build/out/lybook-testdb/aa/lily-c55a6eaf.ly' Parsing... Renaming input to:/home/jlowe/lilypond-git/input/regression/quote-cyclic.ly' Interpreting music... Interpreting music... Interpreting music... ERROR: Value out of range: 0

--snip--

\sourcefilename "/home/jlowe/lilypond-git/input/regression/quote-cyclic.ly"

James

Comment #9

Posted on Jul 23, 2011 by Swift Ox

New patch is up that fixes quote-cyclic.ly (or rather it fixes quoting where the argument is already a full voice rather than a music expression).

http://codereview.appspot.com/4816044/

Comment #10

Posted on Jul 24, 2011 by Quick Kangaroo

make passes and reg test check is ok.

Comment #11

Posted on Aug 13, 2011 by Swift Ox

Pushed with commit 1b11dc0cb1bec0e353773aac6b8afba9030f88c4

Comment #12

Posted on Sep 1, 2011 by Happy Bird

(No comment was entered for this change.)

Status: Verified

Labels:
Type-Defect Priority-Medium fixed_2_15_9