lilypond-user
[Top][All Lists]
Advanced

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

Re: Multiple slurs on chord


From: Klaus Blum
Subject: Re: Multiple slurs on chord
Date: Sun, 20 Mar 2016 14:08:05 -0700 (MST)

Hi Alberto, 

I'd try the following: 
1.) modify the slur's shape to make it point straight from notehead to
notehead 
2.) create an additional voice with hidden noteheads to add the "missing"
slur

% ---------------------------------------------------------------------
\version "2.19.25"

%% The following two functions are borrowed from
%% http://lsr.di.unimi.it/LSR/Item?id=639
shapeSlur =
#(define-music-function (parser location offsets) (list?)
   #{
     \once \override Slur.control-points = #(alter-curve offsets)
   #})

#(define ((alter-curve offsets) grob)
   (let ((coords (ly:slur::calc-control-points grob)))
     (define (add-offsets coords offsets)
       (if (null? coords)
           '()
           (cons
            (cons (+ (caar coords) (car offsets))
              (+ (cdar coords) (cadr offsets)))
            (add-offsets (cdr coords) (cddr offsets)))))
     (add-offsets coords offsets)))

adaptSlur = \shapeSlur #'(0.8 -1   0.8 -1.2   -0.8 -1.2   -0.9 -1)

{
  \clef bass
  \key g \major
  s2
  <<
    {
      \adaptSlur
      <d~ g b>(
      <d fis a>8)
    }
    \new Voice
    {
      \shiftOff
      \hideNotes
      \adaptSlur
      g2(  fis8)
    }
  >>
}
% ---------------------------------------------------------------------

Cheers, 
Klaus



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Multiple-slurs-on-chord-tp188735p188743.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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