Menu

#5638 Improve Lilypond Automatic Slurs

Accepted
None
evidence
Ugly
2019-12-14
2019-12-14
No

We currently need to do a fair amount of manual shaping of slurs. LilyPonsd is not intended to be a WYSIWYG software; it's supposed to be smart enough to make beautiful engraving decisions.

I hope to be able to either tweak default parameters of the slur scoring algorithm or add new parameters and defaults of the slur scoring algorithm to be able to do an improved job of automatic slur creation.

In order to do this, I'd like to collect snippets that show both a less-than-optimal automatic slur and and improved slur created by manually shaping the slur with \shape.

Please add comments to this ticket, and attach two snippets to each comment.

Thanks,

Carl

Discussion

  • Simon Albrecht

    Simon Albrecht - 2019-12-14
    • status: New --> Accepted
     
  • Simon Albrecht

    Simon Albrecht - 2019-12-14

    A very valiant undertaking—it would certainly be great to see improvement there!
    I don’t think many people have taken notice yet—you should certainly post to the user and/or devel list to ask for input. I haven’t done many projects myself that required extensive slur tweaking.

     
  • Simon Albrecht

    Simon Albrecht - 2019-12-14

    There are some examples in the documentation for shapeII in openlilylib:

     
    • Simon Albrecht

      Simon Albrecht - 2019-12-14

      Though I would argue that in this case the left endpoint should be slightly further up.

       
  • Simon Albrecht

    Simon Albrecht - 2019-12-14

    And here’s the main example from that introduction—compiled with v2.19.83:

    \include "oll-core/package.ily"
    \loadModules snippets
    #'((notation-snippets shaping-bezier-curves shapeII))
    
    \paper {
      ragged-right = ##t
      indent = 0
    }
    
    SUp = \change Staff = "up"
    SDn = \change Staff = "down"
    
    \new PianoStaff <<
      \new Staff = up \relative d {
        \clef G
        \key e \major
        \time 3/16
    
        \voiceTwo
        \slurUp
    
        \SDn \times 2/3 { b32( g' b }
        \SUp \times 2/3 { d g e' }
        \times 2/3 { d b g') }
        |
        \SDn \times 2/3 { b,,,32( g' b }
        \SUp \times 2/3 { dis g e' }
        \times 2/3 { d b g') }
        |
        \newSpacingSection
        \override Score.SpacingSpanner #'common-shortest-duration =
        #(ly:make-moment 1 70)
        \SDn \times 2/3 { b,,,32( g' b }
        \SUp \times 2/3 { dis g e' }
        \times 2/3 { d b g') }
      }
      \new Staff = down {
        \clef F
        \key e \major
        \time 3/16
    
        s16*9
      }
    >>
    
    \include "oll-core/package.ily"
    \loadModules snippets
    #'((notation-snippets shaping-bezier-curves shapeII))
    
    \paper {
      ragged-right = ##t
      indent = 0
    }
    
    SUp = \change Staff = "up"
    SDn = \change Staff = "down"
    
    \new PianoStaff <<
      \new Staff = up \relative d {
        \clef G
        \key e \major
        \time 3/16
    
        \voiceTwo
        \slurUp
    
        \shapeII #'((h)(p 55 0.5)(p 50 0.2)(h 0 1.5)) Slur
    
        \SDn \times 2/3 { b32( g' b }
        \SUp \times 2/3 { d g e' }
        \times 2/3 { d b g') }
        |
        \SDn \times 2/3 { b,,,32( g' b }
        \SUp \times 2/3 { dis g e' }
        \times 2/3 { d b g') }
        |
        \newSpacingSection
        \override Score.SpacingSpanner #'common-shortest-duration =
        #(ly:make-moment 1 70)
        \SDn \times 2/3 { b,,,32( g' b }
        \SUp \times 2/3 { dis g e' }
        \times 2/3 { d b g') }
      }
      \new Staff = down {
        \clef F
        \key e \major
        \time 3/16
    
        s16*9
      }
    >>