[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Changing slur behavior
From:       "Fr. Samuel Springuel" <rpspringuel () gmail ! com>
Date:       2020-05-25 18:44:44
Message-ID: C4AF06B6-D2FE-4F2A-9810-23D35D820E86 () gmail ! com
[Download RAW message or body]

> On 25 May, 2020, at 1:01 PM, Shane Brandes <shane.brandes@gmail.com> wrote:
> 
> Increase the spacing-increment on line twenty. I tried a value of 2 and it worked \
> fine. 
> regards,
> 
> Shane

Yep, playing with that parameter allowed me to tweak the note spacing to prevent the \
collisions.  I also found that by tweaking a couple of the other parameters I could \
get a spacing effect that I liked even better.  Thanks for that.

However, I've found another problem, this time related to \set stanza in the lyrics.  \
Seems that the width of the text set that way is not being accounted for.

✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm's Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


["slur spacing.ly" (slur spacing.ly)]

\version "2.20.0"

Slur_spacing_engraver =
#(lambda (context)
 (let ((slur-event-dir #f))
   (define (change-spacing dir)
     (ly:broadcast
       (ly:context-event-source context)
       (ly:make-stream-event
         (ly:make-event-class 'spacing-section-event)
         '(())))
     (let ((score-context (ly:context-find context 'Score)))
       (for-each
         (lambda (args)
           (apply ly:context-pushpop-property
             score-context 'SpacingSpanner
             (if (< 0 dir) (drop-right args 1) args)))
         `((base-shortest-duration ,(ly:make-moment -2))
           (shortest-duration-space 1.5)
           (spacing-increment 1.5)
           (common-shortest-duration ,(ly:make-moment 1))))))
   (make-engraver
     ((start-translation-timestep engraver)
       (set! slur-event-dir #f))
     (listeners
       ((slur-event engraver event)
         (let ((dir (ly:event-property event 'span-direction #f)))
           (set! slur-event-dir dir))))
     ((process-music engraver)
       (if (ly:dir? slur-event-dir)
         (change-spacing slur-event-dir))))))


\layout {
    \context {
        \Score
        \override SpacingSpanner.shortest-duration-space = 3
        timing = ##f
    }
    \context {
        \Staff
        \consists \Slur_spacing_engraver
        \remove Time_signature_engraver
        \omit Stem
        \omit Slur
    }
}

music = { 
  a' g'
  a'( g')
  a'( g')
  a'( g' a')
  a' g'
  b'( c'' b'--)
}

words = \lyricmode { Some words to go longword \set stanza = "*" der notes }

\new Staff  
<<
     \new Voice = "mel" { \music }
     \new Lyrics \lyricsto "mel" { \words }
>>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic