]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.65
authorfred <fred>
Sun, 24 Mar 2002 19:44:17 +0000 (19:44 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:44:17 +0000 (19:44 +0000)
12 files changed:
lily/head-reg.cc
lily/include/head-reg.hh
lily/include/note-head.hh [new file with mode: 0644]
lily/include/tie.hh
lily/local-key-reg.cc
lily/note-column-reg.cc
lily/notehead.cc
lily/register.cc
lily/stem-beam-reg.cc
lily/tie-reg.cc
mi2mu/include/mi2mu-proto.hh [new file with mode: 0644]
mi2mu/include/mi2mu.hh

index 562dbea654e08ff5ca22ea9cde09dd45479a5fd7..b704f1803e4825c02fc69222075c67c76e16c2c4 100644 (file)
@@ -1,23 +1,23 @@
 /*
-  headreg.cc -- part of LilyPond
+  headreg.cc -- part of GNU LilyPond
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-#include "notehead.hh"
+#include "note-head.hh"
 #include "head-reg.hh"
 #include "paper-def.hh"
 #include "complex-walker.hh"
 #include "musical-request.hh"
 
-Notehead_register::Notehead_register()
+Note_head_register::Note_head_register()
 {
     note_p_ = 0;
     post_move_processing();
 }
 
 bool
-Notehead_register::try_request(Request *req_l) 
+Note_head_register::try_request(Request *req_l) 
 {
     if (req_l->note() || req_l->rest())
        note_req_l_=req_l->rhythmic();
@@ -28,12 +28,12 @@ Notehead_register::try_request(Request *req_l)
 }
 
 void
-Notehead_register::process_requests()
+Note_head_register::process_requests()
 {
     if (!note_req_l_)
        return;
     
-    Notehead*n_p = new Notehead(8);    // ugh
+    Note_head*n_p = new Note_head(8);  // ugh
     note_p_ = n_p;
     n_p->set_rhythmic(note_req_l_->rhythmic());
 
@@ -45,7 +45,7 @@ Notehead_register::process_requests()
        if (note_req_l_->rhythmic()->duration_.type_i_ <= 2)
            note_p_->translate(
                Offset(0,
-                      6 * paper()->internote()));
+                      6 * paper()->internote_f()));
     }
     
     Score_elem_info itinf(note_p_,note_req_l_);
@@ -53,7 +53,7 @@ Notehead_register::process_requests()
 }
 
 void
-Notehead_register::pre_move_processing()
+Note_head_register::pre_move_processing()
 {
     if (note_p_) {
        typeset_element(note_p_);
@@ -61,10 +61,10 @@ Notehead_register::pre_move_processing()
     }
 }
 void
-Notehead_register::post_move_processing()
+Note_head_register::post_move_processing()
 {
     note_req_l_ = 0;
 }
 
-IMPLEMENT_STATIC_NAME(Notehead_register);
-ADD_THIS_REGISTER(Notehead_register);
+IMPLEMENT_STATIC_NAME(Note_head_register);
+ADD_THIS_REGISTER(Note_head_register);
index 09941a0554217aefb07629f14f5f8b2d2b9f08a9..5e47743db1b5fbfa0e588e1c589de66fba61eb87 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  headreg.hh -- part of LilyPond
+  headreg.hh -- part of GNU LilyPond
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
@@ -9,17 +9,17 @@
 #define HEADREG_HH
 #include "register.hh"
 
-struct Notehead_register : Request_register {
-    Notehead* note_p_;
+struct Note_head_register : Request_register {
+    Note_head* note_p_;
     Rhythmic_req * note_req_l_;
     
     /* *************** */
-    Notehead_register();
+    Note_head_register();
     virtual bool try_request(Request *req_l) ;
     virtual void process_requests();
     virtual void pre_move_processing();
     virtual void post_move_processing();
-    NAME_MEMBERS(Notehead_register);
+    NAME_MEMBERS(Note_head_register);
 };
 
 
diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh
new file mode 100644 (file)
index 0000000..4a1bf34
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+  note-head.hh -- part of GNU LilyPond
+
+  (c) 1996,97 Han-Wen Nienhuys
+*/
+
+#ifndef NOTEHEAD_HH
+#define NOTEHEAD_HH
+
+#include "item.hh"
+
+/** ball at the end of the stem takes care of:
+
+  * help lines  
+  * proper placing of dots 
+
+  It also is the item for a Rest
+  
+  */
+
+class Note_head : public Item {
+public:
+    NAME_MEMBERS(Note_head);
+
+    bool rest_b_;
+    int position_i_;
+    
+    /// -1 = lowest, 0 = inside, 1 = top
+    int extremal_i_;
+    
+    /// needed for the help-lines
+    int staff_size_i_;
+    int dots_i_;
+    int balltype_i_;
+    int x_dir_i_;
+    
+    /* *************** */
+    
+    void set_rhythmic(Rhythmic_req *);
+
+    /**
+      position of top line (5 linestaff: 8)
+      */
+    Note_head(int staff_size);
+    static int compare(Note_head * const &a, Note_head *const &b) ;
+protected:
+    virtual    void do_print()const;
+    virtual    Molecule* brew_molecule_p()const;
+};
+#endif // NOTEHEAD_HH
+
index 7f03564866a36dbfe608015e70e71d77f455b153..81c356dd7fe7346a48e832c7e2e51114c26e20c9 100644 (file)
@@ -1,7 +1,7 @@
 /*
   tie.hh -- declare Tie
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
 #include "bow.hh"
 
+/**
+  Connect two noteheads.
+  */
 class Tie : public Bow {
-    virtual Spanner* do_break_at(PCol*,PCol*)const;
     virtual void do_add_processing();
     virtual void do_post_processing();
     virtual void set_default_dir();
+    virtual void do_substitute_dependency(Score_elem*,Score_elem*);
+    
 public:
     bool same_pitch_b_;
-    Notehead * left_head_l_;
-    Notehead * right_head_l_;
-    void set_head(int, Notehead*head_l);
+    Note_head * left_head_l_;
+    Note_head * right_head_l_;
+    void set_head(int, Note_head*head_l);
+
     Tie();
-    
+    NAME_MEMBERS(Tie);
+    SPANNER_CLONE(Tie)
 };
 #endif // TIE_HH
