[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Event-Listener [was Re: repeat partcombine texts]
From: |
Simon Bailey |
Subject: |
Event-Listener [was Re: repeat partcombine texts] |
Date: |
Mon, 14 Oct 2013 21:22:56 +0200 |
On 11 Oct 2013, at 16:17, Simon Bailey wrote:
> i was typesetting a score last week, and there are some a2 sections in the
> horns that go over multiple systems and pages. is there any way to repeat the
> current partcombine "text" in brackets at the beginning of a system?
>
> <<<
> \version "2.17.28"
>
> partI = \relative c' {c d c d | e f g a | \break g f e f | }
> partII = \relative c' {a b c d | e f g a | g f e d | }
>
> \partcombine \partI \partII
> >>>
>
> or would it be easiest to add a tagged markup to one of the voices manually?
> [at least easier until the layout of the score changes...]
>
> mock-up of desired result:
> <<<
> \version "2.17.28"
>
> partI = \relative c' {c d c d | e f g a | \break g f e f | }
> partII = \relative c' {a b c d | e f g a | g^"(a2)" f e d | }
>
> \partcombine \partI \partII
> >>>
I've been spending some time thinking about this issue and it would seem to me
that I could create an event-listener on unisono-event.
In this event-listener, initialize a TextSpanner with
bound-details.left-broken.text = \markup { \parenthesize \aDueText }.
ideally, the TextSpanner should stop when the voices break apart again, but i
can't find an event for that.
Does that make sense? It should then be fairly simple to extend this to also
work on Solo I and Solo II.
I've looked at ly/event-listener.ly and using this code, i can see when a
unisono-event is fired and I assume that i can probably get a TextSpanner to
start in there with a lot of trial and error. Is there an event fired when the
unisono state finishes?
And that brings me to the next question: There is a bug in
ly/event-listener.ly. This construct:
<<<
(format-moment (ly:duration-length (ly:event-property
event
'tempo-unit))))))
>>>
throws the following error:
<<<
ly/event-listener.ly:145:35: In procedure ly:duration-length in expression
(ly:duration-length (ly:event-property event #)):
ly/event-listener.ly:145:35: Wrong type argument in position 1 (expecting
Duration): #f
>>>
i have the itchy feeling that this is probably _very_ simple to fix, but i
wouldn't know where to start looking...
regards,
sb
--
Oompa Loompa of Science
+43 699 190 631 25