lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Slur technique comparison


From: Flaming Hakama by Elaine
Subject: Slur technique comparison
Date: Thu, 2 Jun 2016 14:55:12 -0700


In case anyone is curious as to how modifying Slur grob properties compares to using the \shapeII command in openlilylib, below is an exploratory comparative document.  

It is based on the document in opellilylib snippets/notation-snippets/shaping-bezier-curves/shapeII-example.ly

(You'll need to download openlilylib if you want to compile this.)


The more I wrangle with modifying grob properties, I see that it is not quite a satisfying interface.  

The units used do not feel "linear" and the interactions among the properties can be sensitive.

And some types of problems like collisions with accidentals can't really be addressed without severe compromises in other parts of the shape.

Also, I noticed quite a difference in output between 2.17.29 (what openlilylib docs reference) and 2.19.15.  


Regardless, I think that it is an interesting comparison.  You can certainly get improved output on these problem curves (but not hand-crafted precision) without using a library.



\version "2.19.15"

\include "shapeII.ily"
\include "special-cpts-display.ily"

\paper {
  ragged-right = ##t
  indent = 0
  top-markup-spacing #'basic-distance = #5
}

\header {
  title = \markup \column {
    \vspace #2
    "Adjusting slurs and ties in LilyPond"
    \vspace #1
  }
  subtitle = "Comparing improvements in \shape to modifying Slur grob properties"
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\markup \vspace #2
\markup\large\bold "Introduction"
\markup \vspace #1

\markup \vspace #0.5
\markup \justify {
  Comparing the effects of the "shapeII" function to modifying Slur grob properties.
}
\markup \vspace #0.5
\markup\small\typewriter\column {
    "\override Slur.height-limit = 2                   % default"
    "\override Slur.ratio = 0.36                       % default"
    "\override Slur.details.free-head-distance = 0.3   % default"
}
\markup \vspace #0.5
\markup \justify {
  Here's a case where default LilyPond slur looks ugly:
}
\markup \vspace #0.5
\markup\small\typewriter\column {
  "\relative c'' {"
  "  d4( d' b g g,8 f' e d c2)"
  "}"
}
\relative c'' {
  d4( d' b g g,8 f' e d c2)
}
\markup \justify {
  We begin by moving the control points towards the note heads.
}
\markup \vspace #0.5
\markup \justify {
  For the "\shape" approach, this means moving first and last control-points 2.3 staffspaces downward.
}
\markup \vspace #0.5
\markup \justify {
  For the grob properties approach, this means setting free-head-distance to something larger, like 0.86.
}
\markup \vspace #0.5

\markup\small\typewriter\column {
  "\relative c'' {                    \relative c'' {"
  "  \shape #'((0 . -2.3)"
  "            (0 . 0)                  "
  "            (0 . 0)                  "
  "            (0 . -2.3)) Slur         \override Slur.details.free-head-distance = 0.86"
  "  d4( d' b g g,8  f' e d c2)         d4( d' b g g,8  f' e d c2)"
  "}                                  }"
}
\relative c'' {
  \shape #'((0 . -2.3)(0 . 0)(0 . 0)(0 . -2.3)) Slur
  d4( d' b g g,8  f' e d c2)
  \override Slur.details.free-head-distance = 0.86
  d4( d' b g g,8  f' e d c2)
}
\markup \justify {
  The ends of the slur are now correct, but the middle is wrong.
}
\markup \vspace #0.5
\markup \justify {
  For the "\shape" approach, we move 2nd control-point "1 staffspace" "to the" left and
  "3 staffspaces up," and the 3rd point 2 staffspaces to the left.
}
\markup \vspace #0.5
\markup \justify {
  For the grob properties approach, we flatten the curve by reducing the height-limit.
}
\markup \vspace #0.5
\markup\small\typewriter\column {
  "  \shape #'((0  . -2.3)"
  "            (-1 . 3)                "
  "            (-2 . 0)                  \override Slur.height-limit = 0.1"
  "            (0  . -2.3)) Slur         \override Slur.details.free-head-distance = 0.86"
}
\markup \vspace #0.7
\relative c'' {
  \shape #'((0 . -2.3)(-1 . 3)(-2 . 0)(0 . -2.3)) Slur
  d4( d' b g g,8  f' e d c2)
  \override Slur.height-limit = 0.1
  %\override Slur.ratio = 0.01
  \override Slur.details.free-head-distance = 0.86
  d4( d' b g g,8  f' e d c2)
}

\markup \vspace #1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\markup\large\bold "Epilogue"
\noPageBreak
\markup \vspace #0.5
\noPageBreak
\markup \vspace #0.5
\markup \justify {
  Take this example: first two measures are two nearly identical phrases
  (the difference is just one accidental) which get two drastically different
  slur shapes by default. 3rd measure contains the same phrase as the 2nd,
  but with changed spacing – again we get a different default slur
  (as of LilyPond 2.17.30):
}
\markup \vspace #0.5

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
  }
>>


\markup \justify {
  Equipped with all these features, we can easily fix the bad-looking
  slurs from the example at the beginning.
  Note that just \bold one override gives \bold all slurs correct appearance:
}
\markup \vspace #0.5
\markup \typewriter\small "\shapeII #'((h)(p 55 0.5)(p 50 0.2)(h 0 1.5)) Slur"
\markup \vspace #1

\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
  }
>>



\markup \vspace #0.5
\noPageBreak
\markup \justify {
  Here is what the grob properties approach can yeild:
}
\markup \vspace #0.5
\markup\small\typewriter\column {
  "\override Slur.details.free-head-distance = 10"
  "\override Slur.height-limit = 14"
  "\override Slur.ratio = 0.39"
}
\markup \vspace #1

\new PianoStaff <<
  \new Staff = up \relative d {
    \clef G
    \key e \major
    \time 3/16

    \voiceTwo
    \slurUp

    \override Slur.details.free-head-distance = 10
    \override Slur.height-limit = 14
    \override Slur.ratio = 0.39


    \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
  }
>>




David Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
address@hidden
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


reply via email to

[Prev in Thread] Current Thread [Next in Thread]