If I understand you correctly you want to change the appearance (the curve) of a single Tie?

Then you can use the shapeTie function that was discussed here lately.
Have a look at the attached "shapeXXX.ily" which exports functions to shape Ties Slurs and PhrasingSlurs. Maybe this is what you need? Look in the mailing list for the thread about broken Slurs for the discussions and credits.

HTH
Urs

Am 05.08.2011 09:21, schrieb Stefan Thomas:
Dear community,
I try to change the configuration of ties.
If read in lilypond snippet repository <http://lsr.dsi.unimi.it/LSR/Item?id=407> that

    Ties may be engraved manually by changing the |tie-configuration|
    property of the |TieColumn| object. The first number indicates the
    distance from the center of the staff in staff-spaces, and the
second number indicates the direction (1 = up, -1 = down). So far anything is clear, but I have no idea what the other numbers will do.
What I actually would like to do is to change the shape of the tie "slur".
Can I do it with code like the below quoted?

\version "2.14.2"
music = \relative c'' { c1 ~ c }

\new Staff {
  \music
\override TieColumn #'tie-configuration = #'((20 . 1) (0.0 . 1) (0.0 . 1))
   % this moves the tie up,
    \music
\override TieColumn #'tie-configuration = #'((2 . 1) (0.0 . 1) (115 . 1))
    % this seems to do nothing!
    \music
\override TieColumn #'tie-configuration = #'((2 . 1) (-11111 . 1) (0 . 1))
      % this seems to do nothing to!
      \music
      \override Tie #'height-limit = #0.00001
      % has also no effect
    \music
}


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

%{
  shapeXXX.ily
  base include file with typographic tweaks
  modifing the shapes of Bezier curved spanners.
  
  This version works also with line broken curves
  and modifies the shapes of the siblings individually
  
  All functions take a list of lists of 
  eight numbers as argument each (one for each sibling).
  These are four pairs of offsets that are added to the
  four control points of the curve.
  An empt list means that the shape isn't modified.
  
  Exported functions:
  - shapeSlur
  - shapePhrasingSlur
  - shapeTie
  
%}

\version "2.14.0"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% http://lsr.dsi.unimi.it/LSR/Snippet?id=639 :
% http://lists.gnu.org/archive/html/lilypond-user/2007-08/msg00539.html
% http://lists.gnu.org/archive/html/lilypond-user/2009-09/msg00495.html
% thanks, Neil!!

% Functions to alter the shape of slurs and phrasingSlurs

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

     (if (null? offsets)
         coords
         (add-offsets coords offsets))))


#(define ((shape-slur offsets) grob)
   (let* (
          ;; have we been split?
          (orig (ly:grob-original grob))
          ;; if yes, get the split pieces (our siblings)
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig) '() ))
          (total-found (length siblings)))
     (if (>= total-found 2)
         ;; shape BROKEN
         ;; walk through siblings, find index in list
         ;; and apply offsets from list of offsets:
         (let loop ((n 0))
                   (if (eq? (list-ref siblings n) grob)
                       ;; return altered:
                       ((alter-slur-curve (list-ref offsets n)) grob)
                       (if (< n total-found)
                           (loop (1+ n))
                           ;; end of list -- none found?!
                           ;; return defaults:
                           ((alter-slur-curve '()) grob))))
         ;;
         ;; shape UNBROKEN
         ((alter-slur-curve offsets) grob))))

% Changed function to shape ties

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

     (if (null? offsets)
         coords
         (add-offsets coords offsets))))


#(define ((shape-tie offsets) grob)
   (let* (
          ;; have we been split?
          (orig (ly:grob-original grob))
          ;; if yes, get the split pieces (our siblings)
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig) '() ))
          (total-found (length siblings)))
     (if (>= total-found 2)
         ;; shape BROKEN
         ;; walk through siblings, find index in list
         ;; and apply offsets from list of offsets:
         (let loop ((n 0))
                   (if (eq? (list-ref siblings n) grob)
                       ;; return altered:
                       ((alter-tie-curve (list-ref offsets n)) grob)
                       (if (< n total-found)
                           (loop (1+ n))
                           ;; end of list -- none found?!
                           ;; return defaults:
                           ((alter-tie-curve '()) grob))))
         ;;
         ;; shape UNBROKEN
         ((alter-tie-curve offsets) grob))))


shapePhrasingSlur =
#(define-music-function (parser location offsets)
                        (list?)
  #{
    \once \override PhrasingSlur #'control-points = #(shape-slur $offsets)
  #})


shapeSlur =
#(define-music-function (parser location offsets)
                        (list?)
  #{
    \once \override Slur #'control-points = #(shape-slur $offsets)
  #})

shapeTie =
#(define-music-function (parser location offsets)
                        (list?)
  #{
    \once \override Tie #'control-points = #(shape-tie $offsets)
  #})


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to