index 9e014e7c7501d24e3411b024a60c1789791f33af..9569ab10a49d16fd4108fd545ea3366d41c5c0c0 100644 (file)
@@ -13,7 +13,7 @@
 #include "debug.hh"
 #include "key-item.hh"
 #include "tie.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 
 Local_key_register::Local_key_register()
 {
index feee0c66b50b1291275920b054d780991955815d..8ea7cc2d6855eaaff54d9948c592d9cb08fa6cc8 100644 (file)
@@ -1,13 +1,13 @@
 /*
   note-column-reg.cc -- implement Note_column_register
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
 #include "note-column-reg.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 #include "stem.hh"
 #include "note-column.hh"
 #include "script.hh"
@@ -17,7 +17,7 @@ bool
 Note_column_register::acceptable_elem_b(Score_elem const*elem_C)const
 {
     char const*nC = elem_C->name();
-    return (nC == Script::static_name() || nC == Notehead::static_name() 
+    return (nC == Script::static_name() || nC == Note_head::static_name() 
            || nC == Stem::static_name());
 }
 Note_column*
@@ -51,8 +51,8 @@ Note_column_register::acknowledge_element(Score_elem_info i)
 
     if (nC == Script::static_name()) {
        script_l_arr_.push((Script*)i.elem_l_->item());
-    } else if (nC == Notehead::static_name()) {
-       Notehead * h_l = (Notehead*)i.elem_l_->item();
+    } else if (nC == Note_head::static_name()) {
+       Note_head * h_l = (Note_head*)i.elem_l_->item();
        if (h_l->rest_b_)
            rest_col_l()->add(h_l);
        else
@@ -104,7 +104,7 @@ Note_column_register::set_feature(Feature i)
      if (i.type_ == "vdir")    
        dir_i_ = i.value_;
      if (i.type_ == "hshift")
-        h_shift_b_ = i.value_;
+        h_shift_b_ = (bool)(int)i.value_;
 }
 
 Note_column_register::Note_column_register()
index 6e6ca348d9371b087881699302e01337a744788f..ccfffcc2b5d014e40e8a05cc0d8cc34a10cdd24a 100644 (file)
@@ -1,5 +1,5 @@
 #include "misc.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 #include "dimen.hh" 
 #include "debug.hh"
 #include "paper-def.hh"
@@ -9,7 +9,7 @@
 
 
 
-Notehead::Notehead(int ss)
+Note_head::Note_head(int ss)
 {
     x_dir_i_ = 0;
     staff_size_i_=ss;
@@ -21,16 +21,18 @@ Notehead::Notehead(int ss)
 }
 
 void
-Notehead::set_rhythmic(Rhythmic_req*r_req_l)
+Note_head::set_rhythmic(Rhythmic_req*r_req_l)
 {
     balltype_i_ = r_req_l->duration_.type_i_;
+    if (balltype_i_ > 4)
+       balltype_i_ = 4;
     dots_i_ = r_req_l->duration_.dots_i_;
 }
     
-IMPLEMENT_STATIC_NAME(Notehead);
+IMPLEMENT_STATIC_NAME(Note_head);
 
 void
-Notehead::do_print()const
+Note_head::do_print()const
 {
 #ifndef NPRINT
     if (rest_b_)
@@ -42,18 +44,18 @@ Notehead::do_print()const
 
 
 int
-Notehead::compare(Notehead *const  &a, Notehead * const &b)
+Note_head::compare(Note_head *const  &a, Note_head * const &b)
 {
     return a->position_i_ - b->position_i_;
 }
 
 Molecule*
-Notehead::brew_molecule_p() const 
+Note_head::brew_molecule_p() const 
 {
     Molecule*out = 0;
     Paper_def *p = paper();
 
-    Real dy = p->internote();
+    Real dy = p->internote_f();
     Symbol s;
     if (!rest_b_)
        s = p->lookup_l()->ball(balltype_i_);
index 7710ddf87d7da2a21aa3d10b05dbc5fc4ae33f5c..7a846bd6a586b926f12810ac994360ba1bf7596f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   register.cc -- implement Request_register
 
-  Sourcefile of LilyPond musictypesetter
+  Sourcefile of GNU LilyPond musictypesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
@@ -9,10 +9,9 @@
 #include "voice.hh"
 #include "musical-request.hh"
 #include "register.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 #include "complex-walker.hh"
 #include "local-key-item.hh"
-#include "complex-staff.hh"
 #include "register-group.hh"
 #include "debug.hh"
 
index 63040205007bfe3ce3cae94da855a9f49dafe77d..9fed099da21f9b9644129ce99591380edee52a8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  stem-beam-reg.cc -- part of LilyPond
+  stem-beam-reg.cc -- part of GNU LilyPond
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 #include "grouping.hh"
 #include "text-spanner.hh"
 #include "complex-walker.hh"
-#include "complex-staff.hh"
 #include "debug.hh"
 #include "grouping.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 
 Stem_beam_register::Stem_beam_register()
 {
@@ -79,7 +78,7 @@ Stem_beam_register::process_requests()
     }
 
     if (stem_req_l_) {
-       stem_p_ = new Stem(10);
+       stem_p_ = new Stem(8);
        if (current_grouping)
            current_grouping->add_child(
                get_staff_info().time_C_->whole_in_measure_,
@@ -107,9 +106,9 @@ Stem_beam_register::acknowledge_element(Score_elem_info info)
     if (!stem_p_)
        return;
 
-    if (info.elem_l_->name() == Notehead::static_name() &&
+    if (info.elem_l_->name() == Note_head::static_name() &&
        stem_req_l_->duration() == info.req_l_->rhythmic()->duration()){
-       Notehead * n_l= (Notehead*)info.elem_l_->item();
+       Note_head * n_l= (Note_head*)info.elem_l_->item();
        stem_p_->add(n_l);
     }
 }
index 3d75818870bfc4f5ab8ed16d1609963302312ccd..2b8fe5d642a5431306bc5fe33c89f7eb8b318fcc 100644 (file)
@@ -1,14 +1,14 @@
 /*
   tie-reg.cc -- implement Tie_register
 
-  source file of the LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
 #include "tie-reg.hh"
 #include "tie.hh"
-#include "notehead.hh"
+#include "note-head.hh"
 #include "musical-request.hh"
 #include "voice-element.hh"
 
@@ -73,14 +73,14 @@ Tie_register::process_requests()
 void
 Tie_register::acknowledge_element(Score_elem_info i)
 {
-    if (i.elem_l_->name() == Notehead::static_name()) {
+    if (i.elem_l_->name() == Note_head::static_name()) {
        if (tie_p_) {
-           tie_p_->set_head(-1, (Notehead*)i.elem_l_->item());
+           tie_p_->set_head(-1, (Note_head*)i.elem_l_->item());
            melodic_req_l_ = i.req_l_->musical()->melodic();
        }
 
        if (end_tie_p_) {
-           end_tie_p_->set_head(1, (Notehead*)i.elem_l_->item());
+           end_tie_p_->set_head(1, (Note_head*)i.elem_l_->item());
            if (!Melodic_req::compare ( *end_melodic_req_l_, *melodic_req_l_))
                end_tie_p_->same_pitch_b_ = true;
            announce_element(Score_elem_info(end_tie_p_,end_req_l_));
diff --git a/mi2mu/include/mi2mu-proto.hh b/mi2mu/include/mi2mu-proto.hh
new file mode 100644 (file)
index 0000000..af0d543
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  mi2mu-proto.hh -- declare type names in mi2mu
+
+  source file of mi2mu, part of the GNU LilyPond package,
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef MI2MU_PROTO_HH
+#define MI2MU_PROTO_HH
+
+
+struct Lily_stream ;
+class Midi_event ;
+class Midi_key ;
+class Midi_note ;
+class Midi_tempo ;
+class Midi_text ;
+class Midi_time ;
+class Midi_score ;
+class Midi_track ;
+class Midi_voice ;
+class My_midi_lexer ;
+class My_midi_parser ;
+class Track_column ;
+
+#endif // MI2MU_PROTO_HH
index 5d381cedd050ac6d52d0c64af05adb6ced98545a..a7e877f301d41e097257bbfc334ecfd71d804910 100644 (file)
@@ -19,6 +19,7 @@
 #include <ctype.h>
 #include <time.h>
 
+#include "mi2mu-proto.hh"
 #include "proto.hh"
 #include "plist.hh"
 #include "warn.hh"