Hi Jan-Peter,

On Wed, Jun 20, 2012 at 2:46 AM, Jan-Peter Voigt <jp.vo...@gmx.de> wrote:

> Hi David,
>
> ... moving this to devel ...
> I had a look into "tie-column.cc":
> In the scheme-callback "calc_positioning_done" all ties in a chord are
> assigned control-points in a loop. So it might be possible to define a
> scheme-callback "calc_control_point_column", that returns a list of a list
> of a list ... that returns all control-point-lists from the Tie_column. If
> it is not a column, say one tie, it might still return a list of this one
> tie.
> This is just a thought - it might have implications or whatever fiddling
> with those files ...
> My intention is: I would like to shape all ties in a chord.
>

At this point I unfortunately can't help with the C++ aspect of this.  Some
experimentation did show me that it is possible to manipulate
'control-points within a column of ties using Scheme, however.  The
following function demonstrates roughly how this might be done.  It doesn't
make allowance for broken ties yet and requires an entry for each tie.  You
can use () to leave a tie as-is.

\version "2.15.40"

shapeTieColumn =
#(define-music-function (parser location offset-list) (list?)
  #{
    \once \override TieColumn #'after-line-breaking =
      #(lambda (grob)
        (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties))))
          (for-each
            (lambda (tie off)
              (if (pair? off)
                  (set! (ly:grob-property tie 'control-points)
                        (map
                          (lambda (x y) (coord-translate x y))
                          (ly:tie::calc-control-points tie) off))))
             ties offset-list)))
  #})

{
  <d' e' g' a'> ~ q
  q ~
  \shapeTieColumn #'(
   ()
   ((0 . -0.25) (0.33 . -0.1) (0.67 . -0.1) (1 . -0.25))
   ((0 . 0.2) (0.33 . 0.4) (0.67 . 0.4) (1 . 0.2))
   ()
  )
  q
}

\layout {
  ragged-right = ##t
}

%%%%%%%%%%%%%%%%
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to