]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/test/piano-staff-distance.ly: new file.
authorhanwen <hanwen>
Tue, 17 Feb 2004 01:48:35 +0000 (01:48 +0000)
committerhanwen <hanwen>
Tue, 17 Feb 2004 01:48:35 +0000 (01:48 +0000)
* lily/translator-group.cc (recurse_down_translators): use
Direction for bottom-up/top-down.

* lily/include/translator.hh (class Translator): add
process_music() and do_announces(). This obviates
recurse_down_{engravers,performers}.

* ly/declarations-init.ly (melismaEnd): use ManualMelismaEvent for
\melisma and \melismaEnd

* lily/melisma-engraver.cc (process_music): change to
Melisma_translator, unify with performer. Accept
ManualMelismaEvent.

* ly/engraver-init.ly: add Font_size_engraver.

28 files changed:
ChangeLog
input/test/piano-staff-distance.ly [new file with mode: 0644]
lily/completion-note-heads-engraver.cc
lily/context-def.cc
lily/context.cc
lily/engraver.cc
lily/include/engraver-group-engraver.hh
lily/include/engraver.hh
lily/include/performer-group-performer.hh
lily/include/performer.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/lyric-phrasing-engraver.cc
lily/melisma-engraver.cc [deleted file]
lily/melisma-performer.cc [deleted file]
lily/melisma-translator.cc [new file with mode: 0644]
lily/music-output-def.cc
lily/paper-def.cc
lily/performer-group-performer.cc
lily/performer.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/translator-group.cc
lily/translator.cc
ly/declarations-init.ly
ly/engraver-init.ly
ly/performer-init.ly
scm/define-music-types.scm

index 2ad319e9194a1bdbfc1ad456c367b7e29ff47f6e..aadd667f3d23b942491dff223c77df167bb042c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2004-02-17  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * input/test/piano-staff-distance.ly: new file.
+
+       * lily/translator-group.cc (recurse_down_translators): use
+       Direction for bottom-up/top-down.
+
+       * lily/include/translator.hh (class Translator): add
+       process_music() and do_announces(). This obviates
+       recurse_down_{engravers,performers}.
+
+       * ly/declarations-init.ly (melismaEnd): use ManualMelismaEvent for
+       \melisma and \melismaEnd
+
+       * lily/melisma-engraver.cc (process_music): change to
+       Melisma_translator, unify with performer. Accept
+       ManualMelismaEvent.
+
+       * ly/engraver-init.ly: add Font_size_engraver.
+
 2004-02-16  Heikki Junes  <hjunes@cc.hut.fi>
 
        * lily/align-interface.cc, lily/axis-group-engraver.cc: spell
