--- /dev/null
+\header {
+ texidoc = "Grace notes are placed on the appropriate staff."
+}
+
+\version "2.19.22"
+\layout { ragged-right = ##t }
+
+\score {
+ <<
+ \context Staff = "up" { s1 }
+ \context Staff = "down" {
+ \clef "bass"
+ r2
+ \grace { \autochange { e16 e'' } }
+ c'2
+ }
+ >>
+}
--- /dev/null
+\header {
+ texidoc = "Grace notes are placed on the appropriate staff."
+}
+
+\version "2.19.22"
+\layout { ragged-right = ##t }
+
+\score {
+ <<
+ \context Staff = "up" { s1 }
+ \context Staff = "down" {
+ \clef "bass"
+ r2
+ \autochange { \grace { g8 g' } e'4 e }
+ }
+ >>
+}
--- /dev/null
+\header {
+ texidoc = "The notes of the first chord share a stem but the notes of the second chord do not."
+}
+
+\version "2.19.22"
+\layout { ragged-right = ##t }
+
+\score {
+ \context Voice = "v" {
+ r2
+ \grace { \partcombine \relative { e'16 e }
+ \relative { c'16 f } }
+ c'2
+ }
+}
--- /dev/null
+\header {
+ texidoc = "Grace notes in parts are combined."
+}
+
+\version "2.19.22"
+\layout { ragged-right = ##t }
+
+\score {
+ \new Voice = "v" {
+ r2
+ \partcombine { \grace g'8 e'4 \grace g'8 e'4 }
+ { \grace e'8 c'4 \grace e'8 c'4 }
+ }
+}
private:
SCM split_list_;
Direction where_dir_;
- Moment start_moment_;
Context_handle up_;
Context_handle down_;
{
Music_wrapper_iterator::process (m);
- Moment now = get_outlet ()->now_mom ();
Moment *splitm = 0;
- if (start_moment_.main_part_.is_infinity () && start_moment_ < 0)
- start_moment_ = now;
for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_))
{
splitm = unsmob<Moment> (scm_caar (split_list_));
- if ((*splitm + start_moment_) > now)
+ if (*splitm > m)
break;
SCM tag = scm_cdar (split_list_);
Auto_change_iterator::construct_children ()
{
split_list_ = get_music ()->get_property ("split-list");
- start_moment_ = get_outlet ()->now_mom ();
SCM props = get_outlet ()->get_property ("trebleStaffProperties");
Context *up = get_outlet ()->find_create_context (ly_symbol2scm ("Staff"),
private:
static const size_t NUM_PARTS = 2;
Music_iterator *iterators_[NUM_PARTS];
- Moment start_moment_;
SCM split_list_;
void
Part_combine_iterator::construct_children ()
{
- start_moment_ = get_outlet ()->now_mom ();
split_list_ = get_music ()->get_property ("split-list");
SCM lst = get_music ()->get_property ("elements");
void
Part_combine_iterator::process (Moment m)
{
- Moment now = get_outlet ()->now_mom ();
Moment *splitm = 0;
- /* This is needed if construct_children was called before iteration
- started */
- if (start_moment_.main_part_.is_infinity () && start_moment_ < 0)
- start_moment_ = now;
-
Context *prev_active_outlets[NUM_PARTS];
for (size_t i = 0; i < NUM_PARTS; i++)
prev_active_outlets[i] = iterators_[i]->get_outlet ();
for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_))
{
splitm = unsmob<Moment> (scm_caar (split_list_));
- if (splitm && *splitm + start_moment_ > now)
+ if (splitm && *splitm > m)
break;
SCM tag = scm_cdar (split_list_);
(to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
(iterator-ctor . ,ly:music-wrapper-iterator::constructor)
(length-callback . ,ly:music-wrapper::length-callback)
+ (start-callback . ,ly:music-wrapper::start-callback)
(types . (music-wrapper-music unrelativable-music))
))