lilypond-devel
[Top][All Lists]
Advanced

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

Re: shape and chords


From: David Nalesnik
Subject: Re: shape and chords
Date: Tue, 26 Jun 2012 13:27:17 -0500

Hi Jan-Peter,

First of all, I agree with David Kastrup that this is a situation where a deep fix is in order so that simultaneous ties may be tweaked directly.  


Your example is working as expected :)

Glad to hear it!
 

To make it (more) usable, I think, we need wrapper functions, to avoid twiggling with endless listoflistoflistofnumberpairs ;-)

+1
 
In my short test, I thought of having tie-configuration and shape combined, so that one can set the direction of the ties, before shaping them. The downside is, that using this also needs the staff-positions to be set - so I doubt, this is useful:

This is a useful combination, and setting staff-positions really isn't all _that_ inconvenient since you can include a "non-entry" for default ties.  I'm delighted to see that overrides of the two work together!  It's nice to be able to group both functionalities into one command.

One question I have here with your formulation concerns the way you've expanded the overrides.  Why not use #{  . . . }# syntax here?  The only drawback I see is that dollar-signs would be needed with 2.14.  I don't see any issues in 2.15.40 with the replacement I've done below:
 

--snip--
confShapeTieColumn =
#(define-music-function (parser location conf all-offsets)(list? list?)
  (let ((alb-func (lambda (grob)

                    (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties))))
                      (for-each
                       (lambda (tie offsets-for-broken-pair)
                         (let* ((orig (ly:grob-original tie))
                                (siblings (ly:spanner-broken-into orig)))
                           (for-each
                            (lambda (piece offsets-for-piece)
                              (if (pair? offsets-for-piece)
                                  (set! (ly:grob-property piece 'control-points)
                                        (map
                                         (lambda (x y) (coord-translate x y))
(ly:tie::calc-control-points piece)
                                         offsets-for-piece))
                                  ))
                            (if (null? siblings)
                                (list orig)
                                siblings)
                            offsets-for-broken-pair)))
                       ties all-offsets)))
          ))
 
  #{
      \once \override TieColumn #'tie-configuration = #conf
      \once \override TieColumn #'after-line-breaking = #alb-func
  #}))

To be complete, you would need to extend this so that the 'tie-configuration override applies to tie columns across a line break as well.  Of course you could easily modify what you have above.

In the attached file, I've approached the problem in a different way.  Rather than combining the two overrides as you do, I use two separate overrides.  This enables me to override 'tie-configuration with a music function which I made to modify broken spanners in a generalized way.   (If you want to see more examples of usage of \alterBroken I can attach a file demonstrating it.)  My example isn't the greatest, since I didn't use 'tie-configuration to change any directions--meaning that it's simple to do it all with \shapeTieColumn--but you get the idea.

[BTW, I love how it's now possible to put \once before a music function!]


For completeness I created drafts for RepeatTieColumns and LaissezVibrerTieColumns. Note that after-line-breaking is reasonably not called, so I used before-line-breaking here:

Nice!  Thank you for doing this!

Best,
David
 

Attachment: shape-tie-columns.ly
Description: Binary data


reply via email to

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