lilypond-user
[Top][All Lists]
Advanced

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

Re: New snippet: remove staff if another is alive (for wind divisi)


From: Thomas Morley
Subject: Re: New snippet: remove staff if another is alive (for wind divisi)
Date: Tue, 7 Aug 2018 20:16:08 +0200

2018-08-07 19:48 GMT+02:00 David Kastrup <address@hidden>:
> Thomas Morley <address@hidden> writes:
>
>> 2018-08-06 21:40 GMT+02:00 Thomas Morley <address@hidden>:
>>> 2018-08-05 18:14 GMT+02:00 Thomas Morley <address@hidden>:
>>>
>>>> Inspired by your work I come up with the attached.
>>>
>>> Attached an improved and simplified version.
>>> It's tested with 2/3/4-voices divisi, all in one score.
>>> Although not tested, I see no reason why it shouldn't work with even
>>> more voices.
>>
>>
>> Further improvements.
>>
>> It's now possible to omit 'catch-me, _iff_ single instrument-staves
>> and divisi-staves belong exculsively to the same container-context
>> like StaffGroup, GrandStaff, ChoirStaff or PianoStaff with removed
>> "Keep_alive_together_engraver", which is most likely always the case.
>> For ungrouped single/divisi 'catch-me is still neccesary.
>
> Ok, let me chime in: I've basically developed some of the low-level
> mechanisms for divisi staves.

You mean that 'make-dead-when stuff? It does not work in 2.18.2.
The 'staff-grouper grob-object?

> There are no user-level commands or music
> functions or Scheme abstractions making use of them.  There is no parser
> support (like for << \\ >>) but it's likely that isn't really required.

Up to now I can't think of any parser-supported syntax.
Seems all works so far with simple overrides.

> But there certainly is a need for a user level interface, and from the
> description this sounds like you are off to a good start.
>
> Think you can turn this (assuming it isn't already) into something
> obvious and general enough that it would be satisfying to document and
> use it without having to meddle with the low-level mechanisms at least,
> say, 85% of the time?

With my most recent coding the user has to do three things:
(1)
Initiate a divisi-Staff, applying p.e.
\override VerticalAxisGroup.details.combined = #'(1 2)
(2)
Awake the divisi-Staff via \switchOn in the musical-content
(3)
Let it all happen with
      \override VerticalAlignment.before-line-breaking =
        %#(divisis "flutes" "trumpets" "cors")
        %#(divisis)
        #(divisis "flutes")
at Score level.

That's all. The whole scheme-coding could be included.

Though, there are some points I don't like or have concerns.

@(1)
The argument '(1 2) will result in: combine voices 1 and 2 and kill
the the single printing of them.
But it relies on unchanged order of the lists processed. I'm currently
not sure this is warrented, although testings didn't fail so far.
Ofcourse I used details.combined to avoid a real custom-grob-property,
some for 'catch-me. If we think of implementing something like this
coding we should probably turn those in own grob-properties

@(2)
It's done by
switchOff = \set Staff.keepAliveInterfaces = #'()
switchOn = \unset Staff.keepAliveInterfaces
I'm not sure I like this, it feels clumsy.

@(3)
Here I'm fine so far, having a procedure doing all automagically,
unless container-contexts are missing.


Currently I'm a bit at a loss how to proceed.
Ideas?


Cheers,
  Harm



reply via email to

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