Keep alive together - call for use cases

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Keep alive together - call for use cases

Mark Knoop-4
I've been working on some patches to enable more flexible uses for the
Keep_alive_together_engraver. Whilst I've achieved my particular use
case, David K is (rightly) keen that any changes might also address (or
at least not rule out) other potential improvements.

(If you're interested in the code, look here:
https://codereview.appspot.com/308910043/)

So if I could ask users for any situations where they can imagine this
engraver helping, that currently don't work, or don't work easily. I'll
start by describing my case, which came up on the list recently.

Duplicating rehearsal, tempo, volta marks etc at multiple vertical
positions in an orchestral score is possible with a custom MarkLine
context (http://lsr.di.unimi.it/LSR/Item?id=1010), however this
technique currently doesn't work in a Frenched score, as there may be
passages where e.g. the brass are tacet so two MarkLines would be shown
together. My fix makes it possible to set a context (Staff or MarkLine)
to be kept alive only while there is another Staff in the group.

See also the temporary divisi staves example here:
http://lilypond.org/doc/v2.19/input/regression/a6/lily-436997bb.ly
as another use of the engraver.

Many thanks for your input.

--
Mark Knoop

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Kieren MacMillan
Hi Mark,

> I've been working on some patches to enable more flexible uses
> for the Keep_alive_together_engraver.

Thank you!

> if I could ask users for any situations where they can imagine this
> engraver helping, that currently don't work, or don't work easily.

1a. The "frenched score with ScoreMarks / MarkLine / whatever” use-case is my main one. (This use-case would, I assume, include “large time signature” lines, chord symbols, etc.?)

1b. Essentially identical — but not “marks” exactly — is the “dialogue” (TextLine) above/below a theatre work (e.g., musical, opera, narrated). Again, in a frenched score situation, that line should live and die with the “last context standing”.

2. The “divisi staves” use-case is also a primary feature/request for me. Similar/analogous use-cases: a two-stave harp part compressing (if necessary) to a single staff in the full score.

To be honest, I can’t really think of any other significantly different use-cases at the moment… but I have no doubt that they’re out there, and if I think of one, I’ll be sure to let you know about it.

Thanks! Can’t wait for this feature to be available “in the trenches".  =)
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

tisimst


On Tue, Aug 16, 2016 at 12:22 PM, Kieren MacMillan [via Lilypond] <[hidden email]> wrote:
Hi Mark,

> I've been working on some patches to enable more flexible uses
> for the Keep_alive_together_engraver.

Thank you!

> if I could ask users for any situations where they can imagine this
> engraver helping, that currently don't work, or don't work easily.

2. The “divisi staves” use-case is also a primary feature/request for me. Similar/analogous use-cases: a two-stave harp part compressing (if necessary) to a single staff in the full score.

I'll just re-state my earlier use-case (in the devel- mailing list) for good measure that extends divisi staves.

Let's say I have a 4-horn group. The way these appear in the score depends on the complexity of their parts, in the following configurations:

1. Each has their own staff
2. They can be grouped into a 1/3 staff and 2/4 staff.
3. They can be grouped together into a single staff.

I imagine them falling into a "keep-alive-tree" like this:

All Horns Group staff
|
|-- Horns 1/3 Joint Staff
|      |
|      |-- Horn 1 Staff
|      |-- Horn 3 Staff
|
|-- Horns 2/4 Joint Staff
       |
       |-- Horn 2 Staff
       |-- Horn 4 Staff

The expected behavior in this (albeit hypothetical) situation would automatically allow for each branch to hide its own higher nodes while allowing the other branches to join together at their highest available node. 

For example, say I want to show the Horn 1 part in its own staff. This would FORCE Horn 3 to show up on its own staff, but would ALLOW Horns 2/4 to appear on their joint staff, to get:

- Horn 1 Staff
- Horn 3 Staff
- Horns 2/4 Staff

Alternatively, Horn 3 could jump to the joint staff to minimize the number of extra staves, like:

- Horn 1 Staff
- Horns 2/3/4 Staff

As discussed before, I couldn't find a good way to allow this kind of "nested" divisi functionality because it seemed like the trigger acted more like a global on/off switch. I realize this could really be a coding nightmare, but could be a really helpful feature, too, for automatically splitting/combining frenched staves.

Forgive me if I didn't explain that very well.

Best,
Abraham
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Kieren MacMillan
Hi Abraham,

On Aug 16, 2016, at 2:50 PM, tisimst <[hidden email]> wrote:
> I'll just re-state my earlier use-case (in the devel- mailing list) for good measure that extends divisi staves.

Yes. On a related note, see the thread I started a few years ago (still open, ultimately) on choral divisi: <http://lists.gnu.org/archive/html/lilypond-user/2014-12/msg00481.html>

Best,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

tisimst
On Tue, Aug 16, 2016 at 1:01 PM, Kieren MacMillan [via Lilypond] <[hidden email]> wrote:

On Aug 16, 2016, at 2:50 PM, tisimst <[hidden email]> wrote:
> I'll just re-state my earlier use-case (in the devel- mailing list) for good measure that extends divisi staves.

Yes. On a related note, see the thread I started a few years ago (still open, ultimately) on choral divisi: <http://lists.gnu.org/archive/html/lilypond-user/2014-12/msg00481.html>

A great example (better and more likely to happen than mine)! Maybe you'll be able to check this item off you wish-list soon!
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Mark Knoop-4
At 12:13 on 16 Aug 2016, tisimst wrote:
>A great example (better and more likely to happen than mine)! Maybe
>you'll be able to check this item off you wish-list soon!

Thanks both for those. I probably won't do anything on this for the
next couple of days, so feel free to add more thoughts if you have
them.

--
Mark Knoop

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

David Wright
In reply to this post by Kieren MacMillan
On Tue 16 Aug 2016 at 15:00:05 (-0400), Kieren MacMillan wrote:
> On Aug 16, 2016, at 2:50 PM, tisimst <[hidden email]> wrote:
> > I'll just re-state my earlier use-case (in the devel- mailing list) for good measure that extends divisi staves.
>
> Yes. On a related note, see the thread I started a few years ago (still open, ultimately) on choral divisi: <http://lists.gnu.org/archive/html/lilypond-user/2014-12/msg00481.html>

I took a look at that thread: I can't find the string "indivisible" in
the 2.19.44 PDFs. Do you have a reference.

(The last line of the thread made me chuckle and sigh.)

Cheers,
David.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Kieren MacMillan
Hi David (et al.),

> (The last line of the thread made me chuckle and sigh.)

=)

Here’s a later incarnation of the same thread/topic:
<http://lists.gnu.org/archive/html/lilypond-user/2015-11/msg00794.html>

Still unresolved… sigh.
But I have great hopes for Mark’s work on this!

Best,
Kieren.

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Mark Knoop-4
In reply to this post by Mark Knoop-4
At 20:18 on 16 Aug 2016, Mark Knoop wrote:
>At 12:13 on 16 Aug 2016, tisimst wrote:
>>A great example (better and more likely to happen than mine)! Maybe
>>you'll be able to check this item off you wish-list soon!  
>
>Thanks both for those. I probably won't do anything on this for the
>next couple of days, so feel free to add more thoughts if you have
>them.

The attached goes some way towards addressing both Kieren's carol and
Abraham's horn problems. Note this is really just an expansion of the
divisi-staves example and works with current lilypond (without my
patch).

Could you both take a look at this and see (a) if it helps, and (b)
what else needs to be achieved.

--
Mark Knoop

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

divisiproblem.ly (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Malte Meyn-3


Am 18.08.2016 um 14:16 schrieb Mark Knoop:
> Could you both take a look at this and see (a) if it helps, and (b)
> what else needs to be achieved.

I didn’t read the whole thread but how to deal with different clefs? For
example, in a choir a tenor is notated with \clef "treble_8" but a
tenor/bass combined staff with \clef "bass". This case isn’t a problem
because lilypond uses the clef of the bass voice (two \clef events at
the same time, second one is used). But maybe there are cases where you
would want have the clef of the upper voice (f. e. horns in octaves, one
in treble, one in bass clef, combined in treble clef with ledger lines
for the lower horn)?

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

David Kastrup
Malte Meyn <[hidden email]> writes:

> Am 18.08.2016 um 14:16 schrieb Mark Knoop:
>> Could you both take a look at this and see (a) if it helps, and (b)
>> what else needs to be achieved.
>
> I didn’t read the whole thread but how to deal with different clefs?
> For example, in a choir a tenor is notated with \clef "treble_8" but a
> tenor/bass combined staff with \clef "bass". This case isn’t a problem
> because lilypond uses the clef of the bass voice (two \clef events at
> the same time, second one is used). But maybe there are cases where
> you would want have the clef of the upper voice (f. e. horns in
> octaves, one in treble, one in bass clef, combined in treble clef with
> ledger lines for the lower horn)?

So?  The whole point of the layers is that you (more or less fully)
prepare both a split and a combined version and LilyPond then picks the
right layer.  Split and combined layer don't need to have the same
source and/or overrides: you can use an alto clef for the combined
version and violin/bass clefs for the split version if you want to.

Of course you will _largely_ want to share the same source, and tags,
variables, and parallel music expressions will help with that.

--
David Kastrup

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Malte Meyn-3


Am 18.08.2016 um 15:10 schrieb David Kastrup:

> Malte Meyn <[hidden email]> writes:
>
>> Am 18.08.2016 um 14:16 schrieb Mark Knoop:
>>> Could you both take a look at this and see (a) if it helps, and (b)
>>> what else needs to be achieved.
>>
>> I didn’t read the whole thread but how to deal with different clefs?
>> For example, in a choir a tenor is notated with \clef "treble_8" but a
>> tenor/bass combined staff with \clef "bass". This case isn’t a problem
>> because lilypond uses the clef of the bass voice (two \clef events at
>> the same time, second one is used). But maybe there are cases where
>> you would want have the clef of the upper voice (f. e. horns in
>> octaves, one in treble, one in bass clef, combined in treble clef with
>> ledger lines for the lower horn)?
>
> So?  The whole point of the layers is that you (more or less fully)
> prepare both a split and a combined version and LilyPond then picks the
> right layer.  Split and combined layer don't need to have the same
> source and/or overrides: you can use an alto clef for the combined
> version and violin/bass clefs for the split version if you want to.
>
> Of course you will _largely_ want to share the same source, and tags,
> variables, and parallel music expressions will help with that.
>
Hmja, so weit hätt ich mal denken können …

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Mats Bengtsson-4
In reply to this post by Mark Knoop-4


On 08/19/2016 08:16 PM, Mark Knoop wrote:

> At 18:02 on 19 Aug 2016, Mats Bengtsson wrote:
>> >I recently typeset a concerto grosso from the baroque period, where
>> >the solo and tutti parts are identical during long sections and then
>> >they differ for some bars, every here and there. When entering the
>> >parts, I used tags to handle the differences so producing the separate
>> >parts works without problem. However, in the conductors score, I would
>> >prefer to only use a single stave per instrument when the solo and
>> >tutti play in unison, but individual staves when they differ. I
>> >managed to handle this using remove-layer as long as there's only a
>> >single instrument group that contains and occasional solo part, but if
>> >for example both violin 1 and violin 2 have a solo plus a tutti, then
>> >I didn't manage to get it to work correctly. The following example
>> >shows my current attempt. As can be seen, the split between solo and
>> >tutti parts happens both for violin 1 and 2 as soon as one of them is
>> >split. For example, in the second score line, I would like to see Vi I
>> >solo, Vi I tutti but only one stave with Vi II.
> Hi Mats,
>
> How does the attached look to you? Note I have moved the
> Keep_alive_together_engraver to the GrandStaff level so that the vln I
> and vln II groups can work independently. The problem now is making the
> system start braces cooperate.
Yes, I would really like to keep the grouping of my original example,
having the solo parts grouped togother in one GrandStaff/StaffGroup and
the tutti parts in another group. That's why I tried to move the
engraver to the Score level.

As was pointed out in another email, it's also a bit stupid to have
duplicated but identical staves for tutti and unison versions of the
parts, when we in fact only want to change the instrument name. Perhaps
that can instead be accomplished by some extra Scheme hack for
typesetting the instrument name?

     /Mats

--
=============================================
        Mats Bengtsson, Prof.
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.ee.kth.se/~mabe
=============================================


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Mats Bengtsson-4
In reply to this post by Mark Knoop-4


On 08/21/2016 06:26 PM, Mark Knoop wrote:
> I've just submitted an additional patch which I think addresses the
> uses raised by Mats, Kieren and Abraham. See attached ly and pdf files.
>
> Comments, particularly on usability, appreciated.
Looks good! The possibility to group staves seems intuitive.
Thanks for your efforts!

     /Mats


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Kieren MacMillan
In reply to this post by Mark Knoop-4
Hi Mark,

Do your files require a version later than they claim (2.19.45)?

I’m running 2.19.46, and I get

>    warning: cannot find property type-check for `keep-alive-group' (backend-type?).  perhaps a typing error?


Thanks,
Kieren.

On Aug 21, 2016, at 12:25 PM, Mark Knoop <[hidden email]> wrote:

> I've just submitted an additional patch which I think addresses the
> uses raised by Mats, Kieren and Abraham. See attached ly and pdf files.
>
> Comments, particularly on usability, appreciated.

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

Mark Knoop-4
At 12:01 on 22 Aug 2016, Kieren MacMillan wrote:

>Hi Mark,
>
>> Yes, sorry, they require a version built with the 3rd patchset here  
>
>Ah…
>
>> that's why I also attached the pdfs,
>> so you can see the results without compiling.  
>
>I was hoping to try it out on my real-world choral example, so that I
>could report back on its sufficiency and usability. I’ll see what I
>can figure out without actually compiling the score.

I'd be happy to try it on one of your scores if you send me the source.

--
Mark Knoop

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Keep alive together - call for use cases

tisimst
In reply to this post by Mark Knoop-4
Mark,

On Sun, Aug 21, 2016 at 10:25 AM, Mark Knoop <[hidden email]> wrote:
At 21:13 on 19 Aug 2016, David Kastrup wrote:
>Mark Knoop <[hidden email]> writes:
>> Hi Mats,
>>
>> How does the attached look to you? Note I have moved the
>> Keep_alive_together_engraver to the GrandStaff level so that the vln
>> I and vln II groups can work independently. The problem now is
>> making the system start braces cooperate.
>
>I think we should likely have some context with only
>Keep_alive_engraver in it and accepting all sorts of Staff contexts.
>That would likely be more natural than juggling manually with
>Keep_alive_engraver.

I've just submitted an additional patch which I think addresses the
uses raised by Mats, Kieren and Abraham. See attached ly and pdf files.

Comments, particularly on usability, appreciated.

This is looking very nice and appears to do precisely what I (and Kieren) proposed. Thank you for making this happen. It's true power, I'm sure, will come to light as more use-cases (especially in "real world" scores) are attempted. Well done!

Best,
Abraham 

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user