Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]


2009/11/9 Marc Hohl <marc@xxxxxxxxxx>:

> Yes, of course. The additional notes provided a better spacing, but I cut it
> down in length.

If you use semibreves, the glissando will be long enough, and one
\glissando will suffice to test the property setting.

> I hope I understood you correctly - I was only able to remove the
> ly:line-spanner::print callback,
> i.e. one line of code, but I think it is clearer now.

These lines get in the way of testing the nested property:

+  (let* ((original (ly:grob-original grob))
+         (right-bound (ly:spanner-bound original RIGHT))
+         (right-pitch (ly:event-property (event-cause right-bound) 'pitch)))
+
+        (if (= (ly:pitch-semitones right-pitch) 11) ;; middle b

It's obvious if the test fails, so you should be able to boil it down
to the barest minimum:

\relative c' {
  \override Glissando #'after-line-breaking =
    #(lambda (grob)
       (ly:grob-set-nested-property! grob '(bound-details right Y) 3))
  c1 \glissando
  d1
}

Regards,
Neil

---

----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/