lilypond-devel
[Top][All Lists]
Advanced

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

Re: Simplifying input structure (was Re: Issue 3720: Built-in templates


From: Janek Warchoł
Subject: Re: Simplifying input structure (was Re: Issue 3720: Built-in templates for SATB vocal scores (issue 41990043))
Date: Sun, 22 Dec 2013 21:00:28 +0100

Hi,

got a short moment for lily mail...

Devon - all these are valid concerns.  However, i advise not to try
doing too much at once - let's do one level of abstraction at a time.

best,
Janek

2013/12/20 Devon Schudy <address@hidden>:
> Janek Warchoł wrote:
>> I believe we need to add an abstraction layer that would make it
>> conceptually simpler to write \score blocks.
>>
>> Please take a look at
>> https://github.com/openlilylib/snippets/tree/master/templates/predefined-instruments
>>
>> I believe that this is exactly what LilyPond needs to allow beginner
>> users easily create score structures.  Notice how much it shortens the
>> \score definition.
>
> These are convenient! It would be nice to have these for all the
> common instruments — it would save most users the repetitive trouble
> of setting clefs, transpositions, instrumentName, instrumentShortName,
> midiInstrument and \dynamicUp. (But would it bother users who are
> writing for an instrument that doesn't have a predefined staff?)
>
> Other things that cause complexity in the SATB templates:
>  * Repeating \Time and \Key in each staff
>  * Putting \Time in parallel with each voice
>  * Explicitly creating Staff, and Lyrics contexts
>
> With one voice per staff, VocalStaff etc. take care of the first four.
> Users can get away with putting \time (and \repeat, if they don't use
> \unfoldRepeats) in just one staff. The hard part is creating contexts.
>
> Anything requiring understanding of contexts is beyond beginners. They
> should be able to use implicitly created contexts for almost
> everything. There are a few reasons this doesn't work:
>
>  * Music that is lyrics (i.e. a SequentialMusic whose first child is a
> LyricEvent) creates a useless staff, not a Lyrics aligned to the
> previous voice.
>
>  * Some group-level contexts have predictable children that are
> different, so they can't be created correctly automatically.
> PianoStaff's children are LH and RH; ChoralStaff's children are SATB.
> If implicit contexts handled these (perhaps by making defaultChild a
> callback instead of a string?), users wouldn't have to create explicit
> staves just to get the normal behavior.
>
>  * Contexts are created even when a suitable context already exists.
> Users expect { << c' a >> << d' b >> } to be equivalent to << { c' d'
> } { a b } >>, but it isn't when it creates contexts — it makes four
> staves instead of two. This means intuitive operations like
> concatenating tunes into a medley don't work.
>
>  * Implicit contexts aren't named, so they don't support \lyricsto,
> \context, \change, etc.
>
>  * At top-level, StaffGroup isn't implicit when creating multiple staves.
>
> Fixing these problems would make most explicit context creation
> unnecessary. With the first two fixes, SATB scores would be simply:
>
> <<
>   \new ChoralStaff <<
>     \Soprano \SopranoLyrics
>     \Alto \AltoLyrics
>     \Tenor \TenorLyrics
>     \Bass \BassLyrics
>   >>
>   \new PianoStaff << \RH \LH >>
>>>
>
> \new ChoralStaff <<
>   \new SopranoAltoStaff << \Soprano \Alto >>
>   \VerseOne \VerseTwo %...
>   \new TenorBassStaff << \Tenor \Bass >>
>>>
>
> ...which is simple enough to expect users to type.
>
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-devel



reply via email to

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