lilypond-user
[Top][All Lists]
Advanced

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

slur corehack


From: Flaming Hakama by Elaine
Subject: slur corehack
Date: Tue, 24 May 2016 13:24:57 -0700


I was trying to figure out why in lilypond, by default, 
slurs seem too shallow and run into accidentals.

It seems like the state of the art is to tweak each slur individually 
using \shape to specify displacements from current control points.

Wouldn't it be better to change the defaults to something more suitable?  

I don't feel like modifying each shape is even a remotely reasonable workflow 
and I would rather treat the fundamental design issue.

So, I decided to try corehacking the values in the file (this is OSX)
Contents/Resources/share/lilypond/current/scm/define-grobs.scm

After some iteration (since settings influence each other), 
I found that by just changing two defaults, 
I could get the vast majority of my slurs to be quite reasonable:
increasing height-limit from 2.0 to 5.6 and increasing ratio from 0.25 to 0.36

I am wondering if anyone else uses this approach?
Clearly, changing the files in the distro has many things to not recommend it.

But on the other hand, is there a code-based way to do this?
(If so, this ought to go in the docs tout suite!)

There are other things I'd like to change by default, 
especially the x locations of the center two control points, 
which are too close together.

Also, when slurs and ties continue over the break, they are too short.

But changing these two lines in one file has saved many hours 
and improved the quality of my scores immensely.


I'd like to offer, if anyone has a file that needed a lot of slur tweaks, 
send it to me and I'll experiment with changing the default lilypond values 
to see how much of the tweaking could be cleaned up by choosing sensible defaults.


Here is an excerpt of the define-grobs.scm file with some of my mods:


(define-session-public all-grob-descriptions
  `(

    ;;; omitting lots of other grobs' definitions

    (Slur
     . (
        (avoid-slur . inside)
        (control-points . ,ly:slur::calc-control-points)
        (cross-staff . ,ly:slur::calc-cross-staff)
        (details . ,default-slur-details)
        (direction . ,ly:slur::calc-direction)

        ;;;; Originally: (height-limit . 2.0)
        (height-limit . 5.6)

        (line-thickness . 0.8)

        ;;;; Original:  (minimum-length . 1.5)
        (minimum-length . 2.3)

        ;;;; Originally: (ratio . 0.25)
        (ratio . 0.36)

        (spanner-id . "")
        (springs-and-rods . ,ly:spanner::set-spacing-rods)
        (stencil . ,ly:slur::print)
        (thickness . 1.2)
        (vertical-skylines . ,(ly:make-unpure-pure-container ly:slur::vertical-skylines ly:grob::pure-simple-vertical-skylines-from-extents))
        (Y-extent . ,slur::height)
        (meta . ((class . Spanner)
                 (interfaces . (outside-staff-interface
                                slur-interface))))))

    ;;; omitting lots of other grobs' definitions

    ))



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]