3 texidoc
= "Ambituses can be switched off or translated by using
6 If you want to mix per-voice and per-staff ambiti, then you have to
7 define you have to declare a new context type derived from the
8 @code{Voice} context or @code{Staff} context. The derived context
9 must consist of the @code{Ambitus_engraver} and it must be accepted by
10 a proper parent context, in the below example the @code{Staff} context
11 or @code{Score} context, respectively. The original context and the
12 derived context can then be used in parallel in the same score. (this is not demonstrated in this file).
18 #(define
(kill-ambitus grob grob-context apply-context
)
19 (if
(memq
'ambitus-interface
(ly
:get-grob-property grob
'interfaces
))
20 (ly
:grob-suicide grob
)
23 #(define
((shift-ambitus x
) grob grob-context apply-context
)
24 (if
(memq
'ambitus-interface
(ly
:get-grob-property grob
'interfaces
))
25 (ly
:grob-translate-axis
! grob x X
)
30 voiceA
= \notes \relative c'' {
33 voiceB
= \notes \relative c' {
37 \context ChoirStaff
<<
40 \applyoutput #(shift-ambitus
1.0)
48 { \applyoutput #kill-ambitus
\voiceA } \\
49 { \applyoutput #kill-ambitus
\voiceB }
57 \consists Ambitus
_engraver