---- ../lilypond-1.3.77/CHANGES Tue Aug 8 16:14:36 2000
+--- ../lilypond-1.3.77.jcn1/CHANGES Wed Aug 9 23:30:23 2000
+++ b/CHANGES Sun Aug 13 15:50:59 2000
+@@ -1,3 +1,10 @@
+* fixed problem with HaraKiri
+
+* fixed problem with dynamicDirection
+
+* fixed problem with nonEmptyText
+
+
+ 1.3.77.jcn1
+ ===========
+ --- ../lilypond-1.3.77/CHANGES Tue Aug 8 16:14:36 2000
++ b/CHANGES Wed Aug 9 23:30:23 2000
@@ -1,3 +1,15 @@
1.3.77.jcn1
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=77
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
+++ /dev/null
-%non of the dynamics properties work anymore
-
-\score {
- \context Voice \notes\relative c {
- \property Voice.verticalDirection = #-1
- \property Voice.dynamicVerticalDirection = #-1
- \property Voice.dynamicDirection = #-1
- \property Voice.dynamicPadding = #40
- c \p c \< \! c \ff\> c \!c-\p
-
- }
-}
+++ /dev/null
-%
-% Hara-kiri leaves a big gap
-%
-
-\version "1.3.59";
-
-m = \notes \relative c''{
-
-c1 | c2 c | c c | c c | \break c c | c c | c c | c c |
-}
-
-M = \notes \relative c''{
-
-c1 | c2 c | c c | R1*5
-}
-
-\score{ <
- \context StaffGroup = wood <
- \context Staff = flauto <
- \property Staff.instrument = "Flauto"
- \property Staff.instr = "Fl."
- \m
- >
- \context Staff = oboe <
- \property Staff.instrument = "Oboe"
- \property Staff.instr = "Ob."
- \m
- >
- \context Staff = clarI <
- \property Staff.instrument = "Clarinetto I"
- \property Staff.instr = "Cl. I"
- \m
- >
- \context Staff = clarII <
- \property Staff.instrument = "Clarinetto II"
- \property Staff.instr = "Cl. II"
- \m
- >
- \context Staff = fagotto <
- \property Staff.instrument = "Fagotto"
- \property Staff.instr = "Fg."
- \m
- >
- >
- \context StaffGroup = brass <
- \context Staff = cor <
- \property Staff.instrument = "2 Corni in F"
- \property Staff.instr = "Cor."
- \context Voice = corI { \stemup \M }
- \context Voice = corII { \stemdown \M }
- >
- \context Staff = trp <
- \property Staff.instrument = "2 Trp. in B\\textflat "
- \property Staff.instr = "Trp."
- \context Voice = trpI { \stemup \M }
- \context Voice = trpII { \stemdown \M }
- >
- >
- \context StaffGroup = percussion <\context Staff = timpani <
- \property Staff.instrument = "Timpani"
- \property Staff.instr = "Timp."
- \notes{c''1 R1*8}
- >
- >
- \context StaffGroup = strings <
- \context GrandStaff = violins <
- \context Staff = viI <
- \property Staff.instrument = "Violin I"
- \property Staff.instr = "Vi. I"
- \m
- >
- \context Staff = viII <
- \property Staff.instrument = "Violin II"
- \property Staff.instr = "Vi. II"
- \m
- >
- >
- \context Staff = vla <
- \property Staff.instrument = "Viola"
- \property Staff.instr = "Vla."
- \m
- >
- \context Staff = vlc <
- \property Staff.instrument = "Violoncello"
- \property Staff.instr = "Vlc"
- \m
- >
- \context Staff = cb <
- \property Staff.instrument = "Contrabasso"
- \property Staff.instr = "C.B."
- \m
- >
- >
->
- \paper {
-% \paper_sixteen;
- linewidth = 185.\mm;
- textheight = 260.\mm;
- \translator {
- \OrchestralScoreContext
- barNumberScriptPadding = 10;
- }
- \translator { \HaraKiriStaffContext
- marginScriptPadding = 15.0;
-% StaffMinimumVerticalExtent = #(cons -0.0 0.0)
- }
- }
-}
-
--- /dev/null
+%non of the dynamics properties work anymore
+
+\score {
+ \context Voice \notes\relative c {
+% \property Voice.verticalDirection = #-1
+
+ \property Voice.dynamicDirection = #1
+ \property Voice.dynamicPadding = #40
+ c \p c \< \! c \ff\> c \!c-\p
+
+ }
+}
virtual void acknowledge_element (Score_element_info);
virtual void process_acknowledged ();
virtual Spanner* get_spanner_p () const;
+ virtual void add_element (Score_element*) ;
public:
+
VIRTUAL_COPY_CONS(Translator);
Axis_group_engraver ();
};
if ((!par || !Axis_group_interface::has_interface (par))
&& ! elts_[i]->empty_b (Y_AXIS))
- Axis_group_interface::add_element (staffline_p_, elts_[i]);
+ add_element (elts_[i]);
}
elts_.clear ();
}
+void
+Axis_group_engraver::add_element (Score_element*e)
+{
+ Axis_group_interface::add_element (staffline_p_, e);
+}
////////////////////////////////////////////////////////
protected:
virtual Spanner*get_spanner_p ()const;
virtual void acknowledge_element (Score_element_info);
+ virtual void add_element (Score_element *e);
public:
VIRTUAL_COPY_CONS(Translator);
};
+void
+Hara_kiri_engraver::add_element (Score_element*e)
+{
+ Hara_kiri_group_spanner::add_element (staffline_p_, e);
+}
+
+
Spanner*
Hara_kiri_engraver::get_spanner_p () const
{
(c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-
+#include "hara-kiri-group-spanner.hh"
#include "axis-group-interface.hh"
#include "score-element.hh"
bool
Axis_group_interface::axis_b (Score_element*me,Axis a )
{
- return me->has_extent_callback_b (group_extent_callback, a);
+ /*
+ urg. FIXME, check for Hara_kiri_group_spanner shouldn't be necessary?
+
+
+ */
+ return me->has_extent_callback_b (group_extent_callback, a) ||
+ (me->has_extent_callback_b (Hara_kiri_group_spanner::y_extent, a));
}
Interval
if (a1 != Y_AXIS && a2 != Y_AXIS)
me->set_extent_callback (0, Y_AXIS);
- me->set_extent_callback (Axis_group_interface::group_extent_callback,a1);
- me->set_extent_callback (Axis_group_interface::group_extent_callback,a2);
+ // if (!me->has_extent_callback_b (a1))
+ if (me->has_extent_callback_b (Score_element::molecule_extent, a1))
+ me->set_extent_callback (Axis_group_interface::group_extent_callback,a1);
+ if (me->has_extent_callback_b (Score_element::molecule_extent, a2))
+ me->set_extent_callback (Axis_group_interface::group_extent_callback,a2);
}
Link_array<Score_element>
{
String str =ly_scm2string (s);
SCM siz = gh_call1 (barsiz_proc, me->self_scm ());
- return compound_barline (me, str, gh_scm2double (siz)).create_scheme ();
+ Real sz = gh_scm2double (siz);
+ if (sz < 0)
+ return SCM_EOL;
+
+ return compound_barline (me, str, sz).create_scheme ();
}
return SCM_EOL;
}
me->set_elt_property ("items-worth-living", SCM_EOL);
me->add_offset_callback (force_hara_kiri_callback, Y_AXIS);
me->set_interface (ly_symbol2scm ("hara-kiri-spanner-interface"));
+ me->set_extent_callback (Hara_kiri_group_spanner::y_extent, Y_AXIS);
}
+Interval
+Hara_kiri_group_spanner::y_extent(Score_element*me, Axis a)
+{
+ assert (a == Y_AXIS);
+ consider_suicide (me);
+ return Axis_group_interface::group_extent_callback (me, a);
+}
+
+
bool
Hara_kiri_group_spanner::has_interface (Score_element*me)
{
return 0.0;
}
+
+Real
+Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (Score_element*daughter, Axis a)
+{
+ assert (a == Y_AXIS);
+ force_hara_kiri_callback (daughter->parent_l (a), Y_AXIS);
+ return 0.0;
+}
+
+void
+Hara_kiri_group_spanner::add_element (Score_element * me, Score_element *e)
+{
+ // e->add_offset_callback (force_hara_kiri_in_parent_callback, Y_AXIS);
+ Axis_group_interface::add_element (me, e);
+}
items-worth-living -- list of interesting items. If empty in a particular system,
clear this line
+
+ todo: naming
*/
class Hara_kiri_group_spanner
{
public:
static Real force_hara_kiri_callback (Score_element * , Axis);
+ static Interval y_extent (Score_element * , Axis);
+ static Real force_hara_kiri_in_parent_callback (Score_element * , Axis);
+ static void add_element (Score_element *me, Score_element *e);
static void set_interface (Score_element*me);
static bool has_interface (Score_element*);
static void consider_suicide (Score_element*me);
Score_element*common_refpoint (Score_element const* s, Axis a) const;
Score_element*common_refpoint (SCM elt_list, Axis a) const;
+ // duh. slim down interface here. (todo)
bool has_offset_callback_b (Offset_callback, Axis)const;
void add_offset_callback (Offset_callback, Axis);
bool has_extent_callback_b (Extent_callback, Axis)const;
+ bool has_extent_callback_b (Axis) const;
void set_extent_callback (Extent_callback , Axis);
/**
void
Property_engraver::apply_properties (SCM p, Score_element *e)
-{
+{
for (; gh_pair_p (p); p = gh_cdr (p))
{
/*
Score_element::Score_element(SCM basicprops)
{
+ /*
+ fixme: default should be no callback.
+ */
set_extent_callback (molecule_extent, X_AXIS);
set_extent_callback (molecule_extent, Y_AXIS);
Real r = (*c) (me,a );
if (isinf (r) || isnan (r))
{
- r = 0.0;
programming_error (INFINITY_MSG);
+ r = 0.0;
}
me->dim_cache_[a].offset_ +=r;
}
return cb == dim_cache_[a].extent_callback_l_;
}
+
+bool
+Score_element::has_extent_callback_b (Axis a) const
+{
+ return dim_cache_[a].extent_callback_l_;
+}
+
bool
Score_element::has_offset_callback_b (Offset_callback cb, Axis a)const
{
void
Span_bar::evaluate_empty (Score_element*me)
-{
+{
+ /*
+ TODO: filter all hara-kiried out of ELEMENS list, and then
+ optionally do suicide. Call this cleanage function from
+ center_on_spanned_callback() as well.
+
+ */
if (!gh_pair_p (me->get_elt_property ("elements")))
{
me->suicide ();
Interval iv (get_spanned_interval (me));
if (iv.empty_b ())
{
- programming_error("Huh? My children deflated (FIXME)");
- iv = Interval (0,0);
+ /*
+ This happens if the bars are hara-kiried from under us.
+ */
+ me->suicide ();
+ return gh_double2scm (-1);
}
return gh_double2scm (iv.length ());
}
text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
/*
- huh?, this said:
-
- SCM empty = get_property ("textNonEmpty");
- if (to_boolean (empty))
- no-spacing-rods
-
Text is empty by default, which means that the only condition
for not setting 'no-spacing-rods' should be: boolean && true.
Anyway, non-empty text has been broken for some time now.
*/
SCM nonempty = get_property ("textNonEmpty");
- if (to_boolean (nonempty))
- ;
- else
- {
- text->set_elt_property ("no-spacing-rods" , SCM_BOOL_F);
- text->set_extent_callback (0, X_AXIS);
- }
+ if (!to_boolean (nonempty))
+ /*
+ empty text: signal that no rods should be applied.
+ */
+ text->set_elt_property ("no-spacing-rods" , SCM_BOOL_T);
+
+
announce_element (text, r);
texts_.push (text);
}
(interfaces . (dot-interface))
)
basicDynamicLineSpannerProperties = #`(
- (interfaces (dynamic-interface axis-group-interface))
+ (interfaces . (dynamic-interface axis-group-interface))
(axes . ( 1))
)
basicDynamicTextProperties = # `(
(style . "dynamic")
- (interface (dynamic-interface))
+ (interfaces . (dynamic-interface))
(molecule-callback . ,Text_item::brew_molecule)
(script-priority . 100)
(self-alignment-Y . 0)
)
basicTextScriptProperties = #`(
(molecule-callback . ,Text_item::brew_molecule)
- (no-spacing-rods . #t)
+
+: -- don't set, because property-engraver will not override it.
+; (no-spacing-rods . #t)
(interfaces . (text-script-interface text-item-interface))
)
basicTieProperties = #`(