--- /dev/null
+\version "2.14.2"
+
+\header {
+ texidoc = "Ambitus for pieces beginning with @code{\\cueDuringWithClef}.
+
+Cues are often used at or near the beginning of a piece. Furthermore,
+a cue is frequently in a different clef, so the
+@code{\\cueDuringWithClef} command is handy. Using this command at
+the beginning of a piece should leave the ambitus displayed based
+on the main clef.
+"
+}
+
+\addQuote "other" \relative c { r4 c e g }
+
+\new Staff \new Voice \relative c'
+{
+ \cueDuringWithClef #"other" #UP #"bass" { R1 } |
+ e4 b c2
+}
+
+\layout {
+ \context {
+ \Voice
+ \consists "Ambitus_engraver"
+ }
+}
* may then oversee a clef that is defined in a staff context if
* we are in a voice context; middleCPosition would then be
* assumed to be 0.
+
+ * Don't use middleCPosition as this may be thwarted by a cue
+ * starting here. middleCOffset is not affected by cue clefs.
*/
- start_c0_ = robust_scm2int (get_property ("middleCPosition"), 0);
+ int clef_pos = robust_scm2int (get_property ("middleCClefPosition"), 0);
+ int offset = robust_scm2int (get_property ("middleCOffset"), 0);
+
+ start_c0_ = clef_pos + offset;
start_key_sig_ = get_property ("keySignature");
is_typeset_ = true;
/* read */
"keySignature "
- "middleCPosition ",
+ "middleCClefPosition "
+ "middleCOffset ",
/* write */
""