lilypond-user
[Top][All Lists]
Advanced

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

Re: First steps in Lilypond


From: Thomas Morley
Subject: Re: First steps in Lilypond
Date: Mon, 9 Apr 2018 23:06:45 +0200

2018-04-09 20:24 GMT+02:00 foxfanfare <address@hidden>:

> \version "2.19.80"
>
> \relative c, {
>
>   \voiceOne
>   \clef bass
>   \time 3/8
>   \key c\minor
>   %THIS IS THE PROBLEM
>   \scaleDurations 2/3 { c16( f' aes \clef treble f'[ d f~] }  <f d'>8)
>   %ANOTHER EXEMPLE
>   c'8( d' e,\noBeam)
>   %NORMAL
>   c8( d e\noBeam) \bar "||"
>
>   %%%%
>
>   %THE END OF THE SLUR SHOULD BE ALIGNED WITH THE STEM
>
>   \shape #'((0 . 0) (0 . 0) (0 . 0) (-0.5 . 0)) Slur
>   \clef bass \scaleDurations 2/3 { c,,,16( f' aes \clef treble f'[ d f~] }
> <f d'>8)
>   \shape #'((0 . 0) (0 . 0) (0 . 0) (-0.5 . 0)) Slur
>   c8( d' e,\noBeam)
>   c8( d e\noBeam)
> }

> Well, as you see, by default, in the first 2 measures of my exemple,
> lilypond place the end of the slurs very strangely : after the last note!
> And I don't understand why it doesn't align itself with the top of the last
> stem!


I don't have Gould at hand, someone know what she has to say about the topic?

Instead I had a quick look through some editions of major publishers.
As a result I wouldn't say the end of the Slur should always "align
itself with the top of the last stem!".

In many found cases the Slur ends even before the NoteColumn!
Others end at the NoteHead or the Stem, very few behind the NoteColumn.

>
> Sure I could use the \shape control, as shown in the measures 4 & 5
> \shape #'((0 . 0) (0 . 0) (0 . 0) (-0.5 . 0)) Slur
>
> ...and this solve my issue
>
> BUT in my initial question, I was wondering if I missed something, like a
> basic option that would need to be set first and won't need me to adjust
> every slurs which could encounter this issue!
>
> I tried Urs solution, to play with the default shape. So I added to the
> code:
>
>  \override Score.Slur.details = #'(
>       (region-size . 4)
>       (head-encompass-penalty . 1000.0)
>       (stem-encompass-penalty . 30.0)
>       (edge-attraction-factor . 4)
>       (same-slope-penalty . 20)
>       (steeper-slope-factor . 50)
>       (non-horizontal-penalty . 15)
>       (max-slope . 1.1)
>       (max-slope-factor . 10)
>       (free-head-distance . 0.3)
>       (free-slur-distance . 0.8)
>       (gap-to-staffline-inside . 0.2)
>       (gap-to-staffline-outside . 0.1)
>       (extra-object-collision-penalty . 50)
>       (accidental-collision . 3)
>       (extra-encompass-free-distance . 0.3)
>       (extra-encompass-collision-distance . 0.8)
>       (head-slur-distance-max-ratio . 3)
>       (head-slur-distance-factor . 10)
>       (absolute-closeness-measure . 0.3)
>       (edge-slope-exponent . 1.7)
>       (close-to-edge-length . 2.5)
>       (encompass-object-range-overshoot . 0.5)
>       (slur-tie-extrema-min-distance . 0.2)
>       (slur-tie-extrema-min-distance-penalty . 2))
>
> ... and I tried to play with all the values (without understand every
> variables) but without succes.
> So, is it normal Lilypond is drawing slurs beyond the last note and we
> cannot change this default behavior?!

Engraving nice looking Slurs is always a challenge and no, LilyPond
doesn't end Slurs beyond the last Note.
Though, your example triggers some cases where LilyPond does so.

Sometimes you could use details.edge-attraction-factor,
details.free-head-distance, ratio, height-limit.

\paper {
  ragged-right = ##t
  indent = 30
  short-indent = 30
}

\new Staff \with {
  instrumentName = "Untweaked"
  shortInstrumentName = "2 Slurs tweaked"
}
\relative c, {

  \time 3/8
  \key c\minor
  \clef bass

  \voiceOne
  \scaleDurations 2/3 { c16( f' aes \clef treble f'[ d f~] }
  <f d'>8)
  c'8( d' e,\noBeam)
  c8( d e\noBeam)

  \break

  \clef bass
  \scaleDurations 2/3 {
      \once \override Slur.details.free-head-distance = 1
        c,,,16( f' aes \clef treble f'[ d f~]
  }
  <f d'>8)
  \once \override Slur.ratio = 10
  \once \override Slur.height-limit = 3
  \once \override Slur.details.edge-attraction-factor = 100
  c'8( d' e,\noBeam)
  c8( d e\noBeam) \bar "||"
  \break
}

Tbh, I don't like the result either ....
->attachment

You also may try the code by Janek here:
https://github.com/openlilylib/bezier/blob/master/slur-attachments/module.ily
Example:
https://github.com/openlilylib/bezier/blob/master/usage/slur-attachments.ly
Though, it doesn't compile with recent 2.19.-versions, (someone should
upgrade it ...), 2.18.2 works.
Also, there's a mentioned issue in
https://github.com/openlilylib/bezier/blob/master/README.md



To summarize, no, LilyPond does not end Slurs beyond the
Stem/NoteColumn per default.
Also, no, you didn't miss a single command. As said, printing Slurs
(and PhrasingSlurs and Ties) is a challenge for both, the used
type-setting program _and_ the type-setter himself.
Currently LilyPond quite often needs manual help. Ofcourse this also
means LilyPond should be improved. Wanna join? :)
Several tools for manual adjustments are available. (You may also
check for shapeII at openlilylib).

Cheers,
  Harm

Attachment: atest-74-slurs.png
Description: PNG image


reply via email to

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