]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/parser.yy (command_element): move clef stuff into Scheme.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Sep 2002 21:40:44 +0000 (21:40 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 28 Sep 2002 21:40:44 +0000 (21:40 +0000)
* lily/part-combine-music.cc: removed file and class.

* lily/context-specced-music-iterator.cc (class
Context_specced_music_iterator): new file. Obsoletes the
Context_specced_music type.

* scm/music-types.scm (make-repeated-music): put different kinds
of repeated music into music-type table.

* lily/include/command-request.hh: removed
lily/include/musical-request.hh: removed. Removed all _req classes
except Key_change_req. Changes throughout.

45 files changed:
ChangeLog
lily/auto-beam-engraver.cc
lily/chord-tremolo-engraver.cc
lily/completion-note-heads-engraver.cc
lily/duration.cc
lily/folded-repeat-iterator.cc
lily/grace-music.cc
lily/grob-pq-engraver.cc
lily/include/duration.hh
lily/include/grace-music.hh
lily/include/lyric-combine-music.hh
lily/include/midi-item.hh
lily/include/music-iterator.hh
lily/include/music-list.hh
lily/include/music-wrapper.hh
lily/include/music.hh
lily/include/repeated-music.hh
lily/include/request.hh
lily/lyric-combine-music.cc
lily/midi-item.cc
lily/midi-walker.cc
lily/music-iterator.cc
lily/music-sequence.cc
lily/music-wrapper.cc
lily/music.cc
lily/note-performer.cc
lily/parser.yy
lily/part-combine-music-iterator.cc
lily/percent-repeat-engraver.cc
lily/percent-repeat-iterator.cc
lily/porrectus-engraver.cc
lily/repeated-music.cc
lily/request.cc
lily/score.cc
lily/sequential-iterator.cc
lily/sequential-music.cc
lily/simple-music-iterator.cc
lily/simultaneous-music.cc
lily/spacing-engraver.cc
lily/tempo-performer.cc
lily/tie-performer.cc
lily/tuplet-engraver.cc
lily/untransposable-music.cc
scm/clef.scm
scm/music-types.scm

index 7ee5170aeb5d3b67fcf9c227bcc060fffe745d03..1fd875d5cc615ab7407f24d9b59c612ef7ff3201 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2002-09-28  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/parser.yy (command_element): move clef stuff into Scheme.
+
+       * lily/:  rename length_mom () to get_length()
+
        * lily/part-combine-music.cc: removed file and class.
 
        * lily/context-specced-music-iterator.cc (class
index 2d16ffcf0bdb8ae7035ece50001da7751b5d1eb3..55e47bb13c319beb27a2fe1f53b5ad14429f02ce 100644 (file)
@@ -417,7 +417,7 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info)
        return ;
        
       
-      Moment dur = unsmob_duration (m->get_mus_property ("duration"))->length_mom ();
+      Moment dur = unsmob_duration (m->get_mus_property ("duration"))->get_length ();
       /* FIXME:
 
        This comment has been here since long:
@@ -453,7 +453,7 @@ Auto_beam_engraver::acknowledge_grob (Grob_info info)
                             durlog - 2);
       stems_->push (stem);
       last_add_mom_ = now;
-      extend_mom_ = (extend_mom_ >? now) + m->length_mom ();
+      extend_mom_ = (extend_mom_ >? now) + m->get_length ();
     }
 }
 
index d94d752553627cce2076728e64b91af15d24e4dc..bf3859264f73afd4ba2220e14b806f9c862f1a58 100644 (file)
@@ -82,7 +82,7 @@ Chord_tremolo_engraver::try_music (Music * m)
       && rp->get_mus_property ("iterator-ctor") == Chord_tremolo_iterator::constructor_proc
       && !repeat_) 
     {
-      Moment l = rp->length_mom ();
+      Moment l = rp->get_length ();
       repeat_ = rp;
       start_mom_ = now_mom ();
       stop_mom_ = start_mom_ + l;
index a9caf8a7ac8cc52a9db09b49ff27a7dfb50db9aa..5b89b08a97130d04d107db9a24a9c64fb697cd27 100644 (file)
@@ -73,7 +73,7 @@ Completion_heads_engraver::try_music (Music *m)
       note_reqs_.push (m);
 
       first_b_ = true;
-      Moment musiclen = m->length_mom ();
+      Moment musiclen = m->get_length ();
       Moment now = now_mom();
 
       if (now_mom ().grace_part_)
@@ -122,7 +122,7 @@ Completion_heads_engraver::find_nearest_duration (Rational length)
   /*
     this could surely be done more efficient. Left to the reader as an
     excercise.  */
-  while (d.length_mom () > length && d.duration_log () < log_limit)
+  while (d.get_length () > length && d.duration_log () < log_limit)
     {
       if (d.dot_count ())
        {
@@ -141,7 +141,7 @@ Completion_heads_engraver::find_nearest_duration (Rational length)
       d = Duration (d.duration_log (), 0);
 
       // scale up.
-      d = d.compressed (length / d.length_mom ());
+      d = d.compressed (length / d.get_length ());
     }
   
   return d;
@@ -171,22 +171,22 @@ Completion_heads_engraver::process_music ()
       note_dur = *orig;
     }
   Moment nb = next_barline_moment ();
-  if (nb < note_dur.length_mom ())
+  if (nb < note_dur.get_length ())
     {
       note_dur = find_nearest_duration (nb.main_part_);
 
       Moment next = now;
-      next.main_part_ += note_dur.length_mom ();
+      next.main_part_ += note_dur.get_length ();
       top_engraver ()->add_moment_to_process (next);
       do_nothing_until_ = next.main_part_;
     }
 
   if (orig)
     {
-      left_to_do_ = orig->length_mom ();
+      left_to_do_ = orig->get_length ();
     }
 
-  if (orig && note_dur.length_mom() != orig->length_mom())
+  if (orig && note_dur.get_length () != orig->get_length ())
     {
       if (!scratch_note_reqs_.size ())
        for (int i = 0; i < note_reqs_.size (); i++)
@@ -243,7 +243,7 @@ Completion_heads_engraver::process_music ()
       notes_.push (note);
     }
 
-  left_to_do_ -= note_dur.length_mom ();
+  left_to_do_ -= note_dur.get_length ();
 
 
   /*
index a036c55f5247a1728e8a15dc6a0b2a9331dea16d..2ad688ec5f5cfda55ba079d79e6843a93e3e057b 100644 (file)
@@ -22,7 +22,7 @@
 int
 Duration::compare (Duration const &left, Duration const &right)
 {
-  return Rational::compare (left.length_mom (), right.length_mom ());
+  return Rational::compare (left.get_length (), right.get_length ());
 }
 
 Duration::Duration ()
@@ -48,7 +48,7 @@ Duration::compressed (Rational m) const
 }
 
 Rational
-Duration::length_mom () const
+Duration::get_length () const
 {
   Rational mom (1 << abs (durlog_));
 
index 4c72fcf1b195d1d8e677bedb3ac72e66f0cc05ef..06fefb1f4a80b8948a1e30c2c9e6cc8f5540b4fa 100644 (file)
@@ -118,7 +118,7 @@ Folded_repeat_iterator::leave_body ()
 
   main_iter_->quit ();
   main_iter_ = 0;
-  main_length_mom_ +=  mus->body ()->length_mom ();
+  main_length_mom_ +=  mus->body ()->get_length ();
 }
 
 void
index 08fc36616fe43b0b2fc1a5ee08f835472a78e123..3cf9414727ead46dbcc00c6d3b1c88622413035f 100644 (file)
@@ -17,7 +17,7 @@ Grace_music::compress (Moment m)
 }
 
 Moment
-Grace_music::length_mom () const
+Grace_music::get_length () const
 {
   Moment m ;
   return m;
@@ -27,7 +27,7 @@ Grace_music::length_mom () const
 Moment
 Grace_music::start_mom () const
 {
-  Moment l = Music_wrapper::length_mom ();
+  Moment l = Music_wrapper::get_length ();
   Moment gl;
   gl.grace_part_ = -(l.main_part_ + l.grace_part_ );
   return gl;
index 856650300b06b869171fff477bf9d410b53d841b..4aa8a63cd6bd54de278314733280d6626858e8d2 100644 (file)
@@ -62,7 +62,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
   if (m)
     {
       Moment n = now_mom ();
-      Moment l = m->length_mom ();
+      Moment l = m->get_length ();
 
       if (!l.to_bool ())
        return ;
index fff532d9805d39140396bce59764a54673fe559d..c6c194d2269be5f02bc3026a80c134234cd433cb 100644 (file)
@@ -25,7 +25,7 @@ public:
   String string () const;
 
   Duration compressed (Rational) const;
-  Rational length_mom () const ;
+  Rational get_length () const ;
   Rational factor () const { return factor_; }
   int duration_log ()const;
   int dot_count () const;
index 37d1888d87f89b50e9525185f5c0e48615d14bbd..3c324eb7cbb26c2498f6a46155a029c7489f6b26 100644 (file)
@@ -19,7 +19,7 @@ public:
   Grace_music ();
 protected:
   virtual void compress (Moment);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Moment start_mom () const;
 };
 
index 2885450af67f2197fc044f2238d98968b8a37ad4..100f03e723a919613690379698f07488ad633a5f 100644 (file)
@@ -22,7 +22,7 @@ public:
   virtual void transpose (Pitch);
 
   VIRTUAL_COPY_CONS (Music);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Pitch to_relative_octave (Pitch);
   virtual void compress (Moment);
 };
index 8739912a6d4b0748811c5e72525390443a97064b..0e52ccf004f7aec4e247c7c86f517f3ad7384607 100644 (file)
@@ -121,7 +121,7 @@ class Midi_note : public Midi_item
 public:
   Midi_note (Audio_note*);
 
-  Moment length_mom () const;
+  Moment get_length () const;
   int get_pitch () const;
   virtual String string () const;
 
index e005bd60d395c5f71bddc6c7a6548721e2f6633f..e90054a4cff729705b0d4b779cb630fc8c5a2b54 100644 (file)
@@ -67,7 +67,7 @@ protected:
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
   
-  Moment music_length_mom () const;
+  Moment music_get_length () const;
   Moment music_start_mom () const;
   Music_iterator ();
   Music_iterator (Music_iterator const&);
index 3f957eef8b1a6c88f8d31168ac7303cc03805ee9..c2895a1fdd6fdb4d637833904dc62ea93f472aa3 100644 (file)
@@ -21,7 +21,7 @@ class Simultaneous_music : public Music_sequence
 public:
   VIRTUAL_COPY_CONS (Music);
   virtual Pitch to_relative_octave (Pitch);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Moment start_mom () const;
   Simultaneous_music ();
 };
@@ -46,7 +46,7 @@ class Sequential_music : public Music_sequence
 {
 public:
   VIRTUAL_COPY_CONS (Music);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Moment start_mom () const;
   
   Sequential_music ();
index bd2ebb5056a1522e47e219522ba0e84ed6af637e..d9360d959adcc58ce52195f633f7f5ec061816c9 100644 (file)
@@ -28,7 +28,7 @@ public:
 
   
   VIRTUAL_COPY_CONS (Music);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Moment start_mom () const;
   virtual Pitch to_relative_octave (Pitch);
   virtual void compress (Moment);
index a8457dee8b2e1b4860589b5f8133625d3b4a2afa..7f6c4e89503a7a5d78c4641c73c3cef67db3cac7 100644 (file)
@@ -49,7 +49,7 @@ public:
   virtual Pitch to_relative_octave (Pitch);
 
   /// The duration of this piece of music
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Moment start_mom () const;
   void print () const;
   /// Transpose, with the interval central C to #p#
index 833609261c0eb56081b55ca21763ed7ee3975a30..703d35cf1a02aaf880fdc61ea734e538c19bdcfb 100644 (file)
@@ -56,9 +56,9 @@ public:
   int repeat_count ( ) const;
   virtual Pitch to_relative_octave (Pitch);
 
-  Moment body_length_mom () const;
-  Moment alternatives_length_mom (bool fold) const;
-  Moment alternatives_volta_length_mom () const;  
+  Moment body_get_length () const;
+  Moment alternatives_get_length (bool fold) const;
+  Moment alternatives_volta_get_length () const;  
 
   DECLARE_SCHEME_CALLBACK (unfolded_music_length, (SCM));
   DECLARE_SCHEME_CALLBACK (volta_music_length, (SCM));
index eb8f3f046706c107b163fbd2c2df581c1a78437a..292028e4c65a29024407c623acbad1ffc7fc3048 100644 (file)
@@ -29,7 +29,7 @@ public:
   VIRTUAL_COPY_CONS (Music);
   virtual void compress (Moment);
   virtual void transpose (Pitch);
-  virtual Moment length_mom () const;
+  virtual Moment get_length () const;
   virtual Pitch to_relative_octave (Pitch);
 };
 
index 3dbc4507077c7cf452136b8e5f53cc67be6c9bc0..8edc61903f04e345a4ae48eaf178e98b695cc8a3 100644 (file)
@@ -26,9 +26,9 @@ Lyric_combine_music::transpose (Pitch p)
 
 
 Moment
-Lyric_combine_music::length_mom () const
+Lyric_combine_music::get_length () const
 {
-  return get_music ()->length_mom ();
+  return get_music ()->get_length ();
 }
 
 Pitch
index 2a0b6a274fbc7407ec5015bda5eb3479b1bf0a7d..49f02dad9d6bb536dfae74e50ce06e11b7b4cd31 100644 (file)
@@ -228,7 +228,7 @@ Midi_note::Midi_note (Audio_note* a)
 }
 
 Moment
-Midi_note::length_mom () const
+Midi_note::get_length () const
 {
   Moment m = audio_->length_mom_;
 #if 0
index 40aa3af5e7d6c0c28b96f8df466712be98252806..66031d73cb498588cb793264daa2689c8291c8fa 100644 (file)
@@ -55,7 +55,7 @@ void
 Midi_walker::do_start_note (Midi_note* note)
 {
   Audio_item* ptr = (*items_)[index_];
-  Moment stop_mom = note->length_mom () + ptr->audio_column_->at_mom ();
+  Moment stop_mom = note->get_length () + ptr->audio_column_->at_mom ();
 
   bool play_start = true;
   for (int i=0; i < stop_note_queue.size (); i++) 
@@ -151,7 +151,7 @@ Midi_walker::process ()
       //midi->channel_ = track_->number_;
       if (Midi_note* note = dynamic_cast<Midi_note*> (midi))
        {
-         if (note->length_mom ().to_bool ())
+         if (note->get_length ().to_bool ())
            do_start_note (note);
        }
       else
index 7d632c7f1341cb57195d8b831ef597e4bfa26e05..7524190cd0caf86a2bc80f3761855c43d20d3695 100644 (file)
@@ -106,14 +106,14 @@ Music_iterator::get_static_get_iterator (Music *m)
 
   p->music_ = m;
   assert (m);
-  p->music_length_ = m->length_mom ();
+  p->music_length_ = m->get_length ();
   p->start_mom_ = m->start_mom ();
   return iter;
 }
 
 
 Moment
-Music_iterator::music_length_mom () const
+Music_iterator::music_get_length () const
 {
   return music_length_;
 }
index 1dc61a38661b8159477266e8affc3b8831cd568e..0b38de2006e642705c4eab4dc4e47a37f819df05 100644 (file)
@@ -54,7 +54,7 @@ Music_sequence::cumulative_length (SCM l)
 
   for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
-      Moment l = unsmob_music (ly_car (s))->length_mom ();
+      Moment l = unsmob_music (ly_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
        {
          last_len.grace_part_ = Rational (0);
@@ -83,7 +83,7 @@ Music_sequence::maximum_length (SCM l)
   for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * m = unsmob_music (ly_car (s));
-      Moment l = m->length_mom ();
+      Moment l = m->get_length ();
       dur = dur >? l;
     }
 
@@ -154,7 +154,7 @@ Music_sequence::first_start (SCM l)
   for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
-      Moment l = mus->length_mom ();
+      Moment l = mus->get_length ();
       Moment s = mus->start_mom ();
       if (l.to_bool () || s.to_bool ())
        return s;
index 222bda0fcd23962d43950c33bf7973fa08d7bd8a..a30b03958d9e519523da7afda4ee9b6f81a5aa4b 100644 (file)
@@ -27,9 +27,9 @@ Music_wrapper::Music_wrapper ()
 }
 
 Moment
-Music_wrapper::length_mom () const
+Music_wrapper::get_length () const
 {
-  return element ()->length_mom ();
+  return element ()->get_length ();
 }
 
 Pitch
index f72290d5464bd98271625b7f759ec53d44389781..2b85a4f423d5bb08a1fb762a66b0abc631f08762 100644 (file)
@@ -90,7 +90,7 @@ Music::mark_smob (SCM m)
 }
 
 Moment
-Music::length_mom () const
+Music::get_length () const
 {
   SCM l = get_mus_property ("length");
   if (unsmob_moment (l))
index 35b93e58bdfba7713ccd4817eacab5b3e39aaed5..5390447402089e9b33aa00c1ab748ffc1c9689fe 100644 (file)
@@ -48,7 +48,7 @@ Note_performer::create_audio_elements ()
        {
          Music* n = note_reqs_.pop ();
          Pitch pit =  * unsmob_pitch (n->get_mus_property ("pitch"));
-         Audio_note* p = new Audio_note (pit,  n->length_mom (), transposing_i);
+         Audio_note* p = new Audio_note (pit,  n->get_length (), transposing_i);
          Audio_element_info info (p, n);
          announce_element (info);
          notes_.push (p);
index fcb719e317d8215848accaed517b0dd1eef8eb7c..72bc32d8efb0adb7e2e6c2a7a954d2d8e1b1e94d 100644 (file)
@@ -661,7 +661,7 @@ music_output_def_body:
                Duration *d = unsmob_duration ($2->get_mus_property ("duration"));
                Midi_def * md = dynamic_cast<Midi_def*> ($$);
                if (md)
-                       md->set_tempo (d->length_mom (), m);
+                       md->set_tempo (d->get_length (), m);
        }
        | music_output_def_body error {
 
@@ -1223,7 +1223,7 @@ command_element:
                csm->set_mus_property ("context-type", scm_makfrom0str ("Timing"));
        }
        | PARTIAL duration_length       {
-               Moment m = - unsmob_duration ($2)->length_mom ();
+               Moment m = - unsmob_duration ($2)->get_length ();
                Music * p = set_property_music (ly_symbol2scm ( "measurePosition"),m.smobbed_copy ());
 
                Music * sp = MY_MAKE_MUSIC("ContextSpeccedMusic");
@@ -1234,25 +1234,13 @@ command_element:
                sp-> set_mus_property ("context-type", scm_makfrom0str ("Timing"));
        }
        | CLEF STRING  {
-               SCM func = scm_primitive_eval (ly_symbol2scm ("clef-name-to-properties"));
-               SCM result = gh_call1 (func, $2);
-
-               SCM l = SCM_EOL;
-               for (SCM s = result ; gh_pair_p (s); s = ly_cdr (s)) {
-                       Music * p = MY_MAKE_MUSIC("Music");
-                       set_music_properties (p, ly_car (s));
-                       l = scm_cons (p->self_scm (), l);
-                       scm_gc_unprotect_object (p->self_scm ());
-               }
-               Music * seq = MY_MAKE_MUSIC("SequentialMusic");
-               seq->set_mus_property ("elements", l);
-
-               Music * sp = MY_MAKE_MUSIC("ContextSpeccedMusic");
-               sp->set_mus_property ("element", seq->self_scm ());
-               scm_gc_unprotect_object (seq->self_scm ());
+               static SCM proc ;
+               if (!proc)
+                       proc = scm_c_eval_string ("make-clef-set");
 
-               $$ =sp ;
-               sp-> set_mus_property ("context-type", scm_makfrom0str ("Staff"));
+               SCM result = scm_call_1 (proc, $2);
+               scm_gc_protect_object (result);
+               $$ = unsmob_music (result);
        }
        | TIME_T fraction  {
                Music * p1 = set_property_music (ly_symbol2scm ( "timeSignatureFraction"), $2);
index 4a997c0968bfe92e59b8cbb16e91c3f3132e91c9..9a4c25b52957a5e37cfc9204af802653fc31381a 100644 (file)
@@ -247,14 +247,14 @@ Part_combine_music_iterator::get_state (Moment)
            {
              scm_sort_list_x (first_durations,
                               scm_primitive_eval (ly_symbol2scm ("Duration::less_p")));
-             first_mom += unsmob_duration (ly_car (first_durations))->length_mom ();
+             first_mom += unsmob_duration (ly_car (first_durations))->get_length ();
            }
          
          if (second_durations != SCM_EOL)
            {
              scm_sort_list_x (second_durations,
                               scm_primitive_eval (ly_symbol2scm ("Duration::less_p")));
-             second_mom += unsmob_duration (ly_car (second_durations))->length_mom ();
+             second_mom += unsmob_duration (ly_car (second_durations))->get_length ();
            }
          
          if (first_pitches != SCM_EOL && second_pitches == SCM_EOL
index 2a589e8cd5b10da22f5be0584d09f6fab67f3ca4..4a16ae5992f8ef904ea6bde3d8b0c6816df6f079 100644 (file)
@@ -88,7 +88,7 @@ Percent_repeat_engraver::try_music (Music * m)
          == Percent_repeat_iterator::constructor_proc
       && !repeat_)
     {
-      body_length_ = rp->body_length_mom ();
+      body_length_ = rp->body_get_length ();
       int count =   rp->repeat_count ();
       
       Moment now = now_mom ();
index d09e6c8f3b5f80fa7fbd7469094ec07aa893df95..ba2c5b89e4bb9bc3efbd2100dc990a67a563f6a4 100644 (file)
@@ -48,7 +48,7 @@ void
 Percent_repeat_iterator::construct_children ()
 {
   Repeated_music * mus =dynamic_cast<Repeated_music *> (get_music ());
-  finish_mom_ = mus->length_mom ();
+  finish_mom_ = mus->get_length ();
   child_iter_ = unsmob_iterator (get_iterator (mus->body ()));
 }
 
index b06806eeb5c4a7aaee980209be1b314e2c68fbc9..2d9f6eef13500de8b2268e9a84a6732dbb9937be 100644 (file)
@@ -96,7 +96,7 @@ Porrectus_engraver::acknowledge_grob (Grob_info info_)
       if (m->is_mus_type ("note-event"))
        right_heads_.push (Grob_pitch_tuple (info_.grob_, m,
                                             now_mom () +
-                                            m->length_mom ()));
+                                            m->get_length ()));
     }
 }
 
index 3a2ed5eb6c6fd69043b7dd9610d9d0471d7cf9da..28b2c0aca6ef56ec39510c83d2dfa25a27cc20db 100644 (file)
@@ -62,7 +62,7 @@ Repeated_music::compress (Moment p)
 }
 
 Moment
-Repeated_music::alternatives_length_mom (bool fold) const
+Repeated_music::alternatives_get_length (bool fold) const
 {
   if (!alternatives ())
     return 0;
@@ -76,7 +76,7 @@ Repeated_music::alternatives_length_mom (bool fold) const
   SCM p = alternatives ();
   while (gh_pair_p (p) && done < repeat_count ())
     {
-      m = m + unsmob_music (ly_car (p))->length_mom ();
+      m = m + unsmob_music (ly_car (p))->get_length ();
       done ++;
       if (repeat_count () - done < scm_ilength (alternatives ()))
        p = ly_cdr (p);
@@ -89,7 +89,7 @@ Repeated_music::alternatives_length_mom (bool fold) const
   of volta repeats, where the alternatives are iterated just as they
   were entered.  */
 Moment
-Repeated_music::alternatives_volta_length_mom () const
+Repeated_music::alternatives_volta_get_length () const
 {
   if (!alternatives ())
     return 0;
@@ -98,7 +98,7 @@ Repeated_music::alternatives_volta_length_mom () const
   SCM p = alternatives ();
   while (gh_pair_p (p))
     {
-      m = m + unsmob_music (ly_car (p))->length_mom ();
+      m = m + unsmob_music (ly_car (p))->get_length ();
       p = ly_cdr (p);
     }
   return m;
@@ -109,12 +109,12 @@ Repeated_music::alternatives_volta_length_mom () const
   Length of the body in THIS. Disregards REPEAT-COUNT. 
  */
 Moment
-Repeated_music::body_length_mom () const
+Repeated_music::body_get_length () const
 {
   Moment m = 0;
   if (body ())
     {
-      m = body ()->length_mom ();
+      m = body ()->get_length ();
     }
   return m;
 }
@@ -135,7 +135,7 @@ Repeated_music::unfolded_music_length (SCM m)
 {
   Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
   
-  Moment l = Moment (r->repeat_count ()) * r->body_length_mom () + r->alternatives_length_mom (false);
+  Moment l = Moment (r->repeat_count ()) * r->body_get_length () + r->alternatives_get_length (false);
   return l.smobbed_copy ();
 }
 
@@ -144,7 +144,7 @@ Repeated_music::folded_music_length (SCM m)
 {
   Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
  
-  Moment l =  r->body_length_mom () + r->alternatives_length_mom (true);
+  Moment l =  r->body_get_length () + r->alternatives_get_length (true);
   return l.smobbed_copy ();
 }
 
@@ -152,7 +152,7 @@ SCM
 Repeated_music::volta_music_length (SCM m)
 {
   Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
-  Moment l =  r->body_length_mom () + r->alternatives_volta_length_mom ();
+  Moment l =  r->body_get_length () + r->alternatives_volta_get_length ();
   return l.smobbed_copy ();
 }
 
index 840f891c4fed51a02fe8cd8fdacc00f03e1fc7f8..0c569f93cb64e2a46cfb172ba33d931289a67c30 100644 (file)
@@ -13,7 +13,7 @@
 
   
 Moment
-Request::length_mom () const
+Request::get_length () const
 {
   Duration *d = unsmob_duration (get_mus_property ("duration"));
   if (!d)
@@ -21,7 +21,7 @@ Request::length_mom () const
       Moment m ;
       return m;
     }
-  return d->length_mom ();
+  return d->get_length ();
 }
 
 void
@@ -85,7 +85,7 @@ LY_DEFINE(music_duration_length, "music-duration-length", 1, 0,0,
   
   if (d)
     {
-      l = d->length_mom ();  
+      l = d->get_length ();  
     }
   else
     programming_error("Music has no duration");
index 83ef6ed05ad10235c2ffee69a74855ce8b44f83f..ccb5b2b95dd85329a9f25126cee2e222af9e2db9 100644 (file)
@@ -91,7 +91,7 @@ Score::run_translator (Music_output_def *odef)
   progress_indication (_ ("Interpreting music..."));
   Music * music = unsmob_music (music_);
   
-  trans->final_mom_ = music->length_mom ();
+  trans->final_mom_ = music->get_length ();
   SCM protected_iter =  Music_iterator::get_static_get_iterator (music);
   Music_iterator * iter = unsmob_iterator (protected_iter);
   iter->init_translator (music, trans);
index 798283abaa62f8ac845d8f5a35b436bcb6e4e0af..e23b136784e60be929623f3ee6484c9469687411 100644 (file)
@@ -97,7 +97,7 @@ get_grace_fixups (SCM cursor)
     {
       Music * mus = unsmob_music (ly_car (cursor));
       Moment s = mus->start_mom ();
-      Moment l =mus->length_mom () - s;
+      Moment l =mus->get_length () - s;
 
       if (s.grace_part_)
        {
@@ -176,7 +176,7 @@ Sequential_iterator::construct_children ()
 void
 Sequential_iterator::next_element (bool side_effect)
 {
-  Moment len =iter_->music_length_mom () - iter_->music_start_mom ();
+  Moment len =iter_->music_get_length () - iter_->music_start_mom ();
   assert (!grace_fixups_  || grace_fixups_->start_ >= here_mom_);
   
   if (len.main_part_ && grace_fixups_ &&
@@ -258,7 +258,7 @@ Sequential_iterator::get_pending_events (Moment until)const
       for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
        {
          Music *mus=unsmob_music (ly_car (i));
-         m = m >? (mus->length_mom () - mus->start_mom ());
+         m = m >? (mus->get_length () - mus->start_mom ());
        }
       if (m > Moment (0))
        break ;
@@ -289,9 +289,9 @@ Sequential_iterator::skip (Moment until)
          /*
            do the stuff/note/rest preceding a grace.
           */
-         iter_->skip (iter_->music_length_mom ());
+         iter_->skip (iter_->music_get_length ());
        }
-      else if (iter_->music_length_mom () >= until - here_mom_)
+      else if (iter_->music_get_length () >= until - here_mom_)
        iter_->skip (until - here_mom_ + iter_->music_start_mom ());
 
       if (iter_->ok ())
@@ -314,7 +314,7 @@ Sequential_iterator::process (Moment until)
          /*
            do the stuff/note/rest preceding a grace.
           */
-         iter_->process (iter_->music_length_mom ());
+         iter_->process (iter_->music_get_length ());
        }
       else
        iter_->process (until - here_mom_ + iter_->music_start_mom ());
index 10acadf4cc120b83f02a5ab044bde8452bcc2062..7100dd3a760d27416cc9b2666de47882cdb2eb10 100644 (file)
@@ -9,7 +9,7 @@ Sequential_music::Sequential_music ()
 
 
 Moment
-Sequential_music::length_mom () const
+Sequential_music::get_length () const
 {
   return Music_sequence::cumulative_length (get_mus_property ("elements"));
 }
index 5c7ebc6271d420b5724b7dd568fa8ced5bd65550..55fd9540c5a598b9cd3650f8b09d4e73e1142f00 100644 (file)
@@ -26,7 +26,7 @@ Simple_music_iterator::Simple_music_iterator (Simple_music_iterator const &src)
 bool
 Simple_music_iterator::ok ()const
 {
-  return last_processed_mom_ < music_length_mom ();
+  return last_processed_mom_ < music_get_length ();
 }
 
 /*
@@ -43,7 +43,7 @@ Simple_music_iterator::pending_moment ()const
   if (last_processed_mom_ < Moment (0))
     return Moment (0);
   else
-    return music_length_mom ();
+    return music_get_length ();
 }
 
 void
index dcfa4c561bc555b483292bfb9da27bb96963c232..f5930cdaab0bc1ac1334b249a5e5da02299d78e3 100644 (file)
@@ -5,7 +5,7 @@
 #include "music-list.hh"
 
 Moment
-Simultaneous_music::length_mom () const
+Simultaneous_music::get_length () const
 {
   return Music_sequence::maximum_length (get_mus_property ("elements"));
 }
index 9fc77d723947edd5afd3d968117efbb01fd5a9cc..0e4a4fe71749df3a51e486a167fcf68874c728c9 100644 (file)
@@ -109,7 +109,7 @@ Spacing_engraver::acknowledge_grob (Grob_info i)
       Music *r = i.music_cause ();
       if (r && r->is_mus_type ("rhythmic-event"))
        {
-         Moment len = r->length_mom ();
+         Moment len = r->get_length ();
          Rhythmic_tuple t (i, now_mom () + len);
          now_durations_.push (t);
        }
@@ -123,7 +123,7 @@ Spacing_engraver::stop_translation_timestep ()
   shortest_playing.set_infinite (1);
   for (int i=0; i < playing_durations_.size (); i++)
     {
-      Moment m = (playing_durations_[i].info_.music_cause ())->length_mom ();
+      Moment m = (playing_durations_[i].info_.music_cause ())->get_length ();
       shortest_playing = shortest_playing <? m;
     }
   
@@ -132,7 +132,7 @@ Spacing_engraver::stop_translation_timestep ()
 
   for (int i=0; i < now_durations_.size (); i++)
     {
-      Moment m = now_durations_[i].info_.music_cause ()->length_mom ();
+      Moment m = now_durations_[i].info_.music_cause ()->get_length ();
       if (m.to_bool ())
        {
          starter = starter <? m;
index 96ba3fa880739c7a58a476463e6433a0ed37a549..1dce3712d5b7d96e057e7421777ab51ca24fded4 100644 (file)
@@ -47,7 +47,7 @@ Tempo_performer::create_audio_elements ()
       SCM met = tempo_req_->get_mus_property ("metronome-count");
       Duration *d = unsmob_duration (tempo_req_->get_mus_property ("duration"));
       
-      Rational r =  (d->length_mom () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_;
+      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_;
       
       audio_ = new Audio_tempo (int (r));
 
index f1531ea677a166e11fcf5b4d74590838b56598b9..7e0c41114b9a78c7a1c195dae09c9cde1f475e44 100644 (file)
@@ -94,7 +94,7 @@ Tie_performer::acknowledge_audio_element (Audio_element_info i)
     {
       Music *m = i.req_;
       if (m->is_mus_type ("note-event"))
-       now_notes_.push (CNote_melodic_tuple (nh, m, now_mom ()+ m->length_mom ()));
+       now_notes_.push (CNote_melodic_tuple (nh, m, now_mom ()+ m->get_length ()));
     }
 }
 
index 891d809f61c74da8ffa24b458780d7bd692cd029..3488b06fa0124281725a3077939c1413d56b9280 100644 (file)
@@ -48,7 +48,7 @@ Tuplet_engraver::try_music (Music *c)
       if (el && !el->is_mus_type ("request-chord"))
        {
          time_scaled_musics_.push (c);
-         Rational m = now_mom ().main_part_ + c->length_mom ().main_part_;
+         Rational m = now_mom ().main_part_ + c->get_length ().main_part_;
          stop_moments_.push (m);
 
          SCM s = get_property ("tupletSpannerDuration");
index 4f1ea7f016e21da5c19a2f00c6444f0fe687cf8c..2dd1e6d4defe444d4c4b11d2a084617792c64ff8 100644 (file)
@@ -9,6 +9,13 @@ source file of the GNU LilyPond music typesetter
 
 #include "untransposable-music.hh"
 
+/*
+  todo: This one, together with Un_relativable_music is ugh.
+
+  fixthis.
+*/
+  
+
 void
 Untransposable_music::transpose (Pitch )
 {
index 45e6edcd5039c464e86f6394b554ecf5ad9b4da3..ba2d3bc54c9f8349ef17c1a3cdc4733a5ec93934 100644 (file)
   )
 )
 
-(define-public (clef-name-to-properties cl)
+(define-public (make-clef-set cl)
+  "Generate the clef setting commands for a clef with name CL."
+  (define (make-prop-set props)
+    (let*
+       (
+        (m     (make-music-by-name 'PropertySet))
+        )
+
+      (map (lambda (x) (ly-set-mus-property! m (car x) (cdr x))) props)
+      m
+    ))
+    
   (let ((e '())
        (c0 0)
        (oct 0)
 
 
     (set! e  (assoc cl supported-clefs))
-
+    
     (if (pair? e)
-       `(((symbol . clefGlyph)
-          (iterator-ctor . ,Property_iterator::constructor)
-          (value . ,(cadr e))
-          )
+       (let* 
+           (
+            (musics (map make-prop-set  
          
-         ((symbol . centralCPosition)
-          (iterator-ctor . ,Property_iterator::constructor)
-          (value . ,(+ oct (caddr e) (cdr  (assoc  (cadr e) c0-pitch-alist))))
-          )
-         ((symbol . clefPosition)
-          (iterator-ctor . ,Property_iterator::constructor)
-          (value . ,(caddr e))
-          )
-         ((symbol . clefOctavation)
-                (iterator-ctor . ,Property_iterator::constructor)
-                (value . ,(- oct))
-              )
+                         `(((symbol . clefGlyph)
+                            (value . ,(cadr e))
+                            )
+                           ((symbol . centralCPosition)
+                            (value . ,(+ oct (caddr e) (cdr  (assoc  (cadr e) c0-pitch-alist))))
+                            )
+                           ((symbol . clefPosition)
+                            (value . ,(caddr e))
+                            )
+                           ((symbol . clefOctavation)
+                            (value . ,(- oct))
+                            )
+                           )))
+            (seq (make-music-by-name 'SequentialMusic))
+            (csp (make-music-by-name 'ContextSpeccedMusic))
+            )
+
+         (ly-set-mus-property! seq 'elements musics)
+         (ly-set-mus-property! csp 'element seq)
+         (ly-set-mus-property! csp 'context-type "Staff")
+
+         csp
          )
        (begin
-         (ly-warn (string-append "Unknown clef type `" cl "'\nSee scm/lily.scm for supported clefs"))
-         '())
+         (ly-warn (format "Unknown clef type `~a'
+See scm/lily.scm for supported clefs"))
+         (make-music-by-name 'Music)
+         
+       )
     )))
-
-
index 0c1d5fe5788408540f54a8d7ce5d69e7f40ddbb6..55117bf81f67be02bf9703580cc6d0b783a459e8 100644 (file)
@@ -25,7 +25,7 @@
        (internal-class-name . "Request")
        (types . (general-music event articulation-event script-event))
        )) 
-       (AutoChangeMusic
+    (AutoChangeMusic
      . (
        (description .  "")
 
        (iterator-ctor . ,Auto_change_iterator::constructor)
        (types . (general-music music-wrapper-music auto-change-instruction))
        ))
-     (BarCheck
-      . (
-        (description .  "")
-        (internal-class-name . "Music")
-        (types . (general-music bar-check))
-        (iterator-ctor . ,Bar_check_iterator::constructor)
-        ))
+    (BarCheck
+     . (
+       (description .  "")
+       (internal-class-name . "Music")
+       (types . (general-music bar-check))
+       (iterator-ctor . ,Bar_check_iterator::constructor)
+       ))
     (BassFigureEvent
      . (
        (description .  "")
@@ -82,7 +82,7 @@
        (internal-class-name . "Music_wrapper")
        (types . (context-specification general-music music-wrapper-music))
        ))
-   (CrescendoEvent
+    (CrescendoEvent
      . (
        (description .  "")
 
@@ -96,7 +96,7 @@
        (internal-class-name . "Request")
        (types . (general-music dynamic-event decrescendo-event event))
        )) 
-   (ExtenderEvent
+    (ExtenderEvent
      . (
        (description .  "")
 
        (iterator-ctor . ,Grace_iterator::constructor)
        (types . (grace-music music-wrapper-music general-music))
        ))
-   (HyphenEvent
+    (HyphenEvent
      . (
        (description .  "")
 
        (internal-class-name . "Key_change_req")
        (types . (general-music key-change-event event))
        )) 
-      (LyricCombineMusic
+    (LyricCombineMusic
      . (
        (description .  "")
 
        (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
        ))
 
-  (LyricEvent
+    (LyricEvent
      . (
        (description .  "A lyric syllable. Must be entered in lyrics mode, i.e.
 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
        (internal-class-name . "Request")
        (types . (general-music event note-event rhythmic-event melodic-event))
        ))
- (OverrideProperty
-      . (
   (OverrideProperty
+     . (
        (description .  "")
 
-        (internal-class-name . "Music")
-        (types . (general-music layout-instruction))
-        (iterator-ctor . ,     Push_property_iterator::constructor)
-        ))
+       (internal-class-name . "Music")
+       (types . (general-music layout-instruction))
+       (iterator-ctor . ,      Push_property_iterator::constructor)
+       ))
 
- (PartCombineMusic
   (PartCombineMusic
      . (
        (description .  "")
 
        (internal-class-name . "Simultaneous_music")
        (types . (general-music part-combine-music))
        (iterator-ctor . ,Part_combine_music_iterator::constructor)
-     ))
-      (PhrasingSlurEvent
+       ))
+    (PhrasingSlurEvent
      . (
        (description . "Start or end phrasing slur. Syntax NOTE \\(  and \\) NOTE")
        (internal-class-name . "Request")
        (iterator-ctor . ,Property_iterator::constructor)
        )
      )
-     (PropertyUnset
+    (PropertyUnset
      . (
        (description .  "")
 
        (iterator-ctor . ,Property_unset_iterator::constructor)
        )
      )
-     (PorrectusEvent
+    (PorrectusEvent
      . (
        (description .  "")
 
        ))
 
     (RevertProperty
-      . (
+     . (
        (description .  "")
 
-        (internal-class-name . "Music")
-        (types . (general-music layout-instruction))
-        (iterator-ctor . ,     Pop_property_iterator::constructor)
-        ))
-     
+       (internal-class-name . "Music")
+       (types . (general-music layout-instruction))
+       (iterator-ctor . ,      Pop_property_iterator::constructor)
+       ))
+    
     (OutputPropertySetMusic
      . (
        (description .  "")
        (iterator-ctor . ,Output_property_music_iterator::constructor)
        (types . (general-music layout-instruction))
        ))
-   
+    
     (TextSpanEvent
      . (
        (description . "Start a text spanner like 8va.....|")
     (TranslatorChange
      . (
        (description .  "")
-
        (internal-class-name . "Music")
        (iterator-ctor . , Change_iterator::constructor)
        (types . (general-music translator-change-instruction))
        ))
+    
     (TimeScaledMusic
      . (
        (description .  "")
        (iterator-ctor . ,Time_scaled_music_iterator::constructor)
        (types . (time-scaled-music music-wrapper-music general-music))
        ))
+    
     (TransposedMusic
      . (
        (description .  "")
-
        (internal-class-name . "Transposed_music")
        (types . (music-wrapper-music general-music transposed-music))
        ))
     (UnrelativableMusic
      . (
        (description .  "")
-
        (internal-class-name . "Un_relativable_music")
        (types . (music-wrapper-music general-music unrelativable-music))
        ))
        (types . (music-wrapper-music general-music relative-octave-music))
        ))
 
-  
+    
     (RequestChord
      . (
        (description .  "")
        (types . (general-music request-chord simultaneous-music))
        )
      )
-     
+    
     (ScriptEvent
      . (
        (description .  "")
        (types . (general-music event))
        )) 
     (SustainPedalEvent
-      . (
-        (description . "")
-        (internal-class-name . "Request")
-        (types . (general-music pedal-event sustain-pedal-event))
-        ))
+     . (
+       (description . "")
+       (internal-class-name . "Request")
+       (types . (general-music pedal-event sustain-pedal-event))
+       ))
     (SostenutoEvent
-      . (
-        (description . "")
-        (internal-class-name . "Request")
-        (types . (general-music pedal-event sostenuto-pedal-event))
-        ))
+     . (
+       (description . "")
+       (internal-class-name . "Request")
+       (types . (general-music pedal-event sostenuto-pedal-event))
+       ))
     (UnaCordaEvent
-      . (
-        (description . "")
-        (internal-class-name . "Request")
-        (types . (general-music pedal-event una-corda-pedal-event))
-        ))
+     . (
+       (description . "")
+       (internal-class-name . "Request")
+       (types . (general-music pedal-event una-corda-pedal-event))
+       ))
     (StringNumberEvent
      . (
        (description .  "")
        (internal-class-name . "Request")
        (types . (general-music event tremolo-event))
        ))
-     (VoiceSeparator
-      . (
-       (description .  "")
-
-        (internal-class-name . "Music")
-        (types . (separator general-music))
-        ))
-
-     (VoltaRepeatedMusic
-      . (
-        (iterator-ctor . ,Volta_repeat_iterator::constructor)
-        (internal-class-name . "Repeated_music")
-        (description . "")
-        (start-moment-function .  ,Repeated_music::first_start)
-        (length . ,Repeated_music::volta_music_length)
-        (types . (general-music repeated-music volta-repeated-music))
-        ))
-      
-     (UnfoldedRepeatedMusic
-      . (
-        (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
-        (description .  "")
-        (start-moment-function .  ,Repeated_music::first_start)
-        (internal-class-name . "Repeated_music")
-        (types . (general-music repeated-music unfolded-repeated-music))
-        (length . ,Repeated_music::unfolded_music_length)
-        ))
-     (PercentRepeatedMusic
-      . (
-        (internal-class-name . "Repeated_music")
-        (description .  "")
-        (iterator-ctor . ,Percent_repeat_iterator::constructor)
-        (start-moment-function .  ,Repeated_music::first_start)
-        (length . ,Repeated_music::unfolded_music_length)
-        (types . (general-music repeated-music percent-repeated-music))
-        ))
-     
-     (TremoloRepeteadMusic
-      . (
-        (iterator-ctor . ,Chord_tremolo_iterator::constructor)
-        (description .  "")
-        (internal-class-name . "Repeated_music")
-        (start-moment-function .  ,Repeated_music::first_start)
-
-        ;; the length of the repeat is handled by shifting the note logs
-        (length . ,Repeated_music::folded_music_length)
-        (types . (general-music repeated-music tremolo-repeated-music))
-        
-        ))
-     (FoldedRepeatedMusic
-      . (
-        (internal-class-name . "Repeated_music")
-        (description .  "")
-        (iterator-ctor  . ,Folded_repeat_iterator::constructor)
-        (start-moment-function .  ,Repeated_music::minimum_start)
-        (length . ,Repeated_music::folded_music_length)
-        (types . (general-music repeated-music folded-repeated-music))
-        ))
-     ))
+    (VoiceSeparator
+     . (
+       (description .  "")
+
+       (internal-class-name . "Music")
+       (types . (separator general-music))
+       ))
+
+    (VoltaRepeatedMusic
+     . (
+       (iterator-ctor . ,Volta_repeat_iterator::constructor)
+       (internal-class-name . "Repeated_music")
+       (description . "")
+       (start-moment-function .  ,Repeated_music::first_start)
+       (length . ,Repeated_music::volta_music_length)
+       (types . (general-music repeated-music volta-repeated-music))
+       ))
+    
+    (UnfoldedRepeatedMusic
+     . (
+       (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
+       (description .  "")
+       (start-moment-function .  ,Repeated_music::first_start)
+       (internal-class-name . "Repeated_music")
+       (types . (general-music repeated-music unfolded-repeated-music))
+       (length . ,Repeated_music::unfolded_music_length)
+       ))
+    (PercentRepeatedMusic
+     . (
+       (internal-class-name . "Repeated_music")
+       (description .  "")
+       (iterator-ctor . ,Percent_repeat_iterator::constructor)
+       (start-moment-function .  ,Repeated_music::first_start)
+       (length . ,Repeated_music::unfolded_music_length)
+       (types . (general-music repeated-music percent-repeated-music))
+       ))
+    
+    (TremoloRepeteadMusic
+     . (
+       (iterator-ctor . ,Chord_tremolo_iterator::constructor)
+       (description .  "")
+       (internal-class-name . "Repeated_music")
+       (start-moment-function .  ,Repeated_music::first_start)
+
+       ;; the length of the repeat is handled by shifting the note logs
+       (length . ,Repeated_music::folded_music_length)
+       (types . (general-music repeated-music tremolo-repeated-music))
+       
+       ))
+    (FoldedRepeatedMusic
+     . (
+       (internal-class-name . "Repeated_music")
+       (description .  "")
+       (iterator-ctor  . ,Folded_repeat_iterator::constructor)
+       (start-moment-function .  ,Repeated_music::minimum_start)
+       (length . ,Repeated_music::folded_music_length)
+       (types . (general-music repeated-music folded-repeated-music))
+       ))
+    ))
 
 (set! music-descriptions
       (sort music-descriptions alist<?))
     (if (eq? props '())
        (ly-warn (format "Could not find music type `~a'" x)))  
     (ly-make-bare-music name props)
-  ))
+    ))
 
 
 (define-public (old-span-request->event name)
   (let
       (
        (entry   (assoc
-        name
-        '(
-          ("text" . TextSpanEvent)
-          ("decrescendo" . DecrescendoEvent)
-          ("crescendo" . CrescendoEvent)
-          ("Sustain" . SustainPedalEvent)
-          ("slur" . SlurEvent)
-          ("UnaCorda" . UnaCordaEvent)
-          ("Sostenuto" . SostenutoEvent)
-          )))
+                name
+                '(
+                  ("text" . TextSpanEvent)
+                  ("decrescendo" . DecrescendoEvent)
+                  ("crescendo" . CrescendoEvent)
+                  ("Sustain" . SustainPedalEvent)
+                  ("slur" . SlurEvent)
+                  ("UnaCorda" . UnaCordaEvent)
+                  ("Sostenuto" . SostenutoEvent)
+                  )))
        )
     (if (eq? entry #f)
        (error (format "Could not find span type ~a" name))
        
        (make-music-by-name (cdr entry))
        )
-  ))
+    ))
 
 (define-public (make-repeated-music name)
   (let*
                              "'\nSee music-types.scm for supported repeats"))
              'VoltaRepeatedMusic)
            )
-       )
+       )
        )
 
-       (make-music-by-name music-name)
+    (make-music-by-name music-name)
     ))