From: Han-Wen Nienhuys Date: Fri, 29 Oct 1999 00:20:31 +0000 (+0200) Subject: patch::: 1.3.1.hwn1 X-Git-Tag: release/1.3.2~1 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=2873636a53f0011f837aaf6e2072de602730d957;p=lilypond.git patch::: 1.3.1.hwn1 pl 1.hwn1 - changed calling convention for {get,set,remove}_elt_property() - rm'd some mutopia examples. ******* pl 0.hwn2,1 --- diff --git a/CHANGES b/CHANGES index b7f048a100..00ce1a669e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ -pl 3.hwn2,1 +pl 1.hwn1 + - changed calling convention for {get,set,remove}_elt_property() + - rm'd some mutopia examples. + +******* +pl 0.hwn2,1 - Generic properties and Property_engraver. Moved most of the properties. diff --git a/VERSION b/VERSION index 26233811a9..f9af623955 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=1 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=hwn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/flower/include/hash-table.hh b/flower/include/hash-table.hh index 781784d7fd..491feb3df7 100644 --- a/flower/include/hash-table.hh +++ b/flower/include/hash-table.hh @@ -166,6 +166,17 @@ public: fixed_p_->dict_arr_[l].key_ = s; return fixed_p_->dict_arr_[l].value_; } + bool try_retrieve (K k, V *v) + { + int l = fixed_p_->lookup (k, (*hash_func_)(k)); + if (l < 0 || fixed_p_->dict_arr_[l].free_b_) + return false; + else + { + *v = fixed_p_->dict_arr_[l].value_; + return true; + } + } V elem (K s) const { return const_elem (s); diff --git a/lily/align-element.cc b/lily/align-element.cc index 6ad778670d..9ccc1538d6 100644 --- a/lily/align-element.cc +++ b/lily/align-element.cc @@ -98,18 +98,16 @@ Align_element::do_side_processing () Score_element *e =dynamic_cast(elem_l_arr_[i]); // todo: fucks up if item both in Halign & Valign. - SCM min_dims = e->remove_elt_property (minimum_space_scm_sym); - if (min_dims != SCM_BOOL_F) + SCM min_dims = e->remove_elt_property ("minimum-space"); + if (min_dims != SCM_UNDEFINED) { - min_dims = SCM_CDR (min_dims); y.unite (Interval (gh_scm2double (SCM_CAR (min_dims)), gh_scm2double (SCM_CDR (min_dims)))); } - SCM extra_dims = e->remove_elt_property (extra_space_scm_sym); - if (extra_dims != SCM_BOOL_F) + SCM extra_dims = e->remove_elt_property ("extra-space"); + if (extra_dims != SCM_UNDEFINED) { - extra_dims = SCM_CDR (extra_dims); y[LEFT] += gh_scm2double (SCM_CAR (extra_dims)); y[RIGHT] += gh_scm2double (SCM_CDR (extra_dims)); } @@ -236,3 +234,4 @@ Align_element::get_priority (Score_element const * e) const else return elem_l_arr_.find_i (nonconst); } + diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 74967e7b66..efb3abd9bf 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -93,7 +93,7 @@ Align_note_column_engraver::process_acknowledged () */ Real extra_space = gh_scm2double(grsp); SCM e = gh_cons (gh_double2scm (-extra_space), gh_double2scm (0.0)); - now_column_l_->set_elt_property (extra_space_scm_sym, e); + now_column_l_->set_elt_property ("extra-space", e); } } @@ -112,3 +112,4 @@ Align_note_column_engraver::do_post_move_processing () } ADD_THIS_TRANSLATOR(Align_note_column_engraver); + diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index c2d30f6d50..8a22a61997 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -210,6 +210,7 @@ Auto_beam_engraver::create_beam_p () beam_p->add_stem ((*stem_l_arr_p_)[i]); } + announce_element (Score_element_info (beam_p, 0)); return beam_p; } @@ -283,7 +284,7 @@ Auto_beam_engraver::do_removal_processing () bool Auto_beam_engraver::same_grace_state_b (Score_element* e) { - bool gr = e->get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool gr = e->get_elt_property ("grace") == SCM_BOOL_T; SCM wg =get_property ("weAreGraceContext",0); return (gh_boolean_p (wg) && gh_scm2bool (wg)) == gr; } @@ -406,3 +407,4 @@ Auto_beam_engraver::process_acknowledged () } } } + diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index a0ea8abb99..c14b5186e5 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -57,7 +57,7 @@ Axis_group_element::do_print() const Axis_group_element::Axis_group_element() { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); } void @@ -134,7 +134,7 @@ Axis_group_element::add_extra_element (Score_element *e) { extra_elems_.push (se[i]); add_dependency (se[i]); - se[i]->set_elt_property (ly_symbol ("Axis_group_element::add_extra_element"), SCM_BOOL_T); // UGH GUH. + se[i]->set_elt_property (("Axis_group_element::add_extra_element"), SCM_BOOL_T); // UGH GUH. } } @@ -166,3 +166,4 @@ Axis_group_element::extent (Axis a) const return Graphical_element::extent (a); } + diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index ad7e9784bb..85d21f0f8c 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -46,13 +46,12 @@ Axis_group_engraver::acknowledge_element (Score_element_info i) void Axis_group_engraver::process_acknowledged () { + /* UGH UGH UGH */ for (int i=0; i < elts_.size (); i++) { if (!elts_[i]->parent_l (Y_AXIS)) staffline_p_->add_element (elts_[i]); - - /* UGH UGH UGH */ - else if (elts_[i]->get_elt_property (ly_symbol ("Axis_group_element::add_extra_element")) == SCM_BOOL_F + else if (elts_[i]->get_elt_property ("Axis_group_element::add_extra_element") == SCM_UNDEFINED && ! dynamic_cast (elts_[i]->parent_l (Y_AXIS))) { diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc index 246fcee710..991cf10853 100644 --- a/lily/axis-group-spanner.cc +++ b/lily/axis-group-spanner.cc @@ -133,7 +133,7 @@ Axis_group_spanner::do_break_processing() v->add_element (broken_item, a1, a2); else { - broken_item->set_elt_property (transparent_scm_sym, SCM_BOOL_T); + broken_item->set_elt_property ("transparent", SCM_BOOL_T); broken_item->set_empty (true); } @@ -169,3 +169,4 @@ Axis_group_spanner::do_width () const { return Spanner::do_width (); } + diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 92378ccbd8..e5a61176a6 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -32,7 +32,7 @@ Bar_engraver::create_bar () if (!bar_p_) { bar_p_ = new Staff_bar; - bar_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (0)); + bar_p_->set_elt_property ("break-priority", gh_int2scm (0)); // urg: "" != empty... SCM default_type = get_property ("defaultBarType", 0); @@ -47,7 +47,7 @@ Bar_engraver::create_bar () SCM prop = get_property ("barAtLineStart", 0); if (gh_boolean_p (prop) && gh_scm2bool (prop)) { - bar_p_->set_elt_property (at_line_start_scm_sym, SCM_BOOL_T); + bar_p_->set_elt_property ("at-line-start", SCM_BOOL_T); } announce_element (Score_element_info (bar_p_, 0)); } @@ -139,3 +139,4 @@ Bar_engraver::do_pre_move_processing() ADD_THIS_TRANSLATOR(Bar_engraver); + diff --git a/lily/bar-req-collect-engraver.cc b/lily/bar-req-collect-engraver.cc index 2eafaed254..e69de29bb2 100644 --- a/lily/bar-req-collect-engraver.cc +++ b/lily/bar-req-collect-engraver.cc @@ -1,11 +0,0 @@ -/* - bar-req-collect-engraver.cc -- implement Bar_req_collect_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#include "command-request.hh" - diff --git a/lily/bar-script-engraver.cc b/lily/bar-script-engraver.cc index cf73f36500..412f0390bb 100644 --- a/lily/bar-script-engraver.cc +++ b/lily/bar-script-engraver.cc @@ -61,7 +61,7 @@ Bar_script_engraver::attach_script_to_item (Item *i) How do we make sure that staff_side_p_ has a dependency from someone else? We can't use I for that, so we use some other element. */ - // staff_side_p_->set_elt_property (dangling_scm_sym, SCM_BOOL_T) + // staff_side_p_->set_elt_property ("dangling", SCM_BOOL_T) get_staff_info ().command_pcol_l ()->add_dependency (staff_side_p_); } } @@ -135,11 +135,11 @@ Bar_script_engraver::create_items (Request *rq) staff_side_p_ = new Staff_side_item; staff_side_p_->axis_ = axis_; - staff_side_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh + staff_side_p_->set_elt_property ("breakable", SCM_BOOL_T); // ugh text_p_ = new Text_item; - text_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); // ugh + text_p_->set_elt_property ("breakable", SCM_BOOL_T); // ugh SCM prop = get_property (type_ + "Direction", 0); if (isdir_b (prop)) @@ -156,20 +156,21 @@ Bar_script_engraver::create_items (Request *rq) SCM padding = get_property (type_ + "ScriptPadding", 0); if (gh_number_p(padding)) { - staff_side_p_->set_elt_property (padding_scm_sym, padding); + staff_side_p_->set_elt_property ("padding", padding); } else { staff_side_p_ - ->set_elt_property (padding_scm_sym, - gh_double2scm(paper_l ()->get_realvar (interline_scm_sym))); + ->set_elt_property ("padding", + gh_double2scm(paper_l ()->get_realvar (gh_symbol2scm("interline")))); } - staff_side_p_->set_elt_property (visibility_lambda_scm_sym, + staff_side_p_->set_elt_property ("visibility-lambda", visibility_lambda_); - text_p_->set_elt_property (visibility_lambda_scm_sym, + text_p_->set_elt_property ("visibility-lambda", visibility_lambda_); announce_element (Score_element_info (text_p_, rq)); announce_element (Score_element_info (staff_side_p_, rq)); } + diff --git a/lily/bar.cc b/lily/bar.cc index f21d68fbac..f2d3d187ea 100644 --- a/lily/bar.cc +++ b/lily/bar.cc @@ -17,7 +17,7 @@ Bar::Bar () { - set_elt_property (breakable_scm_sym, SCM_BOOL_T); + set_elt_property ("breakable", SCM_BOOL_T); type_str_ = "|"; } @@ -76,7 +76,7 @@ Bar::do_pre_processing () break; } } - if (remove_elt_property (at_line_start_scm_sym) != SCM_BOOL_F // UGR. + if (remove_elt_property ("at-line-start") == SCM_BOOL_T // UGR. && (break_status_dir () == RIGHT) && (type_str_ == "")) { type_str_ = "|"; @@ -86,3 +86,4 @@ Bar::do_pre_processing () set_empty (true, X_AXIS); } + diff --git a/lily/base-span-bar-engraver.cc b/lily/base-span-bar-engraver.cc index 1ffc9be842..53800c6681 100644 --- a/lily/base-span-bar-engraver.cc +++ b/lily/base-span-bar-engraver.cc @@ -54,12 +54,12 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i) spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS); String visnam = String(name()) + "_visibility"; - spanbar_p_->set_elt_property (visibility_lambda_scm_sym, + spanbar_p_->set_elt_property ("visibility-lambda", ly_ch_C_eval_scm (visnam.ch_C())); if (use_priority_b_) { - spanbar_p_->set_elt_property (break_priority_scm_sym, + spanbar_p_->set_elt_property ("break-priority", gh_int2scm (break_priority_i_)); } else @@ -90,3 +90,4 @@ Base_span_bar_engraver::do_pre_move_processing() ADD_THIS_TRANSLATOR(Base_span_bar_engraver); + diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 99a7c00d28..8f0f52cf1c 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -156,7 +156,7 @@ Beam_engraver::acknowledge_element (Score_element_info info) return; - bool stem_grace = stem_l->get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool stem_grace = stem_l->get_elt_property ("grace") == SCM_BOOL_T; SCM wg =get_property ("weAreGraceContext",0); bool wgb= gh_boolean_p (wg) && gh_scm2bool (wg); @@ -193,3 +193,4 @@ Beam_engraver::acknowledge_element (Score_element_info info) ADD_THIS_TRANSLATOR(Beam_engraver); + diff --git a/lily/beam.cc b/lily/beam.cc index 69de929231..7b997ff5e2 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -129,9 +129,9 @@ Beam::auto_knee (SCM gap, bool interstaff_b) bool knee = false; int knee_y = 0; Real internote_f = stems_[0]->staff_line_leading_f ()/2; - if (gap != SCM_BOOL_F) + if (gap != SCM_UNDEFINED) { - int auto_gap_i = gh_scm2int (SCM_CDR (gap)); + int auto_gap_i = gh_scm2int (gap); for (int i=1; i < stems_.size (); i++) { bool is_b = (bool)(sinfo_[i].interstaff_f_ - sinfo_[i-1].interstaff_f_); @@ -160,7 +160,7 @@ Beam::auto_knee (SCM gap, bool interstaff_b) int y = (int)(stems_[i]->chord_start_f () / internote_f) + (int)sinfo_[i].interstaff_f_; stems_[i]->dir_ = y < knee_y ? UP : DOWN; - stems_[i]->set_elt_property (dir_forced_scm_sym, SCM_BOOL_T); + stems_[i]->set_elt_property ("dir-forced", SCM_BOOL_T); } } return knee; @@ -169,10 +169,10 @@ Beam::auto_knee (SCM gap, bool interstaff_b) bool Beam::auto_knees () { - if (auto_knee (get_elt_property (auto_interstaff_knee_gap_scm_sym), true)) + if (auto_knee (get_elt_property ("auto-interstaff-knee-gap"), true)) return true; - return auto_knee (get_elt_property (auto_knee_gap_scm_sym), false); + return auto_knee (get_elt_property ("auto-knee-gap"), false); } @@ -204,7 +204,7 @@ Beam::do_post_processing () if (stems_.size () < 2) { warning (_ ("beam with less than two stems")); - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); return; } set_steminfo (); @@ -219,7 +219,7 @@ Beam::do_post_processing () /* auto-knees used to only work for slope = 0 anyway, should be able to set slope per beam - set_elt_property (damping_scm_sym, gh_int2scm(1000)); + set_elt_property ("damping", gh_int2scm(1000)); */ sinfo_.clear (); @@ -282,8 +282,7 @@ Beam::get_default_dir () const Direction beam_dir; Direction neutral_dir = (Direction)(int)paper_l ()->get_var ("stem_default_neutral_direction"); - SCM a = get_elt_property (gh_symbol2scm ("beam_dir_algorithm")); - a= gh_cdr (a); + SCM a = get_elt_property ("beam-dir-algorithm"); if (a == gh_symbol2scm ("majority")) // should get default from paper. beam_dir = (count[UP] == count[DOWN]) ? neutral_dir @@ -318,10 +317,10 @@ Beam::set_direction (Direction d) for (int i=0; i set_elt_property (beam_dir_scm_sym, gh_int2scm (d)); + s->set_elt_property ("beam-dir", gh_int2scm (d)); - SCM force = s->remove_elt_property (dir_forced_scm_sym); - if (force == SCM_BOOL_F) + SCM force = s->remove_elt_property ("dir-forced"); + if (force == SCM_UNDEFINED) s->dir_ = d; } } @@ -352,7 +351,7 @@ Beam::check_stemlengths_f (bool set_b) { Real interbeam_f = paper_l ()->interbeam_f (multiple_i_); - Real beam_f = paper_l ()->get_realvar (beam_thickness_scm_sym);; + Real beam_f = paper_l ()->get_var ("beam_thickness");; Real staffline_f = paper_l ()-> get_var ("stafflinethickness"); Real epsilon_f = staffline_f / 8; Real dy_f = 0.0; @@ -411,7 +410,7 @@ Beam::set_steminfo () total_count_i++; } - bool grace_b = get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool grace_b = get_elt_property ("grace") == SCM_BOOL_T; String type_str = grace_b ? "grace_" : ""; int stem_max = (int)rint(paper_l ()->get_var ("stem_max")); Real shorten_f = paper_l ()->get_var (type_str + "forced_stem_shorten" @@ -484,10 +483,10 @@ Beam::calculate_slope () damped = tanh (slope_f_) corresponds with some tables in [Wanske] */ - SCM damp = remove_elt_property (damping_scm_sym); + SCM damp = remove_elt_property ("damping"); int damping = 1; // ugh. - if (damp!= SCM_BOOL_F) - damping = gh_int2scm (SCM_CDR(damp)); + if (damp!= SCM_UNDEFINED) + damping = gh_int2scm (damp); if (damping) slope_f_ = 0.6 * tanh (slope_f_) / damping; @@ -514,8 +513,7 @@ Beam::quantise_dy () + n * interline */ - SCM q = get_elt_property (gh_symbol2scm ("slope_quantisation")); - q = gh_cdr (q); + SCM q = get_elt_property ("slope-quantisation"); if (q == gh_symbol2scm ("none")) return; @@ -523,7 +521,7 @@ Beam::quantise_dy () Real interline_f = stems_[0]->staff_line_leading_f (); Real internote_f = interline_f / 2; Real staffline_f = paper_l ()->get_var ("stafflinethickness"); - Real beam_f = paper_l ()->get_realvar (beam_thickness_scm_sym);; + Real beam_f = paper_l ()->get_var ("beam_thickness");; Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); @@ -559,8 +557,8 @@ Beam::quantise_left_y (bool extend_b) we only need to quantise the start of the beam as dy is quantised too if extend_b then stems must *not* get shorter */ - SCM q = get_elt_property (gh_symbol2scm ("slope_quantisation")); - q = gh_cdr (q); + SCM q = get_elt_property ("slope-quantisation"); + /* ---------------------------------------------------------- @@ -576,7 +574,7 @@ Beam::quantise_left_y (bool extend_b) Real space = stems_[0]->staff_line_leading_f (); Real internote_f = space /2; Real staffline_f = paper_l ()->get_var ("stafflinethickness"); - Real beam_f = paper_l ()->get_realvar (beam_thickness_scm_sym);; + Real beam_f = paper_l ()->get_var ("beam_thickness");; /* [TODO] @@ -709,7 +707,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const Real interbeam_f = paper_l ()->interbeam_f (multiple_i_); Real internote_f = here->staff_line_leading_f ()/2; - Real beam_f = paper_l ()->get_realvar (beam_thickness_scm_sym);; + Real beam_f = paper_l ()->get_var ("beam_thickness");; Real dy = interbeam_f; Real stemdx = staffline_f; @@ -763,10 +761,10 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const int j = 0; Real gap_f = 0; - SCM gap = get_elt_property (beam_gap_scm_sym); - if (gap != SCM_BOOL_F) + SCM gap = get_elt_property ("beam-gap"); + if (gap != SCM_UNDEFINED) { - int gap_i = gh_scm2int (SCM_CDR (gap)); + int gap_i = gh_scm2int ( (gap)); int nogap = rwholebeams - gap_i; for (; j < nogap; j++) @@ -812,3 +810,4 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const return leftbeams; } + diff --git a/lily/bezier.cc b/lily/bezier.cc index 9acb9004e9..3bc35d2da4 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -172,7 +172,7 @@ Bezier_bow::blow_fit () return; #ifndef STANDALONE - Real internote_f = paper_l_->get_realvar (interline_scm_sym)/2.0; + Real internote_f = paper_l_->get_var ("interline")/2.0; #else Real internote_f = STAFFHEIGHT / 8; #endif @@ -219,7 +219,7 @@ Bezier_bow::calc_bezier () Real s = sqrt (control_[3][X_AXIS] * control_[3][X_AXIS] + control_[1][Y_AXIS] * control_[2][Y_AXIS]); #ifndef STANDALONE - Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0; + Real internote = paper_l_->get_var ("interline")/2.0; #else Real internote = STAFFHEIGHT / 8; #endif @@ -476,7 +476,7 @@ Bezier_bow::calc_tangent_controls () // emperic computer science: // * tangents somewhat steeper than minimal line #ifndef STANDALONE - Real internote = paper_l_->get_realvar (interline_scm_sym)/2.0; + Real internote = paper_l_->get_var ("interline")/2.0; Real rc_correct = paper_l_->get_var ("slur_rc_factor"); #else Real internote = STAFFHEIGHT / 8; @@ -635,3 +635,4 @@ Bezier_bow::calc_default (Real h) Bezier::set (control); } + diff --git a/lily/bow.cc b/lily/bow.cc index f3c4e59eeb..a3214f281e 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -29,11 +29,11 @@ Bow::do_brew_molecule_p () const Molecule a; - SCM d = get_elt_property (dashed_scm_sym); - if (d == SCM_BOOL_F) + SCM d = get_elt_property ("dashed"); + if (d == SCM_UNDEFINED) a = lookup_l ()->slur (c, thick); else - a = lookup_l ()->dashed_slur (c, thick, gh_scm2int (SCM_CDR(d))); + a = lookup_l ()->dashed_slur (c, thick, gh_scm2int (d)); return new Molecule (a); } @@ -98,3 +98,4 @@ Bow::get_encompass_offset_arr () const return offset_arr; } + diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 32e573a68c..172eb85253 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -32,7 +32,7 @@ Break_align_item::do_pre_processing() flip (&align_dir_); sort_elements (); - Real interline= paper_l ()->get_realvar (interline_scm_sym); + Real interline= paper_l ()->get_var ("interline"); Link_array elems; for (int i=0; i < elem_l_arr_.size(); i++) @@ -58,11 +58,11 @@ Break_align_item::do_pre_processing() if (next_elt) { - next_origin = next_elt->get_elt_property (origin_scm_sym); + next_origin = next_elt->get_elt_property ("origin"); next_origin = - (next_origin == SCM_BOOL_F) + (next_origin == SCM_UNDEFINED) ? ly_ch_C_to_scm ("") - : SCM_CDR (next_origin); + : next_origin; } else next_origin = ly_ch_C_to_scm ("begin-of-note"); @@ -84,7 +84,8 @@ Break_align_item::do_pre_processing() symbol_list = SCM_CDR (scm_reverse (symbol_list)); for (int i=0; i set_elt_property (SCM_CAR (symbol_list), + String sym_str = ly_scm2string (SCM_CAR (symbol_list)); + elems[i]->set_elt_property (sym_str, scm_cons (gh_double2scm (0), gh_double2scm (dists[i+1]))); @@ -93,14 +94,14 @@ Break_align_item::do_pre_processing() // urg - SCM first_pair = elems[0]->get_elt_property (minimum_space_scm_sym); - if (first_pair == SCM_BOOL_F) + SCM first_pair = elems[0]->get_elt_property ("minimum-space"); + if (first_pair == SCM_UNDEFINED) first_pair = gh_cons (gh_double2scm (0.0), gh_double2scm (0.0)); else - first_pair = SCM_CDR (first_pair); + first_pair = first_pair; scm_set_car_x (first_pair, gh_double2scm (-dists[0])); - elems[0]->set_elt_property (minimum_space_scm_sym, first_pair); + elems[0]->set_elt_property ("minimum-space", first_pair); Axis_align_item::do_pre_processing(); @@ -112,12 +113,12 @@ Break_align_item::do_pre_processing() Real stretch_distance =0.; - if (SCM_CAR (symbol_list) == extra_space_scm_sym) + if (SCM_CAR (symbol_list) == gh_symbol2scm ("extra-space")) { spring_len += dists.top (); stretch_distance = dists.top (); } - else if (SCM_CAR (symbol_list) == minimum_space_scm_sym) + else if (SCM_CAR (symbol_list) == gh_symbol2scm ("minimum-space")) { spring_len = spring_len >? dists.top (); stretch_distance = spring_len; @@ -129,11 +130,11 @@ Break_align_item::do_pre_processing() The pairs are in the format of an interval (ie. CAR < CDR). */ - column_l ()->set_elt_property (extra_space_scm_sym, + column_l ()->set_elt_property ("extra-space", scm_cons (gh_double2scm (pre_space), gh_double2scm (spring_len))); - column_l ()->set_elt_property (stretch_distance_scm_sym, + column_l ()->set_elt_property ("stretch-distance", gh_cons (gh_double2scm (-dists[0]), gh_double2scm (stretch_distance))); @@ -148,12 +149,12 @@ Break_align_item::Break_align_item () void Break_align_item::add_breakable_item (Item *it) { - SCM pr = it->remove_elt_property (break_priority_scm_sym); + SCM pr = it->remove_elt_property ("break-priority"); - if (pr == SCM_BOOL_F) + if (pr == SCM_UNDEFINED) return; - int priority = gh_scm2int (SCM_CDR (pr)); + int priority = gh_scm2int (pr); Score_element * column_l = get_elt_by_priority (priority); Axis_group_item * hg=0; @@ -171,7 +172,7 @@ Break_align_item::add_breakable_item (Item *it) warning bells about missing Y refpoints go off later on. */ hg->set_parent (this, Y_AXIS); - hg->set_elt_property (ly_symbol ("origin"), ly_ch_C_to_scm (it->name ())); + hg->set_elt_property ("origin", ly_ch_C_to_scm (it->name ())); pscore_l_->typeset_element (hg); add_element_priority (hg, priority); @@ -182,3 +183,4 @@ Break_align_item::add_breakable_item (Item *it) hg->add_element (it); } + diff --git a/lily/breathing-sign.cc b/lily/breathing-sign.cc index 923eeeab1e..7c8e44b4e5 100644 --- a/lily/breathing-sign.cc +++ b/lily/breathing-sign.cc @@ -22,8 +22,8 @@ TODO: --> see breathing-sign-engraver.cc Breathing_sign::Breathing_sign () { dir_ = UP; - set_elt_property (breakable_scm_sym, SCM_BOOL_T); - set_elt_property (visibility_lambda_scm_sym, + set_elt_property ("breakable", SCM_BOOL_T); + set_elt_property ("visibility-lambda", ly_ch_C_eval_scm ("non_postbreak_visibility")); } @@ -55,3 +55,4 @@ Breathing_sign::do_post_processing() translate_axis(2.0 * dl * dir_, Y_AXIS); } + diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 5e63ef69fe..df8573434b 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -148,13 +148,13 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info i) if (s->type_i () != 1) { int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2); - s->set_elt_property (beam_gap_scm_sym, gh_int2scm(gap_i)); + s->set_elt_property ("beam-gap", gh_int2scm(gap_i)); } #else if (s->type_i () != 1) { int gap_i =s->flag_i_ - ((s->type_i () >? 2) - 2); - abeam_p_->set_elt_property (beam_gap_scm_sym, gh_int2scm(gap_i)); + abeam_p_->set_elt_property ("beam-gap", gh_int2scm(gap_i)); } #endif @@ -162,3 +162,4 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info i) } } } + diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 335ff0a62f..4c7eb954c6 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -129,7 +129,7 @@ Clef_engraver::acknowledge_element (Score_element_info info) bool def = !clef_p_; create_clef(); if(def) - clef_p_->set_elt_property(visibility_lambda_scm_sym, + clef_p_->set_elt_property("visibility-lambda", ly_ch_C_eval_scm ("postbreak_only_visibility")); } @@ -164,7 +164,7 @@ Clef_engraver::do_creation_processing() if (clef_type_str_.length_i ()) { create_clef(); - clef_p_->set_elt_property (non_default_scm_sym, SCM_BOOL_T); + clef_p_->set_elt_property ("non-default", SCM_BOOL_T); } } @@ -198,7 +198,7 @@ Clef_engraver::create_clef() clef_p_->y_position_i_ = clef_position_i_; if (octave_dir_) { - clef_p_->set_elt_property (octave_dir_scm_sym, gh_int2scm (octave_dir_)); + clef_p_->set_elt_property ("octave-dir", gh_int2scm (octave_dir_)); } } @@ -248,3 +248,4 @@ Clef_engraver::do_removal_processing() ADD_THIS_TRANSLATOR(Clef_engraver); + diff --git a/lily/clef-item.cc b/lily/clef-item.cc index f203d39bae..168a1e45e9 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -20,16 +20,16 @@ void Clef_item::do_pre_processing() { translate_axis (y_position_i_ * staff_line_leading_f () / 2.0, Y_AXIS); - SCM style_sym =get_elt_property (style_scm_sym); + SCM style_sym =get_elt_property ("style"); String style; - if (style_sym != SCM_BOOL_F) - style = ly_scm2string (SCM_CDR(style_sym)); + if (style_sym != SCM_UNDEFINED) + style = ly_scm2string (style_sym); if (break_status_dir() != RIGHT && style != "fullSizeChanges") symbol_ += "_change"; if (style == "transparent") { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); set_empty (true, X_AXIS); } } @@ -39,7 +39,7 @@ Clef_item::do_pre_processing() */ Clef_item::Clef_item() { - set_elt_property (breakable_scm_sym, SCM_BOOL_T); + set_elt_property ("breakable", SCM_BOOL_T); symbol_ = "treble"; y_position_i_ = -2; @@ -52,15 +52,15 @@ Clef_item::do_add_processing () { Text_item *g =0; - SCM octave_dir = remove_elt_property (octave_dir_scm_sym); - if (octave_dir != SCM_BOOL_F) + SCM octave_dir = remove_elt_property ("octave-dir"); + if (octave_dir != SCM_UNDEFINED) { - Direction d = Direction (gh_scm2int (SCM_CDR(octave_dir))); + Direction d = Direction (gh_scm2int (octave_dir)); g = new Text_item; pscore_l_->typeset_element (g); g->text_str_ = "8"; - g->set_elt_property (style_scm_sym, gh_str02scm ("italic")); + g->set_elt_property ("style", gh_str02scm ("italic")); g->set_parent (this, Y_AXIS); g->set_parent (this, X_AXIS); @@ -69,9 +69,9 @@ Clef_item::do_add_processing () Real r = do_height ()[d] - g->extent (Y_AXIS)[-d]; g->dim_cache_[Y_AXIS]->set_offset (r); - SCM my_vis = get_elt_property (visibility_lambda_scm_sym); - if (my_vis != SCM_BOOL_F) - g->set_elt_property (visibility_lambda_scm_sym, SCM_CDR (my_vis)); + SCM my_vis = get_elt_property ("visibility-lambda"); + if (my_vis != SCM_UNDEFINED) + g->set_elt_property ("visibility-lambda", my_vis); } @@ -87,3 +87,4 @@ Clef_item::do_brew_molecule_p() const + diff --git a/lily/collision.cc b/lily/collision.cc index c8e97cc998..0c08134b88 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -10,7 +10,7 @@ #include "note-column.hh" #include "note-head.hh" #include "paper-def.hh" -#include "ly-symbols.hh" + #include "tuple.hh" Collision::Collision() @@ -80,12 +80,12 @@ Collision::automatic_shift () for (int i=0; i < clashes.size (); i++) { SCM sh - = clashes[i]->remove_elt_property (horizontal_shift_scm_sym); + = clashes[i]->remove_elt_property ("horizontal-shift"); - if (sh == SCM_BOOL_F) - shift.push (0); + if (gh_number_p (sh)) + shift.push (gh_scm2int (sh)); else - shift.push (gh_scm2int (SCM_CDR (sh))); + shift.push (0); } for (int i=1; i < shift.size (); i++) @@ -178,12 +178,10 @@ Collision::forced_shift () for (int i=0; i < clash_l_arr_.size (); i++) { - SCM force = clash_l_arr_[i]->remove_elt_property (force_hshift_scm_sym); - if (force != SCM_BOOL_F) + SCM force = clash_l_arr_[i]->remove_elt_property ("force-hshift"); + if (force != SCM_UNDEFINED) { - force = SCM_CDR (force); - tups. push (Shift_tup (clash_l_arr_[i], - gh_scm2double (force))); + tups. push (Shift_tup (clash_l_arr_[i], gh_scm2double (force))); } } return tups; @@ -200,3 +198,4 @@ Collision::do_substitute_element_pointer (Score_element*o_l,Score_element*n_l) } } + diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 01f2ba5a77..c570a2b153 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -27,7 +27,7 @@ Molecule Crescendo::get_symbol () const { Real w_dim = extent (X_AXIS).length () - get_broken_left_end_align (); - Real absdyn_dim = paper_l ()-> get_realvar (ly_symbol ("crescendo_shorten")); + Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten"); if (dyn_b_drul_[LEFT]) { w_dim -= absdyn_dim; @@ -62,7 +62,7 @@ Molecule* Crescendo::do_brew_molecule_p () const { Molecule* m_p =0; - Real absdyn_dim = paper_l ()-> get_realvar (ly_symbol ("crescendo_shorten")); + Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten"); Real x_off_dim = get_broken_left_end_align (); if (dyn_b_drul_[LEFT]) diff --git a/lily/dots.cc b/lily/dots.cc index c125ffcd42..43dac77057 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -29,7 +29,7 @@ Dots::do_post_processing () if (!dots_i_) { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); set_empty (true, X_AXIS, Y_AXIS); } } @@ -56,3 +56,4 @@ Dots::do_brew_molecule_p () const } + diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 93dc2e7d5a..ce2c068c64 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -116,7 +116,7 @@ Dynamic_engraver::do_process_requests() text_p_->text_str_ = loud; // ugh staff_side_p_ = new Staff_side_item; - staff_side_p_->set_elt_property (script_priority_scm_sym, + staff_side_p_->set_elt_property ("script-priority", gh_int2scm (100)); staff_side_p_->set_victim (text_p_); @@ -143,7 +143,7 @@ Dynamic_engraver::do_process_requests() prop = get_property ("dynamicPadding", 0); if (gh_number_p(prop)) { - staff_side_p_->set_elt_property (padding_scm_sym, prop); + staff_side_p_->set_elt_property ("padding", prop); } announce_element (Score_element_info (text_p_, absd)); announce_element (Score_element_info (staff_side_p_, absd)); @@ -182,7 +182,7 @@ Dynamic_engraver::do_process_requests() prop = get_property ("dynamicPadding", 0); if (gh_number_p(prop)) { - to_end_ss_span_p_->set_elt_property (padding_scm_sym,prop); + to_end_ss_span_p_->set_elt_property ("padding",prop); } } } @@ -198,7 +198,7 @@ Dynamic_engraver::do_process_requests() new_sss_p->set_victim (new_cresc_p); new_sss_p->axis_ = Y_AXIS; // UGH.! - // new_sss_p->set_elt_property (dangling_scm_sym, SCM_BOOL_T); + // new_sss_p->set_elt_property ("dangling", SCM_BOOL_T); announce_element (Score_element_info (new_sss_p, span_l)); } } @@ -293,3 +293,4 @@ Dynamic_engraver::acknowledge_element (Score_element_info i) ss_span_p_->add_support (i.elem_l_); } } + diff --git a/lily/extender-spanner.cc b/lily/extender-spanner.cc index 2cedcea834..549888576a 100644 --- a/lily/extender-spanner.cc +++ b/lily/extender-spanner.cc @@ -42,7 +42,7 @@ Extender_spanner::do_brew_molecule_p () const Real w = extent (X_AXIS).length (); w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); - Real h = paper_l ()->get_realvar (extender_height_scm_sym); + Real h = paper_l ()->get_var ("extender-height"); Molecule a = lookup_l ()->filledbox ( Box (Interval (0,w), Interval (0,h))); a.translate (Offset (dx_f_drul_[LEFT], 0)); @@ -61,7 +61,7 @@ void Extender_spanner::do_post_processing () { // UGH - Real gap = paper_l ()->get_realvar (interline_scm_sym); + Real gap = paper_l ()->get_var ("interline"); Direction d = LEFT; do @@ -84,3 +84,4 @@ Extender_spanner::set_textitem (Direction d, Item* textitem_l) add_dependency (textitem_l); } + diff --git a/lily/font-size-engraver.cc b/lily/font-size-engraver.cc index 4f706b34bf..e69de29bb2 100644 --- a/lily/font-size-engraver.cc +++ b/lily/font-size-engraver.cc @@ -1,45 +0,0 @@ -/* - font-size-grav.cc -- implement Font_size_engraver - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Han-Wen Nienhuys - - */ - -#include "font-size-engraver.hh" -#include "score-element.hh" -#include "lily-guile.hh" - -Font_size_engraver::Font_size_engraver () -{ - size_ = SCM_EOL; -} - -void -Font_size_engraver::do_process_requests () -{ - SCM s (get_property ("fontSize", 0)); - - if (gh_number_p(s)) - { - size_ = gh_scm2int (s); - } - else - { - size_ = SCM_EOL; - } -} - -void -Font_size_engraver::acknowledge_element (Score_element_info e) -{ - if (size_ != SCM_EOL - && e.elem_l_->get_elt_property (fontsize_scm_sym) == SCM_BOOL_F) - { - e.elem_l_->set_elt_property (fontsize_scm_sym, size_); - } -} - -ADD_THIS_TRANSLATOR (Font_size_engraver); - diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc index 0e0ea46f4b..130f1a0821 100644 --- a/lily/gourlay-breaking.cc +++ b/lily/gourlay-breaking.cc @@ -182,13 +182,14 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev, Paper_column * pc = this_one.cols_.top (); if (pc->original_l_) { - SCM pen = pc->get_elt_property (penalty_scm_sym); - if (pen != SCM_BOOL_F) + SCM pen = pc->get_elt_property ("penalty"); + if (pen != SCM_UNDEFINED) { - break_penalties += gh_scm2double (SCM_CDR(pen)); + break_penalties += gh_scm2double (pen); } } return abs (this_one.force_f_) + abs (prev.force_f_ - this_one.force_f_) + break_penalties; } + diff --git a/lily/grace-align-item.cc b/lily/grace-align-item.cc index 4da8f4b6b5..49739fdad7 100644 --- a/lily/grace-align-item.cc +++ b/lily/grace-align-item.cc @@ -22,7 +22,7 @@ Grace_align_item::do_pre_processing () { Real nhw = lookup_l ()->notehead (2, "").dim_[X_AXIS].length(); threshold_interval_[MIN] = nhw* 1.5; - column_l ()->set_elt_property (contains_grace_scm_sym, SCM_BOOL_T); + column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T); Axis_align_item::do_pre_processing (); @@ -41,3 +41,4 @@ void Grace_align_item::do_add_processing () { } + diff --git a/lily/grace-engraver-group.cc b/lily/grace-engraver-group.cc index 6c7547362d..cb99415a2b 100644 --- a/lily/grace-engraver-group.cc +++ b/lily/grace-engraver-group.cc @@ -8,7 +8,7 @@ */ #include "grace-engraver-group.hh" #include "lily-guile.hh" -#include "ly-symbols.hh" + #include "score-element.hh" #include "musical-request.hh" @@ -50,7 +50,7 @@ Grace_engraver_group::announce_element (Score_element_info inf) // do not propagate to top announce_to_top_.push (inf); - inf.elem_l_->set_elt_property (grace_scm_sym, SCM_BOOL_T); + inf.elem_l_->set_elt_property ("grace", SCM_BOOL_T); } void @@ -121,3 +121,4 @@ Grace_engraver_group::pass_to_top_b (Music *m) const } return false; } + diff --git a/lily/grace-performer-group.cc b/lily/grace-performer-group.cc index 004c7a4923..da7b622c3f 100644 --- a/lily/grace-performer-group.cc +++ b/lily/grace-performer-group.cc @@ -8,7 +8,7 @@ */ #include "grace-performer-group.hh" #include "lily-guile.hh" -#include "ly-symbols.hh" + #include "audio-element.hh" ADD_THIS_TRANSLATOR (Grace_performer_group); @@ -51,7 +51,7 @@ Grace_performer_group::announce_element (Audio_element_info info) // do not propagate to top announce_to_top_.push (info); - //inf.elem_l_->set_elt_property (grace_scm_sym, SCM_BOOL_T); + //inf.elem_l_->set_elt_property ("grace", SCM_BOOL_T); info.elem_l_->grace_b_ = true; } @@ -109,3 +109,4 @@ Grace_performer_group::do_try_music (Music *m) return hebbes_b; } + diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 843801274a..d45ea19b34 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -45,12 +45,12 @@ Grace_position_engraver::acknowledge_element (Score_element_info i) } else if (Note_head * n = dynamic_cast (i.elem_l_)) { - if (n->get_elt_property (grace_scm_sym) == SCM_BOOL_F) + if (n->get_elt_property ("grace") == SCM_UNDEFINED) support_.push (n); } else if (Local_key_item*it = dynamic_cast(i.elem_l_)) { - if (it->get_elt_property (grace_scm_sym) == SCM_BOOL_F) + if (it->get_elt_property ("grace") == SCM_UNDEFINED) support_.push (it); else if (align_l_) it->add_dependency (align_l_); @@ -106,3 +106,4 @@ Grace_position_engraver::do_post_move_processing () } ADD_THIS_TRANSLATOR(Grace_position_engraver); + diff --git a/lily/hara-kiri-vertical-group-spanner.cc b/lily/hara-kiri-vertical-group-spanner.cc index 4b09a5d8a7..9ea5c23de1 100644 --- a/lily/hara-kiri-vertical-group-spanner.cc +++ b/lily/hara-kiri-vertical-group-spanner.cc @@ -37,7 +37,7 @@ Hara_kiri_group_spanner::do_post_processing () if ( line_l () != s->line_l ()) programming_error ("Killing other children too"); - s->set_elt_property (transparent_scm_sym, SCM_BOOL_T); + s->set_elt_property ("transparent", SCM_BOOL_T); s->set_empty (true, X_AXIS, Y_AXIS); } @@ -58,3 +58,4 @@ Hara_kiri_group_spanner::do_print () const { Axis_group_spanner::do_print (); } + diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 86c840e7eb..8efba072e1 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -45,12 +45,12 @@ Hyphen_spanner::do_brew_molecule_p () const w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); - Real th = paper_l ()->get_realvar (hyphen_thickness_scm_sym); - Real h = paper_l ()->get_realvar (hyphen_height_scm_sym); + Real th = paper_l ()->get_var ("hyphen-thickness"); + Real h = paper_l ()->get_var ("hyphen-height"); // UGH. First try: just make the hyphen take 1/3 of the available space // for length, use a geometric mean of the available space and some minimum - Real l = paper_l ()->get_realvar (hyphen_minimum_length_scm_sym); + Real l = paper_l ()->get_var ("hyphen-minimum-length"); if(l < w) l = sqrt(l*w); Molecule a = lookup_l ()->filledbox ( Box (Interval ((w-l)/2,(w+l)/2), Interval (h,h+th))); @@ -71,7 +71,7 @@ void Hyphen_spanner::do_post_processing () { // UGH - Real gap = paper_l ()->get_realvar (interline_scm_sym); + Real gap = paper_l ()->get_var ("interline"); Direction d = LEFT; do @@ -94,3 +94,4 @@ Hyphen_spanner::set_textitem (Direction d, Item* textitem_l) add_dependency (textitem_l); } + diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 994489c411..7df2291b0b 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -36,7 +36,7 @@ SCM array_to_list (SCM *a , int l); void read_lily_scm_file (String); void init_lily_guile (); -#include "ly-symbols.hh" + void init_ly_protection (); unsigned int ly_scm_hash (SCM s); diff --git a/lily/include/ly-symbols.hh b/lily/include/ly-symbols.hh index 0e3f1cf746..e69de29bb2 100644 --- a/lily/include/ly-symbols.hh +++ b/lily/include/ly-symbols.hh @@ -1,90 +0,0 @@ -/* - ly-symbols.hh -- declare SCM symbols. - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ - -#ifndef LY_SYMBOLS_HH -#define LY_SYMBOLS_HH - -#include "lily-guile.hh" - -#ifndef DECLARE_LY_SYMBOL -#define DECLARE_LY_SYMBOL(a) extern SCM a ## _scm_sym -#endif - -DECLARE_LY_SYMBOL(alt_symbol); -DECLARE_LY_SYMBOL(at_line_start); -DECLARE_LY_SYMBOL(auto_interstaff_knee_gap); -DECLARE_LY_SYMBOL(auto_knee_gap); -DECLARE_LY_SYMBOL(bar_size); -DECLARE_LY_SYMBOL(beam); -DECLARE_LY_SYMBOL(beam_thickness); -DECLARE_LY_SYMBOL(beam_dir); -DECLARE_LY_SYMBOL(beam_gap); -DECLARE_LY_SYMBOL(bracket); -DECLARE_LY_SYMBOL(break_helper_only); -DECLARE_LY_SYMBOL(break_priority); -DECLARE_LY_SYMBOL(breakable); -DECLARE_LY_SYMBOL(char); -DECLARE_LY_SYMBOL(change); -DECLARE_LY_SYMBOL(contains_grace); -DECLARE_LY_SYMBOL(damping); -DECLARE_LY_SYMBOL(dashed); -DECLARE_LY_SYMBOL(dangling); -DECLARE_LY_SYMBOL(extremal); -DECLARE_LY_SYMBOL(extra_space); -DECLARE_LY_SYMBOL(dir_forced); -DECLARE_LY_SYMBOL(dir_list); -DECLARE_LY_SYMBOL(extender_height); -DECLARE_LY_SYMBOL(hyphen_thickness); -DECLARE_LY_SYMBOL(hyphen_height); -DECLARE_LY_SYMBOL(hyphen_minimum_length); -DECLARE_LY_SYMBOL(filledbox); -DECLARE_LY_SYMBOL(fontsize); -DECLARE_LY_SYMBOL(force_hshift); -DECLARE_LY_SYMBOL(grace); -DECLARE_LY_SYMBOL(header); -DECLARE_LY_SYMBOL(horizontal_shift); -DECLARE_LY_SYMBOL(interbeam); -DECLARE_LY_SYMBOL(interbeam4); -DECLARE_LY_SYMBOL(interline); -DECLARE_LY_SYMBOL(length); -DECLARE_LY_SYMBOL(linewidth); -DECLARE_LY_SYMBOL(minimum_space); -DECLARE_LY_SYMBOL(molecule); -DECLARE_LY_SYMBOL(notewidth); -DECLARE_LY_SYMBOL(non_default); -DECLARE_LY_SYMBOL(non_rhythmic); -DECLARE_LY_SYMBOL(no_staff_support); -DECLARE_LY_SYMBOL(no_stem_extend); -DECLARE_LY_SYMBOL(octave_dir); -DECLARE_LY_SYMBOL(origin); -DECLARE_LY_SYMBOL(output); -DECLARE_LY_SYMBOL(padding); -DECLARE_LY_SYMBOL(penalty); -DECLARE_LY_SYMBOL(pianobrace); -DECLARE_LY_SYMBOL(placebox); -DECLARE_LY_SYMBOL(rulesym); -DECLARE_LY_SYMBOL(rulethickness); -DECLARE_LY_SYMBOL(script_priority); -DECLARE_LY_SYMBOL(staffheight); -DECLARE_LY_SYMBOL(stretch_distance); -DECLARE_LY_SYMBOL(style); -DECLARE_LY_SYMBOL(text); -DECLARE_LY_SYMBOL(transparent); -DECLARE_LY_SYMBOL(tuplet); -DECLARE_LY_SYMBOL(tuplet_thick); -DECLARE_LY_SYMBOL(tuplet_visibility); -DECLARE_LY_SYMBOL(visibility_lambda); -DECLARE_LY_SYMBOL(volta); -DECLARE_LY_SYMBOL(void); -DECLARE_LY_SYMBOL(volta_thick); - - - -#endif /* LY_SYMBOLS_HH */ - diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index c9b1a30188..55fe6efa2b 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -70,9 +70,9 @@ public: /* properties */ - SCM get_elt_property (SCM sym) const; - void set_elt_property (SCM sym, SCM val); - SCM remove_elt_property (SCM key); + SCM get_elt_property (String nm) const; + void set_elt_property (String, SCM val); + SCM remove_elt_property (String nm); /* related classes. diff --git a/lily/item.cc b/lily/item.cc index e8ea0357df..eba020f52b 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -26,7 +26,7 @@ Item::breakable_b () const return false; Item * i =dynamic_cast (parent_l (X_AXIS)); - return (i) ? i->breakable_b () : get_elt_property( breakable_scm_sym) != SCM_BOOL_F; + return (i) ? i->breakable_b () : get_elt_property( "breakable") != SCM_UNDEFINED; } void @@ -82,18 +82,18 @@ Item::copy_breakable_items() void Item::try_visibility_lambda () { - SCM vis = remove_elt_property (visibility_lambda_scm_sym); - if (vis != SCM_BOOL_F) + SCM vis = remove_elt_property ("visibility-lambda"); + if (vis != SCM_UNDEFINED) { SCM args = scm_listify (gh_int2scm (break_status_dir ()), SCM_UNDEFINED); - SCM result = gh_apply ( SCM_CDR(vis), args); + SCM result = gh_apply (vis, args); int trans = gh_scm2bool (gh_car (result)); int empty = gh_scm2bool (gh_cdr (result)); if (empty) set_empty (true, X_AXIS, Y_AXIS); if (trans) - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); } } @@ -227,3 +227,4 @@ Item::break_status_dir () const return CENTER; } + diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 6e571d4fcb..e5c53f74f8 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -33,7 +33,7 @@ Key_engraver::create_key () if (!item_p_) { item_p_ = new Key_item; - item_p_->set_elt_property (break_priority_scm_sym, gh_int2scm(-1)); // ugh + item_p_->set_elt_property ("break-priority", gh_int2scm(-1)); // ugh item_p_->multi_octave_b_ = key_.multi_octave_b_; announce_element (Score_element_info (item_p_,keyreq_l_)); @@ -91,7 +91,7 @@ Key_engraver::acknowledge_element (Score_element_info info) create_key (); if (def) { - item_p_->set_elt_property (visibility_lambda_scm_sym, + item_p_->set_elt_property ("visibility-lambda", ly_ch_C_eval_scm ("postbreak_only_visibility")); } } @@ -195,3 +195,4 @@ Key_engraver::do_post_move_processing () } ADD_THIS_TRANSLATOR (Key_engraver); + diff --git a/lily/key-item.cc b/lily/key-item.cc index d11424b41e..25c068776c 100644 --- a/lily/key-item.cc +++ b/lily/key-item.cc @@ -22,7 +22,7 @@ const int SHARP_TOP_PITCH=4; /* ais and bis typeset in lower octave */ Key_item::Key_item () { multi_octave_b_ = false; - set_elt_property (breakable_scm_sym, SCM_BOOL_T); + set_elt_property ("breakable", SCM_BOOL_T); set_c_position (0); } @@ -131,3 +131,4 @@ Key_item::do_brew_molecule_p() const + diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 8e773bf05a..e0270ef96e 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -130,7 +130,7 @@ Local_key_engraver::acknowledge_element (Score_element_info info) SCM wg= get_property ("weAreGraceContext", 0); bool selfgr = gh_boolean_p (wg) &&gh_scm2bool (wg); - bool he_gr = info.elem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool he_gr = info.elem_l_->get_elt_property ("grace") != SCM_UNDEFINED; Grace_align_item * gai = dynamic_cast (info.elem_l_); if (he_gr && !selfgr && gai) @@ -176,3 +176,4 @@ Local_key_engraver::do_process_requests() ADD_THIS_TRANSLATOR(Local_key_engraver); + diff --git a/lily/lookup.cc b/lily/lookup.cc index 1181e03925..880dca8825 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -116,7 +116,7 @@ Lookup::afm_find (String s, bool warn) const return m; } - Atom at (gh_list (char_scm_sym, + Atom at (gh_list (gh_symbol2scm ("char"), gh_int2scm (cm.code ()), SCM_UNDEFINED)); at.font_ = ly_symbol (font_name_.ch_C()); @@ -241,7 +241,7 @@ Lookup::beam (Real slope, Real width, Real thick) const Molecule m; Atom at - (gh_list (beam_scm_sym, + (gh_list (gh_symbol2scm ("beam"), gh_double2scm (width), gh_double2scm (slope), gh_double2scm (thick), @@ -288,7 +288,7 @@ Lookup::dashed_slur (Array controls, Real thick, Real dash) const } Atom at - (gh_list (ly_symbol ("dashed-slur"), + (gh_list (gh_symbol2scm ("dashed-slur"), gh_double2scm (thick), gh_double2scm (dash), ly_quote_scm (array_to_list (sc, 4)), @@ -346,7 +346,7 @@ Lookup::filledbox (Box b ) const { Molecule m; - Atom at (gh_list (filledbox_scm_sym, + Atom at (gh_list (gh_symbol2scm ("filledbox"), gh_double2scm (-b[X_AXIS][LEFT]), gh_double2scm (b[X_AXIS][RIGHT]), gh_double2scm (-b[Y_AXIS][DOWN]), @@ -398,7 +398,7 @@ Lookup::text (String style, String text, Paper_def *paper_l) const SCM l = ly_ch_C_eval_scm (("(style-to-cmr \"" + style + "\")").ch_C()); if (l != SCM_BOOL_F) { - style = ly_scm2string (SCM_CDR(l)) +to_str ((int)font_h); + style = ly_scm2string (gh_cdr(l)) +to_str ((int)font_h); } Real w = 0; @@ -454,7 +454,7 @@ Lookup::text (String style, String text, Paper_def *paper_l) const m.dim_.y () = ydims; - Atom at (gh_list (text_scm_sym, + Atom at (gh_list (gh_symbol2scm ("text"), ly_ch_C_to_scm (text.ch_C()), SCM_UNDEFINED)); at.font_ = ly_symbol (style); @@ -511,7 +511,7 @@ Lookup::staff_brace (Real y, int staff_size) const idx = idx >? 0; SCM f = ly_symbol (String ("feta-braces" + to_str (staff_size))); - SCM e =gh_list (char_scm_sym, gh_int2scm (idx), SCM_UNDEFINED); + SCM e =gh_list (gh_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED); Atom at (e); at.font_ = f; @@ -527,7 +527,7 @@ Lookup::hairpin (Real width, Real height, Real thick, bool decresc, bool continu Molecule m; String hairpin = String (decresc ? "de" : "") + "crescendo"; - Atom at (gh_list (ly_symbol (hairpin), + Atom at (gh_list (ly_symbol ("hairpin"), gh_double2scm (thick), gh_double2scm (width), gh_double2scm (height), @@ -545,7 +545,7 @@ Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap, Real interline_ { Molecule m; - Atom at (gh_list(tuplet_scm_sym, + Atom at (gh_list(gh_symbol2scm ("tuplet"), gh_double2scm (interline_f), gh_double2scm (gap), gh_double2scm (dx), @@ -589,7 +589,7 @@ Molecule Lookup::staff_bracket (Real y) const { Molecule m; - Atom at ( gh_list (bracket_scm_sym, + Atom at ( gh_list (gh_symbol2scm ("bracket"), gh_double2scm (y), SCM_UNDEFINED)); m.add_atom (&at); @@ -605,7 +605,7 @@ Lookup::volta (Real h, Real w, Real thick, bool vert_start, bool vert_end) const { Molecule m; - Atom at (gh_list (volta_scm_sym, + Atom at (gh_list (gh_symbol2scm ("volta"), gh_double2scm (h), gh_double2scm (w), gh_double2scm (thick), @@ -817,3 +817,4 @@ Lookup::accordion (SCM s, Real interline_f) const } return m; } + diff --git a/lily/ly-symbols.cc b/lily/ly-symbols.cc index 93edfce560..e69de29bb2 100644 --- a/lily/ly-symbols.cc +++ b/lily/ly-symbols.cc @@ -1,32 +0,0 @@ -/* - ly-symbols.cc -- implement scheme symbols - - source file of the GNU LilyPond music typesetter - - (c) 1999 Han-Wen Nienhuys - - */ -#include "lily-guile.hh" - -/* - storage - */ -#undef LY_SYMBOLS_HH -#define extern -#include "ly-symbols.hh" - -#undef DECLARE_LY_SYMBOL -#undef LY_SYMBOLS_HH -#define DECLARE_LY_SYMBOL(a) a ## _scm_sym = ly_symbol (#a); scm_permanent_object(a ## _scm_sym) - -/* - initialisations. - */ -void -init_symbols () -{ -#include "ly-symbols.hh" -} - - -ADD_SCM_INIT_FUNC(lysyms, init_symbols); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index f6b61316fa..7227f51f83 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -44,7 +44,7 @@ Lyric_engraver::do_process_requests() text_p_->text_str_ = req_l_->text_str_; text_p_->text_str_ += " "; // ugh. - text_p_->set_elt_property (non_rhythmic_scm_sym, SCM_BOOL_T); + text_p_->set_elt_property ("non-rhythmic", SCM_BOOL_T); announce_element (Score_element_info (text_p_, req_l_)); } @@ -66,3 +66,4 @@ Lyric_engraver::do_post_move_processing () req_l_ =0; } + diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 444bd2ffeb..98fed7723c 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -48,6 +48,7 @@ Mark_engraver::do_process_requests () text_p_->text_str_ = mark_req_l_->str_; SCM st = gh_str02scm ((text_p_->text_str_.index_any_i ("0123456789") >= 0 ) ? "mark" : "large"); - text_p_->set_elt_property (style_scm_sym, st); + text_p_->set_elt_property ("style", st); } } + diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 51ff446542..57283a0a9b 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -74,7 +74,7 @@ Multi_measure_rest_engraver::do_process_requests () Time_description const *time = get_staff_info().time_C_; mmrest_p_ = new Multi_measure_rest; if(dynamic_cast (multi_measure_req_l_)) - mmrest_p_->set_elt_property (alt_symbol_scm_sym, + mmrest_p_->set_elt_property ("alt-symbol", ly_ch_C_to_scm ("scripts-repeatsign")); announce_element (Score_element_info (mmrest_p_, multi_measure_req_l_)); start_measure_i_ = time->bars_i_; @@ -122,3 +122,4 @@ Multi_measure_rest_engraver::do_post_move_processing () } } + diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 1254eb4c6b..95f7040bc7 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -74,10 +74,10 @@ Multi_measure_rest::do_brew_molecule_p () const Molecule s; bool rest_symbol=true; - SCM alt_symbol_sym =get_elt_property (alt_symbol_scm_sym); - if (alt_symbol_sym != SCM_BOOL_F) + SCM alt_symbol_sym =get_elt_property ("alt-symbol"); + if (alt_symbol_sym != SCM_UNDEFINED) { - s = lookup_l () -> afm_find (ly_scm2string (SCM_CDR(alt_symbol_sym))); + s = lookup_l () -> afm_find (ly_scm2string (alt_symbol_sym)); rest_symbol = false; } else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) @@ -120,7 +120,7 @@ void Multi_measure_rest::do_post_processing () { if (!column_arr_.size ()) - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); } @@ -180,3 +180,4 @@ Multi_measure_rest::get_rods () const return a; } + diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index d355840d24..c05534131b 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -39,6 +39,7 @@ Music_output_def::Music_output_def (Music_output_def const &s) { scope_p_ = new Scope (*s.scope_p_); translator_p_dict_p_ = new Scope (*s.translator_p_dict_p_); + default_properties_ = s.default_properties_; for (Scope_iter i (*translator_p_dict_p_); i.ok (); i++) { @@ -102,10 +103,11 @@ Music_output_def::print () const String Music_output_def::get_default_output () const { - if (safe_global_b || !scope_p_->elem_b (output_scm_sym)) + if (safe_global_b || !scope_p_->elem_b ("output")) return ""; - Identifier * id = scope_p_->elem (output_scm_sym); + Identifier * id = scope_p_->elem ("output"); String *p = id->access_content_String (false); return p ? *p : String (""); } + diff --git a/lily/note-column.cc b/lily/note-column.cc index accc399bd7..c592d92ce5 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -23,11 +23,11 @@ Note_column::rest_b () const int Note_column::shift_compare (Note_column *const &p1, Note_column*const&p2) { - SCM s1 = p1->get_elt_property (horizontal_shift_scm_sym); - SCM s2 = p2->get_elt_property (horizontal_shift_scm_sym); + SCM s1 = p1->get_elt_property ("horizontal-shift"); + SCM s2 = p2->get_elt_property ("horizontal-shift"); - int h1 = (s1 == SCM_BOOL_F) ? 0 : gh_scm2int (SCM_CDR(s1)); - int h2 = (s2 == SCM_BOOL_F) ? 0 : gh_scm2int (SCM_CDR(s2)); + int h1 = (s1 == SCM_UNDEFINED) ? 0 : gh_scm2int (s1); + int h2 = (s2 == SCM_UNDEFINED) ? 0 : gh_scm2int (s2); return h1 - h2; } @@ -184,3 +184,4 @@ Note_column::do_post_processing () translate_rests (-d * discrete_dist); } + diff --git a/lily/note-head.cc b/lily/note-head.cc index 3c13d1ae1c..faad356297 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -67,10 +67,10 @@ Note_head::do_brew_molecule_p() const String type; - SCM style =get_elt_property (style_scm_sym); - if (style != SCM_BOOL_F) + SCM style =get_elt_property ("style"); + if (style != SCM_UNDEFINED) { - type = ly_scm2string (SCM_CDR(style)); + type = ly_scm2string (style); } Molecule* out = new Molecule (lookup_l()->notehead (balltype_i_, type)); @@ -101,3 +101,4 @@ Note_head::do_brew_molecule_p() const out->dim_ = b; return out; } + diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 92c4b7ef98..d23ee6e806 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -79,7 +79,7 @@ Note_heads_engraver::do_process_requests() if (gh_string_p (noteheadstyle)) { - note_p->set_elt_property (style_scm_sym, noteheadstyle); + note_p->set_elt_property ("style", noteheadstyle); } Score_element_info itinf (note_p,note_req_l); @@ -116,3 +116,4 @@ Note_heads_engraver::do_post_move_processing() ADD_THIS_TRANSLATOR(Note_heads_engraver); + diff --git a/lily/paper-def.cc b/lily/paper-def.cc index ead9c06ae5..39b8fcf165 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -81,7 +81,7 @@ Paper_def::line_dimensions_int (int n) const { if (!shape_int_a_.size ()) { - Real lw = get_realvar (linewidth_scm_sym); + Real lw = get_var ("linewidth"); Real ind = n? 0.0:get_var ("indent"); return Interval (ind, lw); @@ -137,9 +137,9 @@ Real Paper_def::interbeam_f (int multiplicity_i) const { if (multiplicity_i <= 3) - return get_realvar (interbeam_scm_sym); + return get_var ("interbeam"); else - return get_realvar (interbeam4_scm_sym); + return get_var ("interbeam4"); } @@ -239,3 +239,4 @@ Paper_def::base_output_str () const return str; } + diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index b58ba0eeaf..97586318b4 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -91,7 +91,7 @@ Paper_outputter::output_header () } #endif - SCM scm = gh_cons (header_scm_sym, args_scm); + SCM scm = gh_cons (gh_symbol2scm ("header"), args_scm); output_scheme (scm); } @@ -146,7 +146,7 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm) } SCM box_scm - = gh_list (placebox_scm_sym, + = gh_list (gh_symbol2scm ("placebox"), gh_double2scm (a_off.x ()), gh_double2scm (a_off.y ()), SCM(i->func_), @@ -300,3 +300,4 @@ Paper_outputter::stop_last_line () SCM scm = gh_list (ly_symbol ("stop-last-line"), SCM_UNDEFINED); output_scheme (scm); } + diff --git a/lily/paper-score.cc b/lily/paper-score.cc index d8cba19d43..12eacc3071 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -50,7 +50,7 @@ Paper_score::typeset_element (Score_element * elem_p) SCM_CDR(element_smob_list_) = gh_cons (elem_p->self_scm_, SCM_CDR (element_smob_list_)); - elem_p->set_elt_property (ly_symbol ("full-name"), + elem_p->set_elt_property ("full-name", gh_str02scm((char*)elem_p->name())); scm_unprotect_object (elem_p->self_scm_); diff --git a/lily/parser.yy b/lily/parser.yy index fb8e92a65e..6969fd1868 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -558,6 +558,12 @@ paper_def_body: else $$->default_properties_[$2] = $4; } + | paper_def_body SCM_T '=' real semicolon { + if (!gh_symbol_p ($2)) + THIS->parser_error ("expect a symbol as lvalue"); + else + $$->default_properties_[$2] = gh_double2scm ($4); + } | paper_def_body translator_spec_block { $$->assign_translator ($2); } diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 1ff12820ff..268969759b 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -60,14 +60,17 @@ Property_engraver::apply_properties (SCM p, Score_element *e) SCM type_p = gh_cadr (entry); SCM elt_prop_name = gh_caddr (entry); - if (e->get_elt_property (elt_prop_name) != SCM_BOOL_F) + /* + urg scm <-> symbol-string + */ + if (e->get_elt_property (ly_scm2string (elt_prop_name)) != SCM_UNDEFINED) continue; SCM val = get_property (prop_sym, 0); if (val != SCM_UNDEFINED && gh_apply (type_p, scm_listify (val, SCM_UNDEFINED)) == SCM_BOOL_T) - e->set_elt_property (elt_prop_name, val); + e->set_elt_property (ly_scm2string (elt_prop_name), val); } } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index e3e189315a..52c0149bce 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -137,6 +137,7 @@ Rest_collision::do_substitute_element_pointer (Score_element*o,Score_element*n) Rest_collision::Rest_collision() { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); set_empty (true, X_AXIS, Y_AXIS); } + diff --git a/lily/rest.cc b/lily/rest.cc index 14e10a3537..7a3e5fab03 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -51,10 +51,10 @@ Rest::do_brew_molecule_p () const String style; - SCM style_sym =get_elt_property (style_scm_sym); - if (balltype_i_ >= 2 && style_sym != SCM_BOOL_F) + SCM style_sym =get_elt_property ("style"); + if (balltype_i_ >= 2 && style_sym != SCM_UNDEFINED) { - style = ly_scm2string (SCM_CDR(style_sym)); + style = ly_scm2string (style_sym); } Molecule s(lookup_l ()->rest (balltype_i_, ledger_b, style)); @@ -64,3 +64,4 @@ Rest::do_brew_molecule_p () const } + diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index 5862e6f790..6c31e63337 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -74,7 +74,7 @@ Rhythmic_column_engraver::acknowledge_element (Score_element_info i) SCM wg = get_property ("weAreGraceContext",0); bool wegrace = gh_boolean_p (wg) && gh_scm2bool (wg); if ((wegrace != - (i.elem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F)) + (i.elem_l_->get_elt_property ("grace") != SCM_UNDEFINED)) && !dynamic_cast (i.elem_l_)) return ; @@ -97,7 +97,7 @@ Rhythmic_column_engraver::acknowledge_element (Score_element_info i) end slurs starting on grace notes */ - if (s->get_elt_property (grace_scm_sym) != SCM_BOOL_F) + if (s->get_elt_property ("grace") != SCM_UNDEFINED) grace_slur_endings_.push (s); } } @@ -121,3 +121,4 @@ Rhythmic_column_engraver::do_post_move_processing() } ADD_THIS_TRANSLATOR(Rhythmic_column_engraver); + diff --git a/lily/score-element.cc b/lily/score-element.cc index 487a6c0d56..674c5141c7 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -46,7 +46,7 @@ Score_element::Score_element() status_i_ = 0; self_scm_ = SCM_EOL; original_l_ = 0; - element_property_alist_ = scm_protect_object (gh_cons (gh_cons (void_scm_sym, SCM_BOOL_T) , SCM_EOL)); + element_property_alist_ = SCM_EOL; smobify_self (); } @@ -87,38 +87,46 @@ Score_element::dependency_size () const return dependency_arr_.size (); } +// should also have one that takes SCM arg. SCM -Score_element::get_elt_property (SCM sym) const +Score_element::get_elt_property (String nm) const { - SCM s = scm_assq(sym, element_property_alist_); + SCM sym = ly_symbol (nm); + SCM s = scm_assq(sym, element_property_alist_); - // is this a good idea? if (s != SCM_BOOL_F) - return s; - + return SCM_CDR (s); + if (pscore_l_) { + SCM sym2 = ly_symbol (name () + ("::" + nm)); + SCM val; + // should probably check for Type::sym as well. - if (pscore_l_->paper_l_->default_properties_.elem_b (sym)) - return pscore_l_->paper_l_->default_properties_[sym]; + Paper_def * p= pscore_l_->paper_l_; + if (p->default_properties_.try_retrieve (sym2, &val)) + return val; + else if (p->default_properties_.try_retrieve (sym, &val)) + return val; } - return SCM_BOOL_F; + return SCM_UNDEFINED; } SCM -Score_element::remove_elt_property (SCM key) +Score_element::remove_elt_property (String key) { SCM s = get_elt_property (key); - SCM_CDR(element_property_alist_) = scm_assq_remove_x (SCM_CDR (element_property_alist_), key); + SCM sym = ly_symbol (key); + element_property_alist_ = scm_assq_remove_x (element_property_alist_, sym); return s; } void -Score_element::set_elt_property (SCM s, SCM v) +Score_element::set_elt_property (String k, SCM v) { - SCM_CDR(element_property_alist_) = - scm_assoc_set_x (SCM_CDR (element_property_alist_), s, v); + SCM s = ly_symbol (k); + element_property_alist_ = scm_assoc_set_x (element_property_alist_, s, v); } Interval @@ -176,9 +184,9 @@ Score_element::lookup_l () const if (!lookup_l_) { Score_element * urg = (Score_element*)this; - SCM sz = urg->remove_elt_property (fontsize_scm_sym); - int i = (sz != SCM_BOOL_F) - ? gh_scm2int (SCM_CDR (sz)) + SCM sz = urg->remove_elt_property ("fontsize"); + int i = (sz != SCM_UNDEFINED) + ? gh_scm2int (sz) : 0; urg->lookup_l_ = (Lookup*)pscore_l_->paper_l_->lookup_l (i); @@ -224,7 +232,7 @@ Score_element::calculate_dependencies (int final, int busy, void Score_element::output_processing () { - if (get_elt_property (transparent_scm_sym) != SCM_BOOL_F) + if (get_elt_property ("transparent") != SCM_UNDEFINED) return; // we're being silly here. @@ -477,3 +485,4 @@ Score_element::equal_p (SCM a, SCM b) { return SCM_CDR(a) == SCM_CDR(b) ? SCM_BOOL_T : SCM_BOOL_F; } + diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index be6dd2417f..83d2c47eef 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -33,7 +33,7 @@ Score_engraver::prepare (Moment w) Global_translator::prepare (w); set_columns (new Score_column (w), new Score_column (w)); - command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); post_move_processing(); } @@ -57,7 +57,7 @@ Score_engraver::do_creation_processing () scoreline_l_->set_bounds(LEFT, command_column_l_); - command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); Engraver_group_engraver::do_creation_processing(); } @@ -68,7 +68,7 @@ Score_engraver::do_removal_processing() { Engraver_group_engraver::do_removal_processing(); scoreline_l_->set_bounds(RIGHT,command_column_l_); - command_column_l_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + command_column_l_->set_elt_property ("breakable", SCM_BOOL_T); typeset_all (); set_columns (0,0); @@ -122,15 +122,6 @@ Score_engraver::typeset_all() Score_element * elem_p = elem_p_arr_[i]; elem_p->add_processing (); -#if 0 // TODO! - /* - elem_p wants to be connected to the rest of the - dependency graph. - */ - - if (elem_p->get_elt_property (dangling_scm_sym) != SCM_BOOL_F) - scoreline_l_->add_dependency (elem_p); -#endif if (Spanner *s = dynamic_cast (elem_p)) { @@ -153,7 +144,7 @@ Score_engraver::typeset_all() if (!item_p->parent_l (X_AXIS)) { - bool br = (item_p->remove_elt_property (breakable_scm_sym) != SCM_BOOL_F); + bool br = (item_p->remove_elt_property ("breakable") != SCM_UNDEFINED); if (br) command_column_l_->add_element(item_p); else @@ -169,7 +160,7 @@ Score_engraver::typeset_all() void Score_engraver::do_pre_move_processing() { - if (command_column_l_->get_elt_property (breakable_scm_sym) != SCM_BOOL_F) + if (command_column_l_->get_elt_property ("breakable") != SCM_UNDEFINED) { breaks_i_ ++; if (! (breaks_i_%8)) @@ -243,16 +234,16 @@ Score_engraver::do_try_music (Music*r) gotcha = true; - SCM pen = command_column_l_->get_elt_property (penalty_scm_sym); - Real total_penalty = (pen == SCM_BOOL_F) + SCM pen = command_column_l_->get_elt_property ("penalty"); + Real total_penalty = (pen == SCM_UNDEFINED) ? 0.0 - : gh_scm2double (SCM_CDR(pen)); // ugh. Should typecheck. + : gh_scm2double(pen); // ugh. Should typecheck. total_penalty += b->penalty_f_; if (b->penalty_f_ > 10000.0) // ugh. arbitrary. forbid_breaks (); - command_column_l_->set_elt_property (penalty_scm_sym, + command_column_l_->set_elt_property ("penalty", gh_double2scm (total_penalty)); } } @@ -265,7 +256,7 @@ Score_engraver::forbid_breaks () /* result is junked. */ - command_column_l_->remove_elt_property (breakable_scm_sym); + command_column_l_->remove_elt_property ("breakable"); } ADD_THIS_TRANSLATOR(Score_engraver); @@ -279,3 +270,4 @@ Score_engraver::do_add_processing () pscore_p_ = new Paper_score; pscore_p_->paper_l_ = dynamic_cast(output_def_l_); } + diff --git a/lily/score-priority-engraver.cc b/lily/score-priority-engraver.cc index c72a60d01f..a182c7a7d5 100644 --- a/lily/score-priority-engraver.cc +++ b/lily/score-priority-engraver.cc @@ -44,8 +44,8 @@ Score_priority_engraver::acknowledge_element (Score_element_info inf) if (item_l->empty_b (X_AXIS) || item_l->parent_l (X_AXIS)) return; - SCM bp=item_l->remove_elt_property (breakable_scm_sym); - bool breakable = (bp != SCM_BOOL_F); + SCM bp=item_l->remove_elt_property ("breakable"); + bool breakable = (bp != SCM_UNDEFINED); if (!breakable) return ; @@ -53,7 +53,7 @@ Score_priority_engraver::acknowledge_element (Score_element_info inf) if (!halign_p_) { halign_p_ = new Break_align_item; - halign_p_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + halign_p_->set_elt_property ("breakable", SCM_BOOL_T); announce_element (Score_element_info (halign_p_,0)); } @@ -62,3 +62,4 @@ Score_priority_engraver::acknowledge_element (Score_element_info inf) } ADD_THIS_TRANSLATOR(Score_priority_engraver); + diff --git a/lily/script-column.cc b/lily/script-column.cc index cc38a6eae8..c5a0ec1144 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -21,8 +21,8 @@ get_Staff_side (Item *i) void Script_column::add_staff_sided (Item *i) { - SCM p = get_Staff_side (i)->get_elt_property (script_priority_scm_sym); - if (p == SCM_BOOL_F) + SCM p = get_Staff_side (i)->get_elt_property ("script-priority"); + if (p == SCM_UNDEFINED) return; staff_sided_item_l_arr_.push (i); @@ -36,10 +36,10 @@ staff_side_compare (Item * const &i1, Score_element *e1 = get_Staff_side (i1); Score_element *e2 = get_Staff_side (i2); - SCM p1 = e1->get_elt_property (script_priority_scm_sym); - SCM p2 = e2->get_elt_property (script_priority_scm_sym); + SCM p1 = e1->get_elt_property ("script-priority"); + SCM p2 = e2->get_elt_property ("script-priority"); - return gh_scm2int (SCM_CDR(p1)) - gh_scm2int (SCM_CDR(p2)); + return gh_scm2int (p1) - gh_scm2int (p2); } void @@ -69,9 +69,10 @@ Script_column::do_pre_processing () gs->add_support (get_Staff_side (last)); } - gs->remove_elt_property (script_priority_scm_sym); + gs->remove_elt_property ("script-priority"); last = arr[i]; } } while (flip (&d) != DOWN); } + diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index f7657e676f..58bff60dde 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -51,9 +51,9 @@ Script_engraver::do_process_requests() } Script *p =new Script; Stem_staff_side_item * ss =new Stem_staff_side_item; - list = SCM_CDR (list); - - p->set_elt_property (molecule_scm_sym, + + list = gh_cdr (list); + p->set_elt_property ("molecule", SCM_CAR(list)); list = SCM_CDR(list); @@ -80,7 +80,7 @@ Script_engraver::do_process_requests() SCM paddingprop = get_property ("articulationScriptPadding", 0); if (gh_number_p(paddingprop)) { - ss->set_elt_property (padding_scm_sym, paddingprop); + ss->set_elt_property ("padding", paddingprop); } SCM axisprop = get_property ("scriptHorizontal",0); @@ -88,12 +88,12 @@ Script_engraver::do_process_requests() ss->axis_ = X_AXIS; if (follow_staff && !gh_boolean_p (axisprop) && gh_scm2bool (axisprop)) - ss->set_elt_property (no_staff_support_scm_sym, SCM_BOOL_T); + ss->set_elt_property ("no-staff-support", SCM_BOOL_T); p->set_staff_side (ss); - ss->set_elt_property (script_priority_scm_sym, priority); + ss->set_elt_property ("script-priority", priority); if (gh_number_p (paddingprop)) - ss->set_elt_property (padding_scm_sym, paddingprop); + ss->set_elt_property ("padding", paddingprop); script_p_arr_.push (p); @@ -155,3 +155,4 @@ Script_engraver::do_post_move_processing() ADD_THIS_TRANSLATOR(Script_engraver); + diff --git a/lily/script.cc b/lily/script.cc index 3bc415d077..4e10621df9 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -36,19 +36,18 @@ Script::do_substitute_element_pointer (Score_element*o, Score_element*n) Molecule Script::get_molecule(Direction d) const { - SCM s = get_elt_property (molecule_scm_sym); - assert (s != SCM_BOOL_F); + SCM s = get_elt_property ("molecule"); + assert (s != SCM_UNDEFINED); - s = SCM_CDR(s); SCM key = SCM_CAR (s); if (key == ly_symbol ("feta")) { return lookup_l ()->afm_find ("scripts-" + - ly_scm2string (index_cell (SCM_CDR (s), d))); + ly_scm2string (index_cell (gh_cdr (s), d))); } else if (key == ly_symbol ("accordion")) { - return lookup_l ()->accordion (SCM_CDR(s), paper_l()->get_realvar(interline_scm_sym)); + return lookup_l ()->accordion (s, paper_l()->get_var("interline")); } else assert (false); @@ -76,7 +75,7 @@ Script::do_post_processing () /* UGH UGH UGH */ - if (staff_side_l_->get_elt_property (no_staff_support_scm_sym) == SCM_BOOL_F) + if (staff_side_l_->get_elt_property ("no-staff-support") == SCM_UNDEFINED) translate_axis (- m.dim_[Y_AXIS][Direction (-d)], Y_AXIS); } @@ -99,3 +98,4 @@ Script::do_print () const { } + diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 41be6e3180..797ecfd76f 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -60,7 +60,7 @@ Separating_line_group_engraver::acknowledge_element (Score_element_info i) { p_ref_ = new Single_malt_grouping_item; if (ib) - p_ref_->set_elt_property (breakable_scm_sym, SCM_BOOL_T); + p_ref_->set_elt_property ("breakable", SCM_BOOL_T); announce_element (Score_element_info (p_ref_, 0)); } p_ref_->add_item (it); @@ -88,3 +88,4 @@ Separating_line_group_engraver::do_pre_move_processing () ADD_THIS_TRANSLATOR( Separating_line_group_engraver); + diff --git a/lily/single-malt-grouping-item.cc b/lily/single-malt-grouping-item.cc index 90227b09b2..39fcd793aa 100644 --- a/lily/single-malt-grouping-item.cc +++ b/lily/single-malt-grouping-item.cc @@ -13,7 +13,7 @@ Single_malt_grouping_item ::Single_malt_grouping_item() { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); // this is weird! , but needed! set_empty (true, X_AXIS, Y_AXIS); @@ -78,3 +78,4 @@ Single_malt_grouping_item::do_print () const } #endif } + diff --git a/lily/slur.cc b/lily/slur.cc index 8f04b9fa76..349dbd34d1 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -154,7 +154,7 @@ Slur::do_post_processing () y = length >= 5ss : y next interline - d * 0.25 ss */ - Real interline_f = paper_l ()->get_realvar (interline_scm_sym); + Real interline_f = paper_l ()->get_var ("interline"); Real internote_f = interline_f / 2; Real x_gap_f = paper_l ()->get_var ("slur_x_gap"); @@ -510,3 +510,4 @@ Slur::get_rods () const return a; } + diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 8b6b4c893d..e8a5e38292 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -52,10 +52,10 @@ Spacing_engraver::do_removal_processing () void Spacing_engraver::acknowledge_element (Score_element_info i) { - if (i.elem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F) + if (i.elem_l_->get_elt_property ("grace") != SCM_UNDEFINED) return; - if (i.elem_l_->get_elt_property (non_rhythmic_scm_sym) != SCM_BOOL_F) + if (i.elem_l_->get_elt_property ("non-rhythmic") != SCM_UNDEFINED) return; if (Rhythmic_req * r = dynamic_cast(i.req_l_)) @@ -112,3 +112,4 @@ Spacing_engraver::do_post_move_processing () ADD_THIS_TRANSLATOR(Spacing_engraver); + diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 967783c294..cb7eb9b4d4 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -17,7 +17,7 @@ Spacing_spanner::Spacing_spanner () { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); } int @@ -89,17 +89,15 @@ Spacing_spanner::do_measure (int col1, int col2) const s.item_l_drul_[LEFT] = lc; s.item_l_drul_[RIGHT] = rc; - SCM hint = lc->get_elt_property (extra_space_scm_sym); - SCM next_hint = rc->get_elt_property (extra_space_scm_sym); - SCM stretch_hint = lc->get_elt_property (stretch_distance_scm_sym); - SCM next_stretch_hint = rc->get_elt_property (stretch_distance_scm_sym); + SCM hint = lc->get_elt_property ("extra-space"); + SCM next_hint = rc->get_elt_property ("extra-space"); + SCM stretch_hint = lc->get_elt_property ("stretch-distance"); + SCM next_stretch_hint = rc->get_elt_property ("stretch-distance"); Real left_distance; - if (hint != SCM_BOOL_F) + if (hint != SCM_UNDEFINED) { - hint = SCM_CDDR (hint); - - left_distance = gh_scm2double (hint); + left_distance = gh_scm2double (gh_cdr (hint)); } else if (!lc->musical_b() && i+1 < col_count()) { @@ -126,10 +124,9 @@ Spacing_spanner::do_measure (int col1, int col2) const Real right_dist = 0.0; - if (next_hint != SCM_BOOL_F) + if (next_hint != SCM_UNDEFINED) { - next_hint = SCM_CADR(next_hint); - right_dist += - gh_scm2double (next_hint); + right_dist += - gh_scm2double (gh_car (next_hint)); } else { @@ -142,25 +139,25 @@ Spacing_spanner::do_measure (int col1, int col2) const */ if (lc->musical_b () && rc->musical_b ()) { - if (rc->get_elt_property (contains_grace_scm_sym) == SCM_BOOL_F) + if (rc->get_elt_property ("contains-grace") == SCM_UNDEFINED) right_dist *= paper_l ()->get_var ("musical_to_musical_left_spacing_factor"); } - if (rc->musical_b () && rc->get_elt_property (contains_grace_scm_sym) != SCM_BOOL_F) + if (rc->musical_b () && rc->get_elt_property ("contains-grace") != SCM_UNDEFINED) right_dist *= paper_l ()->get_var ("before_grace_spacing_factor"); s.distance_f_ = left_distance + right_dist; Real stretch_dist = 0.; - if (stretch_hint != SCM_BOOL_F) - stretch_dist += gh_scm2double (SCM_CDDR (stretch_hint)); + if (gh_number_p (stretch_hint)) + stretch_dist += gh_scm2double (stretch_hint); else stretch_dist += left_distance; - if (next_stretch_hint != SCM_BOOL_F) + if (next_stretch_hint != SCM_UNDEFINED) // see regtest spacing-tight - stretch_dist += - gh_scm2double (SCM_CADR (next_stretch_hint)); + stretch_dist += - gh_scm2double (SCM_CAR (next_stretch_hint)); else stretch_dist += right_dist; @@ -251,13 +248,11 @@ Spacing_spanner::note_spacing (Score_column *lc, Score_column *rc, Moment shorte Real Spacing_spanner::stem_dir_correction (Score_column*l, Score_column*r) const { - SCM dl = l->get_elt_property (dir_list_scm_sym); - SCM dr = r->get_elt_property (dir_list_scm_sym); - if (dl == SCM_BOOL_F || dr == SCM_BOOL_F) + SCM dl = l->get_elt_property ("dir-list"); + SCM dr = r->get_elt_property ("dir-list"); + if (dl == SCM_UNDEFINED || dr == SCM_UNDEFINED) return 0.0; - dl = SCM_CDR (dl); - dr = SCM_CDR (dr); if (scm_ilength (dl) != 1 && scm_ilength (dr) != 1) return 0.; @@ -315,3 +310,4 @@ Spacing_spanner::get_springs () const + diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 02c7c29e3b..fe85a4e6b6 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -60,13 +60,13 @@ Span_bar::evaluate_empty () { if (spanning_l_arr_.size () < 1) { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); set_empty (true, X_AXIS, Y_AXIS); } if (type_str_.empty_b ()) { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); set_empty (true); } else if (type_str_ == "|:") @@ -127,3 +127,4 @@ Span_bar::Span_bar () { type_str_ = ""; } + diff --git a/lily/span-score-bar-engraver.cc b/lily/span-score-bar-engraver.cc index 3b18cfa127..1c6a21541c 100644 --- a/lily/span-score-bar-engraver.cc +++ b/lily/span-score-bar-engraver.cc @@ -17,7 +17,7 @@ Span_score_bar_engraver::get_span_bar_p () const { Span_bar*s = new Span_bar; s->type_str_ = "scorebar"; - s->set_elt_property (break_priority_scm_sym, + s->set_elt_property ("break-priority", gh_int2scm (-4)); return s; @@ -55,7 +55,7 @@ Staff_group_bar_engraver::acknowledge_element (Score_element_info i) if (Span_bar * b = dynamic_cast (i.elem_l_)) { if (b->type_str_ == "brace") - b->translate_axis ( -paper_l ()->get_realvar (interline_scm_sym), + b->translate_axis ( -paper_l ()->get_var ("interline"), X_AXIS); // ugh } } @@ -64,3 +64,4 @@ ADD_THIS_TRANSLATOR (Piano_bar_engraver); ADD_THIS_TRANSLATOR (Staff_group_bar_engraver); ADD_THIS_TRANSLATOR (Span_score_bar_engraver); + diff --git a/lily/staff-bar.cc b/lily/staff-bar.cc index df97770e25..00e71d2282 100644 --- a/lily/staff-bar.cc +++ b/lily/staff-bar.cc @@ -12,9 +12,10 @@ Real Staff_bar::get_bar_size () const { - SCM size_sym = get_elt_property (bar_size_scm_sym); - if (size_sym != SCM_BOOL_F) - return gh_scm2double (SCM_CDR(size_sym)); + SCM size = get_elt_property ("bar-size"); + if (gh_number_p (size)) + return gh_scm2double (size); else return (lines_i () -1) * staff_line_leading_f (); } + diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 1ac107f6c8..d2b9ab974d 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -18,7 +18,7 @@ Staff_side_element::Staff_side_element () { dir_ = CENTER; to_position_l_ = 0; - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); axis_ = Y_AXIS; } @@ -69,7 +69,7 @@ void Staff_side_element::position_self () { if (to_position_l_ && - to_position_l_->get_elt_property (transparent_scm_sym) != SCM_BOOL_F) + to_position_l_->get_elt_property ("transparent") != SCM_UNDEFINED) return; Axis other = Axis ((axis_ + 1) % NO_AXES); @@ -78,7 +78,7 @@ Staff_side_element::position_self () { warning (_("No support; erasing script")); to_position_l_->set_empty (X_AXIS,Y_AXIS); - to_position_l_->set_elt_property (transparent_scm_sym, SCM_BOOL_T); + to_position_l_->set_elt_property ("transparent", SCM_BOOL_T); set_empty (X_AXIS, Y_AXIS); return ; } @@ -114,17 +114,17 @@ Staff_side_element::position_self () Real off = relative_coordinate (common, axis_); - SCM pad = remove_elt_property (padding_scm_sym); - if (pad != SCM_BOOL_F) + SCM pad = remove_elt_property ("padding"); + if (pad != SCM_UNDEFINED) { - off += gh_scm2double (SCM_CDR(pad)) * dir_; + off += gh_scm2double (pad) * dir_; } Real total_off = dim[dir_] + off; /* - no_staff_support_scm_sym is ugh bugfix to get staccato dots right. + "no-staff-support" is ugh bugfix to get staccato dots right. */ - if (to_position_l_ && to_position_l_->get_elt_property (no_staff_support_scm_sym) == SCM_BOOL_F) + if (to_position_l_ && to_position_l_->get_elt_property ("no-staff-support") == SCM_UNDEFINED) total_off += - sym_dim[-dir_]; dim_cache_[axis_]->set_offset (total_off); @@ -143,7 +143,7 @@ Staff_side_element::do_post_processing () void Staff_side_element::do_add_processing () { - if (get_elt_property (no_staff_support_scm_sym) == SCM_BOOL_F + if (get_elt_property ("no-staff-support") == SCM_UNDEFINED && axis_ == Y_AXIS && staff_symbol_l ()) { add_support (staff_symbol_l ()); @@ -192,3 +192,4 @@ Staff_side_spanner::do_print () const { Staff_side_element::do_print (); } + diff --git a/lily/staff-sym-engraver.cc b/lily/staff-sym-engraver.cc index a326789009..188cdc48ac 100644 --- a/lily/staff-sym-engraver.cc +++ b/lily/staff-sym-engraver.cc @@ -47,7 +47,7 @@ Staff_symbol_engraver::do_removal_processing() } else { - span_p_->staff_line_leading_f_ = paper_l ()->get_realvar (interline_scm_sym); + span_p_->staff_line_leading_f_ = paper_l ()->get_var ("interline"); } span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ()); typeset_element (span_p_); @@ -65,3 +65,4 @@ Staff_symbol_engraver::acknowledge_element (Score_element_info s) ADD_THIS_TRANSLATOR(Staff_symbol_engraver); + diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 813d8a8b17..2af11bc5f7 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -49,7 +49,7 @@ Staff_symbol_referencer::staff_symbol_l () const Real Staff_symbol_referencer::staff_line_leading_f () const { - return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_realvar (interline_scm_sym); + return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_var ("interline"); } Real @@ -63,3 +63,4 @@ Staff_symbol_referencer::position_f () const return 2.0 * y / staff_line_leading_f (); } + diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index edd978df5e..a3779c61e7 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -100,7 +100,7 @@ Stem_engraver::do_pre_move_processing() if (gh_number_p(prop)) { stem_p_->dir_ = to_dir (prop); - stem_p_->set_elt_property (dir_forced_scm_sym, SCM_BOOL_T); + stem_p_->set_elt_property ("dir-forced", SCM_BOOL_T); } Translator_group* which; @@ -135,3 +135,4 @@ Stem_engraver::do_try_music (Music* r) ADD_THIS_TRANSLATOR(Stem_engraver); + diff --git a/lily/stem-info.cc b/lily/stem-info.cc index f555ab0a6b..270ce80072 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -32,14 +32,14 @@ Stem_info::Stem_info (Stem*s, int mult) stem_l_ = s; x_ = stem_l_->hpos_f (); dir_ = stem_l_->dir_; - SCM bd = stem_l_->remove_elt_property (beam_dir_scm_sym); + SCM bd = stem_l_->remove_elt_property ("beam-dir"); - beam_dir_ = gh_scm2int (SCM_CDR(bd)); + beam_dir_ = gh_scm2int (bd); Paper_def* paper_l = stem_l_->paper_l (); Real internote_f = stem_l_->staff_line_leading_f ()/2; Real interbeam_f = paper_l->interbeam_f (mult_i_); - Real beam_f = paper_l->get_realvar (beam_thickness_scm_sym);; + Real beam_f = paper_l->get_var ("beam_thickness");; // strangely enough, dim(chord_start_f) == pt (and not internote!) @@ -51,9 +51,9 @@ Stem_info::Stem_info (Stem*s, int mult) // for simplicity, we calculate as if dir == UP idealy_f_ *= beam_dir_; - bool grace_b = stem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F; - bool no_extend_b = stem_l_->get_elt_property (no_stem_extend_scm_sym) - != SCM_BOOL_F; + bool grace_b = stem_l_->get_elt_property ("grace") != SCM_UNDEFINED; + bool no_extend_b = stem_l_->get_elt_property ("no-stem-extend") + != SCM_UNDEFINED; int stem_max = (int)rint(paper_l->get_var ("stem_max")); String type_str = grace_b ? "grace_" : ""; @@ -123,3 +123,4 @@ Stem_info::Stem_info (Stem*s, int mult) maxy_f_ += interstaff_f_ * beam_dir_; } + diff --git a/lily/stem-staff-side.cc b/lily/stem-staff-side.cc index 1b6f7bc750..56e0201754 100644 --- a/lily/stem-staff-side.cc +++ b/lily/stem-staff-side.cc @@ -47,19 +47,19 @@ Stem_staff_side_item::get_default_direction () const void Stem_staff_side_item::do_pre_processing () { - SCM p = remove_elt_property (padding_scm_sym); + SCM p = remove_elt_property ("padding"); Real pad = paper_l ()->get_var ("articulation_script_padding_default"); - if (get_elt_property (no_staff_support_scm_sym) != SCM_BOOL_F) + if (get_elt_property ("no-staff-support") != SCM_UNDEFINED) pad =0.0; Real il = (stem_l_) ? stem_l_->staff_line_leading_f (): paper_l ()->get_var ("interline"); - if (p != SCM_BOOL_F) + if (p != SCM_UNDEFINED) { pad = gh_scm2double (p); } pad *= il ; - set_elt_property (padding_scm_sym, + set_elt_property ("padding", gh_double2scm(pad)); Staff_side_item::do_pre_processing (); @@ -79,7 +79,7 @@ Stem_staff_side_item::do_post_processing () should use general no_staff_line_collision elt property, and use the same elt prop also for positioning slurs, ties and dots. */ - if (get_elt_property (no_staff_support_scm_sym) != SCM_BOOL_F) + if (get_elt_property ("no-staff-support") != SCM_UNDEFINED) { Graphical_element * c =common_refpoint (staff_symbol_l (), Y_AXIS); Real staff_coord = staff_symbol_l ()->relative_coordinate (c, Y_AXIS); @@ -95,3 +95,4 @@ Stem_staff_side_item::do_post_processing () translate_axis (desired_coord * dir_ * staff_line_leading_f () / 2.0 - now_coord, Y_AXIS); } } + diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 71dead81d1..ee93f94fa8 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -54,7 +54,7 @@ Stem_tremolo::do_brew_molecule_p () const Real space = stem_l_->staff_line_leading_f (); Real internote_f = space/2; - Real beam_f = paper_l ()->get_realvar (beam_thickness_scm_sym); + Real beam_f = paper_l ()->get_var ("beam_thickness"); int beams_i = 0; Real slope_f = internote_f / 4 / internote_f; // HUH? @@ -133,3 +133,4 @@ Stem_tremolo::set_stem (Stem *s) stem_l_ = s; add_dependency (s); } + diff --git a/lily/stem.cc b/lily/stem.cc index 7c7797a385..018011adbc 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -169,15 +169,15 @@ void Stem::set_default_stemlen () { Real length_f = 0.; - SCM scm_len = get_elt_property(length_scm_sym); - if (scm_len != SCM_BOOL_F) + SCM scm_len = get_elt_property("length"); + if (scm_len != SCM_UNDEFINED) { - length_f = gh_scm2double (SCM_CDR(scm_len)); + length_f = gh_scm2double (scm_len); } else length_f = paper_l ()->get_var ("stem_length0"); - bool grace_b = get_elt_property (grace_scm_sym) != SCM_BOOL_F; + bool grace_b = get_elt_property ("grace") != SCM_UNDEFINED; String type_str = grace_b ? "grace_" : ""; Real shorten_f = paper_l ()->get_var (type_str + "forced_stem_shorten0"); @@ -201,7 +201,7 @@ Stem::set_default_stemlen () set_stemend ((dir_ > 0) ? head_positions()[BIGGER] + length_f: head_positions()[SMALLER] - length_f); - bool no_extend_b = get_elt_property (no_stem_extend_scm_sym) != SCM_BOOL_F; + bool no_extend_b = get_elt_property ("no-stem-extend") != SCM_UNDEFINED; if (!grace_b && !no_extend_b && (dir_ * stem_end_f () < 0)) set_stemend (0); } @@ -225,9 +225,9 @@ Stem::set_noteheads () head_l_arr_.reverse (); Note_head * beginhead = head_l_arr_[0]; - beginhead->set_elt_property (extremal_scm_sym, SCM_BOOL_T); + beginhead->set_elt_property ("extremal", SCM_BOOL_T); if (beginhead != head_l_arr_.top ()) - head_l_arr_.top ()->set_elt_property (extremal_scm_sym, SCM_BOOL_T); + head_l_arr_.top ()->set_elt_property ("extremal", SCM_BOOL_T); int parity=1; int lastpos = int (beginhead->position_f ()); @@ -256,7 +256,7 @@ Stem::do_pre_processing () if (invisible_b ()) { - set_elt_property (transparent_scm_sym, SCM_BOOL_T); + set_elt_property ("transparent", SCM_BOOL_T); } set_empty (invisible_b (), X_AXIS, Y_AXIS); set_spacing_hints (); @@ -278,16 +278,14 @@ Stem::set_spacing_hints () if (!invisible_b ()) { SCM scmdir = gh_int2scm (dir_); - SCM dirlist = column_l ()->get_elt_property (dir_list_scm_sym); - if (dirlist == SCM_BOOL_F) + SCM dirlist = column_l ()->get_elt_property ("dir-list"); + if (dirlist == SCM_UNDEFINED) dirlist = SCM_EOL; - else - dirlist = SCM_CDR (dirlist); if (scm_sloppy_memq (scmdir, dirlist) == SCM_EOL) { dirlist = gh_cons (scmdir, dirlist); - column_l ()->set_elt_property (dir_list_scm_sym, dirlist); + column_l ()->set_elt_property ("dir-list", dirlist); } } } @@ -296,10 +294,9 @@ Molecule Stem::flag () const { String style; - SCM st = get_elt_property (style_scm_sym); - if ( st != SCM_BOOL_F) + SCM st = get_elt_property ("style"); + if ( st != SCM_UNDEFINED) { - st = SCM_CDR(st); style = ly_scm2string (st); } @@ -402,3 +399,4 @@ Stem::do_substitute_element_pointer (Score_element*o,Score_element*n) } Staff_symbol_referencer::do_substitute_element_pointer (o,n); } + diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index a2bd014612..05fc9a6a70 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -91,7 +91,7 @@ Text_engraver::do_process_requests () } ss->set_victim (text); - ss->set_elt_property (script_priority_scm_sym, + ss->set_elt_property ("script-priority", gh_int2scm (200)); ss->dir_ = r->dir_; @@ -99,7 +99,7 @@ Text_engraver::do_process_requests () text->text_str_ = r->text_str_; if (r->style_str_.length_i ()) - text->set_elt_property (style_scm_sym, ly_ch_C_to_scm (r->style_str_.ch_C())); + text->set_elt_property ("style", ly_ch_C_to_scm (r->style_str_.ch_C())); SCM empty = get_property ("textEmptyDimension", 0); if (gh_boolean_p (empty) && gh_scm2bool (empty)) @@ -134,3 +134,4 @@ Text_engraver::do_post_move_processing () } ADD_THIS_TRANSLATOR(Text_engraver); + diff --git a/lily/text-item.cc b/lily/text-item.cc index eeaf40c30a..d839410a7e 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -16,8 +16,8 @@ Molecule* Text_item::do_brew_molecule_p () const { - SCM style = get_elt_property (style_scm_sym); - String st = (style == SCM_BOOL_F) ? "" : ly_scm2string (gh_cdr (style)); + SCM style = get_elt_property ("style"); + String st = (style == SCM_UNDEFINED) ? "" : ly_scm2string (style); Molecule a= paper_l ()->lookup_l(0)->text (st, text_str_, paper_l ()); @@ -29,3 +29,4 @@ Text_item::do_print () const { DEBUG_OUT << "text= " << text_str_; } + diff --git a/lily/tie.cc b/lily/tie.cc index bdc3089f64..8773cf2c78 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -68,7 +68,7 @@ Tie::do_post_processing() { assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]); - Real interline_f = paper_l ()->get_realvar (interline_scm_sym); + Real interline_f = paper_l ()->get_var ("interline"); Real internote_f = interline_f / 2; Real x_gap_f = paper_l ()->get_var ("tie_x_gap"); Real y_gap_f = paper_l ()->get_var ("tie_y_gap"); @@ -99,8 +99,6 @@ Tie::do_post_processing() */ if (head_l_drul_[d] /* - && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F) - ugh, ugh: a~a~a; @@ -109,8 +107,8 @@ Tie::do_post_processing() Getting scared a bit by score-element's comment: // is this a good idea? */ - && (head_l_drul_[d]->get_elt_property (extremal_scm_sym) - != SCM_BOOL_F)) + && (head_l_drul_[d]->get_elt_property ("extremal") + != SCM_UNDEFINED)) { if (d == LEFT) dx_f_drul_[d] += head_width_f; @@ -196,3 +194,4 @@ Tie::get_rods () const a.push (r); return a; } + diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index f680885064..e30d1619e2 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -41,7 +41,7 @@ Time_signature_engraver::do_process_requests() time_signature_p_ = new Time_signature (); time_signature_p_->args_ = args; - time_signature_p_->set_elt_property (break_priority_scm_sym, gh_int2scm (1)); // 1 + time_signature_p_->set_elt_property ("break-priority", gh_int2scm (1)); // 1 } @@ -63,3 +63,4 @@ Time_signature_engraver::do_pre_move_processing() ADD_THIS_TRANSLATOR(Time_signature_engraver); + diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 1f6234cd9c..4ba3e65ab6 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -15,17 +15,17 @@ Time_signature::Time_signature () { - set_elt_property (breakable_scm_sym, SCM_BOOL_T); + set_elt_property ("breakable", SCM_BOOL_T); } Molecule* Time_signature::do_brew_molecule_p () const { - SCM st = get_elt_property (style_scm_sym); + SCM st = get_elt_property ("style"); - if (st != SCM_BOOL_F) + if (st != SCM_UNDEFINED) { - String style (ly_scm2string (gh_cdr (st))); + String style (ly_scm2string (st)); if (style[0]=='1') { Array tmparr = args_; @@ -43,3 +43,4 @@ Time_signature::do_brew_molecule_p () const + diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index b9e3cf16dc..e1e0f54c85 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -49,10 +49,10 @@ Tuplet_engraver::do_process_requests () Tuplet_spanner* glep = new Tuplet_spanner; started_span_p_arr_.push (glep); glep->number_str_ = to_str (time_scaled_music_arr_[i]->den_i_); - glep->set_elt_property(tuplet_visibility_scm_sym, + glep->set_elt_property("tuplet-visibility", gh_int2scm (visibility)); if (dir != 0) - glep->set_elt_property(dir_forced_scm_sym, gh_int2scm (dir)); + glep->set_elt_property("dir-forced", gh_int2scm (dir)); announce_element (Score_element_info (glep, time_scaled_music_arr_ [i])); } } @@ -60,7 +60,7 @@ Tuplet_engraver::do_process_requests () void Tuplet_engraver::acknowledge_element (Score_element_info i) { - bool grace= (i.elem_l_->get_elt_property (grace_scm_sym) != SCM_BOOL_F); + bool grace= (i.elem_l_->get_elt_property ("grace") != SCM_UNDEFINED); SCM wg = get_property ("weAreGraceContext",0); bool wgb = gh_boolean_p (wg) && gh_scm2bool (wg); if (grace != wgb) @@ -105,3 +105,4 @@ Tuplet_engraver::do_removal_processing () ADD_THIS_TRANSLATOR(Tuplet_engraver); + diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 234a4f982a..7fa4e3e992 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -35,8 +35,8 @@ Tuplet_spanner::do_brew_molecule_p () const // Default behaviour: number always, bracket when no beam! bool bracket_visibility = !parallel_beam_b_; bool number_visibility = true; - SCM visibility_sym =get_elt_property (tuplet_visibility_scm_sym); - if (visibility_sym != SCM_BOOL_F) + SCM visibility_sym =get_elt_property ("tuplet-visibility"); + if (visibility_sym != SCM_UNDEFINED) { /* ARG. Fixme. @@ -49,7 +49,7 @@ Tuplet_spanner::do_brew_molecule_p () const 3 show number, and bracket-if-no-beam 4 show number, and bracket */ - int value = gh_scm2int (SCM_CDR(visibility_sym)); + int value = gh_scm2int ((visibility_sym)); bracket_visibility = (value == 4 || (value > 1 && !parallel_beam_b_)); number_visibility = (value > 2 || value == 1 || (value == 2 && !parallel_beam_b_)); @@ -62,7 +62,7 @@ Tuplet_spanner::do_brew_molecule_p () const number_str_, paper_l ())); num.align_to (X_AXIS, CENTER); num.translate_axis (w/2, X_AXIS); - Real interline = paper_l ()->get_realvar (interline_scm_sym); + Real interline = paper_l ()->get_var ("interline"); Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_] - column_arr_[0]->extent (Y_AXIS) [dir_]; num.align_to (Y_AXIS, CENTER); @@ -70,7 +70,7 @@ Tuplet_spanner::do_brew_molecule_p () const num.translate_axis (dy/2, Y_AXIS); - Real thick = paper_l ()->get_realvar (tuplet_thick_scm_sym); + Real thick = paper_l ()->get_var ("tuplet-thick"); if (bracket_visibility) { Real gap = paper_l () -> get_var ("tuplet_spanner_gap"); @@ -131,9 +131,9 @@ Direction Tuplet_spanner::get_default_dir () const { Direction d = UP; - SCM dir_sym =get_elt_property (dir_forced_scm_sym); - if (dir_sym != SCM_BOOL_F) { - d= (Direction) gh_scm2int (SCM_CDR(dir_sym)); + SCM dir_sym =get_elt_property ("dir-forced"); + if (dir_sym != SCM_UNDEFINED) { + d= (Direction) gh_scm2int (dir_sym); if (d != CENTER) return d; } @@ -163,3 +163,4 @@ Tuplet_spanner::add_column (Note_column*n) add_dependency (n); } + diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 5ebadf0d08..1b8f83adbe 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -43,9 +43,9 @@ Volta_spanner::do_brew_molecule_p () const if (bar_arr_.top ()->type_str_.length_i () > 1) no_vertical_end = false; - Real interline_f = paper_l ()->get_realvar (interline_scm_sym); + Real interline_f = paper_l ()->get_var ("interline"); Real internote_f = interline_f/2; - Real t = paper_l ()->get_realvar (volta_thick_scm_sym); + Real t = paper_l ()->get_var ("volta-thick"); Real dx = internote_f; Real w = extent (X_AXIS).length () - dx - get_broken_left_end_align (); @@ -130,3 +130,4 @@ Volta_spanner::add_column (Note_column* c) add_dependency (c); } + diff --git a/ly/engraver.ly b/ly/engraver.ly index c1687a847d..60174acd44 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -41,7 +41,6 @@ StaffContext=\translator { marginBreakPriority = #-5 \consists "Separating_line_group_engraver"; - \consists "Font_size_engraver"; \accepts "Voice"; dynamicStyle = #"dynamic" @@ -112,7 +111,6 @@ VoiceContext = \translator { \consists "Script_engraver"; \consists "Script_column_engraver"; \consists "Rhythmic_column_engraver"; - \consists "Font_size_engraver"; \consists "Slur_engraver"; \consists "Tie_engraver"; \consists "Tuplet_engraver"; diff --git a/ly/params.ly b/ly/params.ly index beb538c9b4..609319678a 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -16,6 +16,9 @@ beam_thickness = 0.52 * (\interline - \stafflinethickness); interbeam = (2.0 * \interline + \stafflinethickness - \beam_thickness) / 2.0; interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0; +#'beam-thickness = \beam_thickness ; % ARG. + + % stems and beams % % poor man's array size @@ -97,8 +100,8 @@ MAJORITY = 2.0; MEAN = 3.0; MEDIAN = 4.0; -#'beam_dir_algorithm = #'majority -#'slope_quantisation = #'normal +#'Beam::beam-dir-algorithm = #'majority +#'Beam::slope-quantisation = #'normal %{ @@ -109,8 +112,6 @@ used based on the mean center distance. If set to 4.0 then median selection is used, based on the median center distance. %} -% [Ross]: majority -beam_dir_algorithm = \MAJORITY; % catch suspect beam slopes, set slope to zero if % outer stem is lengthened more than diff --git a/mutopia/D.Scarlatti/GNUmakefile b/mutopia/D.Scarlatti/GNUmakefile index cd768eeb70..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/GNUmakefile +++ b/mutopia/D.Scarlatti/GNUmakefile @@ -1,10 +0,0 @@ -# - -depth = ../.. - -examples=sonata-k3-l378 -LOCALSTEPMAKE_TEMPLATES=mutopia - -include $(depth)/make/stepmake.make - - diff --git a/mutopia/D.Scarlatti/progress.ly b/mutopia/D.Scarlatti/progress.ly index 1518aa6e8d..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/progress.ly +++ b/mutopia/D.Scarlatti/progress.ly @@ -1,810 +0,0 @@ - %{ -Here are the first four sonatas with barring, stem directions -etc., laid out so that two note shapes can be used when that is -ready. (Freenet will chop some of the code lines - I've got it -as one Mudela line per bar.) As you will quickly see, K.4 raises -some notation and collision problems. I've used the modern -tied-notes syntax you prefer, instead of the way Scarlatti wrote -it (bar1.jpeg). Scarlatti had a point, didn't he! (150 years -later, Longo agreed - bar1 is from his edition.) - -Harpsichord music is written much closer than organ (or piano) -music because harpsichords rely on the transfer of energy from -one string directly to other harmonically-related strings to -build power and maintain sound. That only happens when the -strings are close to each other on the soundboard. In fact, that -is one of the ways of judging what instrument a keyboard piece -was written for - organ pipes don't talk to each other, organ -sound is always fighting for clarity, and close harmonies sound -thick, so good organ music is much more widely spaced. K.4 is -typical of mainstream harpsichord music. - -I'll work on the musical aspects of the notation - Lily can be -told to do it one way as easily as the other. (I really -appreciate that.) But, would you give some thought to the best -way of dealing with 'multi-voice' collisions? In the long term, -particularly if you go ahead with automating beaming, you will -need a general anti-collision system. But, for the next 6 months -or so, to keep the Scarlatti project going, might it be faster -to provide for setting the stem length of individual notes? Or -some other similar workaround? - -Oh yes - when the middle note of a chord is trilled, Scarlatti -wrote the praller directly in front of the note, whether the -note was on a line or a space. And, he wrote most of the K.3 -fermatae on top of a bar line to indicate that a sound gap was -wanted, not that the prior note be extended in length. - -John - ----------------------------------------------------- -%} - ----------------------------------------------------- - -\score { - \header {title="Domenico Scarlatti - Sonata K.3 L.378"; - description="Presto";} - % vOne is right hand outside part, vTwo r.h. inside part, - % vThree left hand outside, vFour l.h. inside. - \notes { - \context Staff=staffOne < - \property Staff.nolines=11 - \property Voice.pletvisibility=0 - \time 2/2; - \clef alto; - \context Voice=vOne <{ -% 1 -\stemup s1 -% 2 -s4 [e'16 d' c' b] a4 s | -% 3 -s4 a' e' c'' | -% 4 -b'4 a'2 gis'4 | -% 5 -s4 c'' a' e'' | -% 6 -d''4 c''2 b'4 | -% 7 -s4 c'' g' f'' | -% 8 -e''4 d''2 cis''4 | -% 9 -s4 d'' a' g'' | -% 10 -fis''4 e''2 dis''4 | -% 11 -[e''8 d''] c''2 b'4~b' -% 12 -a'2 g'4~g' -% 13 -fis'2 e'4~e' -% 14 -d'2 c'4~c' -% 15 -b2 a4 | -% 16 -s4 c' dis' fis' | -% 17 -a'4 c'' dis'' fis'' | -% 18 -a''4 c'''2 [b''8 a''] | -% 19 -g''4 f'' e'' d''^\fermata | -s1 s -% 22 -\stemdown s4 a, b, cis | -% 23 -d4 e f2 | -% 24 -\stemup f4 aes b d' | -% 25 -f'4 aes' b' d'' | -% 26 -f''4 aes''2 [g''8 f''] | -% 27 -ees''4 d'' c'' d'' | -% 28 -g'4 b' c'' \stemdown f | -% 29 -e4 e'2 \stemup d''4 | -% 30 -e'4 b' c'' \stemdown b, | -% 31 -a,4 a \stemup c'' d'' | -% 32 -a4 b c' d' | -% 33 -e'4 f' g' a' | -% 34 -b'4 [a'8 g'] g''4 c'' | -% 35 -c''4~[c''16 b' c'' d''] d''4.^\prall c''8 | -% 36 -c''4 c''' b'' bes'' -% 37 -a'' aes''2 g''4~g'' -% 38 -f''2 dis''4~dis'' -% 39 -d''2 c''4~c'' -% 40 -b'4 c'' d'' | -% 41 -e'4 f' g' a' | -% 42 -b'4 [a'8 g'] g''4 c'' | -% 43 -c''4~[c''16 b' c'' d''] d''4.^\prall c''8 | -% 44 -c''4 [g''16 f'' e'' d''] c''4 s | -% 45 -s4 [g16 f e d] c4 s | -% 46 -s4 c'' g' a' | -% 47 -e''4 c'' d'' b' | -% 48 -e'2. s4 | -% 49 -s4 [g'16 f' e' d'] c'4 s | -% 50 -s4 c'' g' ees''~ees'' -% 51 -d''2 c''4 | -% 52 -bes'4 s2 [d'16 c' bes a] | -% 53 -g4 s2 g''4 | -% 54 -g''4 d'' f'' e'' | -% 55 -d''4 [a''16 g'' f'' e''] d''4 s | -% 56 -s4 [a16 g f e] d4 s | -% 57 -s4 d'' a' f'' | -% 58 -f'' e''4 bes'2 | -% 59 -cis''4 s2. | -% 60 -\stemdown s4 a' gis' g' | -% 61 -fis'4 f' e'2 | -% 62 -dis'4 d' cis' c' | -% 63 -b4 bes a2 | -% 64 -gis4 g fis f | -% 65 -\stemup s4 e gis b | -% 66 -d'4 f' gis' b' | -% 67 -d''4 f''2 e''8 d'' | -% 68 -c''4 b' a' g'^\fermata | -s1 s -% 71 -\stemdown s4 d e fis | -% 72 -g4 a bes2 | -% 73 -\stemup e'4 g' bes' e'' | -% 74 -bes''2. [a''8 gis''] | -% 75 -a''4 g''2 [f''8 e''] | -% 76 -f''4 e''2 [d''8 cis''] | -% 77 -d''4 c''2 [b'8 a'] | -% 78 -gis'4 gis'' a'' \stemdown d | -% 79 -c4 c'2 \stemup b''4 | -% 80 -c''4 gis'' a'' \stemdown g, | -% 81 -f,4 f2 \stemup b''4 | -% 82 -f'4 gis' a' b' | -% 83 -c''4 d'' e'' f'' | -% 84 -gis'4 [a'8 b'] e'4 d'' | -% 85 -c''4 d'' b'2 | -% 86 -a'4 a'' gis'' g'' | -% 87 -fis''4 f''2 e''4~e'' -% 88 -d''2 c''4~c'' -% 89 -b'2 a'4~a' -% 90 -gis'4 a' d'' | -% 91 -a'2 gis' | -% 92 -a'4 s2 [e'16 d' c' b] | -% 93 -a4 s2 d''4 | -% 94 -c''2 gis' | -% 95 -a'2. s4 | -} { -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -s s s s s s s s s s s s s -% 46 -s2. f''4 | -% 47 -g'2 f' | -% 48 -c''2. s4 | -s1 s -% 51 -g'2 fis' | -s1 -% 53 -s2. bes'4 | -% 54 -a'4 f'' d'' cis'' | -% 55 -f''4 s2. | -s1 s -% 58 -bes'2 e''4 d'' | -% 59 -a'4 s2. | -s1 s s s s s s s s s s s s s s s s s s s s s s s s -% 85 -a'2 gis' | -s1 s s s s -% 91 -e'2 b' | -s1 -% 93 -s2. a'4 | -% 94 -a'2 b' -} { -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -% 91 -c''4 d''4 s2 | -s1 -% 93 -s2. f'4 | -% 94 -e'2 e'2 - }> - \context Voice=vTwo < - { - %- right hand unchorded notes - - }> - \context Voice=vThree <{ -% 1 -\stemdown s2. [e''16 d'' c'' b'] | -% 2 -a'4 s2 [e16 d c b,] | -% 3 -a,4 s2 a4 | -% 4 -e4 c' b2 | -% 5 -a4 s2 c'4 | -% 6 -g4 e' d'2 | -% 7 -c'4 s2 d'4 | -% 8 -a4 f' e'2 | -% 9 -d'4 s2 e'4 | -% 10 -b4 g' fis'2 | -% 11 -e'2 dis'4 d' | -% 12 -cis'4 c' b2 | -% 13 -bes4 a gis g | -% 14 -fis4 f e2 | -% 15 -dis4 d cis c | -% 16 -b,2 s | -s1 -% 18 -s4 b, cis dis | -% 19 -e4 f g2 | -% 20 -\stemup g4 bes cis' e' | -% 21 -g'4 bes' cis'' e'' | -% 22 -g''4 bes''2 [a''8 g''] | -% 23 -f''4 e'' d'' c''^\fermata | -s1 s -% 26 -\stemdown s4 g, a, b, | -% 27 -c4 d dis f | -% 28 -g4 g'2 \stemup d''4 | -% 29 -g'4 b' c'' \stemdown d | -% 30 -c4 c'2 \stemup d''4 | -% 31 -c'4 b'2 \stemdown g,4 | -% 32 -f,4 f e d | -% 33 -c4 d e f | -% 34 -g,4 g e f | -% 35 -g4 f g g, | -% 36 -c2 s -% 37 -s4 c'' b' bes' | -% 38 -a'4 gis' g'2 | -% 39 -fis'4 f' e' dis' | -% 40 -d4 d' c' b | -% 41 -c4 d e f | -% 42 -g,4 g e f | -% 43 -g4 f g g, | -% 44 -c2 s4 [g'16 f' e' d'] | -% 45 -c'4 s2 [g,16 f, e, d,] | -% 46 -c,4 c s f | -% 47 -g2 g, | -% 48 -c2. [g''16 f'' e'' d''] | -% 49 -c''4 s2 [g16 f e d] | -% 50 -c4 s2 c'4 | -% 51 -d'2 d | -% 52 -g4 [d''16 c'' bes' a'] g'4 s2 -% 53 -[d16 c bes, a,] g,4 g | -% 54 -a2 a, | -% 55 -d2 s4 [a'16 g' f' e'] | -% 56 -d'4 s2 [a,16 g, f, e,] | -% 57 -d,4 s2 d'4 | -% 58 -g2 g, | -% 59 -a,4 \stemup a'' gis'' g'' | -% 60 -fis''4 f''2 e''4~e'' -% 61 -d''2 c''4~c'' -% 62 -b'2 a'4~a' -% 63 -g'2 f'4~f' -% 64 -e'2 d'4 | -% 65 -\stemdown e,2^\fermata s | -s1 -% 67 -s4 e fis gis | -% 68 -a4 b c'2 | -% 69 -\stemup fis4 a c' ees' | -% 70 -fis'4 a' c'' ees'' | -% 71 -c'''2. [bes''8 a''] | -% 72 -bes''4 a'' g'' f'' | -s1 -% 74 -\stemdown s4 c d e | -% 75 -f2 e | -% 76 -d2 c | -% 77 -b,2 a, | -% 78 -e4 e'2 \stemup b''4 | -% 79 -e''4 gis'' a'' \stemdown b, | -% 80 -a,4 a2 \stemup b''4 | -% 81 -a'4 gis'' a'' \stemdown e, | -% 82 -d,4 d' c' b | -% 83 -a4 b c' d' | -% 84 -e4 d' c' d' | -% 85 -e'4 d' e' e | -% 86 -a2 s | -% 87 -s4 a' gis' g' | -% 88 -fis'4 f' e'2 | -% 89 -dis'4 d' cis' c' | -% 90 -d'2 c'4 d | -% 91 -e4 d e e, | -% 92 -a,4 [e''16 d'' c'' b'] a'4 s2 -% 93 -[e16 d c b,] a,4 d | -% 94 -e2 e, | -% 95 -a,2. -} { -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s s -s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s s -% 90 -b2 a4 - } > - \context Voice=vFour < - { - %- left hand unchorded notes - - } - >>} - \paper{barsize=50.0; \translator {\StaffContext \consists -Bar_number_engraver;}} -} - ----------------------------------------------------- - -\score { - \header {title="Domenico Scarlatti - Sonata K.4 L.390"; - description="Allegro";} - % vOne is right hand outside part, vTwo r.h. inside part, - % vThree left hand outside, vFour l.h. inside. - \notes { - \context Staff=staffOne < - \property Staff.nolines=11 - \keysignature bes; - \time 4/4; - \clef alto; - \context Voice=vOne < -{ -% 1 -\stemup \skip 4..*15/7; g'16 | -% 2 -[g'16 bes' a' c''] [bes' d'' c'' ees''] d''4. g''8 | -% 3 -[fis''8 g''] [a'' c''] [bes' c''] [d'' g'] | -% 4 -[fis'8 g'] [a' c'] [bes c'] [d' g'] | -% 5 -[fis'8 g'] a' \stemdown d [g bes,] [c d] | -% 6 -[g,8 g8.] s16 \stemup ees'8 [f' a'] [bes'16 ees'' d'' c''] | -% 7 -[d''8 ees''] [f'' bes'] \stemdown [f' d'] [ees'16 g' b d'] | -% 8 -[c'16 ees' d' f'] [ees' g' f' aes'] \stemup [b' d'' cis'' e''] -[d''8 e''] | -% 9 -[f''8 g''] [a'' d''] \stemdown [a16 cis' b d'] [cis' e' a cis'] | -% 10 -\stemup [f'8 g'] [a' d'] [cis' d'] [e'16 g' f' e'] | -% 11 -[f'16 a' d''8]~[d''16 e'' c''8]~[c''16 d'' bes' g'] [a' e'' f''8] -| -% 12 -e''8 d''4~[d''16 cis''] [d'' bes' a' g'] [a' bes' cis'' a'] | -% 13 -[bes'16 cis'' d'' e''] [a' g'' f'' e''] [f'' e'' d'' c''] [d'' -e'' f'' g''] | -% 14 -[a''16 cis'' d'' e''] a' \stemdown [f' e' d'] a,4~a,16 \stemup -[d'' cis'' b'] | -% 15 -[a''16 cis'' d'' e''] [a' d'' cis'' b'] cis''4~[cis''16 cis'' d'' -e''] | -% 16 -[a'8 a''8]~[a''16 g'' f'' e''] [f''8 e''16 d''] [cis''8 d''] | -% 17 -cis''4 \stemdown [cis'16 a g f] [e8 a] d \stemup g' | -% 18 -[a'16 cis' d' e'] a \stemdown [f e d] a,4~a,16 \stemup [d' cis' -b] | -% 19 -cis'4~[cis'16 cis' d' e'] [a8 a']~[a'16 g' f' e'] | -% 20 -[f'16 a' d''8]~[d''16 e'' cis''8] d''4 [a'8 g'] | -% 21 -fis'8 d'4 cis'8 [d'8. e'16] [fis'8. g'16]~ -% 22 -[g'16 a'8 fis'16] [bes'8. cis''16] [cis''8 d''] r8. d'16 | -% 23 -[d'16 fis' e' g'] [fis' a' g' bes'] a'4. bes'8 | -% 24 -[c''8 d''] [ees'' fis'] [g' a'] [bes' b'] | -% 25 -[c''8 d''] [ees'' g''] [f'' ees''] [d'' c''] | -% 26 -[g''16 b' c'' d''] g' \stemdown [ees' d' c'] g,4~g,16 \stemup -[c'' b' a'] | -% 27 -[g''16 b' c'' d''] [g' c'' b' a'] b'4~b'16 \stemdown [f' ees' d'] -| -% 28 -g8 \stemup g''8~[g''16 f'' ees'' d''] ees''8 \stemdown f [g aes] -| -% 29 -g,8 \stemup [ees'16 f'] [d'8 ees'] [f' g'] g'16 \stemdown [c' bes -a] | -% 30 -[g16 g'] \stemup cis''8 [d''16 c''' bes'' a''] [bes''8 a''16 g''] -[fis''8 g''] | -% 31 -[a''16 fis'' g'' a''] d'' \stemdown [bes' a' g'] d,4~d,16 \stemup -[g'' fis'' e''] | -% 32 -[fis''16 fis'' g'' a''] d'' \stemdown [bes' a' g'] [d'' a' fis' -a'] s \stemup [fis''16 g'' a''] | -% 33 -d''8 g''8~[g''16 c''' bes'' a''] [bes''8 a''16 g''] [fis''8 g''] -| -% 34 -[a''16 a' bes' c''] \stemdown [fis' d' c' bes] [a8 d] g s | -% 35 -d4~d16 \stemup [g' fis' e'] [d'' fis' g' a'] d' \stemdown [bes a -g] | -% 36 -d,4~d,16 \stemup [g' fis' e'] d'' [fis' g' a'] [d' g'] [fis' e'] -| -% 37 -d''4~d''16 [fis' g' a'] d' \stemdown [bes a g] [d a g fis] | -% 38 -[g8 ees] [d d,] g,4 \stemup [bes'16 g' a' fis'] | -% 39 -bes'8 g'4 fis'8 [g'8. a'16] [bes'8 c''] | -% 40 -[d''8. d''16] [ees''8 fis'' ] [fis'' g''] r8. s16 | -} -{ -s1 s s s s s s s s s s -%12 -cis''8 s s4 s2 | -s1 s s s -% 17 - s4 s2 | -s1 s s s -%22 -s4 s8. a'16 d'4 s4 | -s1 -%24 -s2 s4. d'8 | -%25 -ees'8 f' g' s s2 | -s1 s s -%29 -s4. c'8 s4 ees'16 -} - > - \context Voice=vTwo < - { -s1 s s s s s s s s s -% 11 -\stemdown s4. [c''16 g'] fis'8 s8 [a'8. b'16] | -% 12 -s16 \skip 4..*71/7; -% 16 -[f''16 a' bes'8]~[bes'16 a'8 g'16] | -s1 s s -% 20 -[f'8. f'16] [e'8. g'16]~[g' bes' a' g'] [fis' d' e' cis'] | -% 21 -[d'16 c' bes a] [g bes a g] [fis a g8] [a16 d bes8] | -% 22 -[ces'8 d']~[d'16 g' e' g'] s2 | -s1 s -% 25 -s4. \skip 4..*64/7; -% 29 -c'8 [f'16 d' ees' d'] \skip 4..*12/7; -% 30 -[bes''16 d'' ees''8]~[ees''16 d''8 c''16] | -% 31 -\skip 4..*40/7; -% 33 -[bes''16 d'' ees''8]~[ees''16 d''8 c''16] | -% 34 -\skip 4..*48/7; | -% 37 -fis'4~fis'16 \skip 4..*27/7; | -% 39 -[g'16 f' ees' d'] [c' ees' d' c']~[c' bes c'8]~[c'16 d'8 fis'16]~ -% 40 -[fis'16 a' bes' g']~[g' c'' a'd'] -} > - \context Voice=vThree < -{ -% 1 -\stemdown \skip 4..*23/7; -% 2 -g16 [g bes a c'] [bes d' c' ees'] | -% 3 -[d'16 fis' e' g'] [fis' a' d' fis'] [g bes a c'] [bes d' c' ees'] -| -% 4 -[d16 fis e g] [fis a d fis] [g, bes, a, c] [bes, d c ees] | -% 5 -[d16 fis e g] fis \stemup [c' bes a] [bes d' g'8]~ [g'16 a' -fis'8] | -% 6 -[g'16 ees' d' c'] \stemdown [d' bes a g] [a ees' d' c'] [d'8 a] | -% 7 -[bes16 d' c' ees'] [d' f' ees' g'] \stemup [a' c'' b' d''] [c''8 -d''] | -% 8 -[ees''8 f''] [g'' c''] \stemdown [g' e'] [f'16 a' cis' e'] | -% 9 -[d'16 f' e' g'] [f' a' g' bes'] \stemup [cis''8 d''] [e'' g'] | -% 10 -\stemdown [d16 f e g] [f a g bes] [a, cis b, d] [cis8 a,] | -% 11 -[d8 f] [g a] [d g] [cis d] | -% 12 -a2 d' | -% 13 -[g'8 e'] [f' cis'] d' a'4 g'8 | -% 14 -a,4~a,16 \stemup [d'' cis'' b'] [a'' cis'' d'' e''] a' \stemdown -[f' e' d'] | -% 15 -a,4~a,16 [f' e' d'] [a' e' cis' e'] [a g' f' e'] | -% 16 -[a16 f' e' d'] [a e' d' cis'] [d'8 g] [a bes] | -% 17 -a,16 \stemup [e' f' g'] [e'8 f'] [g' f'16 e'] f' \stemdown [d' -cis' b] | -% 18 -a,4~a,16 \stemup [d' cis' b] [a' cis' d' e'] a \stemdown [f e d] -| -% 19 -[a16 e cis e] [a, g f e] [a, f e d] [a, e d cis] | -% 20 -[d8 g] [a a,] d,2 | -% 21 -d,2 d, | -% 22 -d,2 d,4 \skip 4..*11/7; -% 23 -d16 [d fis e g] [fis a g bes] | -% 24 -[a16 c' bes d'] [c' ees' d' c'] [bes c' a bes] [g a f g] | -% 25 -[ees16 f d ees] [c d bes, c] [aes, bes, g, aes,] [f, aes, g, f,] -| -% 26 -g,4~g,16 \stemup [c'' b' a'] [g'' b' c'' d''] g' \stemdown [ees' -d' c'] | -% 27 -g,4~g,16 [ees' d' c'] [g' d' b d'] g \stemup [b' c'' d''] | -% 28 -[g'16 ees'] \stemdown [d' c'] [g d' c' b] [c' g'] \stemup [d'' -c''] [b'8 c''] | -% 29 -[d''16 d'] \stemdown g8 [b16 g f ees] [d8 g] c \stemup a' | -% 30 -bes'8 \stemdown [fis'16 e'] [fis'8 d'] [g' c'] [d' ees'] | -% 31 -d,4~d,16 \stemup [g'' fis'' e''] [fis'' fis'' g'' a''] d'' -\stemdown [bes' a' g'] | -% 32 -d4~d16 \stemup [g'' fis'' e''] fis''4 \stemdown [d'16 c'' bes' -a'] | -% 33 -[d'16 bes' a' g'] [d' a' g' fis'] [g'8 c'] [d' ees'] | -% 34 -[d8 d'] \stemup [a' bes'] [c'' bes'16 a'] [bes'8 c''] | -% 35 -[d''16 fis' g' a'] d' \stemdown [bes a g] d,4~d,16 \stemup [g' -fis' e'] | -% 36 -[d''16 fis' g' a'] d' \stemdown [bes a g] d,4~d,16 [bes a g] | -% 37 -[d'16 a fis a] [d c' bes a] d8 \stemup d''8. [c''16 bes' a'] | -% 38 -[bes'16 d'' g''8]~[g''16 a''8 fis''16] g''4 s4 | -% 39 -\stemdown g,2 g, | -% 40 -g,2 g,4 -} -{s1 s s s s s s s s s s s s s s s -%17 -s4 s8 d' s2 | -s1 s s s s s s s s s s -% 29 -g'16 s8. s2 s8 fis' | -%30 -g8 s s2. | -s1 s s -%34 -s4. g'8} -{s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s -% 29 -b'16} - > - \context Voice=vFour < - { -\stemdown \skip 4..*74/7; -% 5 -[g'16 bes a8.] c'16~c' -% 6 -\skip 4..*81/7; -% 11 -\stemup [f16 f' e'8] \skip 4..*11/7; -% 12 -\stemdown [e'16 f' d'] [e' f' g'8] s [fis'16 e'] [fis' g' a' -fis'] | -% 13 -s2 s8 a'4 g'8 | -% 14 -\skip 4..*48/7; | -% 17 -s2 [g'16 e' d' cis'] \skip 4..*39/7; -% 20 -\skip 4..*135/7; -% 28 -aes'8 [b16 g'8 f'16] | -% 29 -s16 \skip 4..*13/7; s8 | -% 30 -s8 \skip 4..*68/7; -% 34 -s8 [c''16 g'8 fis'16] [bes'' g' f' ees'] | -% 35 -\skip 4..*50/7; -% 38 -[g''16 c''] [bes'8 a'] s16 [ees'' d'' c''] -} >>} - \paper{barsize=50.0; \translator {\StaffContext \consists -Bar_number_engraver;}} -} - ----------------------------------------------------- - -\version "1.2.0"; diff --git a/mutopia/D.Scarlatti/sonata-k1-l366.ly b/mutopia/D.Scarlatti/sonata-k1-l366.ly index 6367433674..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/sonata-k1-l366.ly +++ b/mutopia/D.Scarlatti/sonata-k1-l366.ly @@ -1,269 +0,0 @@ - %{ -From: bf250@freenet.carleton.ca (John Sankey) -To: hanwen@cs.uu.nl, jantien@xs4all.nl -Subject: the first Sonata -Date: Sat, 16 Jan 1999 20:50:07 -0500 (EST) - -To give you an idea of what is involved in the Scarlatti project, -here is the Mudela for the first sonata of the 550, organized so I -can proofread the ps output against the original manuscripts. Lily -mutters about clashing note columns and spans, but puts everything -except note stems where they should be. - -I've set it on a double staff to separate the parts enough so they -are readable without setting all the note stem directions manually. -Voices 1 & 3 are the chords, 2 & 4 the notes that can't be chorded -because of duration. - -I have a program that does most of the enharmonic corrections to -mi2mu output properly. I'm mulling over how to insert beam brackets -(so I can correct the few it gets wrong) and set stem directions -(ditto) mostly automatically too, but that's not as easy. - -Suggestions welcome as always -John - -%} - -\score { -\header {title ="Domenico Scarlatti - Sonata K.1 L.366"; - description="Allegro";} -% vOne is right hand outside part, vTwo r.h. inside part, -% vThree left hand outside, vFour l.h. inside. -\notes { -\context Staff = staffOne < -\property Staff.nolines=11 -\keysignature bes; -\time 4/4; -\clef alto; -\context Voice = vOne < -{ -% 1 -\stemup [d''16 e'' f'' g''] [a'' a' cis'' a'] d''4. e''8 | -% 2 -[f''16 d'' g'' e''] [a'' f'' e'' d''] [cis''8 a''] a''4^\prall~ -% 3 -[a''16 g'' f'' e''] [d'' c'' bes' a'] bes'8 \stemdown bes' [g' -bes'] | -% 4 -[e'8 e'] [e' e'] f \stemup f'' f''4^\prall~ -% 5 -[f''16 e'' d'' c''] [bes' a' g' f'] g'8 \stemdown g' [e' e'] | -% 6 -[e'8 a] [a a] [d e] [f g] | -% 7 -a16 s b s cis' s d' s e' s f' s g' s a' s | -% 8 -b'16 s cis'' s d'' s e'' s [f'' d'' bes' g'] [e'' cis'' a' cis''] -| -% 9 -\stemup a''4 g''4^\prallmordent \stemdown [f''16 d'' bes' g'] -[e'' cis'' a' cis''] | -% 10 -\stemup [f''16 d'' g'' e''] [a'' f'' e'' d''] [cis'' a' d'' b'] -[e'' g' f' e'] | -% 11 -[f'16 d' g' e'] [a' f' e' d'] [cis' a d' b] [e' cis' f' d'] | -% 12 -g'16 \stemdown [ e' d' cis'] \stemup f'8 [g'16^\prall f'32 g'] -[a'16 e' f' d'] \stemdown [e' cis' d' b] | -% 13 -[cis'16 a b aes] \stemup cis'4 a,4^\prall^"\\textnatural" -r^\fermata | \break -% 14 -[a'16 b' cis'' d''] [e'' cis'' f'' d''] e''4. a'8 | -% 15 -[b'16 g' cis'' a'] [d'' b' e'' cis''] [fis'' d'' g'' e''] [a'' -c'' bes' a'] | -% 16 -[bes'16 g' c'' a'] [d'' bes' a' g'] [fis' d' g' e'] [a' c' bes a] -| -% 17 -\stemdown g16 s a s bes s c' s d' s e' s f' s g' s | -% 18 -[a'16 f' d' bes] [g' e' c' e'] \stemup c''4 bes'4^\prall | -% 19 -[c''8 f''] [bes' e''] [a'16 f' c'' a'] [f'' c'' a'' f''] | -% 20 -[e''16 g'' c'' e''] g'8 \stemdown fis' g'16 s g8 [g g,] | -% 21 -[d8 d'] d'16 \stemup [d'' c'' b'] [c'' a' e'' c''] [a'' e'' c''' -a''] | -% 22 -[gis''16 b'' e'' aes''] [b' d'' cis'' b'] \stemdown [cis''8 a'] -[a' a'] | -% 23 -f,8 a' [f' f'16 a'] \stemup [bes'8 g''] g''4^\prall~ | -% 24 -[g''16 f'' e'' d''] [c'' bes' a'] s \stemdown f,8 f' [f' f'] | -% 25 -d,8 d' [f' d'16 f'] \stemup [g'8 e''] e''4^\prall~ | -% 26 -[e''16 d'' cis'' b'] [a' g' f' e'] [f' d' g' e'] [a' f' bes' g'] -| -% 27 -\stemdown [f'16 d' g' e'] [a' f' bes' g'] \stemup f' s g' s a' s -bes' s | -% 28 -[a'8 d''] [g' cis''] \stemdown [f'16 d' bes g] [e' cis' a cis'] | -% 29 -\stemup [a'8 d''] [g' e''] [f'16 d' g' e'] [a' f' b' g'] | -% 30 -[cis''16 a' d'' e''] [f'' d'' e'' cis''] [d'' a' bes' g'] -\stemdown [a' f' g' e'] | -% 31 -[f'16 d' e' cis'] d'4 \stemup d4^\prall r4^\fermata | -} { -s1 s -% 3 -s2 s8 g' bes' g' | -% 4 -g'8 g' g' s s2 | -% 5 -s2 s8 e' g' g' | -% 6 -a8 e' e' s s2 | -s1 s s s s s s s s s s s -% 19 -s8 a'' s g'' s2 | -s1 s s -% 23 -s8 f' a' s s2 | -% 24 -s2 s8 a' a' a' | -% 25 -s8 f' d' s s2 | -% 26 -\stemup s2 d''4 s | -% 27 -\stemdown d'16 s e' s f' s g' s s2 | -% 28 -s8 f'' s e'' s2 | -% 29 -s8 f'' s cis'' -} > -\context Voice = vTwo < -{s1 s s s s -%6 -\stemdown s2 d'16 s s4. | -s1 s s s s s s s s s s s s s s s s s s -%26 -\stemup s2 d''4 s | -%27 -s2 d''4 s2 -s1 -%29 -s2 d''8} -> -\context Voice = vThree < -{ -% 1 -\stemdown s2 [d'16 e' f' g'] [a' a cis' a] | -% 2 -[d'8 e'] [f' g'] [a' a'] [a' a'] | -% 3 -[a'8 a'] [a' f'] g \stemup g'' g''4^\prall~ -% 4 -[g''16 f'' e'' d''] [c'' bes' a' g'] a'8 \stemdown a' [f' a'] | -% 5 -[d'8 f'] [d' d'] e \stemup e'' e''4^\prall~ -% 6 -[e''16 d'' cis'' b'] [a' g' f' e'] [f' d' g' e'] [a' f' e' d'] | -% 7 -[cis'16 a d' b] [e' cis' f' d'] [g' e' a' f'] [b' g' cis'' a'] | -% 8 -[d''16 b' e'' cis''] [f'' d'' g'' e''] a''4 g''4^\prallmordent | -% 9 -\stemdown [f''16 d'' bes' g'] [e'' cis'' a' cis''] \stemup a''4 -g''4^\prallmordent | -% 10 -\stemdown [d'8 e'] [f' g'] [a b] [cis' a] | -% 11 -[d8 e] [f g] a16 s b s cis' s d' s | -% 12 -e16 \stemup [g' f' e'] \stemdown [d'8 bes] a,4 s8 \stemup f' | -% 13 -[e'8 d'] \stemdown [a16 e cis e] s2 | -% 14 -s2 [a16 b cis' d'] [e' cis' f' d'] | -% 15 -g'16 s a' s b' s cis'' s [d'8 e'] [fis' d'] | -% 16 -[g8 a8] [bes c'] [d e] [fis d] | -% 17 -\stemup [bes16 g c' a] [d' bes e' c'] [f' d' g' e'] [a' f' bes' -g'] | -% 18 -c''4 bes'4^\prall \stemdown [a'16 f' d' bes] [g' e' c' e'] | -% 19 -[a'16 f' d' bes] [g' e' c' e'] f' s f8 [f f,] | -% 20 -[c8 c'] c'16 \stemup [c'' bes' a'] [bes' g' d'' bes'] [g'' d'' -bes'' g''] | -% 21 -[f''16 a'' d'' f''] a'8 \stemdown gis' a'16 s a8 [a a,] | -% 22 -[e8 e,] [e, e,] a, \stemup a'' a''4^\prall^"\\textflat"~ | -% 23 -[a''16 g'' f'' e''] [d'' c'' bes'] s \stemdown g,8 bes' [bes' -bes'] | -% 24 -e,8 e' [g' e'16 g'] \stemup [a'8 f''] f''4^\prall~ | -% 25 -[f''16 e'' d'' c''] [bes' a' g'] s \stemdown e,8 g' [g' g'] | -% 26 -a,8 a [e' a] d'16 s e' s f' s g' s | -% 27 -s2 [d'16 d' e' e'] [f' f' g' g'] | -% 28 -[f'16 d' bes g] [e' cis' a cis'] \stemup [a'8 d''] [g' e''] | -% 29 -\stemdown [f'16 d' bes g] [e' cis' a cis'] [d8 e] [f g] | -% 30 -[a8 g] [a a,] d4 s8 \stemup bes' | -% 31 -[a'8 g'] f'16 \stemdown [a f a] s2 | -} { -s1 s -% 3 -f'8 f' f' s s2 | -% 4 -s2 s8 f' a' f' | -% 5 -f'8 d' f' s s2 | -s1 s s s s s s s s s s s s s s s s -% 23 -s2 s8 g' g' g' | -ii% 24 -s8 g' e' s s2 | -% 25 -s2 s8 e' e' e' | -% 26 -s8 e' a s s2 | -s1 -% 28 -s2 s8 f'' s cis'' | -} > -\context Voice = vFour < -{s1 s s s s s s s s -%10 -\stemdown d''16 s s4. a'16 s s4. | -%11 -d'16 s s4. s2 | -s1 s s -%15 -s2 d''16 s s4. | -%16 -g'16 s s4. d'16 s s4. | -s1 s s s s s s s s s -%27 -\stemup d''4 s2. | -s1 -%29 -\stemdown s2 d'16} -> ->} -\paper{barsize=50.0; \translator {\StaffContext \consists -Bar_number_engraver;}} -} -\version "1.2.0"; diff --git a/mutopia/D.Scarlatti/sonata-k2-l388.ly b/mutopia/D.Scarlatti/sonata-k2-l388.ly index bb1746226b..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/sonata-k2-l388.ly +++ b/mutopia/D.Scarlatti/sonata-k2-l388.ly @@ -1,339 +0,0 @@ - - -\score { - \header {title="Domenico Scarlatti - Sonata K.2 L.388"; - description="Presto";} - % vOne is right hand outside part, vTwo r.h. inside part, - % vThree left hand outside, vFour l.h. inside. - \notes { - \context Staff=staffOne < - \property Staff.nolines=11 - \property Voice.pletvisibility=0 - \keysignature fis; - \time 3/8; - \clef alto; - \context Voice=vOne <{ -%1 -\stemup [g''8 g' g'] | -% 2 -g'4.^\prall | -% 3 -[g'16 d' b' g' d'' b'] | -% 4 -g''4. | -% 5 -[b'8 c'' d''] | -% 6 -c''4 b'8 | -% 7 -[c''16 a'' b' g'' a' fis''] | -% 8 -[b'16 g'' a' fis'' g''8] | -% 9 -\stemdown [g'8 a' b'] | -% 10 -[a'8 fis' g'] | -% 11 -[c'8 d' d] | -% 12 -[g8 d g,] | -% 13 -[b'16 d'' a' d'' g' cis''] | -% 14 -[fis'16 d'' e'' cis'' d'' a'] | -% 15 -\stemup [g''8 fis'' e''] | -% 16 -a''8 s4 | -% 17 -[d''16 a' cis'' a' b' gis'] | -% 18 -[e''16 a' b' gis' a' e'] | -% 19 -\stemdown [fis'8 e' d'] | -% 20 -cis'8 s4 | -% 21 -\stemup [d''16 g' a'' fis' cis'' e'] | -% 22 -[d''16 a' fis'] s8. | -% 23 -\stemdown [b8 a g] | -% 24 -fis8 s16 \stemup [d' fis' a'] | -% 25 -[d''16 g' a'' f' cis'' e'] | -% 26 -[d''16 a' f'] s8. | -% 27 -\stemdown [bes8 a g] | -% 28 -f8 s16 \stemup [d' f' a'] | -% 29 -[d''16 g' cis'' fis' b' e'] | -% 30 -[a'16 d' g' cis' fis' d'] | -% 31 -[g'16 e' fis' d' e' cis'] | -% 32 -[d'8 cis' b] | -% 33 -[a8 g' fis'] | -% 34 -[e'8 d'8. cis'16] | -% 35 -[d'16 a fis' d' a' fis'] | -% 36 -[d''16 a' fis'' d'' a'' a'] | -% 37 -d''4. | \break -% 38 -[d''8 d' d'] | -% 39 -d'4.^\prall | -% 40 -[d'16 a fis' d' a' fis'] | -% 41 -d''4.^\prall | -% 42 -[fis'8 g' a'] | -% 43 -g'4^\prall fis'8 | -% 44 -[g'16 e'' fis' d'' e' cis''] | -% 45 -[fis'16 d'' e' cis'' d''8] | -% 46 -\stemdown [d'8 e' fis'] | -% 47 -[e'8 cis' d'] | -% 48 -[g8 a a,] | -% 49 -[d8 a, d,] | -% 50 -\stemup [d''16 a' c'' a' b' gis'] | -% 51 -[e''16 a' b' gis' a' e'] | -% 52 -\stemdown [f'8 e' d'] | -% 53 -c'8 s4 | -% 54 -[e'8 d' c'] | -% 55 -b8 s4 | -% 56 -\stemup [c''16 g' b' g' a' fis'] | -% 57 -[d''16 g' a' fis' g' d'] | -% 58 -\stemdown [e'16 c'' d' b' c' a'] | -% 59 -[b16 g' a fis' g g'] | -% 60 -[c'8 d' e'] | -% 61 -d'8 s4 | -% 62 -[e8 d c] | -% 63 -b,8 s \stemup [b16 d'] | -% 64 -[g'16 c' d'' b fis' a] | -% 65 -[g'16 d' b g] s8 | -% 66 -\stemdown [ees8 d c] | -% 67 -bes,8 s \stemup [ais16 d'] | -% 68 -[g'16 c' d'' bes fis' a] | -% 69 -[g'16 d' ais g] s8 | -% 70 -[g''16 c'' fis'' b' e'' a'] | -% 71 -[d''16 g' c'' fis' b' g'] | -% 72 -[c''16 a' b' g' a' fis'] | -% 73 -[g'8 fis' e'] | -% 74 -[d'8 c' b] | -% 75 -[a16 c' b g' a fis'] | -% 76 -[g'16 d' b g b d'] | -% 77 -[g'16 d' b' g' d'' d'] | -% 78 -g'4. |} -{s1 s s s s -%6 -d4 - }> - \context Voice=vThree <{ -% 1 -\stemdown s4. | -% 2 -[g8 g, g,] | -% 3 -g,4. | -% 4 -[g16 d b g d' b] | -% 5 -[g'8 a' b'] | -% 6 -[a'8 fis' g'] | -% 7 -[c'8 d' fis'] | -% 8 -[g'8 d' g] | -% 9 -\stemup [b'8 c'' d''] | -% 10 -c''4^\prall b'8 | -% 11 -[c''16 a'' b' g'' a' fis''] | -% 12 -[b'16 g'' a' fis'' g''8] | -% 13 -[g''8 fis'' e''] | -% 14 -a''8 s4 | -% 15 -\stemdown [b'16 d'' a' d'' g' cis''] | -% 16 -[fis'16 d'' e'' cis'' d'' a'] | -% 17 -[fis'8 e' d'] | -% 18 -cis'8 s4 | -% 19 -\stemup [d''16 a' cis'' a' b' gis'] | -% 20 -[e''16 a' b' gis' a' e'] | -% 21 -\stemdown [b8 a g] | -% 22 -fis8 s16 \stemup [d' fis' a'] | -% 23 -[d''16 g' a'' fis' cis'' e'] | -% 24 -[d''16 a' fis'] s8. | -% 25 -\stemdown [bes8 a g] | -% 26 -f8 s16 \stemup [d' f' a'] | -% 27 -[d''16 g' a'' f' cis'' e'] | -% 28 -[d''16 a' f'] s8. | -% 29 -\stemdown [b8 a g] | -% 30 -[fis8 e d] | -% 31 -[g8 a a,] | -% 32 -[b,16 g a, fis g, e] | -% 33 -[fis,16 d e, cis d, d] | -% 34 -[g,16 e a, fis e8] | -% 35 -d,4. | -% 36 -d,4. | -% 37 -d,4. | -% 38 -s4. | -% 39 -[d8 d, d,] | -% 40 -d,4. | -% 41 -[d16 a, fis d a fis] | -% 42 -[d'8 e' fis'] | -% 43 -[e'8 cis' d'] | -% 44 -[g8 a cis'] | -% 45 -[d'8 a d] | -% 46 -\stemup [fis'8 g' a'] | -% 47 -g'4^\prall fis'8 | -% 48 -[g'16 e'' fis' d'' e' cis''] | -% 49 -[fis'16 d'' e' cis'' d''8] | -% 50 -\stemdown [f'8 e' d'] | -% 51 -c'8 s4 | -% 52 -\stemup [d''16 a' c'' a' b' gis'] | -% 53 -[e''16 a' b' gis' a' e'] | -% 54 -[c''16 g' b' g' a' fis'] | -% 55 -[d''16 g' a' fis' g' d'] | -% 56 -\stemdown [e'8 d' c'] | -% 57 -b8 s4 | -% 58 -\stemup [g''8 fis'' e''] | -% 59 -[d''8 c'' b'] | -% 60 -[a'16 b' c'' b' a' g'] | -% 61 -[a'16 fis' g' e' fis' d'] | -% 62 -[g'16 c' d'' b fis' a] | -% 63 -[g'16 d' b g] s8 | -% 64 -\stemdown [e8 d c] | -% 65 -b,8 s \stemup [b16 d'] | -% 66 -[g'16 c' d'' bes fis' a] | -% 67 -[g'16 d' bes g] s8 | -% 68 -\stemdown [ees8 d c] | -% 69 -bes,8 s [bes16 d'] | -% 70 -[e'8 d' c'] | -% 71 -[b8 a g] | -% 72 -[c'8 d' d] | -% 73 -[e16 c' d b c a] | -% 74 -[b,16 g a, fis g, g] | -% 75 -[c8 d d,] | -% 76 -g,4. | -% 77 -g,4. | -% 78 -g,4. | - } > - >} - \paper{barsize=50.0; \translator {\StaffContext \consists -Bar_number_engraver;}} -} - -\version "1.2.0"; diff --git a/mutopia/D.Scarlatti/sonata-k3-l378.ly b/mutopia/D.Scarlatti/sonata-k3-l378.ly index 9fc49eadb6..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/sonata-k3-l378.ly +++ b/mutopia/D.Scarlatti/sonata-k3-l378.ly @@ -1,254 +0,0 @@ - \header { - composer = "Domenico Scarlatti"; - title="Sonata K.3"; - opus="L.378"; - movement="Presto"; - copyright = "General Public License"; -} - -tolower = \translator Staff = lower -toupper = \translator Staff = upper - -RHtoL = { \tolower \stemdown } -RHtoR = { \toupper \stemup } -LHtoR = { \toupper \stemup } -LHtoL = { \tolower \stemdown } - -\score { - \notes - \context PianoStaff < - \context Staff = upper <\context Voice = mainV <{ - % 1 - \stemup s1 - s4 [e'16 d' c' b] a4 s | - s4 a' e' c'' | - b'4 a'2 gis'4 | - s4 c'' a' e'' | - % 5 - d''4 c''2 b'4 | - s4 c'' g' f'' | - e''4 d''2 cis''4 | - s4 d'' a' g'' | - fis''4 e''2 dis''4 | - % 10 - [e''8 d''] c''2 b'4~b' - a'2 g'4~g' - fis'2 e'4~e' - d'2 c'4~c' - b2 a4 | - % 15 - s4 c' dis' fis' | - a'4 c'' dis'' fis'' | - a''4 c'''2 [b''8 a''] | - g''4 f'' e'' d''^\fermata | - s1 - % 20 - s - s4 \RHtoL a, b, cis | - d4 e f2 | - \RHtoR f4 aes b d' | - f'4 aes' b' d'' | - % 25 - f''4 aes''2 [g''8 f''] | - ees''4 d'' c'' d'' | - g'4 b' c'' \RHtoL f | - e4 e'2 \RHtoR d''4 | - e'4 b' c'' \RHtoL b, | - % 30 - a,4 a \RHtoR c'' d'' | - a4 b c' d' | - e'4 f' g' a' | - b'4 [a'8 g'] g''4 c'' | - c''4~[c''16 b' c'' d''] d''4.^\prall c''8 | - % 35 - c''4 c''' b'' bes'' - a'' aes''2 g''4~g'' - f''2 dis''4~dis'' - d''2 c''4~c'' - b'4 c'' d'' | - % 40 - e'4 f' g' a' | - b'4 [a'8 g'] g''4 c'' | - c''4~[c''16 b' c'' d''] d''4.^\prall c''8 | - c''4 [g''16 f'' e'' d''] c''4 s | - s4 [g16 f e d] c4 s | - s4 c'' g' - < - { f''4 e'' c'' d'' b' c''2. } - \context Voice = anotherV { a'4 g'2 f'2 e'2. } - > s4 | - - - s4 [g'16 f' e' d'] c'4 s | - s4 c'' g' ees'' ~ - < { ees'' d''2 c''4 } - \context Voice = anotherV { \stemdown g'2 fis'2 } - > - | - bes'4 s2 [d'16 c' bes a] | - g4 s2 | - | - d''4 [a''16 g'' f'' e''] d''4 s | - s4 [a16 g f e] d4 s | - s4 d'' a' f'' | - < - { f''4 e'' e'' d'' } - \context Voice = anotherV { \stemdown bes'2 bes'2 } - > | - < a'4 cis''> s2. | - \RHtoL s4 a' gis' g' | - fis'4 f' e'2 | - dis'4 d' cis' c' | - b4 bes a2 | - gis4 g fis f | - \RHtoR s4 e gis b | - d'4 f' gis' b' | - d''4 f''2 e''8 d'' | - c''4 b' a' g'^\fermata | - s1 s - \RHtoL s4 d e fis | - g4 a bes2 | - \RHtoR e'4 g' bes' e'' | - bes''2. [a''8 gis''] | - a''4 g''2 [f''8 e''] | - f''4 e''2 [d''8 cis''] | - d''4 c''2 [b'8 a'] | - gis'4 gis'' a'' \RHtoL d | - c4 c'2 \RHtoR b''4 | - c''4 gis'' a'' \RHtoL g, | - f,4 f2 \RHtoR b''4 | - f'4 gis' a' b' | - c''4 d'' e'' f'' | - gis'4 [a'8 b'] e'4 d'' | - < \context Voice = mainV { c''4 d'' s2 } - \context Voice = anotherV { \stemdown a'2 } - > - a'4 a'' gis'' g'' | - fis''4 f''2 e''4~e'' - d''2 c''4~c'' - b'2 a'4~a' - gis'4 a' d'' | - < \context Voice = mainV { c''4 d'' s2 } - \context Voice = anotherV { \stemdown } | - > - a'4 s2 [e'16 d' c' b] | - a4 s2 | %% added some chording. - | - a'2. | - }>> - - - \context Staff = lower <{ - - \stemdown s2. [e''16 d'' c'' b'] | - - a'4 - s2 - \clef bass; % HWN - [e16 d c b,] | - a,4 s2 a4 | - e4 c' b2 | - a4 s2 c'4 | - g4 e' d'2 | - c'4 s2 d'4 | - a4 f' e'2 | - d'4 s2 e'4 | - b4 g' fis'2 | - e'2 dis'4 d' | - cis'4 c' b2 | - bes4 a gis g | - fis4 f e2 | - dis4 d cis c | - b,2 s | - s1 - s4 b, cis dis | - e4 f g2 | - \LHtoR g4 bes cis' e' | - g'4 bes' cis'' e'' | - g''4 bes''2 [a''8 g''] | - f''4 e'' d'' c''^\fermata | - s1 s - \LHtoL s4 g, a, b, | - c4 d dis f | - g4 g'2 \LHtoR d''4 | - g'4 b' c'' \LHtoL d | - c4 c'2 \LHtoR d''4 | - c'4 b'2 \LHtoL g,4 | - f,4 f e d | - c4 d e f | - g,4 g e f | - g4 f g g, | - c2 s - \LHtoR %% added. HWN - s4 c'' b' bes' | - a'4 gis' g'2 | - fis'4 f' e' dis' - \LHtoL - | - d4 d' c' b | - c4 d e f | - g,4 g e f | - g4 f g g, | - c2 s4 [g'16 f' e' d'] | - c'4 s2 [g,16 f, e, d,] | - c,4 c s f | - g2 g, | - c2. \LHtoR [g''16 f'' e'' d''] | - - c''4 \LHtoL - s2 [g16 f e d] | - c4 s2 c'4 | - d'2 d | - g4 - \LHtoR - [d''16 c'' bes' a'] g'4 \LHtoL s2 - [d16 c bes, a,] g,4 g | - a2 a, | - d2 s4 \LHtoR [a'16 g' f' e'] | - d'4 \LHtoL s2 [a,16 g, f, e,] | - d,4 s2 d'4 | - g2 g, | - a,4 \LHtoR a'' gis'' g'' | - fis''4 f''2 e''4~e'' - d''2 c''4~c'' - b'2 a'4~a' - g'2 f'4~f' - e'2 d'4 | - \LHtoL e,2^\fermata s | - s1 - s4 e fis gis | - a4 b c'2 | - \LHtoR fis4 a c' ees' | - fis'4 a' c'' ees'' | - c'''2. [bes''8 a''] | - bes''4 a'' g'' f'' | - s1 - \LHtoL s4 c d e | - f2 e | - d2 c | - b,2 a, | - e4 e'2 \LHtoR b''4 | - e''4 gis'' a'' \LHtoL b, | - a,4 a2 \LHtoR b''4 | - a'4 gis'' a'' \LHtoL e, | - d,4 d' c' b | - a4 b c' d' | - e4 d' c' d' | - e'4 d' e' e | - a2 s | - s4 a' gis' g' | - fis'4 f' e'2 | - dis'4 d' cis' c' | - d | - e4 d e e, | - a,4 \LHtoR [e''16 d'' c'' b'] a'4 \LHtoL s2 - [e16 d c b,] a,4 d | - e2 e, | - a,2. - } - > > - - - -} -\version "1.2.0"; diff --git a/mutopia/D.Scarlatti/sonata-k4-l390.ly b/mutopia/D.Scarlatti/sonata-k4-l390.ly index bcfed53d80..e69de29bb2 100644 --- a/mutopia/D.Scarlatti/sonata-k4-l390.ly +++ b/mutopia/D.Scarlatti/sonata-k4-l390.ly @@ -1,314 +0,0 @@ - -\score { - \header {title="Domenico Scarlatti - Sonata K.4 L.390"; - description="Allegro";} - % vOne is right hand outside part, vTwo r.h. inside part, - % vThree left hand outside, vFour l.h. inside. - \notes { - \context Staff=staffOne < - \property Staff.nolines=11 - \keysignature bes; - \time 4/4; - \clef alto; - \context Voice=vOne < -{ -% 1 -\stemup \skip 4..*15/7; g'16 | -% 2 -[g'16 bes' a' c''] [bes' d'' c'' ees''] d''4. g''8 | -% 3 -[fis''8 g''] [a'' c''] [bes' c''] [d'' g'] | -% 4 -[fis'8 g'] [a' c'] [bes c'] [d' g'] | -% 5 -[fis'8 g'] a' \stemdown d [g bes,] [c d] | -% 6 -[g,8 g8.] s16 \stemup ees'8 [f' a'] [bes'16 ees'' d'' c''] | -% 7 -[d''8 ees''] [f'' bes'] \stemdown [f' d'] [ees'16 g' b d'] | -% 8 -[c'16 ees' d' f'] [ees' g' f' aes'] \stemup [b' d'' cis'' e''] -[d''8 e''] | -% 9 -[f''8 g''] [a'' d''] \stemdown [a16 cis' b d'] [cis' e' a cis'] | -% 10 -\stemup [f'8 g'] [a' d'] [cis' d'] [e'16 g' f' e'] | -% 11 -[f'16 a' d''8]~[d''16 e'' c''8]~[c''16 d'' bes' g'] [a' e'' f''8] -| -% 12 -e''8 d''4~[d''16 cis''] [d'' bes' a' g'] [a' bes' cis'' a'] | -% 13 -[bes'16 cis'' d'' e''] [a' g'' f'' e''] [f'' e'' d'' c''] [d'' -e'' f'' g''] | -% 14 -[a''16 cis'' d'' e''] a' \stemdown [f' e' d'] a,4~a,16 \stemup -[d'' cis'' b'] | -% 15 -[a''16 cis'' d'' e''] [a' d'' cis'' b'] cis''4~[cis''16 cis'' d'' -e''] | -% 16 -[a'8 a''8]~[a''16 g'' f'' e''] [f''8 e''16 d''] [cis''8 d''] | -% 17 -cis''4 \stemdown [cis'16 a g f] [e8 a] d \stemup g' | -% 18 -[a'16 cis' d' e'] a \stemdown [f e d] a,4~a,16 \stemup [d' cis' -b] | -% 19 -cis'4~[cis'16 cis' d' e'] [a8 a']~[a'16 g' f' e'] | -% 20 -[f'16 a' d''8]~[d''16 e'' cis''8] d''4 [a'8 g'] | -% 21 -fis'8 d'4 cis'8 [d'8. e'16] [fis'8. g'16]~ -% 22 -[g'16 a'8 fis'16] [bes'8. cis''16] [cis''8 d''] r8. d'16 | -% 23 -[d'16 fis' e' g'] [fis' a' g' bes'] a'4. bes'8 | -% 24 -[c''8 d''] [ees'' fis'] [g' a'] [bes' b'] | -% 25 -[c''8 d''] [ees'' g''] [f'' ees''] [d'' c''] | -% 26 -[g''16 b' c'' d''] g' \stemdown [ees' d' c'] g,4~g,16 \stemup -[c'' b' a'] | -% 27 -[g''16 b' c'' d''] [g' c'' b' a'] b'4~b'16 \stemdown [f' ees' d'] -| -% 28 -g8 \stemup g''8~[g''16 f'' ees'' d''] ees''8 \stemdown f [g aes] -| -% 29 -g,8 \stemup [ees'16 f'] [d'8 ees'] [f' g'] g'16 \stemdown [c' bes -a] | -% 30 -[g16 g'] \stemup cis''8 [d''16 c''' bes'' a''] [bes''8 a''16 g''] -[fis''8 g''] | -% 31 -[a''16 fis'' g'' a''] d'' \stemdown [bes' a' g'] d,4~d,16 \stemup -[g'' fis'' e''] | -% 32 -[fis''16 fis'' g'' a''] d'' \stemdown [bes' a' g'] [d'' a' fis' -a'] s \stemup [fis''16 g'' a''] | -% 33 -d''8 g''8~[g''16 c''' bes'' a''] [bes''8 a''16 g''] [fis''8 g''] -| -% 34 -[a''16 a' bes' c''] \stemdown [fis' d' c' bes] [a8 d] g s | -% 35 -d4~d16 \stemup [g' fis' e'] [d'' fis' g' a'] d' \stemdown [bes a -g] | -% 36 -d,4~d,16 \stemup [g' fis' e'] d'' [fis' g' a'] [d' g'] [fis' e'] -| -% 37 -d''4~d''16 [fis' g' a'] d' \stemdown [bes a g] [d a g fis] | -% 38 -[g8 ees] [d d,] g,4 \stemup [bes'16 g' a' fis'] | -% 39 -bes'8 g'4 fis'8 [g'8. a'16] [bes'8 c''] | -% 40 -[d''8. d''16] [ees''8 fis'' ] [fis'' g''] r8. s16 | -} -{ -s1 s s s s s s s s s s -%12 -cis''8 s s4 s2 | -s1 s s s -% 17 - s4 s2 | -s1 s s s -%22 -s4 s8. a'16 d'4 s4 | -s1 -%24 -s2 s4. d'8 | -%25 -ees'8 f' g' s s2 | -s1 s s -%29 -s4. c'8 s4 ees'16 -} - > - \context Voice=vTwo < - { -s1 s s s s s s s s s -% 11 -\stemdown s4. [c''16 g'] fis'8 s8 [a'8. b'16] | -% 12 -s16 \skip 4..*71/7; -% 16 -[f''16 a' bes'8]~[bes'16 a'8 g'16] | -s1 s s -% 20 -[f'8. f'16] [e'8. g'16]~[g' bes' a' g'] [fis' d' e' cis'] | -% 21 -[d'16 c' bes a] [g bes a g] [fis a g8] [a16 d bes8] | -% 22 -[ces'8 d']~[d'16 g' e' g'] s2 | -s1 s -% 25 -s4. \skip 4..*64/7; -% 29 -c'8 [f'16 d' ees' d'] \skip 4..*12/7; -% 30 -[bes''16 d'' ees''8]~[ees''16 d''8 c''16] | -% 31 -\skip 4..*40/7; -% 33 -[bes''16 d'' ees''8]~[ees''16 d''8 c''16] | -% 34 -\skip 4..*48/7; | -% 37 -fis'4~fis'16 \skip 4..*27/7; | -% 39 -[g'16 f' ees' d'] [c' ees' d' c']~[c' bes c'8]~[c'16 d'8 fis'16]~ -% 40 -[fis'16 a' bes' g']~[g' c'' a'd'] -} > - \context Voice=vThree < -{ -% 1 -\stemdown \skip 4..*23/7; -% 2 -g16 [g bes a c'] [bes d' c' ees'] | -% 3 -[d'16 fis' e' g'] [fis' a' d' fis'] [g bes a c'] [bes d' c' ees'] -| -% 4 -[d16 fis e g] [fis a d fis] [g, bes, a, c] [bes, d c ees] | -% 5 -[d16 fis e g] fis \stemup [c' bes a] [bes d' g'8]~ [g'16 a' -fis'8] | -% 6 -[g'16 ees' d' c'] \stemdown [d' bes a g] [a ees' d' c'] [d'8 a] | -% 7 -[bes16 d' c' ees'] [d' f' ees' g'] \stemup [a' c'' b' d''] [c''8 -d''] | -% 8 -[ees''8 f''] [g'' c''] \stemdown [g' e'] [f'16 a' cis' e'] | -% 9 -[d'16 f' e' g'] [f' a' g' bes'] \stemup [cis''8 d''] [e'' g'] | -% 10 -\stemdown [d16 f e g] [f a g bes] [a, cis b, d] [cis8 a,] | -% 11 -[d8 f] [g a] [d g] [cis d] | -% 12 -a2 d' | -% 13 -[g'8 e'] [f' cis'] d' a'4 g'8 | -% 14 -a,4~a,16 \stemup [d'' cis'' b'] [a'' cis'' d'' e''] a' \stemdown -[f' e' d'] | -% 15 -a,4~a,16 [f' e' d'] [a' e' cis' e'] [a g' f' e'] | -% 16 -[a16 f' e' d'] [a e' d' cis'] [d'8 g] [a bes] | -% 17 -a,16 \stemup [e' f' g'] [e'8 f'] [g' f'16 e'] f' \stemdown [d' -cis' b] | -% 18 -a,4~a,16 \stemup [d' cis' b] [a' cis' d' e'] a \stemdown [f e d] -| -% 19 -[a16 e cis e] [a, g f e] [a, f e d] [a, e d cis] | -% 20 -[d8 g] [a a,] d,2 | -% 21 -d,2 d, | -% 22 -d,2 d,4 \skip 4..*11/7; -% 23 -d16 [d fis e g] [fis a g bes] | -% 24 -[a16 c' bes d'] [c' ees' d' c'] [bes c' a bes] [g a f g] | -% 25 -[ees16 f d ees] [c d bes, c] [aes, bes, g, aes,] [f, aes, g, f,] -| -% 26 -g,4~g,16 \stemup [c'' b' a'] [g'' b' c'' d''] g' \stemdown [ees' -d' c'] | -% 27 -g,4~g,16 [ees' d' c'] [g' d' b d'] g \stemup [b' c'' d''] | -% 28 -[g'16 ees'] \stemdown [d' c'] [g d' c' b] [c' g'] \stemup [d'' -c''] [b'8 c''] | -% 29 -[d''16 d'] \stemdown g8 [b16 g f ees] [d8 g] c \stemup a' | -% 30 -bes'8 \stemdown [fis'16 e'] [fis'8 d'] [g' c'] [d' ees'] | -% 31 -d,4~d,16 \stemup [g'' fis'' e''] [fis'' fis'' g'' a''] d'' -\stemdown [bes' a' g'] | -% 32 -d4~d16 \stemup [g'' fis'' e''] fis''4 \stemdown [d'16 c'' bes' -a'] | -% 33 -[d'16 bes' a' g'] [d' a' g' fis'] [g'8 c'] [d' ees'] | -% 34 -[d8 d'] \stemup [a' bes'] [c'' bes'16 a'] [bes'8 c''] | -% 35 -[d''16 fis' g' a'] d' \stemdown [bes a g] d,4~d,16 \stemup [g' -fis' e'] | -% 36 -[d''16 fis' g' a'] d' \stemdown [bes a g] d,4~d,16 [bes a g] | -% 37 -[d'16 a fis a] [d c' bes a] d8 \stemup d''8. [c''16 bes' a'] | -% 38 -[bes'16 d'' g''8]~[g''16 a''8 fis''16] g''4 s4 | -% 39 -\stemdown g,2 g, | -% 40 -g,2 g,4 -} -{s1 s s s s s s s s s s s s s s s -%17 -s4 s8 d' s2 | -s1 s s s s s s s s s s -% 29 -g'16 s8. s2 s8 fis' | -%30 -g8 s s2. | -s1 s s -%34 -s4. g'8} -{s1 s s s s s s s s s s s s s s s s s s s s s s s s s s s -% 29 -b'16} - > - \context Voice=vFour < - { -\stemdown \skip 4..*74/7; -% 5 -[g'16 bes a8.] c'16~c' -% 6 -\skip 4..*81/7; -% 11 -\stemup [f16 f' e'8] \skip 4..*11/7; -% 12 -\stemdown [e'16 f' d'] [e' f' g'8] s [fis'16 e'] [fis' g' a' -fis'] | -% 13 -s2 s8 a'4 g'8 | -% 14 -\skip 4..*48/7; | -% 17 -s2 [g'16 e' d' cis'] \skip 4..*39/7; -% 20 -\skip 4..*135/7; -% 28 -aes'8 [b16 g'8 f'16] | -% 29 -s16 \skip 4..*13/7; s8 | -% 30 -s8 \skip 4..*68/7; -% 34 -s8 [c''16 g'8 fis'16] [bes'' g' f' ees'] | -% 35 -\skip 4..*50/7; -% 38 -[g''16 c''] [bes'8 a'] s16 [ees'' d'' c''] -} >>} - \paper{barsize=50.0; \translator {\StaffContext \consists -Bar_number_engraver;}} -} -\version "1.2.0"; diff --git a/mutopia/F.Schubert/AnSylvia.ly b/mutopia/F.Schubert/AnSylvia.ly index dcfacf0f09..e69de29bb2 100644 --- a/mutopia/F.Schubert/AnSylvia.ly +++ b/mutopia/F.Schubert/AnSylvia.ly @@ -1,404 +0,0 @@ -\header { -filename = "AnSylvia.ly"; -enteredby = "Peter Chubb"; -composer = "Franz Schubert"; -poet = "Original text by William Shakespeare\\\\" + - "German text by Eduard von Bauernfeld"; -opus = "D. 891"; -date = "1826"; -title = "An Sylvia"; -} - - -\version "1.2.0"; - -\include "paper16.ly"; -\include "paper13.ly"; - -pianoRH=\notes \relative c' { - \clef "G"; -%1 - <[b8-.(\pp d-. g-.> <)b-. d-. g-.>] - <[b8-. d-. g-.(> <)b-. d-. g-.>] - | -%2 - <[c d g_"{\it simile}" \< > ] - <[c d fis> < \! c d fis > ] -%3 - | - <[d f gis \> > < \! d f gis >] - <[c e a> ] - | -%4 - <[d a' b> ] - <[d g a> ] | -%5 - \repeat semi 2 { - <[b_. d g( \pp > <)b_. d g>] - <[b_. d g(> <)b_. d g>] - | -%6 - <[c d g> ] - <[c d fis> < a c dis fis> ] - | -%7 - <[g c e g> ] - <[g c e g> ] - | -%8 - <[g c e> ] - <[g b d> ] - | -%9 - <[fis a d> ] - <[g b d> ] - | -%10 - [< g a c d \> > <\! fis a c d >] - <[g b d> ] - | -%11 - <[g a c d> ] - <[g b d> ] <[b d g> ] - | -%12 - [ ] - [ ] - | -%13 - <[e fis b> < e fis ais> ] - <[e fis ais> ] - | -%14 - <[cis g' a!> ] - <[cis g' a> < e g a> ] - | -%15 - <[e g a> ] - <[d fis a> ] - | -%16 - <[d fis a> ] - <[d fis a \< > < \! d fis a >] - | -%17 - <[d a' c \> > < \! d a' c >] - <[d a' c> ] - | -%18 - <[d g a c \> > ] - <[d fis a c> <\! d fis a c \pp > ] - | -%19 - <[d g b> ] - <[d g b> ] - | -%20 - <[e g c> ] - <[e a c> < e b' c>] - | -%21 - <[e c'> ] - <[e a c> ] - | -%22 - <[d a' c> ] - <[d a' d> ] - | -%23 - <[b d b'> ] - <[b d g \< > < \! b d fis >] - | -%24 - <[b d e \> > < \! gis b e >] - <[a c e> ] - | -%25 - <[d a' c> ] - <[d a'> > < \! c d fis \p >] - | -%26 - <[b d g> ] - <[b d g> ] - | -%27 - <[c d g > ] - <[c d fis \< > < \! c d fis >] - | -%28 - <[d f gis \> > < \! d f gis > ] - <[c e a> ] -%29 - <[d a' b> ] - <[d g a> < d fis! a> ] - } -%30 - r2 - \bar "|."; -} - -pianoLH=\notes \relative c { - \clef "F"; - g4-. d-. r [g8.( g16] | )a4-. d,-. r [a'8.( a16] | -%3 - )b4-. [d,8.( d16] )c'4-. [d,8. d16] | -%4 - d'4-. d,-. d'-. [d,8.( d16 ] - \repeat semi 2 { -%5 - )g4-. d_. r4 [g8.( g16] | -%6 - )a4-. d,-. r4 [a'8.( a16] | -%7 - )c4-. c,-. r [e8.( e16] | -%8 - )g4-. g,-. r4 [b'8.( b16] | -%9 - )d4-. c-. b-. g-. | -%10 - d2(-> )g4 r4 \clef "G"; | -%11 - d'''2->( )b4 r4 \clef "F"; | -%12 - b,,4-. fis-. r [b8.( b16] | -%13 - )cis4-. fis,4-. r4 [d'8.( d16] | -%14 - )e4-. g,4-. r [cis8.( cis16] | -%15 - )d4-. d,4-. r4 [d'8.( d16] | -%16 - )fis4-. d-. a-. d-. | -%17 - fis,4.( a8 )d4 r4 \clef "G"; | -%18 - e''2->( )d4 r4 \clef "F"; | -%19 - g,,,4-. b-. r [g8.( g16 ] | -%20 - )c4-. e-. r [gis,8.( gis16] | -%21 - )a4-. c-. r [g!8.( g16 ] | -%22 - )fis4-. d'-. r [fis,,8.( fis16] | -%23 - )g4-. g'-. r [b,8.( b16] | -%24 - )c4-. c'-. r [c,8.( c16] | -%25 - )d4-. d'-. r [d,8.( d16] | -%26 - )g4-. d-. r [g8.( g16] | -%27 - )a4-. d,-. r [a'8.( a16] | -%28 - )b4 [d,8.( d16] )c'4-. [d,8. d16] | -%29 - d'4-. d,-. d'-. [d,8.( d16 ] - } -%30 - )g2 r2 \bar "|."; - -} - -tune=\notes \relative c'' { - % Put dynamics over the stave. - \property Voice.dynamicdir = "1" - - r1 | r1 |r1 | r1 | - \repeat semi 2 { -%5 - b2. g4 | -%6 - g( )fis \context Staff < {\voiceone r2}{\voicetwo r4 a4}> | -%7 - g2. e4 | -%8 - e4( )d r4 \< g | -%9 - fis a g \! b | -%10 - d2 b4 r4 | -%11 - r1 | -%12 - d2. b4 | -%13 - b4( )ais r [cis8()b] | -%14 - a!2. e4 | -%15 - g4()fis r4 \< d4 | -%16 - a' fis c' \! a | -%17 - e'4.( \> )c8 \! a4 r | -%18 - r1 | -%19 - d2. \context Staff < {\voiceone b8( )g8} {\voicetwo [b8 g8]} > | -%20 - \property Voice.slurDash = 2 - fis4( )e \property Voice.slurDash = "" - \context Staff < {\voiceone r2}{\voicetwo r4 e4} > | -%21 - c'2. [b16( a g )fis] | -%22 - e4( )d \context Staff <{\voiceone r2} {\voicetwo r4 d4}> | -%23 - d2 d'2 | -%24 - e2 e,2 | -%25 - fis2. \> [g8( )a] | -%26 - \! g2 r2 | -%27 - r1 | r1 | r1 - } - r1 \bar "|."; -} - -fourbars=\lyrics { ""1*4 } -verseOne=\lyrics { - Who2. is4 | Syl- via, ""2 | - What2. is4 | she,2 That4 | - all our swains com- | - mend2 her?4 " " | - " "1 | - Ho-4 - - ly, | - fair,2 ""4 and | - wise2. is4 | - she;2 ""4 The | - heav'ns4 such grace did | - lend2 her4 "" | ""1 | - That2. a-4 | - do- red ""2 | - She2. might4 | - be,2 "" | - That2 a- | - do- red | - she2. might4 | be.2 "" | -} - -verseTwo=\lyrics { - Is2. she4 | kind,2 ""4 as | - she2. is4 |fair?2 ""4 For | - beau- ty lives with | kind-2 ness4 "" | ""1 | - To2. her4 |eyes2 ""4 doth | Love 2. re-4 | - pair,2 ""4 To | help him of his | blind-2 ness;4 "" | - ""1 | - And2*3/2 be-8 ing | help'd4 - "" "" | in-2. hab-8 its | - there,2 ""4 And | - be-2 ing | help'd in- | ha-2 -4 bits4 | there.2 ""2 | -} - -verseThree=\lyrics { - Then2. to4 | Syl-4 via ""2 | - let2. us4 | sing,2 ""4 That | - Syl- via is ex- | cel4 - ing; "" | ""1 | - She2. ex-4 | cels2 ""4 each | mor - - tal | - thing,2 ""4 Up- | on the dull earth | dwell-2 ing4 - "" | ""1 | - To2. her4 | gar- lands ""2 | let2. us4 | - bring,2 "" | To her | gar- lands | let2. us4 | - bring.2 "" | -} - - -%% -%% German Words -- syllabification may be incorrect (entered by -%% someone who knows no German!) -origVerseOne=\lyrics { - Was2. ist4 | Sil-4 via, ""2 | - sag-2. et4 | an,2 ""4 - Da{\ss}4 | - sie die wie- te | Flur2 preist?4 "" | ""1| - Sch\"on2. und4 | zart2 ""4 seh'- | ich2. sie4 | - nah'n,2 ""4 Auf4 | - Him- melsg- gunst " und" | Spur2 weist,4 "" | ""1 - Da{\ss}2. ihr4 | al- les ""2 | - un-2. ter4 | tan.2 "" | - Da{\ss}2 ihr | al- les | un-2. ter4 | tan2 "" | -} - -origVerseTwo=\lyrics { - Ist2. sie4 | sch\"on2 ""4 und4 | gut2. da-4 | zu?2 ""4 - Reiz4| labt wie mil- de | Kind-2 heit;4 "" | ""1 | - Ihr-2. em4 | Aug'-2 ""4 eilt | A-2. mor4 | - zu,2 ""4 - Dort4 | heilt er sein- e | Blind-2 heit,4 "" | ""1 | - Und2. ver-4 | weilt2 ""4 in4 | s\"u{\ss}-2. er4 - Ruh'.2 "" | - Und2 ver-2 | weilt in | s\"u{\ss}-2. er4| Ruh'.2 "" | -} - -origVerseThree=\lyrics { - Dar4 - - um | Sil- via, ""2 | t\"on',2. o4 | - Sang,2 ""4 - Der4 | hold- en Sil- via | Ehr-2 en;4 ""4 | ""1 | - Je2. den4 | Reiz2 ""4 be- |siegt2. sie4 | lang,2 ""4 - Den | Er- de kann ge- | w\"ah-2 ren;4 "" | ""1 | - Kr\"an-2. ze4 | ihr2 ""4 und4 | Sai-2. ten4 - |klang!2 "" - Kr\"an-2 ze | ihr und | Sai-2. ten-4 |klang!2 "" | -} - -global=\notes { - \key G; - \time 2/2; - \property Staff.timeSignatureStyle = "C" -} - -Piano=\context GrandStaff = piano { - \property GrandStaff.instrument="Piano" - < - \context Staff=RH {\global \pianoRH } - \context Staff=LH {\global \pianoLH } - > -} - - -EnglishWords= \lyrics< - {\fourbars \verseOne \fourbars} - {\fourbars \verseTwo \fourbars} - {\fourbars \verseThree \fourbars} -> - -GermanWords = \lyrics< - {\fourbars \origVerseOne \fourbars} - {\fourbars \origVerseTwo \fourbars} - {\fourbars \origVerseThree \fourbars} - -> - -Vocals= < - \context Staff = vocal < - \notes {\clef "G2"; \global\tune} -% {\context Lyrics = vocal \EnglishWords} - {\context Lyrics = vocal \GermanWords} - > -> - - -\score { - < - % \transpose aes for basses (Key Eflat). - % (bes to c'') - % \transpose d' for original (in A.) - % Untransposed range: d' to e'' - \notes \transpose d' < - \Vocals - \Piano - > - > - \paper { - % \paper_thirteen - \paper_sixteen - linewidth = 18.0\cm; - textheight = 26.0\cm; - gourlay_maxmeasures=15.0; - \translator { \HaraKiriStaffContext } - } -} - diff --git a/mutopia/GNUmakefile b/mutopia/GNUmakefile index 7cbaeea0ed..a1129ad5ad 100644 --- a/mutopia/GNUmakefile +++ b/mutopia/GNUmakefile @@ -2,7 +2,7 @@ depth = .. -SUBDIRS = J.S.Bach Coriolan W.A.Mozart F.Schubert D.Zipoli Hymns D.Scarlatti L.Mozart E.Satie N.W.Gade +SUBDIRS = J.S.Bach Coriolan W.A.Mozart F.Schubert D.Zipoli Hymns L.Mozart E.Satie N.W.Gade examples= LOCALSTEPMAKE_TEMPLATES=mutopia diff --git a/mutopia/W.A.Mozart/horn-concerto-3/rondo.ly b/mutopia/W.A.Mozart/horn-concerto-3/rondo.ly index f10ace98ae..b8b72b7927 100644 --- a/mutopia/W.A.Mozart/horn-concerto-3/rondo.ly +++ b/mutopia/W.A.Mozart/horn-concerto-3/rondo.ly @@ -18,12 +18,12 @@ lipbreaker = \notes \relative c' [c c c] [c c c] } -rightsixteenth = { \property Voice.stemLeftBeamCount = "1" - \property Voice.stemRightBeamCount = "2" } -leftsixteenth = { \property Voice.stemLeftBeamCount = "2" - \property Voice.stemRightBeamCount = "1" } -bothsixteenth = { \property Voice.stemLeftBeamCount = "2" - \property Voice.stemRightBeamCount = "2" } +rightsixteenth = { \property Voice.stemLeftBeamCount = 1 + \property Voice.stemRightBeamCount = 2 } +leftsixteenth = { \property Voice.stemLeftBeamCount = 2 + \property Voice.stemRightBeamCount = 1 } +bothsixteenth = { \property Voice.stemLeftBeamCount = 2 + \property Voice.stemRightBeamCount = 2 } rondo = \notes \relative c' { @@ -92,7 +92,7 @@ rondo = \notes \relative c' R2.*3 r4 r8 r4 c8 a4. c - f ~ [f8. \rightsixteenth e16( d )c] + f ~ [f8. \rightsixteenth e16( \bothsixteenth d )c] bes4 g8 e4 g8 c4. ~ c8 r r R2.*3| @@ -153,7 +153,7 @@ rondo = \notes \relative c' R2.*5 [c8\f c, c] [c c c] c4 r8 c4 r8 - c4 r8 r4 \bar "||."; % B&H do another r8. + c4 r8 r4 \bar "|."; % B&H do another r8. } diff --git a/scm/generic-property.scm b/scm/generic-property.scm index a895d3ba13..463fad46e5 100644 --- a/scm/generic-property.scm +++ b/scm/generic-property.scm @@ -3,10 +3,10 @@ (cons "Beam" (list (list 'beamslopedamping number? 'damping) - (list 'autoKneeGap number? 'auto_knee_gap) - (list 'autoInterstaffKneeGap number? 'auto_interstaff_knee_gap) - (list 'beamQuantisation symbol? 'slope_quantisation) - (list 'beamDirAlgorithm symbol? 'beam_dir_algorithm) + (list 'autoKneeGap number? 'auto-knee-gap) + (list 'autoInterstaffKneeGap number? 'auto-interstaff-knee-gap) + (list 'beamQuantisation symbol? 'slope-quantisation) + (list 'beamDirAlgorithm symbol? 'beam-dir-algorithm) ) ) ) @@ -17,7 +17,7 @@ (list (list 'stemLength number? 'length) (list 'stemStyle string? 'style) - (list 'noStemExtend boolean? 'no_stem_extend) + (list 'noStemExtend boolean? 'no-stem-extend) )) ) @@ -30,19 +30,19 @@ (define generic-bar-properties (cons "Staff_bar" (list - (list 'barSize number? 'bar_size)) + (list 'barSize number? 'bar-size)) ) ) (define generic-breathing-sign-properties (cons "Breathing_sign" (list - (list 'breathingSignBreakPriority number? 'break_priority + (list 'breathingSignBreakPriority number? 'break-priority )))) (define generic-clef-properties (cons "Clef_item" (list - (list 'clefBreakPriority number? 'break_priority) + (list 'clefBreakPriority number? 'break-priority) (list 'clefStyle string? 'style)) ) ) @@ -56,8 +56,8 @@ (define generic-note-column-properties (cons "Note_column" (list - (list 'horizontalNoteShift number? 'horizontal_shift) - (list 'forceHorizontalShift number? 'force_hshift) + (list 'horizontalNoteShift number? 'horizontal-shift) + (list 'forceHorizontalShift number? 'force-hshift) ))) (define generic-slur-properties diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index 4a5cb5d446..422e2280b3 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -39,6 +39,10 @@ # ??? + +#TODO: +# UNDEF -> None + program_name = 'abc2ly' diff --git a/scripts/musedata2ly.py b/scripts/musedata2ly.py new file mode 100644 index 0000000000..2fe63fc7e2 --- /dev/null +++ b/scripts/musedata2ly.py @@ -0,0 +1,208 @@ +#!@PYTHON@ + +# musedata = musedata.stanford.edu + +import re +import sys +import string + +f = open (sys.argv[1]) +lines =f.readlines() + +def chomp (x): + return re.sub ('[\r\n \t]+$','', x) + +lines = map (chomp, lines) + +default_header_dict = { + 'tagline' :'automatically converted from Musedata', + 'copyright' : 'all rights reserved -- free for noncommercial use' + } + +# Jezus, wat een ranzig formaat. (2am) +def parse_header (lines): + d = default_header_dict + enter = string.split (lines[3], ' ') + d['enteredby'] = string.join (enter[1:]) + d['enteredon'] = enter[0] + d['opus'] = lines[4] + d['source'] = lines[5] + d['title'] = lines[6] + d['subtitle'] = lines[7] + d['instrument']= lines[8] + d['musedatamisc'] =lines[9] + d['musedatagroups'] =lines[10] + d['musedatagroupnumber']=lines[11] + + return d + +clef_dict = { +04: 'treble', +13 : 'alto', +22: 'bass', + +} + +def get_clef(s): + return '\\clef "%s";\n' % clef_dict [string.atoi (s)] + +def get_mudela_notename (p, ac): + if p > 5: + p = p - 7 + s = chr (p + ord ('c')) + infix = 'i' + if ac < 0: + infix = 'e' + ac = -ac + + while ac: + s = s + infix + 's' + ac = ac - 1 + return s + +def get_key (s): + i = string.atoi (s) + return '' + +def get_timesig (s): + return '\\time %s;\n' % s + + +divisions = 4 +def get_divisions_per_quarter (s): + divisions = string.atoi (s) + return '' + +def get_directive (s): + return '%% %s\n' % s + +def get_transposing (s): + return '' + +def get_num_instruments (s): + return '' + +attr_dict = { + 'C' : get_clef, + 'K' : get_key , + 'T' : get_timesig, + 'Q' : get_divisions_per_quarter, + 'D' : get_directive, + 'X' : get_transposing, + 'I': get_num_instruments, + } + +def parse_musical_attributes (l): + s = '' + l = l[1:] + atts = re.split('[ \t]+', l) + for a in atts: + if not a: + continue + m = re.search ('(.):(.*)', a) + if m == None: + print 'Huh, unknown attr `%s\'' % a + continue + + s = s + attr_dict[m.group(1)](m.group (2)) + return s + + +def get_mudela_pitch (n, a, o): + c = '\'' + if o < 1: + c = ',' + o = 1 - o + + return get_mudela_notename (n,a) + '%s' % c * o + +def dump_header (h, out): + out.write ('\\header {\n') + for tup in h.items (): + out.write ('\t%s = \"%s\";\n' % tup) + out.write ('}\n') + +header_dict = parse_header (lines[0:12]) +dump_header (header_dict, sys.stdout) + + +lines = lines [12:] + + +def parse_line_comment (l): + return re.sub ('@' , '%' , l) + +def parse_note_line (l): + pitch = ((ord (l[0]) -ord('A')) + 5) % 7 + acc = 0 + l= l[1:] + while l[0] == 'f': + l= l[1:] + acc = acc - 1 + while l[0] == '#': + l= l[1:] + acc = acc + 1 + while l[0] in ' \t': + l= l[1:] + + oct = 0 + if l[0] in '0123456789': + oct = string.atoi (l[0]) - 4 + l= l[1:] + + while l[0] in ' \t': + l= l[1:] + + + print get_mudela_pitch (pitch,acc,oct), parse_duration(l[:2]) + l = l[2:] + + + + +def parse_duration (l): + s = '' + while l[0] in '0123456789': + s = s + l[0] + l= l[1:] + print l + num = string.atoi (s) + den = 4 * divisions + + current_dots = 0 + try_dots = [3, 2, 1] + for d in try_dots: + f = 1 << d + multiplier = (2*f-1) + if num % multiplier == 0 and den % f == 0: + num = num / multiplier + den = den / f + current_dots = current_dots + d + + if num <> 1: + sys.stderr.write ('huh. Durations left') + return '%s%s' % (den, '.' * current_dots) + +comment_switch = 0 +for l in lines: + if l[0] == '&': + comment_switch = not comment_switch + if comment_switch: + l= l[1:] + print '%{' + else: + print '%}' + + if comment_switch: + print l + continue + + if 0: + pass + elif l[0] == '$': + print parse_musical_attributes (l) + elif l[0] == '@': + parse_line_comment (l) + + elif l[0] in 'ABCDEFG': + parse_note_line (l)