lilypond-user
[Top][All Lists]
Advanced

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

Re: defining custom contexts: child context doesn't work properly


From: David Kastrup
Subject: Re: defining custom contexts: child context doesn't work properly
Date: Fri, 06 Sep 2013 22:43:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Janek Warchoł <address@hidden> writes:

> I'm trying to create predefined custom contexts for specific
> instruments, for example define a TenorStaff which has appropriate
> instrumentName, clef, ambitus, etc.
>
> Predefined staves work well, but i didn't manage to make custom voice
> contexts work properly with them - despite using \defaultchild, wrong
> context is created.

No, the correct context would be created as soon as you need a bottom
context.  In this case, you don't need one.

> Here are the definitions that i have so far:
> http://github.com/openlilylib/snippets/blob/master/templates/predefined-instruments/instrument-context-definitions.ily
>
> Here is my testing file:
> http://github.com/openlilylib/snippets/blob/master/templates/predefined-instruments/overriding-example.ly
>
> Note that i can override the color of noteheads in AltoStaff by using
> appropriate command in the \layout block, but if i try to do this for
> SopranoVoice, nothing hapens.  Apparently soprano notes aren't placed
> in a SopranoVoice, just in an ordinary Voice.

If there was any need for a Bottom context, it would be a SopranoVoice.

However, \addlyrics says "hey, I need a Voice" right after SopranoStaff
has been created, and gets the demanded Voice.  And then a Bottom
context is there.

Without \addlyrics, you'll get the expected result.  Possibly even when
writing \new SopranoVoice (but I'm not sure \addlyrics will accept an
alias).

> Any ideas?

Use \lyricsto.  \addlyrics sucks for anything but Voice contexts.

-- 
David Kastrup




reply via email to

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