From: Han-Wen Nienhuys Date: Wed, 31 Mar 2004 11:59:44 +0000 (+0000) Subject: * lily/change-iterator.cc (process): use find_existing_context(). X-Git-Tag: release/2.1.37~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6e41e0cf6b09bf5cab7a5e0a41a05c19992fb998;p=lilypond.git * lily/change-iterator.cc (process): use find_existing_context(). * Documentation/user/notation.itely (Automatic part combining): add note about \relative. --- diff --git a/ChangeLog b/ChangeLog index 6b5e542396..f00f04b6f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-03-31 Han-Wen Nienhuys + * lily/change-iterator.cc (process): use find_existing_context(). + * input/test/polymetric-differing-notes.ly: use ly:music-compress. * input/regression/repeat-unfold-tremolo.ly: new file. diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index d9e3bc517e..e1a13537a2 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -3075,8 +3075,27 @@ Voices can be switched between staves manually, using the following command The string @var{staffname} is the name of the staff. It switches the current voice from its current staff to the Staff called @var{staffname}. Typically @var{staffname} is @code{"up"} or -@code{"down"}. +@code{"down"}. The @context{Staff} referred to must already exist, so +usually the setup for a score will start with a setup of the staves, +@example + << + \context Staff = up @{ + \skip 1 * 10 %@emph{ keep staff alive} + @} + \context Staff = down @{ + \skip 1 * 10 %@emph{idem} + @} + >> +@end example + + +and the @context{Voice} is inserted afterwards + +@example + \context Staff = down + \new Voice @{ @dots{} \change Staff = up @dots{} @} +@end example @node Pedals diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index 804e3ff6e3..829ca048a4 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -65,7 +65,7 @@ Change_iterator::process (Moment m) if (last) { Context * dest = - get_outlet ()->find_create_context (to_type, to_id, SCM_EOL); + get_outlet ()->find_existing_context (to_type, to_id, SCM_EOL); current->remove_context (last); dest->add_context (last); } diff --git a/lily/parser.yy b/lily/parser.yy index 549093937e..f02b425f89 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -792,6 +792,10 @@ Repeated_music: r-> set_property ("elements",alts); if (gh_equal_p ($2, scm_makfrom0str ("tremolo"))) { + /* + TODO: move this code to Scheme. + */ + /* we can not get durations and other stuff correct down the line, so we have to add to the duration log here.