]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.7
authorfred <fred>
Tue, 26 Mar 2002 21:44:32 +0000 (21:44 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:44:32 +0000 (21:44 +0000)
17 files changed:
lily/bar-engraver.cc
lily/compressed-music-iterator.cc
lily/include/compressed-music-iterator.hh
lily/include/lily-proto.hh
lily/include/music-wrapper-iterator.hh
lily/include/repeated-music-iterator.hh [new file with mode: 0644]
lily/include/repeated-music.hh [new file with mode: 0644]
lily/include/sequential-music-iterator.hh [new file with mode: 0644]
lily/music-iterator.cc
lily/music-wrapper-iterator.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/parser.yy
lily/property-iterator.cc
lily/repeated-music.cc [new file with mode: 0644]
lily/sequential-music-iterator.cc [new file with mode: 0644]
lily/tuplet-engraver.cc

index b9896b4ad32c0b8149778337787e540d9eed779c..91c23feb2caa12d78ea21fefd783bac7c99b923b 100644 (file)
@@ -13,6 +13,7 @@
 #include "command-request.hh"
 #include "time-description.hh"
 #include "engraver-group.hh"
+#include "repeated-music.hh"
 
 Bar_engraver::Bar_engraver()
 {
index c6393d5ecfd8e372e6204148a9417c3d36ef08c5..65fc6ad78c52cf06a9305c28c5ccaa99210b24f4 100644 (file)
 
 
 
-Compressed_music_iterator::Compressed_music_iterator ()
-{
-  Bracket_req pr;
-  pr.spantype = Span_req::START;
-  //  pr.plet_i_ = 1;
-  start_req_p_ = new Bracket_req (pr);
-  pr.spantype = Span_req::STOP;
-  stop_req_p_ =new Bracket_req (pr);
-}
-
-Compressed_music_iterator::~Compressed_music_iterator ()
-{
-  delete start_req_p_;
-  delete stop_req_p_;
-}
-
-Compressed_music *
-Compressed_music_iterator::compressed_l () const
-{
-  return (Compressed_music*) music_l_;
-}
-
-void
-Compressed_music_iterator::construct_children ()
-{
-  /*
-    start_req_p_->plet_i_ = compressed_l ()->den_i_;
-    stop_req_p_->plet_i_ = compressed_l ()->den_i_;  
-  */
-  Music_wrapper_iterator::construct_children ();
-}
-
 void
 Compressed_music_iterator::do_process_and_next (Moment m)
 {
   if (first_b_)
     {
-      bool success =   report_to_l ()->try_music (compressed_l ());
+      bool success =   report_to_l ()->try_music (dynamic_cast<Compressed_music const*> (music_l_));
       if (!success)
        music_l_->warning ( _("No one to print a tuplet start bracket"));
     }
index 0616345e872a5b6cce8e880988288b477ae469b3..a9950b5781c305721fb04e65538d1975ee3fa36d 100644 (file)
 
 class Compressed_music_iterator : public Music_wrapper_iterator
 {
-public:
-  Bracket_req* start_req_p_;
-  Bracket_req* stop_req_p_;
-  
-  Compressed_music_iterator();
-  ~Compressed_music_iterator ();
+public:  
+  // construction
+protected:
   virtual void do_process_and_next (Moment);
-  virtual void construct_children ();
-  Compressed_music *compressed_l ()const;
 };
 
 
index 52f3674b5229c4a42d8ab85bdec88cdfa8f54df5..6c75f333d2c8030f22482da61f791beae51495b8 100644 (file)
 #define LILY_PROTO_HH
 #include "proto.hh"
 
-
 struct Absolute_dynamic_req;
 struct Abbreviation;
-struct Abbreviation_req;
+struct Abbreviation_beam; 
 struct Abbreviation_beam_req;
 struct Abbreviation_beam_engraver;
-struct Axis_group_element;
-struct Axis_group;
-struct Translator_group;
-struct Translator;
-struct Abbreviation_beam; 
+struct Abbreviation_req;
+struct Atom;
 struct Audio_element;
 struct Audio_column;
 struct Audio_item;
@@ -28,10 +24,10 @@ struct Audio_key;
 struct Audio_time_signature;
 struct Audio_note;
 struct Audio_note_off;
-struct Performance;
 struct Audio_staff;
 struct Audio_tempo;
-struct Atom;
+struct Axis_group_element;
+struct Axis_group;
 struct Bar;
 struct Bar_column_engraver;
 struct Bar_column;
@@ -74,6 +70,7 @@ struct Dynamic;
 struct Dynamic_req;
 struct Element_group;
 struct Element_group_item;
+struct Engraver;
 struct Engraver_group_engraver;
 struct Extender;
 struct Extender_req;
@@ -120,10 +117,6 @@ struct Lyric_req;
 struct My_lily_lexer;
 struct Measure_grouping_req;
 struct Melodic_req;
-struct Time_signature;
-struct Time_signature_change_req;
-struct Time_signature_engraver;
-struct Time_signature_performer;
 struct Midi_def;
 struct Midi_duration;
 struct Midi_header;
@@ -167,20 +160,23 @@ struct Paper_outputter;
 struct Paper_score;
 struct Paper_stream;
 struct Partial_measure_req;
+struct Performance;
 struct Performer;
 struct Plet;
 struct Plet_engraver;
 struct Plet_req;
 struct Plet_spanner;
-struct Rational;
 struct Piano_brace;
 struct Performer;
 struct Performer_group_performer;
 struct Property_iterator;
+struct Rational;
 struct Request;
 struct Request_column;
-struct Engraver;
 struct Relative_octave_music;
+struct Repeat_engraver;
+struct Repeated_music;
+struct Repeated_music_iterator;
 struct Rest;
 struct Rest_collision;
 struct Rest_collision_engraver;
@@ -222,7 +218,6 @@ struct Stem;
 struct Stem_beam_engraver;
 struct Stem_req;
 struct String;
-struct Atom;
 struct Symtable;
 struct Symtables;
 struct Super_element;
@@ -238,6 +233,12 @@ struct Tie;
 struct Tie_engraver;
 struct Tie_req;
 struct Time_description;
+struct Time_signature;
+struct Time_signature_change_req;
+struct Time_signature_engraver;
+struct Time_signature_performer;
+struct Translator;
+struct Translator_group;
 struct Timing_req;
 struct Vertical_brace;
 struct Vertical_spanner;
@@ -245,6 +246,7 @@ struct Vertical_group_element;
 struct Vertical_group_spanner;
 struct Vertical_align_spanner;
 struct Vertical_align_engraver;
+struct Volta_spanner;
 struct Align_element;
 struct Sequential_music;
 struct Request_chord;
index 02a4e97fa0089fd9a415054bb6308957d3190f31..50d9bbea272f278e31bfa7c3395a6a629f0680bb 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  music-wrapper-iterator.hh -- declare 
+  music-wrapper-iterator.hh -- declare Music_wrapper_iterator
   
   source file of the GNU LilyPond music typesetter
   
 #include "music.hh"
 #include "music-iterator.hh"
 
+/** 
+  The iterator for a #Music_wrapper#.  Since #Music_wrapper# essentially
+  does nothing, this iterator creates a child iterator and delegates
+  all work to that child.
+ */
 class Music_wrapper_iterator : public Music_iterator
 {
-  Music_iterator *child_iter_p_;
-  Music_wrapper *music_wrapper_l();
 public:
   Music_wrapper_iterator ();
   ~Music_wrapper_iterator ();
-  virtual void do_print () const;
+
   virtual void construct_children  () ;
-  virtual void do_process_and_next (Moment) ;
   virtual Moment next_moment () const;
   virtual bool ok () const;
-  
+
+protected:
+  Music_wrapper *music_wrapper_l () const;
+  virtual void do_print () const;
+  virtual void do_process_and_next (Moment) ;
+
+private:
+  Music_iterator *child_iter_p_;
 };
 
 #endif /* MUSIC_WRAPPER_ITERATOR_HH */
diff --git a/lily/include/repeated-music-iterator.hh b/lily/include/repeated-music-iterator.hh
new file mode 100644 (file)
index 0000000..081faa7
--- /dev/null
@@ -0,0 +1,37 @@
+/*   
+  repeated-music-iterator.hh -- declare Repeated_music_iterator
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+  
+ */
+
+#ifndef REPEATED_MUSIC_ITERATOR_HH
+#define REPEATED_MUSIC_ITERATOR_HH
+
+#include "music-wrapper-iterator.hh"
+#include "sequential-music-iterator.hh"
+
+class Repeated_music_iterator : public Music_iterator
+{
+public:
+  Repeated_music_iterator ();
+  ~Repeated_music_iterator ();
+
+  virtual void construct_children ();
+  virtual Moment next_moment () const;
+  virtual bool ok () const;
+
+protected:
+  virtual Repeated_music* repeated_music_l () const;
+  virtual void do_print () const;
+  virtual void do_process_and_next (Moment);
+
+private:
+  Music_iterator* repeat_iter_p_;
+  Sequential_music_iterator* alternative_iter_p_;
+};
+
+#endif /* REPEATED_MUSIC_ITERATOR_HH */
+
diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh
new file mode 100644 (file)
index 0000000..b068c24
--- /dev/null
@@ -0,0 +1,39 @@
+/*   
+  repeated-music.hh -- declare Repeated_music
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+  
+ */
+
+#ifndef REPEATED_MUSIC_HH
+#define REPEATED_MUSIC_HH
+
+#include "music-list.hh"
+
+/**
+   Repeats and voltas
+ */
+class Repeated_music : public Music
+{
+public:
+  int repeats_i_;
+  Music* repeat_p_;
+//  Music_list* alternative_p_;
+  Sequential_music* alternative_p_;
+
+//  Repeated_music (Music*, int n, Music_list*);
+  Repeated_music (Music*, int n, Sequential_music*);
+  Repeated_music (Repeated_music const& s);
+  virtual ~Repeated_music ();
+  
+  virtual void do_print () const;
+  virtual void transpose (Musical_pitch p);
+  virtual Moment duration () const;
+
+  VIRTUAL_COPY_CONS(Music);
+};
+
+#endif /* REPEATED_MUSIC_HH */
+
diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh
new file mode 100644 (file)
index 0000000..bcbf817
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+  Sequential_music-iter.hh -- declare Sequential_music_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#ifndef SEQUENTIAL_MUSIC_ITER_HH
+#define SEQUENTIAL_MUSIC_ITER_HH
+
+#include "music-iterator.hh"
+#include "pcursor.hh"
+
+/** Sequential_music iteration: walk each element in turn, and
+  construct an iterator for every element.
+  
+ */
+class Sequential_music_iterator :  public Music_iterator
+{
+public:
+  Sequential_music_iterator ();
+  ~Sequential_music_iterator ();
+
+  virtual void construct_children ();
+  virtual Moment next_moment () const;
+  virtual bool ok () const;
+
+protected:
+  Sequential_music * sequential_music_l() const;
+
+  virtual void do_print() const;
+  virtual void do_process_and_next (Moment);
+
+private:
+  Moment here_mom_;
+  PCursor<Music*> *cursor_p_;
+  Music_iterator * iter_p_;
+
+  /*
+    perhaps these can be virtual and protected iso. private?  
+   */
+  void start_next_element();
+  void leave_element();
+  void set_Sequential_music_translator();
+};
+
+#endif // SEQUENTIAL_MUSIC_ITER_HH
index 43891b05605675e9025f0ecc810b6a7e943e9a10..718490df5ef299116cf3582e8a9433236783aec4 100644 (file)
@@ -8,7 +8,7 @@
 #include "debug.hh"
 #include "music-list.hh"
 #include "music-iterator.hh"
-#include "voice-iterator.hh"
+#include "sequential-music-iterator.hh"
 #include "property-iterator.hh"
 #include "chord-iterator.hh"
 #include "request-iterator.hh"
 #include "music-wrapper-iterator.hh"
 #include "compressed-music-iterator.hh"
 #include "compressed-music.hh"
-
-
-
-
-
+#include "repeated-music.hh"
+#include "repeated-music-iterator.hh"
 
 void
 Music_iterator::do_print() const
 {
-
 }
 
 void
@@ -150,6 +146,10 @@ Music_iterator::static_get_iterator_p (Music const *m, Translator_group *report_
     p = new Compressed_music_iterator;
   else if (dynamic_cast<Music_wrapper  const *> (m))
     p = new Music_wrapper_iterator;
+  else if (dynamic_cast<Repeated_music const *> (m))
+    p = new Repeated_music_iterator;
+  else
+    assert (0);
 
   p->music_l_ = m;
   if (m->translator_type_str_.length_i ())
@@ -166,16 +166,11 @@ Music_iterator::static_get_iterator_p (Music const *m, Translator_group *report_
   return p;
 }
 
-void
-Music_iterator::inherit_info(Music_iterator const *)
-{
-}
 
 Music_iterator*
 Music_iterator::get_iterator_p (Music const*m) const
 {
   Music_iterator*p = static_get_iterator_p (m, report_to_l());
-  p->inherit_info (this);
   p->construct_children();
   return p;
 }
index d5ed47629c241bc482e4a7bde8338bfca3355d8d..e282bded8c60b7c1c43635810cfff418e9ee2b31 100644 (file)
@@ -36,10 +36,11 @@ Music_wrapper_iterator::~Music_wrapper_iterator ()
 }
 
 Music_wrapper*
-Music_wrapper_iterator::music_wrapper_l ()
+Music_wrapper_iterator::music_wrapper_l () const
 {
   return (Music_wrapper*) music_l_;
 }
+
 bool
 Music_wrapper_iterator::ok () const
 {
index 316cbff1d95e7d8db5ff655c852fe62d38ed6617..8d7ce5cb881c3d4acbbc54613875fb0c86529329 100644 (file)
 #include "debug.hh"
 #include "musical-pitch.hh"
 
+Music::Music()
+{
+}
+
+void    
+Music::compress (Moment)
+{
+}
+
+void
+Music::do_print() const
+{
+}
+
 Moment
 Music::duration () const
 {
@@ -32,34 +46,14 @@ Music::print() const
 #endif
 }
 
-void
-Music::transpose (Musical_pitch )
-{
-  
-}
-
-void
-Music::do_print() const
-{
-}
-
-
-
-
-
-
-  
-Music::Music()
-{
-}
-
 Musical_pitch
 Music::to_relative_octave (Musical_pitch m)
 {
   return m;
 }
 
-void    
-Music::compress (Moment)
+void
+Music::transpose (Musical_pitch )
 {
 }
+
index 61c1cd028c64b7d704c73a327394dc4d0c843afa..7b47c2e3d6f7f041b4a376834be3337c35c94326 100644 (file)
 static Keyword_ent the_key_tab[]={
   {"absdynamic", ABSDYNAMIC},
   {"accepts", ACCEPTS},
+  {"alternative", ALTERNATIVE},
   {"bar", BAR},
   {"cadenza", CADENZA},
   {"clef", CLEF},
   {"cm", CM_T},
   {"consists", CONSISTS},
   {"duration", DURATION},
-//  {"_", EXTENDER},
   {"font", FONT},
   {"grouping", GROUPING},
   {"header", HEADER},
@@ -56,6 +56,7 @@ static Keyword_ent the_key_tab[]={
   {"pt", PT_T},
   {"relative", RELATIVE},
   {"remove", REMOVE},
+  {"repeat", REPEAT},
   {"scm", SCM_T},
   {"scmfile", SCMFILE},
   {"score", SCORE},
index 344abe68b2acccafb7a12273210f2b43168cfd24..e3622cdf4f3dee5e74c05955f98d0c0532916df2 100644 (file)
@@ -43,6 +43,7 @@
 #include "relative-music.hh"
 #include "transposed-music.hh"
 #include "compressed-music.hh"
+#include "repeated-music.hh"
 
 // mmm
 Mudela_version oldest_version ("1.0.7");
@@ -158,6 +159,7 @@ yylex (YYSTYPE *s,  void * v_l)
 
 %token ABSDYNAMIC
 %token ACCEPTS
+%token ALTERNATIVE
 %token BAR
 %token BEAMPLET
 %token CADENZA
@@ -194,6 +196,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token PT_T
 %token RELATIVE
 %token REMOVE
+%token REPEAT
 %token SCM_T
 %token SCMFILE
 %token SCORE
@@ -247,6 +250,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <i>      open_plet_parens close_plet_parens
 %type <i>      sub_quotes sup_quotes
 %type <music>  simple_element  request_chord command_element Simple_music  Composite_music
+%type <music>  Alternative_music Repeated_music
 %type <i>      abbrev_type
 %type <i>      int unsigned
 %type <i>      script_dir
@@ -731,6 +735,22 @@ Music:
        | Composite_music
        ;
 
+Alternative_music: {
+               Music_list* m = new Music_list;
+               $$ = new Sequential_music (m);
+       }
+       | ALTERNATIVE '{' Music_list '}'                {
+               $$ = new Sequential_music ($3);
+       }
+       ;
+
+Repeated_music: REPEAT unsigned '{' Music '}' Alternative_music        {
+               // s/r conflicts -> '{' '}' 
+               Sequential_music* s = (Sequential_music*)$6;
+               $$ = new Repeated_music ($4, $2, s);
+       }
+       ;
+
 Sequential_music: '{' Music_list '}'           {
                $$ = new Sequential_music ($2);
        }
@@ -766,6 +786,7 @@ Composite_music:
                $$ = new Compressed_music ($2, $4, $5);
 
        }
+       | Repeated_music                { $$ = $1; }
        | Simultaneous_music            { $$ = $1; }
        | Sequential_music              { $$ = $1; }
        | TRANSPOSE musical_pitch Music {
index 2037955b83d85341edac74f6a5525dd4f0083eac..6ea772222a0734a9a6941a1017d37dfbdbeac06e 100644 (file)
 #include "translation-property.hh"
 #include "translator-group.hh"
 
+/**
+  There is no real processing to a property: just lookup the
+  translation unit, and set the property.
+  */
 void
 Property_iterator::do_process_and_next (Moment m)
 {
-  if (property_l()->var_str_.length_i ())
-    report_to_l ()->set_property (property_l()->var_str_, property_l()->value_);
+  Translation_property const * prop = dynamic_cast<Translation_property const*> (music_l_);
+  if (prop->var_str_.length_i ())
+    report_to_l ()->set_property (prop->var_str_, prop->value_);
   Music_iterator::do_process_and_next (m);
 }
 
-
-
-Translation_property*
-Property_iterator::property_l () const
-{
-  return (Translation_property*) music_l_;
-}
diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc
new file mode 100644 (file)
index 0000000..8f51eaf
--- /dev/null
@@ -0,0 +1,63 @@
+/*   
+  repeated-music.cc --  implement Repeated_music
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+  
+ */
+
+#include "repeated-music.hh"
+#include "musical-pitch.hh"
+
+//Repeated_music::Repeated_music (Music* r, int n, Music_list* a)
+Repeated_music::Repeated_music (Music* r, int n, Sequential_music* a)
+{
+  repeats_i_ = n;
+  repeat_p_ = r;
+  alternative_p_ = a;
+}
+
+Repeated_music::~Repeated_music ()
+{
+  delete repeat_p_;
+  delete alternative_p_;
+}
+
+Repeated_music::Repeated_music (Repeated_music const& s)
+  : Music (s)
+{
+  repeat_p_ = (s.repeat_p_) ? s.repeat_p_->clone () : 0;
+  // urg?
+//  alternative_p_ = (Sequential_music*)(s.alternative_p_) ? s.alternative_p_->clone () : 0;
+}
+
+void
+Repeated_music::do_print () const
+{
+  if (repeat_p_)
+    repeat_p_->print ();
+  if (alternative_p_)
+    alternative_p_->print ();
+}
+
+void
+Repeated_music::transpose (Musical_pitch p)
+{
+  if (repeat_p_)
+    repeat_p_->transpose (p);
+  if (alternative_p_)
+    alternative_p_->transpose (p);
+}
+
+Moment
+Repeated_music::duration () const
+{
+  Moment m;
+  if (repeat_p_)
+    m += repeat_p_->duration ();
+  if (alternative_p_)
+    m += alternative_p_->duration ();
+  return m;
+}
+
diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc
new file mode 100644 (file)
index 0000000..69c1eed
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+  Sequential_music_iterator.cc -- implement Sequential_music_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "translator-group.hh"
+#include "debug.hh"
+#include "sequential-music-iterator.hh"
+#include "music-list.hh"
+
+
+void
+Sequential_music_iterator::do_print() const
+{
+  if (iter_p_)
+    iter_p_->print();
+}
+
+Sequential_music_iterator::Sequential_music_iterator ()
+{
+  cursor_p_ = 0;
+  here_mom_ = 0;
+  iter_p_ =0;
+}
+
+Sequential_music*
+Sequential_music_iterator::sequential_music_l () const
+{
+  return (Sequential_music *)music_l_;
+}
+
+void
+Sequential_music_iterator::construct_children()
+{
+  cursor_p_ = new PCursor<Music*> (sequential_music_l ()->music_p_list_p_->top ());
+  
+  while (cursor_p_->ok()) 
+    {
+      start_next_element();
+      if (!iter_p_->ok()) 
+       {
+         leave_element();
+       }
+      else 
+       {
+         set_Sequential_music_translator();
+         break;
+       }
+    }
+}
+
+void 
+Sequential_music_iterator::leave_element()
+{
+  delete iter_p_;
+  iter_p_ =0;
+  Moment elt_time = cursor_p_->ptr()->duration ();
+  here_mom_ += elt_time;
+  cursor_p_->next();
+}
+
+void
+Sequential_music_iterator::start_next_element()
+{
+  assert (!iter_p_);
+  iter_p_ = get_iterator_p ( cursor_p_->ptr());
+}
+
+void
+Sequential_music_iterator::set_Sequential_music_translator()
+{
+  if (iter_p_->report_to_l()->depth_i () > report_to_l ()->depth_i ())
+    set_translator (iter_p_->report_to_l());
+}
+
+Sequential_music_iterator::~Sequential_music_iterator()
+{
+  delete cursor_p_;
+  assert (! iter_p_);
+}
+
+
+
+
+void
+Sequential_music_iterator::do_process_and_next (Moment until)
+{
+  while (1) 
+    {
+      Moment local_until = until - here_mom_;
+      while (iter_p_->ok()) 
+       {
+         Moment here = iter_p_->next_moment();
+         if (here != local_until)
+           goto loopexit;
+           
+         iter_p_->process_and_next (local_until);
+       }
+
+      if (!iter_p_->ok()) 
+       {
+         leave_element();
+         
+         if (cursor_p_->ok()) 
+           {
+             start_next_element();
+             set_Sequential_music_translator();
+           }
+         else 
+           {
+             goto loopexit;
+           }
+       }
+    }
+
+loopexit:
+
+  Music_iterator::do_process_and_next (until);
+}
+
+Moment
+Sequential_music_iterator::next_moment() const
+{
+  return iter_p_->next_moment() + here_mom_;
+}
+
+bool
+Sequential_music_iterator::ok() const
+{
+  return iter_p_;
+}
+
index d7d9190d2d21b4565f88c7ee2af16b30d7b1e044..ef7c95e23307608a997a185e0569f390fc9db540 100644 (file)
@@ -32,7 +32,7 @@ Tuplet_engraver::do_process_requests ()
   for (int i= started_span_p_arr_.size ();
        i < compressed_music_arr_.size (); i++)
     {
-      Plet_spanner* glep = new Plet_spanner ();
+      Plet_spanner* glep = new Plet_spanner;
       started_span_p_arr_.push (glep);
 
       Text_def *t = new Text_def;