diff options
author | Werner Lemberg <wl@gnu.org> | 2007-07-01 16:01:30 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2007-07-01 16:01:30 +0200 |
commit | 2c70df4984be974a7ffefaa90ec4c7a2f5f13ee9 (patch) | |
tree | 7540389e304c95c869af9df2c9b3255f22e46e05 | |
parent | 7031d9fbb7f285db0b596b3d4261f29ccdb3c038 (diff) |
Remove `\repeat "fold"' and its associated stuff.
This was neither documented nor working properly.
-rw-r--r-- | Documentation/de/user/basic-notation.itely | 5 | ||||
-rw-r--r-- | Documentation/es/user/basic-notation.itely | 5 | ||||
-rw-r--r-- | Documentation/fr/user/basic-notation.itely | 5 | ||||
-rw-r--r-- | Documentation/user/basic-notation.itely | 5 | ||||
-rw-r--r-- | input/regression/display-lily-tests.ly | 1 | ||||
-rw-r--r-- | input/regression/repeat-fold.ly | 20 | ||||
-rw-r--r-- | input/regression/repeat-unfold.ly | 24 | ||||
-rw-r--r-- | lily/folded-repeat-iterator.cc | 128 | ||||
-rw-r--r-- | lily/include/folded-repeat-iterator.hh | 47 | ||||
-rw-r--r-- | lily/include/lily-proto.hh | 1 | ||||
-rw-r--r-- | scm/define-music-display-methods.scm | 3 | ||||
-rw-r--r-- | scm/define-music-types.scm | 11 |
12 files changed, 17 insertions, 238 deletions
diff --git a/Documentation/de/user/basic-notation.itely b/Documentation/de/user/basic-notation.itely index 46cfeb7e8f..4b61a201f5 100644 --- a/Documentation/de/user/basic-notation.itely +++ b/Documentation/de/user/basic-notation.itely @@ -3531,9 +3531,8 @@ c4 c4 Programmreferenz: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic}, -@internalsref{VoltaRepeatedMusic}, -@internalsref{UnfoldedRepeatedMusic} und -@internalsref{FoldedRepeatedMusic}. +@internalsref{VoltaRepeatedMusic} und +@internalsref{UnfoldedRepeatedMusic}. @node Tremolo repeats diff --git a/Documentation/es/user/basic-notation.itely b/Documentation/es/user/basic-notation.itely index 7261394d36..301a3f0d63 100644 --- a/Documentation/es/user/basic-notation.itely +++ b/Documentation/es/user/basic-notation.itely @@ -3355,9 +3355,8 @@ c4 c4 Referencia del programa: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic}, -@internalsref{VoltaRepeatedMusic}, -@internalsref{UnfoldedRepeatedMusic} y -@internalsref{FoldedRepeatedMusic}. +@internalsref{VoltaRepeatedMusic} y +@internalsref{UnfoldedRepeatedMusic}. @node Tremolo repeats diff --git a/Documentation/fr/user/basic-notation.itely b/Documentation/fr/user/basic-notation.itely index 4a68894658..71711ffbf5 100644 --- a/Documentation/fr/user/basic-notation.itely +++ b/Documentation/fr/user/basic-notation.itely @@ -3499,9 +3499,8 @@ c4 c4 Référence du programme : @internalsref{VoltaBracket}, @internalsref{RepeatedMusic}, -@internalsref{VoltaRepeatedMusic}, -@internalsref{UnfoldedRepeatedMusic}, et -@internalsref{FoldedRepeatedMusic}. +@internalsref{VoltaRepeatedMusic}, et +@internalsref{UnfoldedRepeatedMusic}. @node Tremolo repeats diff --git a/Documentation/user/basic-notation.itely b/Documentation/user/basic-notation.itely index afcd3384dd..0a67b9ea14 100644 --- a/Documentation/user/basic-notation.itely +++ b/Documentation/user/basic-notation.itely @@ -3357,9 +3357,8 @@ c4 c4 Program reference: @internalsref{VoltaBracket}, @internalsref{RepeatedMusic}, -@internalsref{VoltaRepeatedMusic}, -@internalsref{UnfoldedRepeatedMusic}, and -@internalsref{FoldedRepeatedMusic}. +@internalsref{VoltaRepeatedMusic}, and +@internalsref{UnfoldedRepeatedMusic}. @node Tremolo repeats diff --git a/input/regression/display-lily-tests.ly b/input/regression/display-lily-tests.ly index 5b2b4f198c..434f76fa83 100644 --- a/input/regression/display-lily-tests.ly +++ b/input/regression/display-lily-tests.ly @@ -187,7 +187,6 @@ stderr of this run." %% Repeats \test "" ##[ \repeat volta 2 { c d } #] % VoltaRepeatedMusic \test "" ##[ \repeat unfold 2 { c d } #] % UnfoldedRepeatedMusic -\test "" ##[ \repeat fold 2 { c d } #] % FoldedRepeatedMusic \test "" ##[ \repeat percent 2 { c d } #] % PercentRepeatedMusic \test "" ##[ \repeat tremolo 4 { c16 d } #] % TremoloRepeatedMusic \test "" ##[ \repeat volta 2 { c4 d } \alternative { { c d } { e f } } #] % diff --git a/input/regression/repeat-fold.ly b/input/regression/repeat-fold.ly deleted file mode 100644 index 7a5f1c66e2..0000000000 --- a/input/regression/repeat-fold.ly +++ /dev/null @@ -1,20 +0,0 @@ -\version "2.10.0" - -\header{ -texidoc=" -Folded repeat may not make sense without alternatives, and there -should not be more alternatives than repeats. -" -} - -\paper { ragged-right = ##t } - -\context Staff \relative c'' { - \repeat fold 3 { c^"3x 0alt" d } - % less alts than body - \repeat fold 4 { c^"4x 2alt" d } \alternative { e f } - % more alts than body - \repeat fold 2 { c^"2x 3alt" d } \alternative { e f g } - } - - diff --git a/input/regression/repeat-unfold.ly b/input/regression/repeat-unfold.ly index 03ac55f35b..2ff7e2304a 100644 --- a/input/regression/repeat-unfold.ly +++ b/input/regression/repeat-unfold.ly @@ -1,22 +1,16 @@ -\version "2.10.0" +\version "2.11.27" \header{ - texidoc=" -LilyPond has three modes for repeats: folded, unfolded and -semi-unfolded. Unfolded repeats are fully written out. Semi unfolded -repeats have the body written and all alternatives sequentially. -Folded repeats have the body written and all alternatives -simultaneo.ly. If the number of alternatives is larger than the -repeat count, the excess alternatives are ignored. If the number of -alternatives is smaller, the first alternative is multiplied to get to -the number of repeats. + texidoc="LilyPond has two modes for repeats: unfolded and semi-unfolded. +Unfolded repeats are fully written out. Semi unfolded repeats have the body +written and all alternatives sequentially. If the number of alternatives is +larger than the repeat count, the excess alternatives are ignored. If the +number of alternatives is smaller, the first alternative is multiplied to +get to the number of repeats. -Unfolded behavior: -" +Unfolded behavior:" } - - \context Voice \relative c'' { \repeat unfold 3 { c^"3x 0a" d } %% less alts than body @@ -24,5 +18,3 @@ Unfolded behavior: %% more alts than body \repeat unfold 2 { c^"2x 3a" d } \alternative { e f g } } - - diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc deleted file mode 100644 index f22e8b879b..0000000000 --- a/lily/folded-repeat-iterator.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* - folded-repeat-iterator.cc -- implement Folded_repeat_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl> -*/ - -#include "folded-repeat-iterator.hh" - -#include "context.hh" -#include "input.hh" -#include "international.hh" -#include "repeated-music.hh" -#include "simultaneous-music-iterator.hh" - -Folded_repeat_iterator::Folded_repeat_iterator () -{ - main_iter_ = 0; - alternative_iter_ = 0; -} - -bool -Folded_repeat_iterator::ok () const -{ - return main_iter_ || alternative_iter_; -} -void -Folded_repeat_iterator::do_quit () -{ - if (main_iter_)main_iter_->quit (); - if (alternative_iter_)alternative_iter_->quit (); -} - -Moment -Folded_repeat_iterator::pending_moment () const -{ - if (main_iter_) - return main_iter_->pending_moment (); - else - return main_length_mom_ + alternative_iter_->pending_moment (); -} - -void -Folded_repeat_iterator::construct_children () -{ - Music *mus = get_music (); - main_iter_ = unsmob_iterator (get_iterator (Repeated_music::body (mus))); - if (!main_iter_->ok ()) - { - leave_body (); - enter_alternative (); - } -} - -void -Folded_repeat_iterator::process (Moment m) -{ - if (main_iter_) - { - main_iter_->process (m); - if (!main_iter_->ok ()) - leave_body (); - } - - if (!main_iter_ && !alternative_iter_) - enter_alternative (); - - if (alternative_iter_) - { - alternative_iter_->process (m - main_length_mom_); - if (!alternative_iter_->ok ()) - { - alternative_iter_->quit (); - alternative_iter_ = 0; - } - } -} - -void -Folded_repeat_iterator::leave_body () -{ - Music *mus = get_music (); - - main_iter_->quit (); - main_iter_ = 0; - main_length_mom_ += Repeated_music::body (mus)->get_length (); -} - -void -Folded_repeat_iterator::enter_alternative () -{ - Music *mus = get_music (); - if (scm_is_pair (Repeated_music::alternatives (mus))) - { - /* - ugh. - */ - Simultaneous_music_iterator *s = new Simultaneous_music_iterator; - s->create_separate_contexts_ = true; - s->init_context (mus, get_outlet ()); - - alternative_iter_ = s; - alternative_iter_->construct_children (); - - s->unprotect (); - } -} - -void -Folded_repeat_iterator::derived_mark () const -{ - if (main_iter_) - scm_gc_mark (main_iter_->self_scm ()); - if (alternative_iter_) - scm_gc_mark (alternative_iter_->self_scm ()); -} - -void -Folded_repeat_iterator::derived_substitute (Context *f, Context *t) -{ - if (main_iter_) - main_iter_->substitute_outlet (f, t); - if (alternative_iter_) - alternative_iter_->substitute_outlet (f, t); -} - -IMPLEMENT_CTOR_CALLBACK (Folded_repeat_iterator); diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh deleted file mode 100644 index d32f77d57f..0000000000 --- a/lily/include/folded-repeat-iterator.hh +++ /dev/null @@ -1,47 +0,0 @@ -/* - folded-repeat-iterator.hh -- declare Folded_repeat_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl> -*/ - -#ifndef FOLDED_REPEAT_ITERATOR_HH -#define FOLDED_REPEAT_ITERATOR_HH - -#include "music-iterator.hh" - -/** - Iterate through a repeated section: first do the body, then - all alternatives in parallel. -*/ -class Folded_repeat_iterator : public Music_iterator -{ -public: - DECLARE_SCHEME_CALLBACK (constructor, ()); - DECLARE_CLASSNAME(Folded_repeat_iterator); - - Folded_repeat_iterator (Folded_repeat_iterator const &src); - Folded_repeat_iterator (); - virtual void derived_mark () const; - virtual void derived_substitute (Context *f, Context *t); - - virtual void construct_children (); - virtual Moment pending_moment () const; - virtual void do_quit (); - virtual bool ok () const; - -protected: - void enter_alternative (); - void leave_body (); - - virtual void process (Moment); - -private: - Music_iterator *main_iter_; - Music_iterator *alternative_iter_; - - Moment main_length_mom_; -}; -#endif /* FOLDED_REPEAT_ITERATOR_HH */ - diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 4754d498da..8de07c990b 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -55,7 +55,6 @@ class Event; class Event_chord; class Event_chord_iterator; class Event_iterator; -class Folded_repeat_iterator; class Font_metric; class Font_size_engraver; class Global_context; diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index 3212e5f0b8..e3afd7f273 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -689,9 +689,6 @@ Otherwise, return #f." (define-display-method UnfoldedRepeatedMusic (expr parser) (repeat->lily-string expr "unfold" parser)) -(define-display-method FoldedRepeatedMusic (expr parser) - (repeat->lily-string expr "fold" parser)) - (define-display-method PercentRepeatedMusic (expr parser) (repeat->lily-string expr "percent" parser)) diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm index a57b187e30..993d93b6d0 100644 --- a/scm/define-music-types.scm +++ b/scm/define-music-types.scm @@ -185,14 +185,6 @@ You can also use @code{\\<}, @code{\\!}, @code{\\cresc}, and (types . (general-music fingering-event event)) )) - (FoldedRepeatedMusic - . ((description . "Repeats with alternatives placed in parallel.") - (iterator-ctor . ,ly:folded-repeat-iterator::constructor) - (start-callback . ,ly:repeated-music::minimum-start) - (length-callback . ,ly:repeated-music::folded-music-length) - (types . (general-music repeated-music folded-repeated-music)) - )) - (GlissandoEvent . ((description . "Start a glissando on this note.") (types . (general-music glissando-event event)) @@ -693,8 +685,7 @@ and values. E.g: (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic) ("unfold" . UnfoldedRepeatedMusic) ("percent" . PercentRepeatedMusic) - ("tremolo" . TremoloRepeatedMusic) - ("fold" . FoldedRepeatedMusic)))) + ("tremolo" . TremoloRepeatedMusic)))) (music-name (if (pair? handle) (cdr handle) (begin |