lilypond-devel
[Top][All Lists]
Advanced

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

Re: Allow music with layout instructions in output definitions. (issue 5


From: lemniskata . bernoullego
Subject: Re: Allow music with layout instructions in output definitions. (issue 5701049)
Date: Thu, 05 Sep 2013 22:30:06 +0000

Hi,

(some archeology...)

On 2012/02/29 23:44:20, dak wrote:
Janek Warchoł <mailto:address@hidden> writes:

> On Wed, Feb 29, 2012 at 9:22 AM, David Kastrup <mailto:address@hidden>
wrote:
>> Janek Warchoł <mailto:address@hidden> writes:
>>>
>>> sure, i can do this. &nbsp;Nevertheless, writing these in \layout
{} would
>>> be more elegant
>>
>> No. &nbsp;An arbitrary number of named contexts can occur in the
text, and
>> some are implicitly named anyway. &nbsp;So you want to change _all_
contexts
>> of a given type in \layout and/or derive a new context type
(aaVoice or
>> so) and then use \new aaVoice ... in the score.
>>
>>> and in my opinion easier to maintain: \layout must be placed at
the
>>> end of \score block, while variables containing context
modifications
>>> must be defined before they are used, i.e. before \score block.
&nbsp;Thus,
>>> style decisions are spread over two places.
>>
>> A _style_ is something affecting _all_ contexts of a given type,
not
>> just particular contexts with a particular id.
>
> Hmm.  I'm not sure if i understand what you mean.  Let me give an
> example case where i think that named context thingy would be
useful:
> i have a piece for 3 SATB choirs; the structure is
>
> \score { <<
>   \new ChoirStaff = ChoirOne <<
>     \new Staff = soprano { }
>     \new Staff = alto { }
>     \new Staff = tenor { }
>     \new Staff = bass { }
>   >>
>   \new ChoirStaff = ChoirTwo <<
>     \new Staff = soprano { }
>     \new Staff = alto { }
>     \new Staff = tenor { }
>     \new Staff = bass { }
>   >>
>   \new ChoirStaff = ChoirThree <<
>     \new Staff = soprano { }
>     \new Staff = alto { }
>     \new Staff = tenor { }
>     \new Staff = bass { }
>   >>
>>>
>
> i'll print scores separately for each choir, so to save space i can
> make two choirStaves smaller in each print.

Then make a SmallStaff context definition and use it instead of Staff.
Take a look at engraver-init.ly for examples.  I think that
RhythmicStaff is created from Staff, for example.

Being a more experienced LilyPond user now, i can say that you were
right.  Creating custom contexts *is* the way to do this.  The remaining
question is whether creating custom contexts can be done easily enough
(i had serious trouble last time when i attempted doing this), and
whether some other structural shortcomings can be fixed.

best,
Janek

https://codereview.appspot.com/5701049/

reply via email to

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