+1.3.22.hwn2
+===========
+
+* Symbols opposite to stem (eg marcato) now get the proper glyph.
+
+* Breathing marks now have a direction by default.
+
+* Do set generic script properties.
+
+* Also put tuplet brackets under notes.
+
+* Score_element_info: only store origin of element, but not the path
+to parent translators. Saves a little memory, and removes some complexity.
+
+
+1.3.22.hwn1
+===========
+
+* Autobeaming in time sigs that don't have 1/4 beats fixed.
+
+* (De)crescendi should now work. (Thanks Michael)
+
+* Better error reporting for conflicting time signatures.
+
+* Line_number_engraver: output locations of note head
+definitions. Very handy when entering complicated scores.
+
+* Rewrote multi measure rest support: now they are entered as spanners
+(\commandspanrequest \start "rest"). RXXXX is an abbreviation for
+\commandspanrequest \start "rest" SXXXX \commandspanrequest \stop "rest".
+
+* Removed support of percent style repetitions.
+
+* Put texts outside the staff.
+
1.3.21.mb1
==========
* Getopt bugfix: don't assert on certain errors.
.* TODO
. * use hash tabs iso. alist_ for elt property?
. * fix tremolos.
+. * ROADMAP file.
+. * change ) c4 to c4-)
. * internationalize GUILE msgs.
-gg
. * unbroken marks.
. * write smobifying howto.
-. * tuplet spanner dir
. * \property autoBeamOverRest (boolean). Don't stop for rests when autobeaming.
?
. * put property test files in refman.
. * alignment within @itemize
. * interstaff stems
. * junk dstream output.
-. * agressive type-checking for SCM stuff.
+. * Change website to be index to documentation.
. * \prop slurdir in grace notes
+. * \eltproperty "=Context" "Elt_name" "prop-name" #value
. * script columns
. * Must stop before this music ends:
verse=\lyrics {
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=22
+PATCH_LEVEL=23
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
void set_spot (Input const &);
Input spot () const;
String location_str () const;
+ String line_number_str () const;
Input (Source_file*, char const*);
Input ();
};
return "(" + _ ("position unknown") + ")";
}
+String
+Input::line_number_str () const
+{
+ if (source_file_l_)
+ return to_str (source_file_l_->line_i (defined_ch_C_));
+ else
+ return "?";
+}
--- /dev/null
+/*
+ Audio-element-info.cc -- implement Audio_element_info
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "audio-element-info.hh"
+#include "request.hh"
+
+Audio_element_info::Audio_element_info (Audio_element*s_l, Music *r_l)
+{
+ elem_l_ = s_l;
+ req_l_ = r_l;
+}
+
+
+Audio_element_info::Audio_element_info()
+{
+ elem_l_ = 0;
+ req_l_ = 0;
+}
+
+Link_array<Translator>
+Audio_element_info::origin_trans_l_arr (Translator*) const
+{
+ return origin_trans_l_arr_;
+}
+++ /dev/null
-/*
- Audio-element-info.cc -- implement Audio_element_info
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "audio-element-info.hh"
-#include "request.hh"
-
-Audio_element_info::Audio_element_info (Audio_element*s_l, Music *r_l)
-{
- elem_l_ = s_l;
- req_l_ = r_l;
-}
-
-
-Audio_element_info::Audio_element_info()
-{
- elem_l_ = 0;
- req_l_ = 0;
-}
-
-
-
void
Bar_script_engraver::acknowledge_element (Score_element_info inf)
{
- if (inf.origin_trans_l_arr_.size () == 1)
+ if (inf.origin_trans_l_arr (this).size () == 1)
{
Item *i=cast_to_interesting_item (inf.elem_l_);
if (!i)
/* Only put numbers on bars that are at our own level (don't put
numbers over the staffs of a GrandStaff, only over the GrandStaff
itself */
- if (inf.origin_trans_l_arr_.size () != 1)
+ if (inf.origin_trans_l_arr (this).size () != 1)
return;
attach_script_to_item (i);
void
Base_span_bar_engraver::acknowledge_element (Score_element_info i)
{
- int depth = i.origin_trans_l_arr_.size();
+ int depth = i.origin_trans_l_arr (this).size();
if (depth > 1
&& dynamic_cast<Bar *> (i.elem_l_))
{
bool
Breathing_sign_engraver::do_try_music (Music*r_l)
{
- if (Breathing_sign_req * b= dynamic_cast <Breathing_sign_req *> (r_l)) {
- breathing_sign_req_l_ = b;
- return true;
- }
+ if (Breathing_sign_req * b= dynamic_cast <Breathing_sign_req *> (r_l))
+ {
+ breathing_sign_req_l_ = b;
+ return true;
+ }
return false;
}
void
Breathing_sign_engraver::do_process_requests()
{
- if(breathing_sign_req_l_) {
- breathing_sign_p_ = new Breathing_sign;
- Staff_symbol_referencer_interface st (breathing_sign_p_);
- st.set_interface ();
+ if(breathing_sign_req_l_)
+ {
+ breathing_sign_p_ = new Breathing_sign;
+ breathing_sign_p_->set_elt_property ("break-aligned", SCM_BOOL_T);
+ Staff_symbol_referencer_interface st (breathing_sign_p_);
+ st.set_interface ();
- announce_element (Score_element_info (breathing_sign_p_, breathing_sign_req_l_));
- }
+ announce_element (Score_element_info (breathing_sign_p_, breathing_sign_req_l_));
+ }
}
void
Breathing_sign_engraver::do_pre_move_processing()
{
- if(breathing_sign_p_) {
- typeset_element(breathing_sign_p_);
- breathing_sign_p_ = 0;
- }
+ if(breathing_sign_p_)
+ {
+ typeset_element(breathing_sign_p_);
+ breathing_sign_p_ = 0;
+ }
}
void
Breathing_sign_engraver::do_post_move_processing()
{
- breathing_sign_req_l_ = 0;
+ breathing_sign_req_l_ = 0;
}
ADD_THIS_TRANSLATOR(Breathing_sign_engraver);
{
Staff_symbol_referencer_interface si (this);
- Real dl = si.staff_space();
- Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
+ Real space = si.staff_space();
+ Interval i1(0, space / 6), i2(-space / 2, space / 2);
Box b(i1, i2);
Molecule *output = new Molecule (lookup_l()->filledbox(b));
-
+
return output;
}
void
Breathing_sign::do_post_processing()
{
- Real dl = Staff_symbol_referencer_interface (this).staff_space();
-
- translate_axis(2.0 * dl * directional_element(this).get (), Y_AXIS);
+ Real space = staff_symbol_referencer (this).staff_space();
+ Direction d = directional_element (this). get ();
+ if (!d)
+ {
+ d = UP;
+ directional_element(this).set (d);
+ }
+
+ translate_axis(2.0 * space * d, Y_AXIS);
}
{
}
-Mark_req::Mark_req (String s)
-{
- str_ = s;
-}
void
Mark_req::do_print () const
{
DEBUG_OUT << str_;
}
+
+bool
+Mark_req::do_equal_b (Request const * r) const
+{
+ Mark_req const * other = dynamic_cast<Mark_req const*> (r);
+ return other && other->str_ == str_;
+}
+
void
Key_change_req::transpose (Musical_pitch p)
{
Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten");
Real extra_left = get_broken_left_end_align ();
- SCM dir = get_elt_property("grow-dir");
+ SCM dir = get_elt_property("grow-direction");
SCM dyns = get_elt_property ("dynamic-drul");
if (!isdir_b (dir) || !gh_pair_p (dyns))
virtual void do_process_requests();
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
+ virtual void typeset_element (Score_element*);
};
text_p_->set_elt_property ("style", gh_str02scm ("dynamic"));
text_p_->set_elt_property ("script-priority",
gh_int2scm (100));
- text_p_->set_elt_property ("staff-support", SCM_BOOL_T);
Side_position_interface (text_p_).set_axis (Y_AXIS);
->set_elt_property ("grow-direction",
gh_int2scm ((span_l->span_type_str_ == "crescendo") ? BIGGER : SMALLER));
- new_cresc_p->set_elt_property ("staff-support", SCM_BOOL_T);
-
-
- Side_position_interface (new_cresc_p).set_axis (Y_AXIS);
+ side_position (new_cresc_p).set_axis (Y_AXIS);
announce_element (Score_element_info (new_cresc_p, span_l));
}
}
{
::warning (_ ("Too many crescendi here"));
-
typeset_element (cresc_p_);
cresc_p_ = 0;
}
}
+void
+Dynamic_engraver::typeset_element (Score_element * e)
+{
+ side_position(e).add_staff_support ();
+ Engraver::typeset_element (e);
+}
void
Dynamic_engraver::acknowledge_element (Score_element_info i)
if (!dynamic_cast <Engraver_group_engraver *> (p->car_))
{
Engraver * eng = dynamic_cast<Engraver*> (p->car_);
- if (eng && eng!= info.origin_trans_l_arr_[0])
+ if (eng && eng!= info.origin_trans_l_arr (this)[0])
eng->acknowledge_element (info);
}
}
void
Engraver::announce_element (Score_element_info i)
{
- i.origin_trans_l_arr_.push (this);
+ if (!i.origin_trans_l_)
+ i.origin_trans_l_ = this;
daddy_grav_l()->announce_element (i);
}
Audio_element * elem_l_;
Music *req_l_;
Link_array<Translator> origin_trans_l_arr_;
+ Link_array<Translator> origin_trans_l_arr (Translator*) const;
Audio_element_info (Audio_element*, Music*);
Audio_element_info();
public:
VIRTUAL_COPY_CONS(Score_element);
Breathing_sign ();
-
- void set_vertical_position (Direction);
-
-
protected:
virtual void do_post_processing ();
virtual Molecule* do_brew_molecule_p () const;
class Mark_req : public Request {
public:
- Mark_req (String);
String str_;
protected:
+ virtual bool do_equal_b (Request const*) const;
virtual void do_print () const;
VIRTUAL_COPY_CONS(Music);
};
VIRTUAL_COPY_CONS(Music);
};
-/**
- Part: typeset a measure with the number of measures rest
- Score: typeset all individual measures as full rests
- */
-class Multi_measure_rest_req : public Rhythmic_req {
-public:
- VIRTUAL_COPY_CONS(Music);
-};
-
-/**
- Typeset a repetition sign in each bar.
- */
-class Repetitions_req : public Rhythmic_req {
-public:
- VIRTUAL_COPY_CONS(Music);
-};
/// an extender line
class Extender_req : public Request {
#include "parray.hh"
/**
- Data container for broadcasts
+ Data container for broadcasts.
+
+ TODO: Store this in element info!
*/
struct Score_element_info {
- Score_element * elem_l_;
- Music *req_l_;
- Link_array<Translator> origin_trans_l_arr_;
+ Translator * origin_trans_l_;
+ friend Engraver;
+public:
+ Link_array<Translator> origin_trans_l_arr (Translator*) const;
+ Score_element * elem_l_;
+ Music *req_l_;
+
- Score_element_info (Score_element*, Music*);
- Score_element_info();
+ Score_element_info (Score_element*, Music*);
+ Score_element_info();
};
+++ /dev/null
-/*
- script-engraver.hh -- part of GNU LilyPond
-
- (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef Script_GRAV
-#define Script_GRAV
-
-#include "engraver.hh"
-
-
-class Script_engraver : public Engraver {
- Link_array<Script> script_p_arr_;
- Link_array<Articulation_req> script_req_l_arr_;
-
-public:
- VIRTUAL_COPY_CONS(Translator);
-
- Script_engraver();
-protected:
- virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
- virtual void do_pre_move_processing ();
- virtual void do_post_move_processing ();
- virtual void acknowledge_element (Score_element_info);
-};
-
-#endif // Script_GRAV
bool supported_b () const;
bool has_interface_b () const;
void add_support (Score_element*);
-
+
+ void add_staff_support ();
Direction get_direction () const;
void set_direction (Direction);
};
+Side_position_interface side_position (Score_element*);
#endif /* SIDE_POSITION_INTERFACE_HH */
virtual Molecule*do_brew_molecule_p() const;
public:
Time_signature () ;
+
+ /*
+ TODO: make this SCM!
+ */
Array<int> args_;
VIRTUAL_COPY_CONS(Score_element);
--- /dev/null
+/*
+ line-number-engraver.cc -- implement Line_number_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "engraver.hh"
+#include "text-item.hh"
+#include "side-position-interface.hh"
+#include "note-head.hh"
+#include "stem.hh"
+
+/**
+ Annotate output with line numbers. Creates text-items when it
+ catches note heads. */
+class Line_number_engraver : public Engraver
+{
+ Array<Score_element_info> interesting_;
+ Link_array<Score_element> support_;
+ Item * text_item_p_;
+ String last_text_;
+public:
+ Line_number_engraver ();
+ VIRTUAL_COPY_CONS (Translator);
+protected:
+ virtual void do_pre_move_processing ();
+ virtual void acknowledge_element (Score_element_info);
+ virtual void process_acknowledged ();
+};
+
+void
+Line_number_engraver::process_acknowledged ()
+{
+ if (!text_item_p_ && interesting_.size ())
+ {
+ text_item_p_ = new Text_item;
+ Side_position_interface si (text_item_p_);
+ si.set_axis (Y_AXIS);
+ text_item_p_->set_parent (interesting_[0].elem_l_, Y_AXIS);
+
+ si.set_direction (UP);
+ announce_element (Score_element_info (text_item_p_, 0));
+ }
+}
+
+void
+Line_number_engraver::acknowledge_element (Score_element_info inf)
+{
+ if (dynamic_cast<Note_head*> (inf.elem_l_))
+ {
+ interesting_.push (inf);
+ support_.push (inf.elem_l_);
+ }
+ if (dynamic_cast<Stem*> (inf.elem_l_))
+ {
+ support_.push (inf.elem_l_);
+ }
+}
+
+void
+Line_number_engraver::do_pre_move_processing ()
+{
+ if (text_item_p_)
+ {
+ String s;
+ Side_position_interface si (text_item_p_);
+ for (int i=0; i < interesting_.size (); i++)
+ {
+ if (i)
+ s += ",";
+
+ s += interesting_[i].req_l_->line_number_str ();
+
+ }
+
+ for (int j= support_.size (); j--; )
+ {
+ si.add_support (support_[j]);
+ }
+ if (s != last_text_)
+ {
+ text_item_p_->set_elt_property ("text", ly_str02scm (s.ch_C()));
+ last_text_ =s;
+ }
+
+ typeset_element (text_item_p_);
+ text_item_p_ =0;
+ }
+ interesting_.clear ();
+ support_.clear ();
+}
+
+Line_number_engraver::Line_number_engraver ()
+{
+ text_item_p_ =0;
+}
+
+ADD_THIS_TRANSLATOR(Line_number_engraver);
{
if (Mark_req *mr = dynamic_cast <Mark_req *> (r_l))
{
+
+ if (mark_req_l_ && mr->equal_b (mark_req_l_))
+ return true;
+ if (mark_req_l_)
+ return false;
mark_req_l_ = mr;
return true;
}
{
public:
VIRTUAL_COPY_CONS(Translator);
-
Multi_measure_rest_engraver ();
protected:
virtual bool do_try_music (Music*);
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
-
+ virtual void do_removal_processing ();
private:
- Drul_array<Moment> rest_moments_;
-
+ Span_req * new_req_l_;
+ Span_req * busy_span_req_l_;
+ Span_req * stop_req_l_;
int start_measure_i_;
- Rhythmic_req* multi_measure_req_l_;
- Multi_measure_rest* mmrest_p_;
- Multi_measure_rest* lastrest_p_;
+ Moment start_moment_;
+
+ Multi_measure_rest *mmrest_p_;
+ Multi_measure_rest *lastrest_p_;
};
ADD_THIS_TRANSLATOR (Multi_measure_rest_engraver);
Multi_measure_rest_engraver::Multi_measure_rest_engraver ()
{
start_measure_i_ = 0;
- rest_moments_[START] =
- rest_moments_[STOP] =0;
- multi_measure_req_l_ = 0;
-
- lastrest_p_ =0;
- mmrest_p_ = 0;
+ mmrest_p_ = lastrest_p_ =0;
+ new_req_l_ = busy_span_req_l_ = stop_req_l_ =0;
}
void
{
if (Bar *c = dynamic_cast<Bar*> (i.elem_l_))
{
- if (mmrest_p_)
+ if (mmrest_p_)
mmrest_p_->add_column (c);
if (lastrest_p_)
lastrest_p_->add_column (c);
bool
Multi_measure_rest_engraver::do_try_music (Music* req_l)
{
- Rhythmic_req *r=0;
- if (Multi_measure_rest_req *mr =
- dynamic_cast<Multi_measure_rest_req *> (req_l))
- r=mr;
- else if (Repetitions_req *rr =
- dynamic_cast<Repetitions_req *> (req_l))
- r=rr;
- if (r)
+ if (Span_req * sp = dynamic_cast<Span_req*> (req_l))
{
- if (multi_measure_req_l_)
- if (!multi_measure_req_l_->equal_b (r)
- || rest_moments_[START] != now_mom ())
- return false;
-
- multi_measure_req_l_ = r;
- rest_moments_[START] = now_mom ();
-
- rest_moments_[STOP] = rest_moments_[START] +
- multi_measure_req_l_->duration_.length_mom ();
- return true;
+ if (sp->span_type_str_ == "rest")
+ {
+ if (sp->span_dir_ == STOP)
+ {
+ stop_req_l_ = sp;
+ }
+ else if (sp->span_dir_ == START && !new_req_l_)
+ {
+ new_req_l_ = sp;
+ }
+ return true;
+ }
}
return false;
}
+
+
void
Multi_measure_rest_engraver::do_process_requests ()
{
- if (multi_measure_req_l_ && !mmrest_p_)
+ if (new_req_l_ && stop_req_l_)
+ stop_req_l_ = 0;
+
+ if (new_req_l_)
+ start_moment_ = now_mom ();
+
+ if (stop_req_l_)
+ {
+ busy_span_req_l_ =0;
+ stop_req_l_ = 0;
+ }
+
+ if (new_req_l_)
{
+ busy_span_req_l_ = new_req_l_;
+ new_req_l_ =0;
+ }
+ if (busy_span_req_l_ && !mmrest_p_)
+ {
Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh
Timing_translator * time = dynamic_cast<Timing_translator*> (tr);
Staff_symbol_referencer_interface si (mmrest_p_);
si.set_interface ();
-
- /*
- UGH. JUNKME
- */
- if(dynamic_cast<Repetitions_req *> (multi_measure_req_l_))
- mmrest_p_->set_elt_property ("alt-symbol",
- ly_str02scm ("scripts-repeatsign"));
- announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_));
+ announce_element (Score_element_info (mmrest_p_, busy_span_req_l_));
start_measure_i_
= gh_scm2int (time->get_property ("currentBarNumber", 0));
}
Translator * tr = daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh
Timing_translator * time = dynamic_cast<Timing_translator*> (tr);
-
- if (mmrest_p_ && (now >= rest_moments_[START])
+ if (mmrest_p_ && (now >= start_moment_)
&& !time->measure_position ()
&& (scm_ilength (mmrest_p_->get_elt_property ("columns")) >= 2))
{
typeset_element (lastrest_p_);
lastrest_p_ = 0;
}
+
+ if (new_req_l_)
+ {
+ busy_span_req_l_ = new_req_l_;
+ new_req_l_ =0;
+ }
+
}
void
= gh_scm2int (time->get_property ("currentBarNumber", 0)) - start_measure_i_;
mmrest_p_ = 0;
}
-
- if (now >= rest_moments_[STOP])
- {
- multi_measure_req_l_ = 0;
- mmrest_p_ = 0;
- }
}
+void
+Multi_measure_rest_engraver::do_removal_processing ()
+{
+ if (mmrest_p_)
+ typeset_element (mmrest_p_);
+ if (lastrest_p_)
+ typeset_element (lastrest_p_);
+}
static Keyword_ent the_key_tab[]={
{"autochange", AUTOCHANGE},
{"spanrequest", SPANREQUEST},
+ {"commandspanrequest", COMMANDSPANREQUEST},
{"simultaneous", SIMULTANEOUS},
{"sequential", SEQUENTIAL},
{"accepts", ACCEPTS},
%token SCRIPT
%token SKIP
%token SPANREQUEST
+%token COMMANDSPANREQUEST
%token TEMPO
%token TIME_T
%token TIMES
request_chord:
pre_requests simple_element post_requests {
Music_sequence *l = dynamic_cast<Music_sequence*>($2);
- for (int i=0; i < $1->size(); i++)
- l->add_music ($1->elem(i));
- for (int i=0; i < $3->size(); i++)
- l->add_music ($3->elem(i));
+ if (l) {
+ for (int i=0; i < $1->size(); i++)
+ l->add_music ($1->elem(i));
+ for (int i=0; i < $3->size(); i++)
+ l->add_music ($3->elem(i));
+ }
+ else
+ programming_error ("Need Sequence to add music to");
$$ = $2;
}
verbose_command_req:
+
BAR STRING {
$$ = new Bar_req (ly_scm2string ($2));
}
+ | COMMANDSPANREQUEST int STRING {
+ Span_req * sp_p = new Span_req;
+ sp_p-> span_dir_ = Direction($2);
+ sp_p->span_type_str_ = ly_scm2string ($3);
+ sp_p->set_spot (THIS->here_input ());
+ $$ = sp_p;
+ }
| MARK STRING {
- $$ = new Mark_req (ly_scm2string ($2));
+ Mark_req *m = new Mark_req;
+ m->str_ = ly_scm2string ($2);
+ $$ = m;
}
| MARK unsigned {
- $$ = new Mark_req (to_str ($2));
+ Mark_req *m = new Mark_req;
+ m->str_ = to_str ($2);
+ $$ = m;
}
| TIME_T unsigned '/' unsigned {
Time_signature_change_req *m = new Time_signature_change_req;
$$ = key_p;
delete $2;
}
-
;
post_requests:
Note_req *n = new Note_req;
n->pitch_ = *$1;
- delete $1;
n->duration_ = *$4;
- delete $4;
if (THIS->abbrev_beam_type_i_)
{
if (n->duration_.plet_b ())
n->forceacc_b_ = $2 % 2 || n->cautionary_b_;
Simultaneous_music*v = new Request_chord;
- v->set_spot (THIS->here_input ());
- n->set_spot (THIS->here_input ());
+ v->set_spot ($1->spot ());
+ n->set_spot ($1->spot ());
v->add_music (n);
$$ = v;
- }
- | RESTNAME optional_notemode_duration {
- Simultaneous_music* velt_p = new Request_chord;
- velt_p->set_spot (THIS->here_input());
- if (ly_scm2string ($1) =="s")
- { /* Space */
- Skip_req * skip_p = new Skip_req;
- skip_p->duration_ = *$2;
+ delete $1;
+ delete $4;
- skip_p->set_spot (THIS->here_input());
- velt_p->add_music (skip_p);
- }
- else
- {
- Rest_req * rest_req_p = new Rest_req;
- rest_req_p->duration_ = *$2;
- rest_req_p->set_spot (THIS->here_input());
+ }
+ | RESTNAME optional_notemode_duration {
+ Simultaneous_music* velt_p = new Request_chord;
+ velt_p->set_spot (THIS->here_input());
- velt_p->add_music (rest_req_p);
- }
+ if (ly_scm2string ($1) =="s")
+ { /* Space */
+ Skip_req * skip_p = new Skip_req;
+ skip_p->duration_ = *$2;
- delete $2;
- $$ = velt_p;
+ skip_p->set_spot (THIS->here_input());
+ velt_p->add_music (skip_p);
+ }
+ else
+ {
+ Rest_req * rest_req_p = new Rest_req;
+ rest_req_p->duration_ = *$2;
+ rest_req_p->set_spot (THIS->here_input());
+ velt_p->add_music (rest_req_p);
+ }
+ delete $2;
+ $$ = velt_p;
}
| MEASURES optional_notemode_duration {
- Multi_measure_rest_req* m = new Multi_measure_rest_req;
- m->duration_ = *$2;
- delete $2;
-
- Simultaneous_music*velt_p = new Request_chord;
- velt_p->set_spot (THIS->here_input ());
- velt_p->add_music (m);
- $$ = velt_p;
- }
- | REPETITIONS optional_notemode_duration {
- Repetitions_req* r = new Repetitions_req;
- r->duration_ = *$2;
- delete $2;
+ Skip_req * sk = new Skip_req;
+ sk->duration_ = *$2;
+ Music_list * ms = new Music_list;
+ Request_chord * rqc1 = new Request_chord;
+ Request_chord * rqc2 = new Request_chord;
+ Request_chord * rqc3 = new Request_chord;
+
+ Span_req *sp1 = new Span_req;
+ Span_req *sp2 = new Span_req;
+ sp1-> span_dir_ = START;
+ sp2-> span_dir_ = STOP;
+ sp1->span_type_str_ = sp2->span_type_str_ = "rest";
+ rqc1->add_music (sp1);
+ rqc2->add_music (sk);
+ rqc3->add_music (sp2);
+
+ ms->add_music (rqc1);
+ ms->add_music (rqc2);
+ ms->add_music (rqc3);
- Simultaneous_music*velt_p = new Request_chord;
- velt_p->set_spot (THIS->here_input ());
- velt_p->add_music (r);
- $$ = velt_p;
+ $$ = new Sequential_music (ms);
}
| STRING optional_notemode_duration {
if (!THIS->lexer_p_->lyric_state_b ())
{
Performer * eng = dynamic_cast<Performer*> (p->car_);
// urg, huh? core dump?
- //if (eng && eng!= info.origin_trans_l_arr_[0])
- if (eng && info.origin_trans_l_arr_.size ()
- && eng!= info.origin_trans_l_arr_[0])
+ //if (eng && eng!= info.origin_trans_l_arr ()[0])
+ if (eng && info.origin_trans_l_arr (this).size ()
+ && eng!= info.origin_trans_l_arr (this)[0])
eng->acknowledge_element (info);
}
}
#include "score-element-info.hh"
#include "request.hh"
+#include "translator.hh"
+#include "translator-group.hh"
Score_element_info::Score_element_info (Score_element*s_l, Music *r_l)
{
elem_l_ = s_l;
req_l_ = r_l;
+ origin_trans_l_ = 0;
}
{
elem_l_ = 0;
req_l_ = 0;
+ origin_trans_l_ = 0;
}
-
+Link_array<Translator>
+Score_element_info::origin_trans_l_arr (Translator* end) const
+{
+ Translator * t = origin_trans_l_;
+ Link_array<Translator> r;
+ do {
+ r.push (t);
+ t = t->daddy_trans_l_;
+ } while (t != end->daddy_trans_l_);
+
+ return r;
+}
+
Score_engraver::announce_element (Score_element_info info)
{
announce_info_arr_.push (info);
- info.origin_trans_l_arr_.push (this);
pscore_p_->typeset_element (info.elem_l_);
}
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "script-engraver.hh"
+
#include "script.hh"
#include "side-position-interface.hh"
#include "musical-request.hh"
#include "rhythmic-head.hh"
#include "dimension-cache.hh"
+#include "engraver.hh"
+
+class Script_engraver : public Engraver {
+ Link_array<Script> script_p_arr_;
+ Link_array<Articulation_req> script_req_l_arr_;
+
+public:
+ VIRTUAL_COPY_CONS(Translator);
+
+ Script_engraver();
+protected:
+ virtual bool do_try_music (Music*);
+ virtual void do_process_requests ();
+ virtual void do_pre_move_processing ();
+ virtual void do_post_move_processing ();
+ virtual void acknowledge_element (Score_element_info);
+};
+
+
Script_engraver::Script_engraver()
{
do_post_move_processing();
{
for (int i=0; i < script_p_arr_.size(); i++)
{
+ if (to_boolean (script_p_arr_[i]->remove_elt_property ("staff-support")))
+ side_position (script_p_arr_[i]).add_staff_support ();
typeset_element (script_p_arr_[i]);
}
script_p_arr_.clear();
void
Script::do_post_processing ()
{
- Direction d = Side_position_interface (this).get_direction ();
- Molecule m (get_molecule(d));
+ Side_position_interface i (this);
+ Direction d = i.get_direction ();
+ i.set_direction (d);
}
Molecule*
return o;
}
-
-
+void
+Side_position_interface::add_staff_support ()
+{
+ Staff_symbol_referencer_interface si (elt_l_);
+ if (si.staff_symbol_l ())
+ {
+ add_support (si.staff_symbol_l ());
+ }
+}
void
Side_position_interface::set_axis (Axis a)
SCM s =elt_l_->get_elt_property ("side-support");
return s != SCM_UNDEFINED && s != SCM_EOL;
}
+
+
+Side_position_interface
+side_position (Score_element* e)
+{
+ Side_position_interface si (e);
+ return si;
+}
Staff_margin_engraver::acknowledge_element (Score_element_info inf)
{
Item *i = cast_to_interesting_item (inf.elem_l_);
- if (!i || inf.origin_trans_l_arr_.size() != 1)
+ if (!i || inf.origin_trans_l_arr (this).size() != 1)
return;
{
s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm_);
s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH
-
- SCM ss =s.elem_l_->remove_elt_property ("staff-support");
- if (to_boolean (ss))
- {
- Side_position_interface si (s.elem_l_);
- if (si.has_interface_b ())
- si.add_support (span_p_);
- }
}
(c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "dimension-cache.hh"
+#include "dimension-cache.hh"
#include "engraver.hh"
#include "side-position-interface.hh"
#include "text-item.hh"
{
for (int i=0; i < texts_.size (); i++)
{
+ side_position (texts_[i]).add_staff_support ();
typeset_element (texts_[i]);
}
texts_.clear ();
set_elt_property ("breakable", SCM_BOOL_T);
}
+// ugh.!
Molecule*
Time_signature::do_brew_molecule_p () const
{
{
for (int i=0; i < timing_req_l_arr_.size (); i++)
{
+ /*
+ merge timing reqs.
+ */
if (timing_req_l_arr_[i]->equal_b(t))
return true;
if (String (classname (timing_req_l_arr_[i])) == classname (r))
{
r->warning (_ ("conflicting timing request"));
+ timing_req_l_arr_[i]->warning (_("This is the other timing request"));
return false;
}
}
Moment len = Moment (l) * one_beat;
daddy_trans_l_->set_property ("measureLength",
(new Moment (len))->smobify_self ());
- daddy_trans_l_->set_property ("beatength",
+ daddy_trans_l_->set_property ("beatLength",
(new Moment (one_beat))->smobify_self ());
}
void
Tuplet_spanner::do_post_processing ()
{
-
Link_array<Note_column> column_arr=
Group_interface__extract_elements (this, (Note_column*)0, "columns");
Direction d = directional_element (this).get ();
if (!d)
{
- d = UP;
+ d = get_default_dir ();
directional_element (this).set (d);
}
bool
Vertical_align_engraver::qualifies_b (Score_element_info i) const
{
- int sz = i.origin_trans_l_arr_.size() ;
-
+ int sz = i.origin_trans_l_arr ((Translator*)this).size() ;
Axis_group_element * elt = dynamic_cast<Axis_group_element *> (i.elem_l_);
{
valign_p_->add_element (i.elem_l_);
}
- else if (dynamic_cast<Span_bar*>(i.elem_l_) && i.origin_trans_l_arr_.size ())
+ /*
+ ? huh
+ */
+ else if (dynamic_cast<Span_bar*>(i.elem_l_) && i.origin_trans_l_arr (this).size ())
{
i.elem_l_->add_dependency (valign_p_);
}
%time3_4beamAutoBegin_32 = #(make-moment 1 8)
time3_4beamAutoEnd_32 = #(make-moment 1 8)
-time3_8beamAutoBegin = #(make-moment 1 8)
+time3_8beamAutoBegin_16 = #(make-moment 1 8)
time3_8beamAutoEnd = #(make-moment 3 8)
% in common time:
Begin3
Title: LilyPond
-Version: 1.3.22
-Entered-date: 02FEB00
+Version: 1.3.23
+Entered-date: 07FEB00
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.22.tar.gz
+ 1000k lilypond-1.3.23.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.22.tar.gz
+ 1000k lilypond-1.3.23.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.22
+Version: 1.3.23
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.22.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.23.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# get Packager from (undocumented?) ~/.rpmmacros!
generic-text-properties
generic-note-column-properties
generic-crescendo-properties
+ generic-script-properties
generic-All-properties
))