diff --git a/input/test/piano-staff-distance.ly b/input/test/piano-staff-distance.ly
new file mode 100644 (file)
index 0000000..556d68c
--- /dev/null
@@ -0,0 +1,69 @@
+
+\header
+{
+
+ texidoc = "It is possible to have different staff distances across
+piano systems, but it requires some advanced magic. Kids don't try this at home.
+
+"
+
+}
+
+\version "2.1.24"
+
+#(define ((futz-alignment-callback distance count) grob axis)
+
+   "Check if we're the system number COUNT, and if yes, set fixed distance to
+DISTANCE; then call the original callback.  "
+   (let*
+       ((a (ly:get-parent grob axis))
+       (o (ly:get-original a))
+       (bs (if (ly:grob? o)
+               (ly:get-broken-into o)
+               #f))
+       )
+
+
+     (if (and (list? bs)
+             (< count (length bs))
+             (equal? (list-ref bs count) a)
+        )
+        (ly:set-grob-property! a 'forced-distance distance))
+     
+     (Align_interface::fixed_distance_alignment_callback grob axis)) )
+
+\score {
+    \notes \relative c''  \context PianoStaff
+    \with {
+       verticalAlignmentChildCallback = #(futz-alignment-callback 20 1)
+
+       %% Every cross staff beam will trigger
+       %% alignment unless autokneeing is switched off 
+       \override Beam #'auto-knee-gap = #'()
+    } <<
+
+       \context Staff  = up {
+           
+           \time 2/4 
+           c8[
+               \change Staff = down
+               \once \override Stem #'direction = #UP
+               c8
+               \change Staff = up
+               c c ](
+           |
+           \break
+           
+           c8[)
+               \change Staff = down
+               \once \override Stem #'direction = #UP
+               c8
+               \change Staff = up
+               c c ](
+       }
+       \context Staff = down {
+           \skip 1 }
+
+    >>
+    \paper { raggedright = ##T } 
+}
index bbe14d260d9f5f5c61cae30cd7d467f1eb807091..33908639a97b242ec273d14236621f9a3d0b58ae 100644 (file)
@@ -300,7 +300,6 @@ Completion_heads_engraver::stop_translation_timestep ()
   for (int i = scratch_note_reqs_.size(); i--;)
     {
       scm_gc_unprotect_object (scratch_note_reqs_[i]->self_scm () );
-      
     }
   
   scratch_note_reqs_.clear();
index d91c60a03b966a0e0247f4d992ac7142fe20ce46..05c19af47a9f4f1b4aa7e68213eec364540eac38 100644 (file)
@@ -286,16 +286,20 @@ SCM
 Context_def::clone_scm () const
 {
   Context_def * t = new Context_def (*this);
-  scm_gc_unprotect_object (t->self_scm());
-  return t->self_scm();
+
+  SCM x = t->self_scm();
+  scm_gc_unprotect_object (x);
+  return x;
 }
 
 SCM
 Context_def::make_scm ()
 {
   Context_def* t = new Context_def;
-  scm_gc_unprotect_object (t->self_scm());
-  return t->self_scm();
+
+  SCM x  =t->self_scm();
+  scm_gc_unprotect_object (x);
+  return x;
 }
 
 void
index 0374885195ea6af735772a082cf6eb49e0d6238b..4503d1cf7ceeeb4e3bad7f4aa42043120e4002cc 100644 (file)
@@ -35,7 +35,7 @@ Context::check_removal ()
       trg->check_removal ();
       if (trg->is_removable ())
        {
-         recurse_down_translators (trg, &Translator::finalize, false);
+         recurse_down_translators (trg, &Translator::finalize, DOWN);
          remove_context (trg);
        }
     }
@@ -73,7 +73,7 @@ Context::add_context (Context*t)
       */
       td->apply_default_property_operations (t);
 
-      recurse_down_translators (t, &Translator::initialize, true);
+      recurse_down_translators (t, &Translator::initialize, DOWN);
     }
 }
 
@@ -90,9 +90,8 @@ Context::Context ()
   
   smobify_self ();
 
-  Scheme_hash_table *tab = new Scheme_hash_table ;
-  properties_scm_ = tab->self_scm ();
-  scm_gc_unprotect_object (tab->self_scm ());
+  properties_scm_ = (new Scheme_hash_table)->self_scm ();
+  scm_gc_unprotect_object (properties_scm_);
 }
 
 Context *
index 201f44655f009da118ce1d05c38a272f45237baa..87cb246d6f201f4564354e0612ebbe6ebbbf819e 100644 (file)
@@ -63,11 +63,6 @@ Engraver::typeset_grob (Grob*p)
 
 
 
-void
-Engraver::process_music ()
-{
-  
-}
 Engraver::Engraver()
 {
 }
@@ -81,11 +76,6 @@ Engraver::get_score_engraver () const
 }
 
 
-void
-Engraver::do_announces ()
-{
-}
-
 ENTER_DESCRIPTION(Engraver,
                   "", "",
                  "",
index f18a60f15f807179ee29486fe3f8161b7451fef7..23c6719fb082b499190068042abb23c0f792427a 100644 (file)
@@ -36,7 +36,6 @@ private:
 
 typedef void (Engraver::*Engraver_method) (void);
 
-void recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first);
 void engraver_each (SCM list, Engraver_method method);
 
 #endif // ENGRAVERGROUP_HH
index b7dcefb83f44ca782f5a717f1d8a03053f7b6847..76f2a122bfb897dcc14c3ab06fa2e32ac404a5e1 100644 (file)
@@ -47,8 +47,6 @@ protected:
     */
   virtual void announce_grob (Grob*, SCM cause);
   virtual void announce_grob (Grob_info);
-  virtual void process_music ();
-  virtual void do_announces ();
   Engraver_group_engraver*get_daddy_engraver () const;
 
 public:
index a8d607526e375b4adf83f3e87c2b389b2aedf9fa..b7d2575f5c8f659f6ceb3ea3dd35136aaefea500 100644 (file)
@@ -28,8 +28,6 @@ private:
   void acknowledge_audio_elements ();
 };
 
