---- ../lilypond-1.3.32.hwn1/CHANGES Tue Mar 14 12:47:50 2000
-++ b/CHANGES Tue Mar 14 15:16:52 2000
-@@ -1,3 +1,12 @@
-1.3.32.hwn2
+1.3.33
+======
+
+1.3.32.hwn3
===========
+* Experiment: use STL map for Scheme_hash_table; Is there a speedup?
+
+* Bugfix: print brace iso. bracket for Piano / GrandStaff
+
+* Change naming: change do_post_processsing into after_line_breaking,
+do_pre_processsing into before_line_breaking and do_process_requests
+into do_process_music.
+
+* Bugfix in hash-table.hh: do quadratic probing, and not cubic probing.
+
+* Display property name for type error.
+
* Cleanups for Dynamic_engraver and Dynamic_line_spanner.
* Warn if last column in score is musical. Helps catch programming errors.
* Spanner::spanned_drul_ now is private.
- 1.3.32.jcn2
- ===========
- 1.3.32.jcn3
+* Rewrote some bar code: moved molecule functions out of Lookup.
+
+1.3.32.jcn3
===========
* Embedded newlines in text items are now allowed. This helps avoiding
* Fixed slur/bezier-beautiful name mismatch. This should fix the steep
slurs that were apparently reintroduced in 1.3.29.
-1.3.32.jcn2
-===========
-
* Made some small fixes to Coriolan.
-1.3.32.jcn1
-===========
-
* Removed duplicate lily/output-property-engraver.hh.
* Removed optional use of vanilla spanner in Dynamic_engraver.
* Added *.yy and *.ll to TAGS, to that tags-find-replace doesn't omit
parser and lexer.
+1.3.31.mb1
+=========
+
+* Fixed \specialkey and \normalkey. Updated documentation.
+
+1.3.32
+======
1.3.31.jcn5
===========
* Various fixes to Coriolan, score starts to look acceptable.
-1.3.31.jcn3
-===========
-
* Moved optional text of crescendo into Crescendo spanner. Fixed horizontal
and vertical alignment of dynamics.
stuck. I'm not sure whose fault this is, Lily's MIDI output may be
stretching the standard a bit.
-1.3.30.jcn4
-===========
-
* Adjacent dynamic markings are now grouped on a horizontal line, but it's
not perfect yet: they're always below the staff and no horizontal spacing
is done. Also, character metrics of dynamics are still not used.
is used to determine the instrument for MIDI output.
@item @code{keyOctaviation}@indexcode{keyOctaviation} @propertytype{boolean}
- If set to TRUE, then keys are the same in all octaves. If set
- to FALSE then the key signature for different octaves can be
+ If set to false, then keys are the same in all octaves. If set
+ to true then the key signature for different octaves can be
different and is specified independently:
@example
\keysignature bes fis'
@end example
- The default value is 1. Can be set to zero with
- @code{\specialkey} or reset to 1 with @code{\normalkey}.
+ The default value is @code{#f}. Can be set to @code{#t} with
+ @code{\specialkey} or reset with @code{\normalkey}.
@item @code{timeSignatureStyle}@indexcode{timeSignatureStyle} @propertytype{string}
Changes the default two-digit layout for time signatures. The
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=32
-MY_PATCH_LEVEL=hwn2
+PATCH_LEVEL=33
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
int lookup (K s, unsigned int initial_hash)
{
int sz =dict_arr_.size ();
- int i = initial_hash % sz;
+ initial_hash = initial_hash % sz;
+ int i;
int j = 0;
while (j <= sz/2) {
+ i = (initial_hash + j*j) % sz;
+
if (dict_arr_[i].free_b_)
return i;
return i;
j++;
- i = (i + j*j) % sz;
}
# input/test/Makefile
depth = ../..
-examples=font20
+examples= # font20
LOCALSTEPMAKE_TEMPLATES=mutopia
include $(depth)/make/stepmake.make
--- /dev/null
+
+\score
+{
+\notes \relative c'' {
+c4
+\bar "|."; c
+\bar "|:";c
+\bar "||";c
+\bar ":|" ; c
+\bar ".|"; c
+\bar ".|."; c
+\bar "|"; c
+}
+}
a'^\flageolet
\property Voice . textStyle = "roman"
\time 1/2; a2 |
- \time 3/2; < a1.
- { s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} >
+ % \time 3/2; < a1.
+ % { s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} >
|
\time 2/4; a2 |
\time 5/4; a1.. |
% no alts.
\score { \notes
\relative c'' {
-\repeat volta 3 { c^"3$\\times$ 0alt" d }
+% repeat non aligning with barlines.
+e
+\repeat volta 3 { c^"3$\\times$ 0alt" d e }
% less alts than body
\repeat volta 4 { c^"4$\\times$ 2alt" d } \alternative { e f }
#include "dimension-cache.hh"
void
-Align_element::do_post_processing()
+Align_element::after_line_breaking()
{
if (axis () == Y_AXIS)
do_side_processing ();
}
void
-Align_element::do_pre_processing ()
+Align_element::before_line_breaking ()
{
if (axis () == X_AXIS)
do_side_processing ();
}
+
+Font_metric*
+find_font (String name)
+{
+ return all_fonts_global_p->find_font (name);
+}
}
void
-Auto_beam_engraver::do_process_requests ()
+Auto_beam_engraver::do_process_music ()
{
consider_end_and_begin (shortest_mom_);
}
}
void
-Bar_engraver::do_process_requests()
+Bar_engraver::do_process_music()
{
Translator * t = daddy_grav_l ()->get_simple_translator ("Timing_engraver");
void
-Bar_number_engraver::do_process_requests ()
+Bar_number_engraver::do_process_music ()
{
Translator *tr = daddy_grav_l ()->get_simple_translator ("Timing_engraver");
Timing_translator *time = dynamic_cast<Timing_translator*>(tr);
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include <math.h>
+#include "main.hh"
+#include "dimensions.hh"
#include "dimension-cache.hh"
#include "bar.hh"
#include "string.hh"
#include "paper-def.hh"
#include "lookup.hh"
#include "debug.hh"
-
+#include "all-font-metrics.hh"
Bar::Bar ()
{
Molecule
Bar::do_brew_molecule () const
{
- String s = ly_scm2string (get_elt_property ("glyph"));
- return lookup_l ()->bar (s, get_bar_size (), paper_l ());
+ SCM s = get_elt_property ("glyph");
+ if (gh_string_p (s))
+ {
+ String str =ly_scm2string (s);
+ if (str == "bracket")
+ return staff_bracket (get_bar_size ());
+ else if (str == "brace")
+ return staff_brace (get_bar_size ());
+ else
+ return compound_barline (str, get_bar_size ());
+ }
+ return Molecule ();
+}
+
+
+Molecule
+Bar::staff_bracket (Real height) const
+{
+ Paper_def* p= paper_l ();
+ SCM at = gh_list (ly_symbol2scm ("bracket"),
+ gh_double2scm (p->get_var("bracket_arch_angle")),
+ gh_double2scm (p->get_var("bracket_arch_width")),
+ gh_double2scm (p->get_var("bracket_arch_height")),
+ gh_double2scm (p->get_var("bracket_width")),
+ gh_double2scm (height),
+ gh_double2scm (p->get_var("bracket_arch_thick")),
+ gh_double2scm (p->get_var("bracket_thick")),
+ SCM_UNDEFINED);
+
+ Real staff_space = p->get_var ("interline");
+ Box b (Interval (0, 1.5 * staff_space), Interval (-height/2,height/2));
+ Molecule mol (b, at);
+
+ mol.translate_axis (- mol.dim_[X_AXIS].length () / 2, X_AXIS);
+ return mol;
}
+Molecule
+Bar::compound_barline (String str, Real h) const
+{
+ Real kern = paper_l()->get_var ("bar_kern");
+ Real thinkern = paper_l()->get_var ("bar_thinkern");
+
+ Molecule thin = simple_barline (paper_l()->get_var ("barthick_thin"), h);
+ Molecule thick = simple_barline (paper_l()->get_var ("barthick_thick"), h);
+ Molecule colon = lookup_l ()->afm_find ("dots-repeatcolon");
+
+ Molecule m;
+
+ if (str == "")
+ {
+ return lookup_l ()->blank (Box (Interval(0, 0), Interval (-h/2, h/2)));
+ }
+ if (str == "scorepostbreak")
+ {
+ return simple_barline (paper_l ()->get_var ("barthick_score"), h);
+ }
+ else if (str == "|")
+ {
+ return thin;
+ }
+ else if (str == "|.")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, 0);
+ m.add_at_edge (X_AXIS, LEFT, thin, kern);
+ }
+ else if (str == ".|")
+ {
+ m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+ m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+ }
+ else if (str == ":|")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, 0);
+ m.add_at_edge (X_AXIS, LEFT, thin, kern);
+ m.add_at_edge (X_AXIS, LEFT, colon, kern);
+ }
+ else if (str == "|:")
+ {
+ m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+ m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+ m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+ }
+ else if (str == ":|:")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
+ m.add_at_edge (X_AXIS, LEFT, colon, kern);
+ m.add_at_edge (X_AXIS, RIGHT, thick, kern);
+ m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+ }
+ else if (str == ".|.")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
+ m.add_at_edge (X_AXIS, RIGHT, thick, kern);
+ }
+ else if (str == "||")
+ {
+ m.add_at_edge (X_AXIS, RIGHT, thin, 0);
+ m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
+ }
+
+ return m;
+}
+
+/*
+ ugh. Suck me plenty.
+ */
+Molecule
+Bar::staff_brace (Real y) const
+{
+ Real staffht = paper_l ()->get_var ("staffheight");
+ int staff_size = int (rint (staffht ));
+
+ // URG
+ Real step = 1.0;
+ int minht = 2 * staff_size;
+ int maxht = 7 * minht;
+ int idx = int (((maxht - step) <? y - minht) / step);
+ idx = idx >? 0;
+
+ SCM l = ly_eval_str ("(style-to-cmr \"brace\")");
+ String nm = "feta-braces";
+ if (l != SCM_BOOL_F)
+ nm = ly_scm2string (gh_cdr (l));
+ nm += to_str (staff_size);
+ SCM e =gh_list (ly_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
+ SCM at = (e);
+
+ at = fontify_atom (all_fonts_global_p->find_font (nm), at);
+
+ Box b ( Interval (-y/2,y/2),
+ Interval (0,0));
+ return Molecule(b, at);
+}
+
+
+Molecule
+Bar::simple_barline (Real w, Real h) const
+{
+ return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
+}
void
-Bar::do_pre_processing ()
+Bar::before_line_breaking ()
{
SCM g = get_elt_property ("glyph");
Direction bsd = break_status_dir ();
void
-Beam_engraver::do_process_requests ()
+Beam_engraver::do_process_music ()
{
if (reqs_drul_[STOP])
{
their beam, during 'final-pre-processing'.]
*/
void
-Beam::do_pre_processing ()
+Beam::before_line_breaking ()
{
// Why?
if (visible_stem_count () < 2)
Adjust stem lengths to reach beam.
*/
void
-Beam::do_post_processing ()
+Beam::after_line_breaking ()
{
/* first, calculate y, dy */
Real y, dy;
*/
void
-Break_align_item::do_pre_processing()
+Break_align_item::before_line_breaking ()
{
Direction ad = (break_status_dir() == LEFT) ? RIGHT : LEFT;
Real interline= paper_l ()->get_var ("interline");
scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
elems[0]->set_elt_property ("minimum-space", first_pair);
- Axis_align_item::do_pre_processing();
+ Axis_align_item::before_line_breaking ();
Real pre_space = elems[0]->relative_coordinate (column_l (), X_AXIS);
}
void
-Breathing_sign_engraver::do_process_requests()
+Breathing_sign_engraver::do_process_music()
{
if(breathing_sign_req_l_)
{
}
void
-Breathing_sign::do_post_processing()
+Breathing_sign::after_line_breaking ()
{
Real space = staff_symbol_referencer (this).staff_space();
Direction d = directional_element (this). get ();
}
void
-Chord_name_engraver::do_process_requests ()
+Chord_name_engraver::do_process_music ()
{
if (chord_name_p_)
return;
protected:
virtual void do_removal_processing();
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual bool do_try_music (Music*);
virtual void acknowledge_element (Score_element_info);
virtual void do_pre_move_processing();
}
void
-Chord_tremolo_engraver::do_process_requests ()
+Chord_tremolo_engraver::do_process_music ()
{
if (reqs_drul_[STOP])
{
void create_clef();
bool set_type (String);
protected:
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
virtual void do_creation_processing();
virtual void do_post_move_processing();
void
-Clef_engraver::do_process_requests()
+Clef_engraver::do_process_music()
{
if (clef_req_l_)
{
#include "warn.hh"
void
-Clef_item::do_pre_processing()
+Clef_item::before_line_breaking ()
{
SCM style_sym =get_elt_property ("style");
String style;
*/
void
-Collision::do_pre_processing()
+Collision::before_line_breaking ()
{
Array<Shift_tup> autos (automatic_shift ());
Array<Shift_tup> hand (forced_shift ());
Should be smarter.
*/
void
-Dot_column::do_post_processing ()
+Dot_column::after_line_breaking ()
{
Link_array<Dots> dots = Group_interface__extract_elements (this, (Dots*)0 , "dots");
dots.sort (Dot_column::compare);
}
void
-Dots::do_post_processing ()
+Dots::after_line_breaking ()
{
SCM d= get_elt_property ("dot-count");
if (!gh_number_p (d) || !gh_scm2int (d))
Molecule
Dots::do_brew_molecule () const
{
- Molecule mol (lookup_l ()->fill (Box (Interval (0,0),
+ Molecule mol (lookup_l ()->blank (Box (Interval (0,0),
Interval (0,0))));
Molecule d = lookup_l ()->afm_find (String ("dots-dot"));
virtual void do_removal_processing ();
virtual void acknowledge_element (Score_element_info);
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
};
}
void
-Dynamic_engraver::do_process_requests ()
+Dynamic_engraver::do_process_music ()
{
if ((span_req_l_drul_[START] || text_req_l_) && !line_spanner_)
{
}
void
-Extender_engraver::do_process_requests ()
+Extender_engraver::do_process_music ()
{
if (req_l_)
{
void
-Extender_spanner::do_post_processing ()
+Extender_spanner::after_line_breaking ()
{
// UGH
Real gap = paper_l ()->get_var ("interline");
}
void
-Grace_align_item::do_pre_processing ()
+Grace_align_item::before_line_breaking ()
{
Real nhw = // lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
paper_l ()->get_var ("quartwidth");
column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
- Axis_align_item::do_pre_processing ();
+ Axis_align_item::before_line_breaking ();
// translate_axis (-0.5* nhw, X_AXIS); // ugh.
}
}
void
-Hara_kiri_group_spanner::do_post_processing ()
+Hara_kiri_group_spanner::after_line_breaking ()
{
SCM worth = get_elt_property ("items-worth-living");
if (gh_pair_p (worth))
}
void
-Hyphen_engraver::do_process_requests ()
+Hyphen_engraver::do_process_music ()
{
if (req_l_)
{
void
-Hyphen_spanner::do_post_processing ()
+Hyphen_spanner::after_line_breaking ()
{
// UGH
Real gap = paper_l ()->get_var ("interline");
void set_axis (Axis);
int get_count (Score_element*)const;
protected:
- virtual void do_post_processing() ;
- virtual void do_pre_processing ();
+ virtual void after_line_breaking () ;
+ virtual void before_line_breaking ();
virtual void do_side_processing ();
};
#endif // VERTICAL_ALIGN_ITEM_HH
SCM font_descriptions () const;
};
+Font_metric * find_font (String name);
+
#endif /* ALL_FONTS_HH */
virtual void do_post_move_processing ();
virtual void do_removal_processing ();
virtual void acknowledge_element (Score_element_info);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void process_acknowledged ();
virtual void do_creation_processing ();
private:
protected:
virtual void do_creation_processing ();
virtual void do_removal_processing ();
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
class Bar_number_engraver : public Bar_script_engraver {
protected:
- void do_process_requests ();
+ void do_process_music ();
public:
VIRTUAL_COPY_CONS(Translator);
Bar_number_engraver();
public:
VIRTUAL_COPY_CONS(Score_element);
Bar();
+
+ Molecule staff_bracket (Real height) const;
+ Molecule staff_brace (Real height) const;
+ Molecule compound_barline (String, Real height) const;
+ Molecule simple_barline (Real wid, Real height) const;
+
protected:
- virtual void do_pre_processing ();
+ virtual void before_line_breaking ();
virtual Molecule do_brew_molecule () const;
virtual Real get_bar_size () const;
};
virtual void do_removal_processing ();
virtual void acknowledge_element (Score_element_info);
virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
public:
Beam_engraver ();
VIRTUAL_COPY_CONS (Translator);
protected:
- virtual void do_pre_processing ();
- virtual void do_post_processing ();
+ virtual void before_line_breaking ();
+ virtual void after_line_breaking ();
virtual Molecule do_brew_molecule () const;
Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
protected:
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
public:
Break_align_item ();
VIRTUAL_COPY_CONS(Score_element);
protected:
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
VIRTUAL_COPY_CONS(Score_element);
Breathing_sign ();
protected:
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Molecule do_brew_molecule () const;
};
protected:
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Score_element_info i);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual bool do_try_music (Music* m);
private:
class Clef_item : public Item
{
protected:
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
virtual void do_add_processing ();
public:
VIRTUAL_COPY_CONS(Score_element);
Array<Shift_tup> automatic_shift ();
Array<Shift_tup> forced_shift ();
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
public:
void add_column (Note_column*ncol_l);
Dot_column ();
protected:
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
};
#endif // DOT_COLUMN_HH
{
protected:
virtual Molecule do_brew_molecule () const;
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
public:
Dots ();
protected:
virtual void acknowledge_element (Score_element_info);
virtual void do_removal_processing();
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual bool do_try_music (Music*);
virtual void do_pre_move_processing();
virtual void do_post_move_processing ();
protected:
virtual Molecule do_brew_molecule () const;
- void do_post_processing ();
+ void after_line_breaking ();
VIRTUAL_COPY_CONS (Score_element);
Protected_scm size_;
protected:
virtual void acknowledge_element (Score_element_info);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
public:
Font_size_engraver ();
Grace_align_item ();
protected:
virtual void do_add_processing ();
- virtual void do_pre_processing ();
+ virtual void before_line_breaking ();
};
#endif /* GRACE_ALIGN_ITEM_HH */
{
public:
Hara_kiri_group_spanner ();
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
void add_interesting_item (Item* n);
protected:
VIRTUAL_COPY_CONS(Score_element);
protected:
virtual void acknowledge_element (Score_element_info);
virtual void do_removal_processing();
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual bool do_try_music (Music*);
virtual void do_pre_move_processing();
virtual void do_post_move_processing ();
virtual Molecule do_brew_molecule () const;
Interval do_height () const;
- void do_post_processing ();
+ void after_line_breaking ();
VIRTUAL_COPY_CONS (Score_element);
/**
A declarable data structure in mudela.
- TODO: use SCM and SMOBS for union datatype.
+ TODO: use SMOBS for the union type, and junk all derived classes.
*/
struct Identifier : public Input {
bool init_b_;
protected:
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
virtual void acknowledge_element (Score_element_info);
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_pre_move_processing ();
private:
void add_pitch (Musical_pitch, bool cautionary, bool natural);
protected:
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
virtual Molecule do_brew_molecule() const;
};
#endif // LOCALKEYITEM_HH
Lookup ();
Lookup (Lookup const&);
- Molecule simple_bar (String s, Real w, Paper_def*) const;
Molecule afm_find (String, bool warn=true) const;
- Molecule bar (String, Real height, Paper_def*) const;
Molecule accordion (SCM arg, Real interline_f) const;
static Molecule frame (Box b, Real thick);
static Molecule slur (Bezier controls, Real cthick, Real thick) ;
static Molecule beam (Real, Real, Real) ;
static Molecule dashed_slur (Bezier, Real thick, Real dash) ;
- static Molecule fill (Box b) ;
+ static Molecule blank (Box b) ;
static Molecule filledbox (Box b) ;
static Molecule text (String style, String text, Paper_def*) ;
- static Molecule staff_brace (Real dy, int) ;
- static Molecule staff_bracket (Real height, Paper_def* paper_l) ;
};
#endif // LOOKUP_HH
protected:
virtual void do_pre_move_processing();
virtual bool do_try_music (Music*);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_post_move_processing ();
public:
Lyric_engraver ();
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing ();
private:
Box extent() const;
Interval extent (Axis) const;
bool empty_b() const;
- void print ()const;
+
+
+ /*******/
};
SCM fontify_atom (Font_metric*, SCM atom);
+
+
+
#endif
VIRTUAL_COPY_CONS (Score_element);
virtual void do_add_processing ();
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Array<Rod> get_rods () const;
};
(chord) and scripts) as a single entity. */
class Note_column : public Axis_group_item {
protected:
- virtual void do_post_processing () ;
+ virtual void after_line_breaking () ;
public:
static int shift_compare (Note_column *const &, Note_column*const&);
Molecule ledger_line (Interval) const;
protected:
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
virtual Molecule do_brew_molecule() const;
};
#endif // NOTEHEAD_HH
protected:
virtual bool do_try_music (Music *req_l) ;
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
};
Note_performer();
protected:
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual bool do_try_music (Music *req_l) ;
virtual void do_print () const;
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Score_element_info i);
virtual void do_removal_processing ();
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
virtual void do_post_move_processing ();
void queue_events ();
Rest_collision();
protected:
- virtual void do_pre_processing();
+ virtual void before_line_breaking ();
};
#endif // REST_COLLISION_HH
virtual bool do_try_music (Music *);
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
- virtual void do_process_requests ();
+ virtual void do_process_music ();
public:
VIRTUAL_COPY_CONS(Translator);
class Rest : public Rhythmic_head
{
protected:
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Molecule do_brew_molecule () const;
};
#endif // REST_HH
Dots * dots_l () const;
int dot_count () const;
protected:
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
};
#endif // RHYTHMIC_HEAD_HH
#ifndef SCM_HASH_HH
#define SCM_HASH_HH
+
+#include <map>
+
#include "lily-guile.hh"
#include "hash-table.hh"
#include "smobs.hh"
+#define usestl
+
+struct SCM_less
+{
+ bool operator () (SCM s1, SCM s2) const
+ {
+ return long(s1) < long (s2);
+ }
+};
+
+typedef map<SCM,SCM, SCM_less> Scm_stl_map;
+
/**
auto resizing hash table. This should come from GUILE.
*/
-class Scheme_hash_table : private Hash_table<SCM,SCM>
+class Scheme_hash_table : private Scm_stl_map
{
public:
+#ifndef usestl
// bool elem_b (SCM k) const;
Hash_table<SCM,SCM>::try_retrieve;
Hash_table<SCM,SCM>::elem_b;
+#else
+ bool try_retrieve (SCM key, SCM *val);
+ bool elem_b (SCM key) const;
+#endif
+
+
/**
WARNING: putting something in assumes responsibility for cleaning
up. */
///executed directly after the item is added to the Paper_score
virtual void do_add_processing ();
/// do calculations before determining horizontal spacing
- virtual void do_pre_processing ();
+ virtual void before_line_breaking ();
/// generate rods & springs
virtual void do_space_processing ();
virtual void do_breakable_col_processing ();
/// do calculations after determining horizontal spacing
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Link_array<Score_element> get_extra_dependencies () const;
Script_column();
void add_staff_sided (Item*);
protected:
- virtual void do_pre_processing ();
+ virtual void before_line_breaking ();
};
public:
protected:
- virtual void do_pre_processing ();
- virtual void do_post_processing ();
+ virtual void before_line_breaking ();
+ virtual void after_line_breaking ();
Molecule do_brew_molecule () const;
};
void set_melisma (bool);
protected:
virtual bool do_try_music (Music*);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void acknowledge_element (Score_element_info);
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
Drul_array<Real> dx_f_drul_;
virtual Direction get_default_dir () const;
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual void do_add_processing ();
Array<Rod> get_rods () const;
static Interval width_callback(Dimension_cache const*) ;
static Interval height_callback(Dimension_cache const*) ;
- virtual void do_pre_processing();
- virtual void do_post_processing();
- virtual Molecule do_brew_molecule() const;
+ virtual Real get_bar_size () const;
+ virtual void before_line_breaking ();
+ virtual void after_line_breaking ();
};
#endif // SPAN_BAR_HH
virtual void play_element (Audio_element* p);
virtual void do_removal_processing ();
virtual void do_creation_processing ();
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_pre_move_processing ();
private:
protected:
Molecule flag () const;
- virtual void do_pre_processing();
+ virtual void before_line_breaking();
static Interval dim_callback (Dimension_cache const*);
virtual Molecule do_brew_molecule() const;
void space_processing ();
void pre_processing();
void breakable_col_processing();
- void break_processing();
void post_processing();
void output_all ();
};
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing ();
private:
void add_tie (Tie*);
Tie_column ();
protected:
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
void set_directions ();
};
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Audio_element_info);
virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void process_acknowledged ();
};
Drul_array<Real> dx_f_drul_;
virtual void do_add_processing ();
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Array<Rod> get_rods () const;
*/
class Time_signature_engraver : public Engraver {
protected:
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
public:
VIRTUAL_COPY_CONS(Translator);
protected:
void do_print() const;
virtual bool do_try_music (Music* req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing ();
private:
protected:
virtual void do_creation_processing ();
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
bool try_music_on_nongroup_children (Music *m);
virtual void do_print () const;
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_add_processing ();
virtual bool do_try_music (Music* req_l);
virtual void do_pre_move_processing();
virtual void do_print () const;
virtual void do_pre_move_processing();
virtual void do_post_move_processing();
- virtual void do_process_requests () ;
+ virtual void do_process_music () ;
virtual void do_creation_processing() ;
virtual void do_removal_processing();
};
virtual Molecule do_brew_molecule () const;
VIRTUAL_COPY_CONS(Score_element);
virtual void do_add_processing ();
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
virtual Direction get_default_dir () const;
};
virtual void do_add_processing ();
static Interval dim_callback (Dimension_cache const*);
- virtual void do_post_processing ();
+ virtual void after_line_breaking ();
};
#endif // VOLTA_SPANNER_HH
}
void
-Key_engraver::do_process_requests ()
+Key_engraver::do_process_music ()
{
if (keyreq_l_)
{
Interval x(0, inter);
Interval y(0,0);
- mol.add_at_edge (X_AXIS, RIGHT, lookup_l()->fill (Box(x,y)),0);
+ mol.add_at_edge (X_AXIS, RIGHT, lookup_l()->blank (Box(x,y)),0);
}
for (int i =0; i < pitch_arr_.size(); i++)
}
void
-Key_performer::do_process_requests ()
+Key_performer::do_process_music ()
{
if (key_req_l_)
{
#include <stdio.h>
#include <stdlib.h>
+#include <math.h> // isinf
#include "libc-extension.hh"
#include "lily-guile.hh"
}
-static void
-init_functions ()
-{
- scm_make_gsubr ("ly-warn", 1, 0, 0, (SCM(*)(...))ly_warning);
- scm_make_gsubr ("ly-gulp-file", 1,0, 0, (SCM(*)(...))ly_gulp_file);
- scm_make_gsubr ("dir?", 1,0, 0, (SCM(*)(...))ly_isdir_p);
-}
-
-ADD_SCM_INIT_FUNC(funcs, init_functions);
-
typedef void (*Void_fptr)();
Array<Void_fptr> *scm_init_funcs_;
return ly_str02scm (cp);
}
+
+/*
+ convert without too many decimals, and leave a space at the end.
+ */
+
+
+SCM
+ly_number2string (SCM s)
+{
+ assert (gh_number_p (s));
+
+ char str[100]; // ugh.
+
+ if (scm_integer_p (s))
+ {
+ Real r (gh_scm2double (s));
+
+ if (isinf (r) || isnan (r))
+ {
+ programming_error ("Infinity or NaN encountered while converting Real number; setting to zero.");
+ r = 0.0;
+ }
+
+ sprintf (str, "%8.4f ", r);
+ }
+ else
+ {
+ sprintf (str, "%d ", gh_scm2int (s));
+ }
+
+ return gh_str02scm (str);
+}
+
+
+static void
+init_functions ()
+{
+ scm_make_gsubr ("ly-warn", 1, 0, 0, (SCM(*)(...))ly_warning);
+ scm_make_gsubr ("ly-gulp-file", 1,0, 0, (SCM(*)(...))ly_gulp_file);
+ scm_make_gsubr ("dir?", 1,0, 0, (SCM(*)(...))ly_isdir_p);
+ scm_make_gsubr ("ly-number->string", 1, 0,0, (SCM(*)(...)) ly_number2string);
+}
+
+ADD_SCM_INIT_FUNC(funcs, init_functions);
Local_key_item *key_item_p_;
protected:
VIRTUAL_COPY_CONS(Translator);
- virtual void do_process_requests();
+ virtual void do_process_music();
virtual void acknowledge_element (Score_element_info);
virtual void do_pre_move_processing();
virtual void do_creation_processing ();
}
void
-Local_key_engraver::do_process_requests()
+Local_key_engraver::do_process_music()
{
if (time_trans_l_ && !time_trans_l_->measure_position ())
{
void
-Local_key_item::do_pre_processing()
+Local_key_item::before_line_breaking ()
{
accidental_arr_.sort (Local_key_cautionary_tuple::compare);
}
Box b(Interval (0, gh_scm2double (pads[d]) * note_distance),
Interval (0,0));
- Molecule m (lookup_l ()->fill (b));
+ Molecule m (lookup_l ()->blank (b));
mol.add_at_edge (X_AXIS, d, m, 0);
} while ( flip (&d)!= LEFT);
}
*/
#include <math.h>
#include <ctype.h>
+
#include "lookup.hh"
#include "debug.hh"
#include "dimensions.hh"
-
#include "bezier.hh"
#include "paper-def.hh"
#include "string-convert.hh"
return Molecule ( afm_bbox_to_box (cm->charBBox), at);
}
-Molecule
-Lookup::simple_bar (String type, Real h, Paper_def* paper_l) const
-{
- SCM thick = ly_symbol2scm (("barthick_" + type).ch_C());
- Real w = 0.0;
-
- if (paper_l->scope_p_->elem_b (thick))
- {
- w = paper_l->get_realvar (thick);
- }
- else
- {
- programming_error ("No bar thickness set ! ");
- w = 1 PT;
- }
- return filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
-}
-
-Molecule
-Lookup::bar (String str, Real h, Paper_def *paper_l) const
-{
- if (str == "bracket")
- return staff_bracket (h, paper_l);
- else if (str == "brace")
- {
- Real staffht = paper_l->get_var ("staffheight");
- return staff_brace (h,staffht);
- }
- Real kern = paper_l->get_var ("bar_kern");
- Real thinkern = paper_l->get_var ("bar_thinkern");
- Molecule thin = simple_bar ("thin", h, paper_l);
- Molecule thick = simple_bar ("thick", h, paper_l);
- Molecule colon = afm_find ("dots-repeatcolon", paper_l);
-
- Molecule m;
-
- if (str == "")
- {
- return fill (Box (Interval(0, 0), Interval (-h/2, h/2)));
- }
- if (str == "scorepostbreak")
- {
- return simple_bar ("score", h, paper_l);
- }
- else if (str == "|")
- {
- return thin;
- }
- else if (str == "|.")
- {
- m.add_at_edge (X_AXIS, LEFT, thick, 0);
- m.add_at_edge (X_AXIS, LEFT, thin, kern);
- }
- else if (str == ".|")
- {
- m.add_at_edge (X_AXIS, RIGHT, thick, 0);
- m.add_at_edge (X_AXIS, RIGHT, thin, kern);
- }
- else if (str == ":|")
- {
- m.add_at_edge (X_AXIS, LEFT, thick, 0);
- m.add_at_edge (X_AXIS, LEFT, thin, kern);
- m.add_at_edge (X_AXIS, LEFT, colon, kern);
- }
- else if (str == "|:")
- {
- m.add_at_edge (X_AXIS, RIGHT, thick, 0);
- m.add_at_edge (X_AXIS, RIGHT, thin, kern);
- m.add_at_edge (X_AXIS, RIGHT, colon, kern);
- }
- else if (str == ":|:")
- {
- m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
- m.add_at_edge (X_AXIS, LEFT, colon, kern);
- m.add_at_edge (X_AXIS, RIGHT, thick, kern);
- m.add_at_edge (X_AXIS, RIGHT, colon, kern);
- }
- else if (str == ".|.")
- {
- m.add_at_edge (X_AXIS, LEFT, thick, thinkern);
- m.add_at_edge (X_AXIS, RIGHT, thick, kern);
- }
- else if (str == "||")
- {
- m.add_at_edge (X_AXIS, RIGHT, thin, 0);
- m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
- }
-
- return m;
-}
Molecule
Lookup::beam (Real slope, Real width, Real thick)
Molecule
-Lookup::fill (Box b)
+Lookup::blank (Box b)
{
Molecule m;
m.dim_ = b;
-Molecule
-Lookup::staff_brace (Real y, int staff_size)
-{
- // URG
- Real step = 1.0;
- int minht = 2 * staff_size;
- int maxht = 7 * minht;
- int idx = int (((maxht - step) <? y - minht) / step);
- idx = idx >? 0;
-
- SCM l = ly_eval_str ("(style-to-cmr \"brace\")");
- String nm = "feta-braces";
- if (l != SCM_BOOL_F)
- nm = ly_scm2string (gh_cdr (l));
- nm += to_str (staff_size);
- SCM e =gh_list (ly_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
- SCM at = (e);
-
- at = fontify_atom (all_fonts_global_p->find_font (nm), at);
-
- Box b ( Interval (-y/2,y/2),
- Interval (0,0));
- return Molecule(b, at);
-}
-
-
/*
Make a smooth curve along the points
*/
return Molecule (b, at);
}
-Molecule
-Lookup::staff_bracket (Real height, Paper_def* paper_l)
-{
- SCM at = ( gh_list (ly_symbol2scm ("bracket"),
- gh_double2scm (paper_l->get_var("bracket_arch_angle")),
- gh_double2scm (paper_l->get_var("bracket_arch_width")),
- gh_double2scm (paper_l->get_var("bracket_arch_height")),
- gh_double2scm (paper_l->get_var("bracket_width")),
- gh_double2scm (height),
- gh_double2scm (paper_l->get_var("bracket_arch_thick")),
- gh_double2scm (paper_l->get_var("bracket_thick")),
- SCM_UNDEFINED));
-
- Real staff_space = paper_l->get_var ("interline");
- Box b (Interval (0, 1.5 * staff_space), Interval (-height/2,height/2));
- Molecule mol (b, at);
-
- mol.translate_axis (- mol.dim_[X_AXIS].length () / 2, X_AXIS);
- return mol;
-}
-
-
Molecule
Lookup::accordion (SCM s, Real staff_space) const
{
}
void
-Lyric_engraver::do_process_requests()
+Lyric_engraver::do_process_music()
{
if (req_l_)
{
}
void
-Lyric_performer::do_process_requests ()
+Lyric_performer::do_process_music ()
{
if (lreq_arr_.size () && lreq_arr_[0]->text_str_.length_i ())
{
VIRTUAL_COPY_CONS(Translator);
protected:
virtual bool do_try_music (Music *req_l);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_post_move_processing ();
private:
Mark_req * mark_req_l_;
}
void
-Mark_engraver::do_process_requests ()
+Mark_engraver::do_process_music ()
{
if (mark_req_l_)
{
}
}
-void
-Molecule::print () const
-{
-#ifndef NPRINT
- gh_display (expr_);
-#endif
-}
void
Molecule::align_to (Axis a, Direction d)
protected:
virtual void acknowledge_element (Score_element_info i);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual bool do_try_music (Music*);
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
void
-Multi_measure_rest_engraver::do_process_requests ()
+Multi_measure_rest_engraver::do_process_music ()
{
if (new_req_l_ && stop_req_l_)
stop_req_l_ = 0;
}
void
-Multi_measure_rest::do_post_processing ()
+Multi_measure_rest::after_line_breaking ()
{
if (!gh_pair_p (get_elt_property ("columns")))
set_elt_property ("transparent", SCM_BOOL_T);
*/
void
-Note_column::do_post_processing ()
+Note_column::after_line_breaking ()
{
if (!stem_l () || !rest_b ())
return;
void
-Note_head::do_pre_processing ()
+Note_head::before_line_breaking ()
{
// 8 ball looks the same as 4 ball:
String type;
}
void
-Note_heads_engraver::do_process_requests()
+Note_heads_engraver::do_process_music()
{
if (note_p_arr_.size ())
return ;
Link_array<Note_req> req_l_arr_;
Link_array<Text_item> texts_;
virtual bool do_try_music (Music*m);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_pre_move_processing ();
};
void
-Note_name_engraver::do_process_requests ()
+Note_name_engraver::do_process_music ()
{
String s ;
for (int i=0; i < req_l_arr_.size (); i++)
}
void
-Note_performer::do_process_requests ()
+Note_performer::do_process_music ()
{
if (note_req_l_arr_.size ())
{
{
SCM errport = scm_current_error_port ();
warning (_("Wrong type for property"));
-
- scm_puts ("type predicate: ", errport);
+ scm_display (prop_sym, errport);
+ scm_puts (", type predicate: ", errport);
scm_display (type_p, errport);
scm_puts (", value found: ", errport);
scm_display (val, errport);
}
void
-Repeat_engraver::do_process_requests ()
+Repeat_engraver::do_process_music ()
{
if (repeated_music_l_ && !done_this_one_b_)
{
}
void
-Rest_collision::do_pre_processing()
+Rest_collision::before_line_breaking ()
{
Link_array<Note_column> rest_l_arr =
Group_interface__extract_elements (this, (Note_column*) 0, "rests");
}
void
-Rest_engraver::do_process_requests ()
+Rest_engraver::do_process_music ()
{
if (rest_req_l_ && !rest_p_)
{
void
-Rest::do_post_processing ()
+Rest::after_line_breaking ()
{
if (balltype_i () == 0)
{
}
void
-Rhythmic_head::do_post_processing ()
+Rhythmic_head::after_line_breaking ()
{
if (Dots *d = dots_l ())
{
#include "scm-hash.hh"
#include "hash-table-iter.hh"
+
+#ifdef usestl
+
+
+Scheme_hash_table::Scheme_hash_table ()
+{
+ self_scm_ = SCM_EOL;
+ smobify_self ();
+}
+
+void
+Scheme_hash_table::operator =(Scheme_hash_table const & src)
+{
+ Scm_stl_map::operator = (src);
+
+ // we do not copy the self_scm_ field!
+}
+
+void
+Scheme_hash_table::do_smobify_self ()
+{
+}
+
+
+SCM
+Scheme_hash_table::mark_smob (SCM s)
+{
+ /*
+ can't typecheck naively, since GC bit lives in CAR of S
+ */
+
+ Scheme_hash_table *me = SMOB_TO_TYPE(Scheme_hash_table,s);
+
+ for (Scm_stl_map::const_iterator i= me->begin (); i != me->end(); i++)
+ {
+ scm_gc_mark ((*i).first);
+ scm_gc_mark ((*i).second);
+ }
+ return SCM_EOL;
+}
+
+
+Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
+ : Scm_stl_map (src)
+{
+ self_scm_ = SCM_EOL;
+ smobify_self ();
+}
+
+int
+Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state*)
+{
+ assert (SMOB_IS_TYPE_B (Scheme_hash_table, s));
+ char str[1000];
+ sprintf (str, "#<Scheme_hash_table 0x%0x ", s);
+ scm_puts (str, p);
+ Scheme_hash_table *me = SMOB_TO_TYPE(Scheme_hash_table,s);
+ for (Scm_stl_map ::const_iterator i = me->begin (); i != me->end(); i++)
+ {
+ scm_display ((*i).first, p);
+ scm_puts (" = ",p);
+ scm_display ((*i).second, p);
+ scm_puts ("\n",p);
+ }
+ scm_puts ("> ",p);
+ return 1;
+}
+
+bool
+Scheme_hash_table::try_retrieve (SCM k, SCM *v)
+{
+ Scm_stl_map ::const_iterator i (find (k));
+ bool found = i != end ();
+ if (found)
+ *v = (*i).second;
+ return found;
+}
+
+bool
+Scheme_hash_table::elem_b (SCM k) const
+{
+ Scm_stl_map::const_iterator i (find (k));
+ return i != end ();
+}
+
+void
+Scheme_hash_table::set (SCM k, SCM v)
+{
+ (*this)[k] = v;
+ scm_unprotect_object (v);
+}
+
+// UGH.
+SCM
+Scheme_hash_table::get (SCM k)const
+{
+ return (*(Scheme_hash_table*)this)[k];
+}
+
+
+Scheme_hash_table::~Scheme_hash_table( )
+{
+ unsmobify_self ();
+}
+
+SCM
+Scheme_hash_table::to_alist () const
+{
+ SCM l = SCM_EOL;
+ for (Scm_stl_map ::const_iterator i = begin (); i != end(); i++)
+ l = gh_cons (gh_cons ((*i).first, (*i).second), l);
+ return l;
+}
+
+
+#include "ly-smobs.icc"
+IMPLEMENT_UNSMOB(Scheme_hash_table,scheme_hash);
+IMPLEMENT_SMOBS(Scheme_hash_table);
+
+#else
Scheme_hash_table::Scheme_hash_table ()
{
hash_func_ = ly_scm_hash;
#include "ly-smobs.icc"
IMPLEMENT_UNSMOB(Scheme_hash_table,scheme_hash);
IMPLEMENT_SMOBS(Scheme_hash_table);
+#endif
}
void
-Score_element::do_post_processing()
+Score_element::after_line_breaking ()
{
}
}
void
-Score_element::do_pre_processing()
+Score_element::before_line_breaking ()
{
}
}
else
{
- Interval emp;
- emp.set_empty ();
- return lookup_l ()->fill (Box (emp,emp));
+ Molecule m ;
+ m.set_empty (true);
+ return m;
}
}
for (int a = X_AXIS; a < NO_AXES; a ++)
{
Axis ax = (Axis)a;
- Score_element * par = parent_l (ax);
+ Score_element * parent = parent_l (ax);
- if (!par)
+ if (!parent)
continue;
- if (par->line_l () != line_l ())
+ if (parent->line_l () != line_l ())
{
- Score_element * newpar = par->find_broken_piece (line_l ());
- set_parent (newpar, ax);
+ Score_element * newparent = parent->find_broken_piece (line_l ());
+ set_parent (newparent, ax);
}
if (Item * i = dynamic_cast<Item*> (this))
{
- Item *pari = dynamic_cast<Item*> (par);
+ Item *parenti = dynamic_cast<Item*> (parent);
- if (pari && i)
+ if (parenti && i)
{
Direction my_dir = i->break_status_dir () ;
- if (my_dir!= pari->break_status_dir())
+ if (my_dir!= parenti->break_status_dir())
{
- Item *newpar = pari->find_broken_piece (my_dir);
- set_parent (newpar, ax);
+ Item *newparent = parenti->find_broken_piece (my_dir);
+ set_parent (newparent, ax);
}
}
}
}
void
-Script_column::do_pre_processing ()
+Script_column::before_line_breaking ()
{
Drul_array<Link_array<Item> > arrs;
Link_array<Item> staff_sided
Script_engraver();
protected:
virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
virtual void acknowledge_element (Score_element_info);
}
void
-Script_engraver::do_process_requests()
+Script_engraver::do_process_music()
{
for (int i=0; i < script_req_l_arr_.size(); i++)
{
void
-Script::do_pre_processing ()
+Script::before_line_breaking ()
{
/*
center my self on the note head.
}
void
-Script::do_post_processing ()
+Script::after_line_breaking ()
{
Side_position_interface i (this);
Direction d = i.get_direction ();
}
void
-Slur_engraver::do_process_requests()
+Slur_engraver::do_process_music()
{
Array<Slur*> start_slur_l_arr_;
for (int i=0; i< new_slur_req_l_arr_.size(); i++)
}
void
-Slur::do_post_processing ()
+Slur::after_line_breaking ()
{
set_extremities ();
set_control_points ();
{
Span_bar* s= dynamic_cast<Span_bar*> (c->element_l ());
String gl = ly_scm2string (s->get_elt_property ("glyph"));
-
- Molecule m = s->lookup_l ()->bar (gl, 40 PT, s->paper_l ());
+
+ /*urg.
+ */
+ Molecule m = s->compound_barline (gl, 40 PT);
return m.extent (X_AXIS);
}
void
-Span_bar::do_pre_processing ()
+Span_bar::before_line_breaking ()
{
- Bar::do_pre_processing ();
+ Bar::before_line_breaking ();
evaluate_empty ();
}
void
-Span_bar::do_post_processing ()
+Span_bar::after_line_breaking ()
{
- Bar::do_post_processing ();
+ Bar::after_line_breaking ();
Interval i(get_spanned_interval ());
translate_axis (i.center (), Y_AXIS);
type_str= ".|.";
}
}
+
+ /*
+ uhh. should do something with type_str ?!!
+ */
}
Interval
y_int.unite (y + iv);
}
}
+
return y_int;
}
return s->get_spanned_interval ();
}
-Molecule
-Span_bar::do_brew_molecule () const
+Real
+Span_bar::get_bar_size () const
{
- Interval iv (get_spanned_interval ());
- Molecule output;
- SCM s = get_elt_property ("glyph");
- if (gh_string_p (s) && !iv.empty_b())
- {
- output.add_molecule (lookup_l ()->bar (ly_scm2string (s),
- iv.length (),
- paper_l ()));
- }
- else
- {
- programming_error("Huh? My children deflated (FIXME)");
- }
- return output;
+ Interval iv (get_spanned_interval ());
+ if (iv.empty_b ())
+ {
+ programming_error("Huh? My children deflated (FIXME)");
+ iv = Interval (0,0);
+ }
+ return iv.length ();
}
-
-
Span_bar::Span_bar ()
{
+ group (this).set_interface ();
dim_cache_[X_AXIS]->set_callback (width_callback);
dim_cache_[Y_AXIS]->set_callback (height_callback);
}
}
void
-Staff_performer::do_process_requests ()
+Staff_performer::do_process_music ()
{
String str = new_instrument_str ();
if (str.length_i ())
instrument_p_ = new Audio_instrument (str);
announce_element (Audio_element_info (instrument_p_, 0));
}
- Performer_group_performer::do_process_requests ();
+ Performer_group_performer::do_process_music ();
}
void
}
void
-Stem::do_pre_processing ()
+Stem::before_line_breaking ()
{
stem_end_position (); // ugh. Trigger direction calc.
position_noteheads ();
void
Super_element::pre_processing ()
{
- calculate_dependencies (PRECALCED, PRECALCING, &Score_element::do_pre_processing);
+ calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking);
}
void
// calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents);
}
-void
-Super_element::break_processing ()
-{
- calculate_dependencies (BROKEN, BROKEN, &Score_element::do_break_processing);
-}
void
Super_element::post_processing ()
{
// calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND,
// &Score_element::handle_broken_dependents);
- calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::do_post_processing);
+ calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking);
}
void
}
void
-Tempo_performer::do_process_requests ()
+Tempo_performer::do_process_music ()
{
if (tempo_req_l_)
{
virtual bool do_try_music (Music* m);
virtual void do_pre_move_processing ();
virtual void do_post_move_processing ();
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void acknowledge_element (Score_element_info);
};
}
void
-Text_engraver::do_process_requests ()
+Text_engraver::do_process_music ()
{
for (int i=0; i < reqs_.size (); i++)
{
}
void
-Tie_column::do_post_processing ()
+Tie_column::after_line_breaking ()
{
set_directions ();
}
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Score_element_info);
virtual bool do_try_music (Music*);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void process_acknowledged ();
public:
}
void
-Tie_engraver::do_process_requests ()
+Tie_engraver::do_process_music ()
{
if (req_l_)
{
}
void
-Tie_performer::do_process_requests ()
+Tie_performer::do_process_music ()
{
if (req_l_)
{
}
void
-Tie::do_post_processing()
+Tie::after_line_breaking ()
{
if (!head (LEFT) && !head (RIGHT))
{
}
void
-Time_signature_engraver::do_process_requests()
+Time_signature_engraver::do_process_music()
{
Translator * result =
daddy_grav_l()->get_simple_translator ("Timing_engraver"); // ugh
}
void
-Time_signature_performer::do_process_requests ()
+Time_signature_performer::do_process_music ()
{
if (time_signature_req_l_)
{
}
void
-Timing_translator::do_process_requests()
+Timing_translator::do_process_music()
{
for (int i=0; i < timing_req_l_arr_.size (); i++)
{
}
void
-Translator_group::do_process_requests ()
+Translator_group::do_process_music ()
{
each (&Translator::process_requests);
}
return;
status = PROCESSED_REQS;
- do_process_requests ();
+ do_process_music ();
}
void
void
Translator::do_post_move_processing(){}
void
-Translator::do_process_requests () {}
+Translator::do_process_music () {}
void
Translator::do_creation_processing() {}
void
virtual void do_removal_processing ();
virtual void acknowledge_element (Score_element_info);
virtual bool do_try_music (Music*r);
- virtual void do_process_requests ();
+ virtual void do_process_music ();
virtual void do_post_move_processing ();
};
}
void
-Tuplet_engraver::do_process_requests ()
+Tuplet_engraver::do_process_music ()
{
SCM v = get_property ("tupletInvisible");
if (to_boolean (v))
}
void
-Tuplet_spanner::do_post_processing ()
+Tuplet_spanner::after_line_breaking ()
{
Link_array<Note_column> column_arr=
Group_interface__extract_elements (this, (Note_column*)0, "columns");
}
void
-Volta_spanner::do_post_processing ()
+Volta_spanner::after_line_breaking ()
{
Link_array<Bar> bar_arr
= Group_interface__extract_elements (this, (Bar*)0, "bars");
}
normalkey = {
- \property Staff.keyOctaviation = 1
+ \property Staff.keyOctaviation = ##f
}
specialkey = {
- \property Staff.keyOctaviation = 0
+ \property Staff.keyOctaviation = ##t
}
% End the incipit and print a ``normal line start''.
Begin3
Title: LilyPond
-Version: 1.3.32
-Entered-date: 13MAR00
+Version: 1.3.33
+Entered-date: 14MAR00
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.32.tar.gz
+ 1000k lilypond-1.3.33.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.32.tar.gz
+ 1000k lilypond-1.3.33.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.32
+Version: 1.3.33
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.32.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.33.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# get Packager from (undocumented?) ~/.rpmmacros!
$(MAKE) -C $(depth)/mf
+
+htmldoc:
+ $(MAKE) CONFIGSUFFIX='www' local-WWW
+ $(MAKE) CONFIGSUFFIX='www' -C Documentation WWW
+ rm -f `find . -name \*.html~ -print`
+ $(footify-all-command)
+ find `find Documentation -type d -name 'out-www'` -not -name '*dvi' -not -name '*ly' -not -name '*tex' -not -name '*.ps' -not -name 'out-www' > wwwlist
+ tar cfz $(outdir)/htmldoc.tar.gz `cat wwwlist` `ls *.png $(ERRORLOG)` index.html
+
examples:
$(MAKE) CONFIGSUFFIX='www' -C input WWW
$(MAKE) CONFIGSUFFIX='www' -C mutopia WWW
; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+;
+; This file contains various routines in Scheme that are easier to
+; do here than in C++. At present it is a unorganised mess. Sorry.
+;
+;
+
+
+
;(debug-enable 'backtrace)
;;; library funtions
)
)
-(define (glue-2-strings a b)
- (string-append a " " b))
(define (numbers->string l)
- (reduce glue-2-strings (map number->string l)))
+ (apply string-append (map ly-number->string l)))
-(define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
+; (define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
(define (number->octal-string x)
(let* ((n (inexact->exact x))
(number->string n radix)))
-(define
- (control->string c)
- (string-append
- (string-append (number->string (car c)) " ")
- (string-append (number->string (cdr c)) " ")))
+(define (control->string c)
+ (string-append (number->string (car c)) " "
+ (number->string (cdr c)) " "))
(define (font i)
(not (not (memq name (ly-get-elt-property elt 'interfaces))))))
-
-
-
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;; generic output
-
-(define (translate-molecule offset)
- "")
-
-
;;;;;;;;;;;;;;;;;;; TeX output
(define (tex-scm action-name)
(define (unknown)
(define (decrescendo thick w h cont)
(embedded-ps ((ps-scm 'decrescendo) thick w h cont)))
- ;This sets CTM so that you get to the currentpoint
- ; by executing a 0 0 moveto
-
-
-
-
(define (font-load-command name-mag command)
(string-append
"\\font\\" command "="
(number->string (magstep (cdr name-mag)))
"\n"))
-
(define (embedded-ps s)
(string-append "\\embeddedps{" s "}"))
(define (number->dim x)
(string-append
- (number->string (chop-decimal x)) " pt "))
+ (ly-number->string x) " pt "))
(define (placebox x y s)
(string-append
;;;;;;;;;;;; PS
(define (ps-scm action-name)
-
;; alist containing fontname -> fontcommand assoc (both strings)
(define font-alist '())
(define font-count 0)
$(README_TXT_FILES): do-top-doc
-
-htmldoc:
- $(MAKE) CONFIGSUFFIX='www' local-WWW
- $(MAKE) CONFIGSUFFIX='www' -C Documentation WWW
- rm -f `find . -name \*.html~ -print`
- $(footify-all-command)
- find `find Documentation -type d -name 'out-www'` -not -name '*dvi' -not -name '*ly' -not -name '*tex' -not -name '*.ps' -not -name 'out-www'
- tar cfz $(outdir)/htmldoc.tar.gz `cat wwwlist` `ls *.png $(ERRORLOG)` index.html
-
localclean: