lilypond-user
[Top][All Lists]
Advanced

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

Re: How do I do a transition between a grouped and a non-grouped part (e


From: Flaming Hakama by Elaine
Subject: Re: How do I do a transition between a grouped and a non-grouped part (example attached)
Date: Tue, 3 Aug 2021 21:28:42 -0700




On Tue, Aug 3, 2021 at 8:09 PM Daniel Benjamin Miller <dbmiller@dbmiller.org> wrote:

Please re-read the original message if you don't understand what I mean. I've attached an example again. Basically, this is something often found in old, manually-set vocal scores. There is a solo (or there are solos), and at some point, the chorus enters. This may occur even in the middle of a measure. When there are solos, they are not in the group, because they are not part of the chorus. But what old vocal scores often do when a chorus enters during a measure but after the soloists have finished singing is add the staff group bracket there, then continue. This is what is very tricky using LilyPond. I know how to include multiple voices. The issue here is switching between gruped and ungrouped within the middle of a particular system a number of times within a piece

Right now, if I do this, I can french the staffs fine enough, so long as I am OK with manually breaking (by switching the staffs of the particular parts as appropriate and/or including the parts as necessary in the system which is mixed in this way). But I would like it so that I do not have to manually break to switch from the mixed system to a new system which has the staff group at the beginning. Basically, I a good solution for me would be to have some sort of command which, when inserted into the music, could somehow indicate to the part above whether or not the staff group bracket should be drawn for a line.

Daniel

On 8/3/21 10:57 PM, Flaming Hakama by Elaine wrote:

Hmm, I'm still not sure I understand the difficulty.

If you have one system that starts out with a single voice, then mid-system has two voices,
that just means that everything for that system would be in the 2-staff staffgroup, but you'd have rests 
in the staff that isn't active, for those measures, instead of spacers.

And the single-voice staff/staffgroup would be all spacers for that entire system.

I see that it might be a bit more inconvenient to organize this way, since you'd have to break up the single voice between sometimes being on the single staff, and sometimes on one of the double staves.  But, on the scale of things lilypond, that seems pretty straight forward.    It does mean that at some point, you'd have to commit to the system breaks, since if you change those, you'd have to shuffle the content from one voice/staff to another.  But choosing good system breaks is usually a manual affair anyway, so that doesn' t seem like much of an extra burden.

It might be possible, even if you will not know the system breaks up front, to make that task a bit easier using tags, so you could keep the entire single voice in one variable, but combine it with tagged content so one version of the voice has tags for the single staff, and the other has tags for the double staff.


Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


On Tue, Aug 3, 2021 at 7:01 PM Daniel Benjamin Miller <dbmiller@dbmiller.org> wrote:

Hi Elaine,

I already do this. But this is not sufficient for creating the effect necessary (as seen in the original example images). Frenching is perfectly sufficient so long as the staffs are never in the same system. But it does not enable the transition between the two to be done within a system as found in the old vocal scores. This is why it is necessary to do mid-system (i.e., usually, mid-measure) switches to the "group".

Best,
Daniel

On 8/3/21 9:54 PM, Flaming Hakama by Elaine wrote:



---------- Forwarded message ----------
From: "D. B. Miller" <dbmiller@dbmiller.org>
To: Jean Abou Samra <jean@abou-samra.fr>, LilyPond User Group <lilypond-user@gnu.org>
Cc: 
Bcc: 
Date: Tue, 3 Aug 2021 19:45:07 +0000 (UTC)
Subject: Re: How do I do a transition between a grouped and a non-grouped part (example attached)
Thanks Jean. This is quite useful. Unfortunately I'm not quite sure how
to make it into the generalized solution I need. This works well if I
have a specific number of systems, and I know how many systems I will
need before turning on the grouping --- which causes problems if I don't
want to break manually (which I try to avoid if possible). Returning to
the solo also requires going to a new part with this. The mid-staff
bracket works well, though.

Maybe this is just beyond LP's current capabilities, at least when it
comes to things you don't have to do manually. Maybe a better solution
could involve some sort of invisible staff (?) which is meant to overlap
with the solo staff, or something else quite out there. Preferably I
would like a way to turn the grouping's visibility on and off, but I
can't see a way to do this via overrides in the music.

All the best,
Daniel

Jul 30, 2021 17:36:37 Jean Abou Samra <jean@abou-samra.fr>:

>
>
> Le 30/07/2021 à 14:46, Daniel Benjamin Miller a écrit :
>> Hi all,
>>
>> I want to replicate this feature, often found in manually-engraved
>> vocal scores. Although the feature I am talking about should be
>> obvious from the images, I will attempt to describe it. Basically, the
>> staff group starts partway through a system, as we switch from a solo
>> to a choral part. If necessary, another staff appears (filled with
>> rests as appropriate).
>>
>> I know it is possible to insert a [ bar manually (although I cannot
>> quite figure out how to do this in a way that looks like a staff group
>> across staffs). Since the staff grouping needs to continue in the
>> following systems, and since I don't want to manually break my score,
>> I don't think that's a reasonable option either.
>>
>> The solution I have been trying to work out essentially involves
>> trying to having the systems all be part of the staff group, but to
>> suppress the engraving of the staff group bracket where appropriate
>> (or something like that?). Still, it's proven to be a bit too
>> intricate for me.
>>
>> Has anyone else done this? I know there are some of you who have
>> greater expertise, and I'm probably not the first person to at least
>> try to include this element in a score.
>>
>> All the best,
>> Daniel
>
>
> Hi Daniel,
>
> Too bad that I can't find the snippet again -- anyway, here is a
> remixed version of a hacky piece of code I once wrote for the
> French list:
>
> \version "2.22.1"
>
> #(define add-bracket
>    (grob-transformer 'stencil
>      (lambda (grob original)
>        (let* ((vag (ly:grob-object grob 'axis-group-parent-Y))
>               (elts (ly:grob-array->list
>                       (ly:grob-object vag 'elements)))
>               (system-start-delim
>                 (filter
>                   (lambda (g)
>                     (and (grob::has-interface g
> 'system-start-delimiter-interface)
>                          (not (eq? 'SystemStartBar (grob::name g)))))
>                   elts)))
>          (if (eqv? 1 (length system-start-delim))
>              (ly:stencil-combine-at-edge
>                original
>                X
>                LEFT
>                (ly:grob-property (first system-start-delim)
>                                  'stencil)
>                (ly:grob-property grob 'padding))
>              (ly:warning "should have 1 delimiter, found ~a"
>                          (length system-start-delim)))))))
>
> forceBar =
> \context Timing \applyContext
>   #(lambda (context)
>      (if (null? (ly:context-property context 'whichBar))
>          (set! (ly:context-property context 'whichBar)
>                "")))
>
> midStaffBracket = {
>   \forceBar
>   \once \override StaffGroup.SpanBar.stencil = #add-bracket
> }
>
> \layout {
>   \context {
>     \StaffGroup
>     % Padding added between the bracket and the bar in case they
>     % are both present.
>     \override SpanBar.padding = 0.8
>   }
> }
>
>
>
> \new StaffGroup \with {
>   %% Change the number of systems with no bracket at the beginning.
>   \alterBroken transparent #(make-list 2 #t) SystemStartBracket
> }
> <<
>   \new Staff {
>     \repeat unfold 20 c'1
>     c2 \midStaffBracket c2 \midStaffBracket
>     \repeat unfold 79 c'1
>   }
>   \new Staff \repeat unfold 100 c'1
>>>
>
>
>
> (From a development perspective...)
>
> To enable doing this more properly, one would have to start out
> by making system start delimiters items rather than spanners. The
> use of \alterBroken is not super natural here, it's tripped up
> other before... Last time I looked, the problem was that in
> theory you can always take the X-extent and X-offset of an
> item before line breaking, and system start braces (as opposed
> to brackets) have a horizontal extent that depends on the amount
> of space between staves. So I wasn't very sure about the approach,
> but probably this could be picked up.
>
>
> Cheers,
> Jean


I''m not sure if you've explored this, but to me it sounds like you should rather use frenched scores.

Which is to say, you will have 2 concurrent entities:
* A single staff (or a staffgroup with one staff), 
* A staffgroup with 2 staves

When you want only the single staff, ensure that the staves in the 2nd staffgroup are empty (contain only spacers)

When you want the double staff, ensure that the first staff is empty (contains only spacers)

Then to get the frenched score, which will omit staves that are empty, set \Staff \RemoveEmptyStaves in the \layout block.

If you can't get your line breaks exactly when you switch to/from single to double staves, 
you might need to have rests in those measures of the unused staff/staves that appear, instead of spacers.


HTH,

Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 


I did re-read the original message, and looked at this example.

I guess I mostly noticed the problem of the voice placement, but now I understand that the issue is really:  how to print the staffgroup bracket mid-system?  Thanks for clarifying.

I would say that, technically, the issue is NOT "switching between grouped and ungrouped within the middle of a particular system", since for those systems, in terms of the implementation, everything on those systems must be part of the same staffgroup.  You are just changing the intended interpretation of what those voices mean from measure to measure (or beat to beat). 

It sounds like, rather, you need a command to say "print the staffgroup brace here".  Unfortunately, I am not familiar with how to do that.  But I would imagine that other folks on this list could figure out how to treat the brace as a glyph, and print it as needed.

I can understand that still requires more work than you want to do, in terms of having to break up the content between different voices/staves.  But semantically, that is what you are constructing, so it does not seem like an unreasonable workflow for reproducing something so boutique.   As I mentioned in the last message, I think you may be able to facilitate this using a single variable for each voice, combined with two different sets of tags, which will keep the parts relevant to that system, and replace the parts not relevant to that system with spacers.  But even there, you would have to do similar work in constructing the tag sets to reflect where the changes occur.  
 

Thanks, 

Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
elaine@flaminghakama.com
Producer ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

reply via email to

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