-void recurse_down_performers (Context * c, Performer_method ptr,
-                              bool context_first);
 void performer_each (SCM list, Performer_method method);
 
 #endif // PERFORMER_GROUP_PERFORMER_HH
index 2fc46d3a1d10532bbe45e715be91b2a0cbf74032..04ecba2d55ba53000b4de993ee61fd5b827c09c2 100644 (file)
@@ -31,8 +31,6 @@ protected:
   virtual void create_audio_elements ();
   virtual int get_tempo () const;
   virtual void play_element (Audio_element * elem );
-  virtual void process_music ();
-  virtual void do_announces ();
 };
 
 
index 851c8f5a571ac71308d5d74f685d270e34789564..b302aefcdb8cd0a19eed19b5651eafa58710bd63 100644 (file)
@@ -34,7 +34,7 @@ public:
 
 
 SCM names_to_translators (SCM namelist, Context*tg);
-void recurse_down_translators (Context * c, Translator_method ptr, bool context_first);
+void recurse_down_translators (Context * c, Translator_method ptr, Direction);
 void translator_each (SCM list, Translator_method method);
 
 
index 3178beff9eb25ad39a0ebb4d1cf0e23cbf55136a..923cf2f639504d651d22f37274298d1fcb6cf97d 100644 (file)
@@ -61,6 +61,8 @@ public:
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
   virtual void initialize () ;
+  virtual void process_music ();
+  virtual void do_announces ();
   virtual void finalize ();
 };
 
index 3396fe194053084bee25186f30952c6120125756..5c087ff18dd28a9bf2fdeeb2e7e35837707ebdbb 100644 (file)
@@ -98,9 +98,9 @@ String
 Lyric_phrasing_engraver::get_voice_name_for_lyric (Context *tr)
 {
   SCM voice_context = tr->get_property ("associatedVoiceContext");
-  if (Translator *vc = unsmob_translator (voice_context))
+  if (Context *vc = unsmob_context (voice_context))
     {
-      return dynamic_cast<Context *> (vc)->id_string_;
+      return vc->id_string_;
     }
   
   SCM voice = tr->get_property ("associatedVoice");
diff --git a/lily/melisma-engraver.cc b/lily/melisma-engraver.cc
deleted file mode 100644 (file)
index f8b9a5e..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*   
-  melisma-engraver.cc --  implement Melisma_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-/*
-  duplicated in melisma-performer
- */
-#include "engraver.hh"
-#include "event.hh"
-#include "grob.hh"
-#include "context.hh"
-
-
-/**
-   Signal existence of melismas.
- */
-class Melisma_engraver : public Engraver
-{
-public:
-  TRANSLATOR_DECLARATIONS(Melisma_engraver);
-  bool try_music (Music *);
-};
-
-
-bool
-Melisma_engraver::try_music (Music *) 
-{
-  /*
-    This can only be melisma-playing-event.
-   */
-  return melisma_busy (this);
-}
-
-Melisma_engraver::Melisma_engraver()
-{
-}
-
-ENTER_DESCRIPTION(Melisma_engraver,
-/* descr */       "This engraver collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code.  ",
-/* creats*/       "",
-/* accepts */     "melisma-playing-event",
-/* acks  */      "",
-/* reads */       "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
-/* write */       "");
diff --git a/lily/melisma-performer.cc b/lily/melisma-performer.cc
deleted file mode 100644 (file)
index 2ad44ba..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/*   
-  melisma-performer.cc --  implement Melisma_performer
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-/*
-  copy of melisma-engraver - see there.
- */
-#include "performer.hh"
-#include "event.hh"
-#include "grob.hh"
-#include "translator-group.hh"
-
-/**
-   Signal existence of melismas.
- */
-class Melisma_performer : public Performer
-{
-public:
-  TRANSLATOR_DECLARATIONS(Melisma_performer);
-  bool try_music (Music *);
-};
-
-
-bool
-Melisma_performer::try_music (Music *) 
-{
-  /*
-    This can only be melisma-playing-event.
-   */
-  return melisma_busy (this);
-}
-
-Melisma_performer::Melisma_performer()
-{
-}
-
-ENTER_DESCRIPTION(Melisma_performer,
-/* descr */       "This performer collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code.  ",
-/* creats*/       "",
-/* accepts */     "melisma-playing-event",
-/* acks  */      "",
-/* reads */       "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
-/* write */       "");
diff --git a/lily/melisma-translator.cc b/lily/melisma-translator.cc
new file mode 100644 (file)
index 0000000..6bcdd21
--- /dev/null
@@ -0,0 +1,81 @@
+/*   
+  melisma-engraver.cc --  implement Melisma_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+/*
+  duplicated in melisma-performer
+ */
+#include "engraver.hh"
+#include "event.hh"
+#include "grob.hh"
+#include "context.hh"
+
+
+/**
+   Signal existence of melismas.
+ */
+class Melisma_translator : public Translator
+{
+public:
+  TRANSLATOR_DECLARATIONS(Melisma_translator);
+protected:
+  virtual bool try_music (Music *);
+  virtual void process_music ();
+  virtual void start_translation_timestep ();
+  Music * event_;
+};
+
+
+bool
+Melisma_translator::try_music (Music *m) 
+{
+  if (m->is_mus_type ("melisma-playing-event"))
+    {
+      return melisma_busy (this);
+    }
+  else if (m->is_mus_type ("melisma-span-event"))
+    {
+      event_ = m;
+      return true;
+    }
+
+  return false;
+}
+
+void
+Melisma_translator::process_music ()
+{
+  if (event_)
+    {
+      SCM sd = event_->get_mus_property ("span-direction");
+      Direction d = to_dir (sd);
+      if (d == START)
+       daddy_context_->set_property ("melismaBusy", SCM_BOOL_T);
+      else
+       daddy_context_->unset_property (ly_symbol2scm ("melismaBusy"));
+    }
+      
+}
+
+void
+Melisma_translator::start_translation_timestep ()
+{
+  event_ =0;
+}
+  
+Melisma_translator::Melisma_translator()
+{
+}
+
+ENTER_DESCRIPTION(Melisma_translator,
+/* descr */       "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code.  ",
+/* creats*/       "",
+/* accepts */     "melisma-playing-event melisma-span-event",
+/* acks  */      "",
+/* reads */       "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
+/* write */       "");
index e1f86f7387e01582ee371d15e3e303b59e93a8e8..ab651a45c7f1699bc230a17ac7ca285f1412ba4c 100644 (file)
@@ -25,9 +25,9 @@ Music_output_def::Music_output_def ()
   translator_tab_ = new Scheme_hash_table;
   scope_ = SCM_EOL;
   smobify_self ();
-  scm_gc_unprotect_object (translator_tab_->self_scm ());
 
-  scope_ =   ly_make_anonymous_module();
+  scm_gc_unprotect_object (translator_tab_->self_scm ());
+  scope_ = ly_make_anonymous_module();
 }
 
 Music_output_def::~Music_output_def ()
