Re: [frogs] Changing subproperties with grob-set-property (working on bug #40) |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: frogs@xxxxxxxxxxx
- Subject: Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)
- From: Neil Puttock <n.puttock@xxxxxxxxx>
- Date: Mon, 9 Nov 2009 22:33:26 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=sRtJtmKBqS8fEsO4e/OqZQLvhbr+LWWKisZv2yV2Wls=; b=b68XTEPo9qiAup8GoBDz/+Lr9z/8me4mhrffSz7lrdn6iQ3fBvE3GdzcBSK0cU4c/p Zh+OicqfVh2UeiaLjIam+SX7p+GV/h8Vk8RCBRfJDsqwUZa3QaffkUQkFsQSqHqmNYUk 6AwfUFQxksV053KeDbHoqhdRvkQFo+kTNrmik=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=u6jwdKFQPUpuLv8Kwg4JEFkp9NTsOPJt8ZjM8lWq5URqLHs3HSx/pioeyN4t8Zn8Ml XXufCb3O6OUROb48d1tqRxLezmm0lqERh3AiNpFC1d66ystdp/XAElLs/2lXFKadgDjy OeXce0AHKexGa6ZQObvqpflWUmhKJyTbfm65U=
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!