+1.3.111.jcn2
+============
+
+* Note_head_line_engraver now also listenes to \property
+"followThread": Automagically connect note-heads when thread switches
+staff.
+
+* Fixed american-chords example (except for o/, that waits for kerning fix).
+
1.3.111.jcn1
============
#(set! chord::names-alist-american
(append
'(
- ;; any changes here, see scm/chord-names.scm
+ ;; any changes here, see scm/chord-name.scm
)
chord::names-alist-american))
chord = \notes\transpose c''\chords{
- \property ChordNames.ChordNames \override #'style = #"american"
+ \property ChordNames.ChordName \override #'style = #'american
c % Major triad
cs:m % Minor triad
df:m5- % Diminished triad
--- /dev/null
+% followThread: connect note heads with line when thread switches staff
+
+\score{
+ <
+ \context Staff=one \notes\relative c''{
+ \context Thread
+ a
+ \translator Staff=two
+ a,, a
+ \translator Staff=one
+ a''
+ }
+ \context Staff=two { \clef bass; \skip 1; }
+ >
+ \paper{
+ linewidth = 70.\mm;
+ \translator {
+ \ScoreContext
+ followThread = ##t
+ }
+ }
+}
\ No newline at end of file
%
chord = \notes\transpose c''\chords{
-\property ChordNames.ChordNames \override #'style = #"jazz"
+\property ChordNames.ChordName \override #'style = #'jazz
% major chords
c
c:6 % 6 = major triad with added sixth
#include "rhythmic-head.hh"
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
+#include "translator-group.hh"
#include "protected-scm.hh"
/**
Spanner* line_;
Request* req_;
Protected_scm heads_;
+ Translator* last_staff_;
+ Grob* last_head_;
};
Note_head_line_engraver::Note_head_line_engraver ()
line_ = 0;
req_ = 0;
heads_ = SCM_EOL;
+ last_head_ = 0;
+ last_staff_ = 0;
}
bool
void
Note_head_line_engraver::acknowledge_grob (Grob_info info)
{
- if (req_)
+ if (Rhythmic_head::has_interface (info.elem_l_))
{
- if (Rhythmic_head::has_interface (info.elem_l_))
+ if (req_)
+ heads_ = gh_cons (info.elem_l_->self_scm (), heads_);
+ else if (to_boolean (get_property ("followThread")))
{
- heads_ = gh_cons (info.elem_l_->self_scm (), heads_);
+ Translator* staff = daddy_trans_l_ && daddy_trans_l_->daddy_trans_l_
+ ? daddy_trans_l_->daddy_trans_l_->daddy_trans_l_ : 0;
+ if (staff != last_staff_)
+ {
+ if (last_head_)
+ heads_ = gh_list (info.elem_l_->self_scm (),
+ last_head_->self_scm (), SCM_UNDEFINED);
+ last_staff_ = staff;
+ }
+ last_head_ = info.elem_l_;
}
}
}