@@ -37,11 +37,11 @@ Music_output_def::~Music_output_def ()
 Music_output_def::Music_output_def (Music_output_def const &s)
 {
   scope_ = SCM_EOL;
-  translator_tab_ = new Scheme_hash_table (*s.translator_tab_);
-
+  translator_tab_ = 0;
   scaled_fonts_ = SCM_EOL;
-
   smobify_self ();
+
+  translator_tab_ =   new Scheme_hash_table (*s.translator_tab_);  
   scm_gc_unprotect_object (translator_tab_->self_scm ());  
   
   scaled_fonts_ = scm_list_copy (s.scaled_fonts_);  
@@ -59,7 +59,8 @@ SCM
 Music_output_def::mark_smob (SCM m)
 {
   Music_output_def * mo = (Music_output_def*) SCM_CELL_WORD_1 (m);
-  scm_gc_mark (mo->translator_tab_->self_scm ());
+  if (mo->translator_tab_)
+    scm_gc_mark (mo->translator_tab_->self_scm ());
   scm_gc_mark (mo->scope_);
 
   return mo->scaled_fonts_;
index 27de71fa443b8f811d97553beebfe015692a1dad..c9386c2e41623ee264245de2dd860b3797d16907 100644 (file)
@@ -117,8 +117,9 @@ Paper_def::find_font (SCM fn, Real m)
       f = all_fonts_global->find_font (ly_scm2string (fn));
       SCM val = Scaled_font_metric::make_scaled_font_metric (f, m);
       scaled_fonts_ = scm_acons (key, val, scaled_fonts_);
-      f = unsmob_metrics (val);
       scm_gc_unprotect_object (val);
+      
+      f = unsmob_metrics (val);
     }
 
   return f;
index 90029772505feb2716eee44c2f43587c01fd7cc8..6844cce7a6a766437d7917b893585be7bb446c8e 100644 (file)
@@ -71,36 +71,6 @@ Performer_group_performer::Performer_group_performer()
 {
 }
 
-/* c&p engraver-group.cc */
-void
-recurse_down_performers (Context * c, Performer_method ptr, bool context_first)
-{
-  Performer_group_performer * tg
-    = dynamic_cast<Performer_group_performer*> (unsmob_translator (c->implementation_));
-
-
-  if (!context_first)
-    {
-      performer_each (tg->get_simple_trans_list (),
-                    ptr);
-
-      (tg->*ptr) ();
-    }
-
-  for (SCM s = c->context_list_ ; gh_pair_p (s);
-       s =gh_cdr (s))
-    {
-      recurse_down_performers (unsmob_context (gh_car (s)), ptr, context_first);
-    }
-
-  if (context_first)
-    {
-      performer_each (tg->get_simple_trans_list (),
-                    ptr);
-      (tg->*ptr) ();
-    }
-}
-
 
 void
 performer_each (SCM list, Performer_method method)
index ebf5a030fbbd947bcdd6a71718a7a5601c161101..14a4239c1faaf6fb29abdf717634720ffdfd26f6 100644 (file)
 #include "performer-group-performer.hh"
 #include "warn.hh"
 
-void
-Performer::do_announces ()
-{
-}
-
 void 
 Performer::play_element (Audio_element* p) 
 { 
@@ -53,9 +48,3 @@ Performer::announce_element (Audio_element_info i)
     i.origin_trans_= this;
   get_daddy_performer ()->announce_element (i);
 }
-
-void
-Performer::process_music ()
-{
-  
-}
index 55dd5ad32e9c5f8a92a774c484345bb80aaac4cb..c66301c6086a04969b5721ea53d9c7963a3189c6 100644 (file)
@@ -80,7 +80,7 @@ Score_engraver::prepare (Moment m)
   command_column_->set_grob_property ("when", w);
   musical_column_->set_grob_property ("when", w);
   
-  recurse_down_translators (daddy_context_, &Translator::start_translation_timestep, false);
+  recurse_down_translators (daddy_context_, &Translator::start_translation_timestep, DOWN);
 }
 
 void
