lilypond-user
[Top][All Lists]
Advanced

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

Re: thanks again for the editionEngraver


From: Janek Warchoł
Subject: Re: thanks again for the editionEngraver
Date: Mon, 28 Jul 2014 23:28:48 +0200

Hi,

2014-07-28 3:38 GMT+02:00 Kieren MacMillan <address@hidden>:
> Hi Jan-Peter,
>
>> I think the most complicated part is addressing multiple voices in one Staff.
> […]
>> propably there are more things to modify to make it more intuitive.
>
> I think the stated problem would be solved *AND* the whole machinery made 
> more intuitive by allowing a context to be “direct addressed”, i.e., the 
> context
>
>     \new Staff = “MyStaff” \someMusic
>
> would be mod-ed using something like
>
>     \editionMod ThisEdition 1 0/4 APiece.MyStaff \override …
>
> as opposed to
>
>     \editionMod ThisEdition 1 0/4 APiece.Staff.B \override …

Maybe it would be possible to take advantage of my work on predefined
contexts for instruments?
(https://github.com/openlilylib/openlilylib/tree/master/templates/predefined-instruments)

With "predefined instruments", instead of writing

<<
  \new Staff = "violin" {
    % music...
  }
  \new Staff = "viola" {
    % music...
  }
>>

you basically write

<<
  \new ViolinStaff {
    % music...
  }
  \new ViolaStaff {
    % music...
  }
>>

(except that i haven't defined Violins and Violas yet, right now i
only have vocal stuff).  This makes it possible to do

<<
  \new ViolinStaff {
    % music...
  }
  \new ViolaStaff {
    % music...
  }
>>
\layout {
  \override ViolinStaff.NoteHead #'color = #red
}

to get just the Violin's notes colored red, achieving true separation
of content from layout.
...apart from the fact that you'll also get a bunch of specific
settings for each instrument, like midiInstrument and InstrumentName
:)

If i understood how Jan-Peter's engraver works, i think that using my
predefined instruments should make it possible to write

    \new ViolinStaff \someMusic

and mod it using

    \editionMod ThisEdition 1 0/4 APiece.ViolinStaff \override …

since there usually should be one XxxStaff in the score.  Actually,
it's dead easy to define new instruments, even just for the sake of
having unique contexts:

% syntax: \newInstrument name parentName groupName staffSettings voiceSettings
\newInstrument "ViolinI" "Violin" "StaffGroup" \with { instrumentName
= "ViolinI" } \with { }

What do you think?
Janek



reply via email to

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