@mudelafile{clefs.ly}
+
+Key signatures appear on key changes. They may also
+appear without barlines. The restoration accidentals are not printed at
+the start of the line. If @code{createKeyOnClefChange} is set, they're
+also created on a clef change.
+
+@mudelafile{keys.ly}
+
@ignore
@c the input file is too long and does not test for specific bugs
+
By default, time signatures are written with two numbers. With style
``C'', 4/4 and 2/2 are written with their corresponding symbols and
with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and
\mu delafile{time.ly}
@end ignore
+
+
@section Hacks and Features
As a last resort, the placement of items can be adjusted manually.
--- /dev/null
+\score { \notes {
+ \property Voice.tupletSpannerDuration = #(make-moment 1 4)
+ \property Voice.tupletNumberVisibility = #'if-no-beam
+ \property Voice.tupletBracketVisibility = #'if-no-beam
+ % Gm7 / F | A7 / Dm |
+ \times 2/3 {
+ [f,8 bes, d] [g d bes,] [f, a, c] [f c a,] | e, a, cis e cis a, d, f, a, d a, f, |
+ % Db |
+ des, aes, des f des aes, des, aes, des f des aes, | }
+}}
\version "1.3.42";
-%{
-test key itemv breaking
-%}
\score {
\notes \relative c''
{
+ \property Staff. createKeyOnClefChange = ##t
\key bes; c2 \key c \minor; c2
\break
- \key bes \major; c1 \key d;\break c1
+ \key bes \major; c2 \clef alto; c2 \key d; c1
}
}
\version "1.3.42";
m = \notes \relative c''{
+
c1 | c2 c | c c | c c | \break c c | c c | c c | c c |
}
\translator {
\OrchestralScoreContext
barNumberScriptPadding = 10;
- minVerticalAlign = 2.2*\staffheight;
+ minVerticalAlign = 2.2*\staffheight;
+
}
\translator { \StaffContext
\consists "Instrument_name_engraver";
Make the key signature.
*/
class Key_engraver : public Engraver {
- void create_key();
+ void create_key(bool);
void read_req (Key_change_req const * r);
public:
Key key_;
Key_change_req * keyreq_l_;
Key_item * item_p_;
+
Array<Musical_pitch> accidental_idx_arr_;
Array<Musical_pitch> old_accidental_idx_arr_;
System_start_delimiter ();
VIRTUAL_COPY_CONS (Score_element);
protected:
+ virtual void after_line_breaking();
virtual Molecule do_brew_molecule () const;
Molecule staff_bracket (Real) const;
Molecule staff_brace (Real) const;
}
void
-Key_engraver::create_key ()
+Key_engraver::create_key (bool def)
{
if (!item_p_)
{
item_p_->add_old (m_l.notename_i_, a);
}
}
+
+
+ if (!def)
+ item_p_->set_elt_property ("visibility-lambda",
+ scm_eval (ly_symbol2scm ("all-visible")));
+
}
{
SCM c = get_property ("createKeyOnClefChange");
if (to_boolean (c))
- create_key ();
+ {
+ create_key (false);
+
+ }
}
else if (dynamic_cast<Bar *> (info.elem_l_)
&& accidental_idx_arr_.size ())
{
- create_key ();
+ create_key (true);
}
}
{
if (keyreq_l_)
{
- create_key ();
+ create_key (false);
}
}
{
if (item_p_)
{
- if (keyreq_l_)
- item_p_->set_elt_property ("visibility-lambda",
- scm_eval (ly_symbol2scm ("all-visible")));
-
typeset_element (item_p_);
item_p_ = 0;
}
Real w = paper_l ()->get_var ("barthick_score");
return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
}
-
+
+void
+System_start_delimiter::after_line_breaking ()
+{
+ SCM gl = get_elt_property ("glyph");
+
+ if (scm_ilength (get_elt_property ("elements")) <= 1 && gl == ly_symbol2scm ("bar-line"))
+ {
+ set_elt_property ("transparent", SCM_BOOL_T);
+ set_extent_callback (0, X_AXIS);
+ set_extent_callback (0, Y_AXIS);
+ }
+}
Molecule
System_start_delimiter::do_brew_molecule ()const
s = get_elt_property ("glyph");
- if (gh_symbol_p (s) && s == ly_symbol2scm ("bracket"))
+ if (!gh_symbol_p(s))
+ return m;
+
+ if (s == ly_symbol2scm ("bracket"))
m = staff_bracket (l);
- else if (gh_symbol_p (s) && s == ly_symbol2scm ("brace"))
+ else if ( s == ly_symbol2scm ("brace"))
m = staff_brace (l);
- else
+ else if (s == ly_symbol2scm ("bar-line"))
m = simple_bar (l);
alignmentReference = \down;
defaultClef = #"treble"
defaultBarType = #"|"
+ systemStartDelimiterGlyph = #'bar-line
+
\accepts "Staff";
\accepts "StaffGroup";
\accepts "RhythmicStaff";