@@ -89,7 +89,7 @@ Score_engraver::finish ()
   if ((breaks_%8))
     progress_indication ("[" + to_string (breaks_) + "]");
 
-  recurse_down_translators (daddy_context_, &Translator::finalize, true);
+  recurse_down_translators (daddy_context_, &Translator::finalize, UP);
 }
 
 /*
@@ -139,11 +139,11 @@ Score_engraver::one_time_step ()
 {
   if (!to_boolean (get_property ("skipTypesetting")))
     {
-      recurse_down_engravers (daddy_context_, &Engraver::process_music, true);
-      recurse_down_engravers (daddy_context_, &Engraver::do_announces, true);
+      recurse_down_translators (daddy_context_, &Engraver::process_music, UP);
+      recurse_down_translators (daddy_context_, &Engraver::do_announces, UP);
     }
   
-  recurse_down_translators (daddy_context_, &Translator::stop_translation_timestep, true);
+  recurse_down_translators (daddy_context_, &Translator::stop_translation_timestep, UP);
 }
 
 void
index d44a836e35a26cf9a699d2e0a9e1d3973c9ee9f7..1e8cd4794e02e7cd67eaaa4a35d6f8bbe9e0d8aa 100644 (file)
@@ -58,16 +58,16 @@ Score_performer::prepare (Moment m)
 {
   audio_column_ = new Audio_column (m);
   play_element (audio_column_);
-  recurse_down_translators (daddy_context_, &Translator::start_translation_timestep, true);
+  recurse_down_translators (daddy_context_, &Translator::start_translation_timestep, UP);
 }
 
 
 void 
 Score_performer::one_time_step ()
 {
-  recurse_down_performers (daddy_context_, &Performer::process_music, false);
-  recurse_down_performers (daddy_context_, &Performer::do_announces, true);
-  recurse_down_translators (daddy_context_, &Translator::stop_translation_timestep, false);
+  recurse_down_translators (daddy_context_, &Performer::process_music, UP);
+  recurse_down_translators (daddy_context_, &Performer::do_announces, UP);
+  recurse_down_translators (daddy_context_, &Translator::stop_translation_timestep, UP);
 }
 
 int
index 10806b34c0f83afce2c242ab5a22052b689a7d49..f26842df02077a6c6a19434ff9a1eb084759be51 100644 (file)
@@ -128,13 +128,16 @@ Translator_group::get_simple_trans_list ()
 
 
 void
-recurse_down_translators (Context * c, Translator_method ptr, bool context_first)
+recurse_down_translators (Context * c, Translator_method ptr, Direction dir)
 {
   Translator_group * tg
     = dynamic_cast<Translator_group*> (unsmob_translator (c->implementation_));
 
 
-  if (!context_first)
+  /*
+    Top down: 
+   */
+  if (dir == DOWN)
     {
       translator_each (tg->get_simple_trans_list (),
                          ptr);
@@ -145,10 +148,10 @@ recurse_down_translators (Context * c, Translator_method ptr, bool context_first
   for (SCM s = c->context_list_ ; gh_pair_p (s);
        s =gh_cdr (s))
     {
-      recurse_down_translators (unsmob_context (gh_car (s)), ptr, context_first);
+      recurse_down_translators (unsmob_context (gh_car (s)), ptr, dir);
     }
 
-  if (context_first)
+  if (dir == UP)
     {
       translator_each (tg->get_simple_trans_list (),
                     ptr);
index ee0709fbe19fbf063311039bb35f904aad88cd5b..62b5a6c450c8c0aba86205860ba6b3040ea5be1a 100644 (file)
@@ -30,6 +30,17 @@ Translator::init ()
   smobify_self ();
 }
 
+void
+Translator::do_announces ()
+{
+}
+
+void
+Translator::process_music ()
+{
+  
+}
+
 Translator::Translator ()
 {
   init ();
index 0f55ad98e51ecf738d8aa83656ebdf5782ab76de..736fef3a87820b14ecc63d5b7a42837d23afb409 100644 (file)
@@ -32,9 +32,8 @@ noBreak = #(make-event-chord (list (make-penalty-music 10001)))
 
 \include "scale-definitions-init.ly"
 
-melisma = \set Staff.melismaBusy = ##t
-melismaEnd = \set Staff.melismaBusy = ##f
-
+melisma = #(make-span-event 'ManualMelismaEvent START)
+melismaEnd = #(make-span-event 'ManualMelismaEvent STOP)
 
 \include "grace-init.ly"
 
index 2cc1c0b46b5dbcf6d2ac07a11f1b5f3083f50829..4581cd611543e9075f778d95e9a5ad70bf043d12 100644 (file)
     \consists "Chord_tremolo_engraver"
     \consists "Percent_repeat_engraver"
     \consists "Slash_repeat_engraver"
-    \consists "Melisma_engraver"
+    \consists "Melisma_translator"
     \consists "Part_combine_engraver"
 
 %{
@@ -333,6 +333,7 @@ printing of a single line of lyrics.  "
     \consists "Stanza_number_engraver"
     \consists "Vocal_name_engraver"
     \consists "Skip_event_swallow_translator"
+    \consists "Font_size_engraver"
     \override SeparationItem #'padding = #0.2
 }
 
index 26b04348f65950fcd70996c9c04cee5915649e9e..09ae94969b10ac1163f45279d508045099da3bb1 100644 (file)
@@ -46,7 +46,7 @@
     \consists "Note_performer"
     \consists "Beam_performer"
     \consists "Slur_performer"
-    \consists "Melisma_performer"
+    \consists "Melisma_translator"
 }
 
 \translator {
index a85ea9bc1152b0dad3cd02bb2cc23f93586c1811..178efa4743a49f7ed6bd7980addc6822226a5bf7 100644 (file)
@@ -250,10 +250,18 @@ e.g. @code{\\mark \"A\"}.")
        ))
     (MelismaPlayingEvent
      . (
-       (description .  "Used internally to signal melismas")
+       (description .  "Used internally to signal melismas.")
        (internal-class-name . "Event")
        (types . (general-music melisma-playing-event event))
        ))
+    (ManualMelismaEvent
+     . (
+       (description .  "Start or stop a melisma.
+
+Syntax:@code{c4\\melisma d\\melismaEnd}.")
+       (internal-class-name . "Event")
+       (types . (general-music melisma-span-event event))
+       ))
     
     (MultiMeasureRestEvent
      . (