Menu

#202 merge-differently-headed should work for more than just two voices

Accepted
nobody
None
Enhancement
2015-09-15
2006-12-30
Anonymous
No

Originally created by: *anonymous

Originally created by: *anonymous

Originally created by: gpermus@gmail.com

% the docs don't specify that merge-differently-headed only
% works for 2 voices, so I assume this is a bug rather than
% a feature request.  -gp

% merge-differently-headed only works on the first two
% voices in a << {} \\ {} \\ {} >> construct

\paper {ragged-right = ##t}

\relative c' {
  \override Staff.NoteCollision #'merge-differently-headed = ##t
  <<
    { d'2 a2 } \\
    { e,2 e2 } \\
    { d''8 c8 r4  a8 f'8 r4 }
  >>
}
1 Attachments

Discussion

  • Google Importer

    Google Importer - 2006-12-30

    Originally posted by: hanw...@gmail.com

    this is a doc problem / feature request.

    merge-differently-headed was only meant for opposing stem dirs
    (ie. Voice 1 & 2). Merging would create incorrect notation here.
    If submitter disagrees, please ask for scan.

    Status: Invalid

     
  • Google Importer

    Google Importer - 2006-12-30

    Originally posted by: gpermus@gmail.com

    (No comment was entered for this change.)

    Status: Verified

     
  • Google Importer

    Google Importer - 2007-01-01

    Originally posted by: Carl.D.S...@gmail.com

    Here is an example of a single-staff guitar piece that has four voices in one staff. Merges are apparent between voice 1 and voice 2, and between voice 2 and voice 3.

    I've also included an .ly file and a .png of the results of 2.10.5 when trying to reproduce something like the scanned score.

     
  • Google Importer

    Google Importer - 2007-01-04

    Originally posted by: gpermus@gmail.com

    I'm not familiar with guitar notation, but FourVoicesOneStaff.png (I only see 3 voices, though) looks pretty good to me.

    This is a non-trivial feature request, especially since voice 3 keeps on changing the stem direction, but I think it's a good one.

    Summary: merge-differently-headed should work for >2 voices
    Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low
    Status: Accepted

     
  • Google Importer

    Google Importer - 2007-01-04

    Originally posted by: Carl.D.S...@gmail.com

    FourVoicesOneStaff.png shows four, not three, voices. There are two full-time, staff-down voices in the measure. The opening staff-down note is a dotted-half b, which is tied to the second measure. On beat two of the measure, there is a half-note f, also with stem down. (There is no rest for this voice on the first beat, so it's not a full voice). To replicate this music in Lilypond requires four voices, AFICT.

     
  • Google Importer

    Google Importer - 2007-01-23

    Originally posted by: Carl.D.S...@gmail.com

    This item can now be closed, as far as I can tell.

    I've got a snippet that demonstrates a workaround, and might possibly be added to the manual.

    Here's some proposed language for the docs:

    If three or more notes line up in the same column, merge-differently-headed can't successfully complete the merge of the two notes that should be merged. To allow the merge to complete, apply a @code{\shift} to the note that should not be merged.

    % \shiftXxx can be used to avoid "warning: too many clashing note columns"
    
    % the first shared note, d''2 and d''8 is shared between voice1 and voice2
    % the second shared note, e,8 and e'2, is shared between voice2 and voice3
    %  an error message is given, and the notehead is _not_ a half note
    
    \version "2.10.5"  %Windows XP
    
    \paper { indent = 0\mm ragged-right = ##t }
    
    \relative c' {
      \override Staff.NoteCollision #'merge-differently-headed = ##t
      <<
        { d=''2   g2 }
        \\
        { \stemNeutral d=''8 c8 r4 e,8 c'8 r4 }
        \\
        { \voiceFour e,,2 e'2 }
      >>
      <<
        { d=''2 \shiftOn  g2 }
        \\
        { \stemNeutral d=''8 c8 r4 e,8 c'8 r4 }
        \\
        { \voiceFour e,,2 e'2 }
      >>
    }
    %  end of .ly snippet.
    
     
  • Google Importer

    Google Importer - 2008-05-30

    Originally posted by: v.villenave

    (Reproduced with 2.11.47) Carl, this kind of workaround could be added to the LSR now, tagged as "workaround". However, your code still produces some collisions.

    Summary: merge-differently-headed should work for >2 voices

     
  • Google Importer

    Google Importer - 2011-10-16

    Originally posted by: pkx1...@gmail.com

    2.15.5 images attached including Carl's workaround from comment #6 above which gives me some output warning:

    --snip--
    GNU LilyPond 2.15.15
    Processing `test.ly'
    Parsing...
    test.ly:4:4: warning: octave check failed; expected "d''", found: "d'"
    << {
        d=''2   g2 } \\ {\stemNeutral d=''8 c8 r4 e,8 c'8 r4 } \\ { \voiceFour e,,2 e'2} >>
    test.ly:5:4: warning: octave check failed; expected "d''", found: "d'"
    << {
        d=''2 \shiftOn  g2 } \\ {\stemNeutral d=''8 c8 r4 e,8 c'8 r4 } \\ { \voiceFour
    Interpreting music...
    Preprocessing graphical objects...
    test.ly:4:12: warning: ignoring too many clashing note columns
    << {d=''2  
                g2 } \\ {\stemNeutral d=''8 c8 r4 e,8 c'8 r4 } \\ { \voiceFour e,,2 e'2} >>
    Finding the ideal number of pages...
    
    --snip--
    

    Summary: merge-differently-headed should work for more than just two voices
    Owner: ---
    Labels: -Priority-Low

     

Log in to post a comment.