/*
- 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();
}
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());
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_);
}
void
-Notehead_register::pre_move_processing()
+Note_head_register::pre_move_processing()
{
if (note_p_) {
typeset_element(note_p_);
}
}
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);
/*
- headreg.hh -- part of LilyPond
+ headreg.hh -- part of GNU LilyPond
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
#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);
};
--- /dev/null
+/*
+ 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
+
/*
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
#include "debug.hh"
#include "key-item.hh"
#include "tie.hh"
-#include "notehead.hh"
+#include "note-head.hh"
Local_key_register::Local_key_register()
{
/*
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"
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*
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
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()
#include "misc.hh"
-#include "notehead.hh"
+#include "note-head.hh"
#include "dimen.hh"
#include "debug.hh"
#include "paper-def.hh"
-Notehead::Notehead(int ss)
+Note_head::Note_head(int ss)
{
x_dir_i_ = 0;
staff_size_i_=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_)
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_);
/*
register.cc -- implement Request_register
- Sourcefile of LilyPond musictypesetter
+ Sourcefile of GNU LilyPond musictypesetter
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
#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"
/*
- 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()
{
}
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_,
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);
}
}
/*
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"
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_));
--- /dev/null
+/*
+ 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
#include <ctype.h>
#include <time.h>
+#include "mi2mu-proto.hh"
#include "proto.hh"
#include "plist.hh"
#include "warn.hh"