Menu

#4012 Strange collision avoidance with multiple voices

Accepted
nobody
None
Ugly
2015-09-11
2014-07-14
Anonymous
No

Originally created by: *anonymous

Originally created by: dak@gnu.org

In the following code, the r8 is moved to a strange position.

:::TeX
\new Staff
<< \new Voice { d16 fis'16 b a <a fis>8 r8 r2 }
   \new Voice { \stemDown d,2 } >>

It turns out that replacing r8 with \tweak Stem.direction #UP r8 or equivalently \single \stemUp r8 is sufficient for stopping the problem.

Somewhat absurdly, even \tweak Stem.direction #CENTER r8 is enough to stop the problem.

It is rather startling that Stem.direction has an influence on the positioning of rests.  It is also quite unclear what kind of collision this positioning is supposed to avoid.

1 Attachments

Discussion

  • Google Importer

    Google Importer - 2014-07-14

    Originally posted by: dak@gnu.org

    It would seem that moving the kind of information that rests currently seem to derive from Stem.direction for whatever reason to a place specific for rests would also help to facilitate an option for merging rests from multiple voices in a central position, a frequent request encountered on the mailing list.

     
  • Google Importer

    Google Importer - 2014-07-14

    Originally posted by: k-ohara5...@oco.net

    Rests do move based on Rest.direction if it is set, since issue 1410, although their direction of collision avoidance falls-back to Stem.direction if Rest.direction is not set.  The Stem.direction rest in the central voice is the same as that for a note on center-line, which is down.    The rest is trying to make it clear that it not in the same voice as the low D, which would have worked if the other notes in its voice were below that D.

    The music above, of course, should use \voiceOne for the upper voice.

    I think Rest.direction==CENTER is not distinguished from an un-set direction, so to give it the desired meaning (merge rests) we would have to create that distinction, or stop falling-back to use the Stem.direction.  Probably Rests should not reference the stem-direction anyway, issue 1625.

     

    Related

    Issues: #1410
    Issues: #1625

  • Trevor Daniels

    Trevor Daniels - 2015-09-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,14 +2,17 @@
    
     *Originally created by:* [dak@gnu.org](http://code.google.com/u/dak@gnu.org/)
    
    -In the following code, the [r8] is moved to a strange position.
    +In the following code, the r8 is moved to a strange position.
    
    +~~~~
    +:::TeX
     \new Staff
    -&lt;&lt; \new Voice \{ d16 fis'16 b a &lt;a fis&gt;8 [r8] [r2] \}
    -&nbsp;&nbsp; \new Voice \{ \stemDown d,2 \} &gt;&gt;
    +<< \new Voice { d16 fis'16 b a <a fis>8 r8 r2 }
    +   \new Voice { \stemDown d,2 } >>
    +~~~~
    
    -It turns out that replacing [r8] with \tweak Stem.direction \#UP [r8] or equivalently \single \stemUp [r8] is sufficient for stopping the problem.
    +It turns out that replacing r8 with \tweak Stem.direction \#UP r8 or equivalently \single \stemUp r8 is sufficient for stopping the problem.
    
    -Somewhat absurdly, even \tweak Stem.direction \#CENTER [r8] is enough to stop the problem.
    +Somewhat absurdly, even \tweak Stem.direction \#CENTER r8 is enough to stop the problem.
    
     It is rather startling that Stem.direction has an influence on the positioning of rests.&nbsp; It is also quite unclear what kind of collision this positioning is supposed to avoid.
    
    • Needs: -->
    • Patch: -->