Menu

#1321 Enhancement: add partcombineUp and partcombineDown functions

Started
needs_work
Enhancement
2015-10-29
2010-10-12
Anonymous
No

Originally created by: *anonymous

Originally created by: v.villenave
Originally owned by: dak@gnu.org

This feature request was posted by Mark on -devel a while back:
http://lists.gnu.org/archive/html/lilypond-devel/2010-03/msg00089.html

"""
While answering a question on -user, I found what looks like
an easily-solvable (?) limitation with /partcombine.  The
part-combiner.scm file is a little beyond me, but am I right
in thinking that /partcombine uses the equivalent of
/voiceOne and /voiceTwo when redistributing the notes?

If that's true, then the proposed functions would use:

partcombineUp   (voiceOne + voiceThree)
partcombineDown (voiceTwo + voiceFour)

This would allow combinations of 3 or even 4 voices to share
a common staff while taking advantage of the partcombine
functionality.  Would this be a trivial extension or is it
more complicated than that?
"

Discussion

<< < 1 2 (Page 2 of 2)
  • Google Importer

    Google Importer - 2013-09-11

    Originally posted by: dak@gnu.org

    Better match of partcombineUp/Down

    http://codereview.appspot.com/13242056

     
  • Google Importer

    Google Importer - 2013-09-11

    Originally posted by: dak@gnu.org

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-09-11

    Originally posted by: dak@gnu.org

    It's conceptually cleaner to have a separate disjoint modshared

    http://codereview.appspot.com/13242056

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2013-09-11

    Originally posted by: dak@gnu.org

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-09-12

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

    Patchy the autobot says: passes tests.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-09-15

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

    Patch on countdown for September 18 - 06:00 GMT

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2013-09-18

    Originally posted by: dak@gnu.org

    Patch counted down, please push.

    [donning developer hat]

    After trying to polish up the documentation in the manual and being somewhat put off by the use cases, I switched to a different approach, but it's not finished yet.  So putting this back to Needs_work.

    Labels: -Patch-countdown Patch-needs_work

     
  • Google Importer

    Google Importer - 2014-11-01

    Originally posted by: dak@gnu.org

    Rebase on current master

    http://codereview.appspot.com/13242056

    Labels: -Patch-needs_work Patch-new

     
  • Google Importer

    Google Importer - 2014-11-01

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

    Patchy the autobot says: passes tests.  includes a full make doc

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2014-11-01

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

    Discussion on the patch makes it clear that we can easily format the output of \partcombine as we like.  \partcombine does the work of finding the solo, unison, and chord-able sections from two parts, and distributing the into voices.  These voices are engraved in the normal way, which we can control if we know their names.

    soprano = { d''2 f'' g'' }
    tenor = { [r1]  c''2 }
    basso = { d'4 e' f' g' g'2 }

    \new Staff <<
        \new Voice {\voiceOne \soprano}

        \override Staff.CombineTextScript.direction = # DOWN
        \context Voice ="one" { \voiceFour }
        \context Voice ="two" { \voiceTwo }
        \context Voice ="shared" { \voiceFour }
        \context Voice ="solo" { \voiceFour }

        \partcombine \tenor \basso >>

    The difficult part is including the alto part.  We could use two \partcombine expressions in the staff, if we could make them output distinct-ly names Voices for alto-soprano and for tenor-bass.

     
  • Google Importer

    Google Importer - 2014-11-02

    Originally posted by: dak@gnu.org

    Well...

    soprano = { d''2 f'' g'' }
    alto = { b'2. c''4 c''2( e'') }
    tenor = { [r1]  c''2 }
    basso = { d'4 e' f' g' g'2 }

    \new Staff <<
      \new VoiceBox <<
        \context Voice = "one" { \voiceOne }
        \context Voice = "two" { \voiceThree }
        \context Voice = "shared" { \voiceOne }
        \context Voice = "solo" { \voiceOne }
        \partcombine \soprano \alto
      >>
      \new VoiceBox <<
        \override Staff.CombineTextScript.direction = # DOWN
        \context Voice ="one" { \voiceFour }
        \context Voice ="two" { \voiceTwo }
        \context Voice ="shared" { \voiceFour }
        \context Voice ="solo" { \voiceFour }

        \partcombine \tenor \basso
      >>
    >>

    \layout {
      \context {
        \Staff
        \accepts "VoiceBox"
      }
      \context {
        \name "VoiceBox"
        \type "Engraver_group"
        \defaultchild "Voice"
        \accepts "Voice"
      }
    }

    But we arrive back at the situation of "you don't seriously call that a user interface?".

     
  • Google Importer

    Google Importer - 2014-11-02

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

    That is lovely.

    The user-interface is verbose, but transparent.  It clarifies that we are merely setting the output of \partcombine in a new way, and might enable users to do the next thing they need that we haven't thought of yet.

    The grouping context VoiceBox (maybe name-regularized to VoiceGroup) is useful enough to be defined by default.  Its use here lets us keep the special voice-names, "one" "shared" etc., as they were, so old overrides continue to work.

    The verbose nature of the user-interface would be neatly packaged into music functions  \partcombineUp and \partcombineDown that return everything within each  \context VoiceBox.

     
  • Google Importer

    Google Importer - 2014-11-02

    Originally posted by: dak@gnu.org

    I think we have different ideas about the meanings of "lovely" and "user-interface".

     
  • Google Importer

    Google Importer - 2014-11-03

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

    Well, the clarity of the LilyPond language to adjust the \partcombine output is lovely in its clarity, and the user interface has lovely potential if something to do your VoiceBox becomes built-in by default.

    \new Staff <<
       \partcombineUp \soprano \alto
       \partcombineDown \tenor \basso
    >>

     
  • Google Importer

    Google Importer - 2014-11-04

    Originally posted by: dak@gnu.org

    I have my doubts that this approach, whether used internally or as "user interface", will be workable with grace notes.

     
  • Google Importer

    Google Importer - 2014-11-05

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

    Patch on countdown for November 8th

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2014-11-05

    Originally posted by: nine.fie...@gmail.com

    > The grouping context VoiceBox (maybe name-regularized to VoiceGroup) is useful enough to be defined by default.

    +1.  I use groups of voices to work around accidental-engraving problems caused by the part combiner.  If a VoiceGroup context were provided, it would be one less thing I'd have to define myself.

     
  • Google Importer

    Google Importer - 2014-11-05

    Originally posted by: dak@gnu.org

    Stopping countdown again while we are not even close to agreement that this is a step in the right direction.

    Providing VoiceGroup would be about a dozen lines each in engraver-init and performer-init.  However, it is a solution searching for problems: the real work would be going through the documentation and snippets and identifying situations where VoiceGroup would be a reliable solution for a certain problem class.

    We have, in particular in piano music, situations where stems or slurs or beams would do well to cross voices while other per-voice elements shouldn't.  An intermediate VoiceGroup might be a nice tool, but without accompanying music commands and/or mechanisms that will conveniently move the respective engravers and/or activate/deactivate them, it looks like missing potential.

    Labels: -Patch-countdown Patch-review

     
  • Google Importer

    Google Importer - 2014-11-05

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

    > workable with grace notes.
    \partcombine itself has an issue with initial grace notes, but I don't see any additional problems with the solution in your comment #37.

    Confirming that the discussion on linked patch indicates that it goes in the wrong direction; passing settings to control the voicing of the outputs of partcombine, through the internals of partcombine, makes the code more complex than needed.

    Labels: -Patch-review Patch-needs_work

     
  • Trevor Daniels

    Trevor Daniels - 2015-10-29
    • Description has changed:

    Diff:

    
    
    • assigned_to: David Kastrup
    • Needs: -->
     
<< < 1 2 (Page 2 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.