-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.
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.
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);
Score_element *e =dynamic_cast<Score_element*>(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));
}
else
return elem_l_arr_.find_i (nonconst);
}
+
*/
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);
}
}
}
ADD_THIS_TRANSLATOR(Align_note_column_engraver);
+
beam_p->add_stem ((*stem_l_arr_p_)[i]);
}
+ announce_element (Score_element_info (beam_p, 0));
return beam_p;
}
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;
}
}
}
}
+
Axis_group_element::Axis_group_element()
{
- set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+ set_elt_property ("transparent", SCM_BOOL_T);
}
void
{
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.
}
}
return Graphical_element::extent (a);
}
+
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<Axis_group_element*> (elts_[i]->parent_l (Y_AXIS)))
{
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);
}
{
return Spanner::do_width ();
}
+
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);
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));
}
ADD_THIS_TRANSLATOR(Bar_engraver);
+
-/*
- bar-req-collect-engraver.cc -- implement Bar_req_collect_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#include "command-request.hh"
-
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_);
}
}
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))
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));
}
+
Bar::Bar ()
{
- set_elt_property (breakable_scm_sym, SCM_BOOL_T);
+ set_elt_property ("breakable", SCM_BOOL_T);
type_str_ = "|";
}
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_ = "|";
set_empty (true, X_AXIS);
}
+
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
ADD_THIS_TRANSLATOR(Base_span_bar_engraver);
+
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);
ADD_THIS_TRANSLATOR(Beam_engraver);
+
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_);
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;
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);
}
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 ();
/* 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 ();
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
for (int i=0; i <stems_.size (); i++)
{
Stem *s = stems_[i];
- s->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;
}
}
{
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;
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"
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;
+ 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;
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 ();
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");
+
/*
----------------------------------------------------------
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]
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;
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++)
return leftbeams;
}
+
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
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
// 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;
Bezier::set (control);
}
+
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);
}
return offset_arr;
}
+
flip (&align_dir_);
sort_elements ();
- Real interline= paper_l ()->get_realvar (interline_scm_sym);
+ Real interline= paper_l ()->get_var ("interline");
Link_array<Score_element> elems;
for (int i=0; i < elem_l_arr_.size(); i++)
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");
symbol_list = SCM_CDR (scm_reverse (symbol_list));
for (int i=0; i <elems.size()-1; i++)
{
- elems[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])));
// 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();
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;
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)));
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;
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);
hg->add_element (it);
}
+
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"));
}
translate_axis(2.0 * dl * dir_, Y_AXIS);
}
+
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
}
}
}
+
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"));
}
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);
}
}
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_));
}
}
ADD_THIS_TRANSLATOR(Clef_engraver);
+
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);
}
}
*/
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;
{
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);
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);
}
+
#include "note-column.hh"
#include "note-head.hh"
#include "paper-def.hh"
-#include "ly-symbols.hh"
+
#include "tuple.hh"
Collision::Collision()
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++)
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;
}
}
+
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;
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])
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);
}
}
}
+
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_);
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));
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);
}
}
}
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));
}
}
ss_span_p_->add_support (i.elem_l_);
}
}
+
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));
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
add_dependency (textitem_l);
}
+
-/*
- font-size-grav.cc -- implement Font_size_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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);
-
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;
}
+
{
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 ();
Grace_align_item::do_add_processing ()
{
}
+
*/
#include "grace-engraver-group.hh"
#include "lily-guile.hh"
-#include "ly-symbols.hh"
+
#include "score-element.hh"
#include "musical-request.hh"
// 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
}
return false;
}
+
*/
#include "grace-performer-group.hh"
#include "lily-guile.hh"
-#include "ly-symbols.hh"
+
#include "audio-element.hh"
ADD_THIS_TRANSLATOR (Grace_performer_group);
// 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;
}
return hebbes_b;
}
+
}
else if (Note_head * n = dynamic_cast <Note_head*> (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<Local_key_item*>(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_);
}
ADD_THIS_TRANSLATOR(Grace_position_engraver);
+
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);
}
{
Axis_group_spanner::do_print ();
}
+
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)));
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
add_dependency (textitem_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);
-/*
- ly-symbols.hh -- declare SCM symbols.
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-
-#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 */
-
/*
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.
return false;
Item * i =dynamic_cast<Item*> (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
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);
}
}
return CENTER;
}
+
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_));
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"));
}
}
}
ADD_THIS_TRANSLATOR (Key_engraver);
+
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);
}
+
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<Grace_align_item*> (info.elem_l_);
if (he_gr && !selfgr && gai)
ADD_THIS_TRANSLATOR(Local_key_engraver);
+
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());
Molecule m;
Atom at
- (gh_list (beam_scm_sym,
+ (gh_list (gh_symbol2scm ("beam"),
gh_double2scm (width),
gh_double2scm (slope),
gh_double2scm (thick),
}
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)),
{
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]),
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;
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);
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;
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),
{
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),
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);
{
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),
}
return m;
}
+
-/*
- ly-symbols.cc -- implement scheme symbols
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
-#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);
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_));
}
req_l_ =0;
}
+
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);
}
}
+
Time_description const *time = get_staff_info().time_C_;
mmrest_p_ = new Multi_measure_rest;
if(dynamic_cast<Repetitions_req *> (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_;
}
}
+
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)
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);
}
return a;
}
+
{
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++)
{
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 ("");
}
+
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;
}
translate_rests (-d * discrete_dist);
}
+
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));
out->dim_ = b;
return out;
}
+
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);
ADD_THIS_TRANSLATOR(Note_heads_engraver);
+
{
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);
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");
}
return str;
}
+
}
#endif
- SCM scm = gh_cons (header_scm_sym, args_scm);
+ SCM scm = gh_cons (gh_symbol2scm ("header"), args_scm);
output_scheme (scm);
}
}
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_),
SCM scm = gh_list (ly_symbol ("stop-last-line"), SCM_UNDEFINED);
output_scheme (scm);
}
+
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_);
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);
}
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);
}
}
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);
}
+
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));
}
+
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<Slur*> (i.elem_l_))
return ;
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);
}
}
}
ADD_THIS_TRANSLATOR(Rhythmic_column_engraver);
+
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 ();
}
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
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);
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.
{
return SCM_CDR(a) == SCM_CDR(b) ? SCM_BOOL_T : SCM_BOOL_F;
}
+
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();
}
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();
}
{
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);
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 <Spanner *> (elem_p))
{
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
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))
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));
}
}
/*
result is junked.
*/
- command_column_l_->remove_elt_property (breakable_scm_sym);
+ command_column_l_->remove_elt_property ("breakable");
}
ADD_THIS_TRANSLATOR(Score_engraver);
pscore_p_ = new Paper_score;
pscore_p_->paper_l_ = dynamic_cast<Paper_def*>(output_def_l_);
}
+
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 ;
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));
}
}
ADD_THIS_TRANSLATOR(Score_priority_engraver);
+
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);
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
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);
}
+
}
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);
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);
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);
ADD_THIS_TRANSLATOR(Script_engraver);
+
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);
/*
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);
}
{
}
+
{
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);
ADD_THIS_TRANSLATOR( Separating_line_group_engraver);
+
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);
}
#endif
}
+
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");
return a;
}
+
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<Rhythmic_req*>(i.req_l_))
ADD_THIS_TRANSLATOR(Spacing_engraver);
+
Spacing_spanner::Spacing_spanner ()
{
- set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+ set_elt_property ("transparent", SCM_BOOL_T);
}
int
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())
{
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
{
*/
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;
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.;
+
{
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_ == "|:")
{
type_str_ = "";
}
+
{
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;
if (Span_bar * b = dynamic_cast<Span_bar *> (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
}
}
ADD_THIS_TRANSLATOR (Staff_group_bar_engraver);
ADD_THIS_TRANSLATOR (Span_score_bar_engraver);
+
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 ();
}
+
{
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;
}
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);
{
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 ;
}
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);
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 ());
{
Staff_side_element::do_print ();
}
+
}
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_);
ADD_THIS_TRANSLATOR(Staff_symbol_engraver);
+
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
return 2.0 * y / staff_line_leading_f ();
}
+
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;
ADD_THIS_TRANSLATOR(Stem_engraver);
+
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!)
// 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_" : "";
maxy_f_ += interstaff_f_ * beam_dir_;
}
+
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 ();
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);
translate_axis (desired_coord * dir_ * staff_line_leading_f () / 2.0 - now_coord, Y_AXIS);
}
}
+
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?
stem_l_ = s;
add_dependency (s);
}
+
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");
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);
}
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 ());
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 ();
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);
}
}
}
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);
}
}
Staff_symbol_referencer::do_substitute_element_pointer (o,n);
}
+
}
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_;
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))
}
ADD_THIS_TRANSLATOR(Text_engraver);
+
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 ());
{
DEBUG_OUT << "text= " << text_str_;
}
+
{
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");
*/
if (head_l_drul_[d]
/*
- && head_l_drul_[d]->remove_elt_property (extremal_scm_sym) != SCM_BOOL_F)
- ugh, ugh:
a~a~a;
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;
a.push (r);
return a;
}
+
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
}
ADD_THIS_TRANSLATOR(Time_signature_engraver);
+
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<int> tmparr = args_;
+
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]));
}
}
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)
ADD_THIS_TRANSLATOR(Tuplet_engraver);
+
// 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.
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_));
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);
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");
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;
}
add_dependency (n);
}
+
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 ();
add_dependency (c);
}
+
marginBreakPriority = #-5
\consists "Separating_line_group_engraver";
- \consists "Font_size_engraver";
\accepts "Voice";
dynamicStyle = #"dynamic"
\consists "Script_engraver";
\consists "Script_column_engraver";
\consists "Rhythmic_column_engraver";
- \consists "Font_size_engraver";
\consists "Slur_engraver";
\consists "Tie_engraver";
\consists "Tuplet_engraver";
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
MEAN = 3.0;
MEDIAN = 4.0;
-#'beam_dir_algorithm = #'majority
-#'slope_quantisation = #'normal
+#'Beam::beam-dir-algorithm = #'majority
+#'Beam::slope-quantisation = #'normal
%{
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
-#
-
-depth = ../..
-
-examples=sonata-k3-l378
-LOCALSTEPMAKE_TEMPLATES=mutopia
-
-include $(depth)/make/stepmake.make
-
-
- %{
-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
-<e''4 a'> 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'] <g'4 bes'>
-} >
- \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";
- %{
-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";
-
-
-\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";
- \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 <bes'4 g''> |
- <a' g''> <d'' f''> <d'' f''> <cis'' e''> |
- 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 <b'2 gis'> }
- >
- 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'2 e'> <gis' b'> } |
- >
- a'4 s2 [e'16 d' c' b] |
- a4 s2 <f'4 a' d''4> | %% added some chording.
- <e'2 a' c''> <e' gis' b'> |
- 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'2 b> <c'4 a> 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";
-
-\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
-<e''4 a'> 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'] <g'4 bes'>
-} >
- \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";
-\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-.> <b-. d-. g-.> <)b-. d-. g-.>]
- <[b8-. d-. g-.(> <b-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.>]
- |
-%2
- <[c d g_"{\it simile}" \< > <c d g> <c d fis> <c d fis>]
- <[c d fis> < \! c d fis > <c d fis> <c d fis>]
-%3
- |
- <[d f gis \> > <d f gis> <d f gis> < \! d f gis >]
- <[c e a> <c e a> <e a c> <e a c>]
- |
-%4
- <[d a' b> <d a' b> <d g! b> <d g b>]
- <[d g a> <d g a> <d fis a> <d fis a>] |
-%5
- \repeat semi 2 {
- <[b_. d g( \pp > <b_. d g> <b_. d g> <)b_. d g>]
- <[b_. d g(> <b_. d g> <b_. d g> <)b_. d g>]
- |
-%6
- <[c d g> <c d g> <c d fis> <c d fis>]
- <[c d fis> <c d fis> < a c dis fis> <a c dis fis>]
- |
-%7
- <[g c e g> <g c e g> <g c e g> <g c e g >]
- <[g c e g> <g c e g> <g c e> <g c e>]
- |
-%8
- <[g c e> <g c e> <g b d> <g b d>]
- <[g b d> <g b d> <g b d> <g b d>]
- |
-%9
- <[fis a d> <fis a d> <fis a d> <fis a d>]
- <[g b d> <g b d> <g b d> <g b d>]
- |
-%10
- [< g a c d \> > <g a c d> <fis a c d> <\! fis a c d >]
- <[g b d> <g b d><g b d><g b d>]
- |
-%11
- <[g a c d> <g a c d> <fis a c d> <fis a c d>]
- <[g b d> <g b d>] <[b d g> <b d g>]
- |
-%12
- [<d fis b> <d fis b><d fis b><d fis b>]
- [<d fis b> <d fis b><d fis b><d fis b>]
- |
-%13
- <[e fis b> <e fis b> < e fis ais> <e fis ais>]
- <[e fis ais> <e fis ais> <d fis b> <d fis b>]
- |
-%14
- <[cis g' a!> <cis g' a> <cis a' g> <cis a' g>]
- <[cis g' a> <cis g' a> < e g a> <e g a>]
- |
-%15
- <[e g a> <e g a> <d fis a> <d fis a>]
- <[d fis a> <d fis a> <d fis a> <d fis a>]
- |
-%16
- <[d fis a> <d fis a> <d fis a> <d fis a>]
- <[d fis a \< > <d fis a> <d fis a> < \! d fis a >]
- |
-%17
- <[d a' c \> > <d a' c><d a' c>< \! d a' c >]
- <[d a' c> <d a' c><d a' c><d a' c>]
- |
-%18
- <[d g a c \> > <d g a c> <d g a c> <d g a c>]
- <[d fis a c> <\! d fis a c \pp > <d fis a c> <d fis a c>]
- |
-%19
- <[d g b> <d g b> <d g b> <d g b>]
- <[d g b> <d g b> <d g b> <s g b>]
- |
-%20
- <[e g c> <e g c> <e gis c> <e gis c>]
- <[e a c> <e a c> <e b' c> < e b' c>]
- |
-%21
- <[e c'> <e c'> <e a c> <e a c>]
- <[e a c> <e a c> <e a c> <e a c>]
- |
-%22
- <[d a' c> <d a' c> <d a'> <d a'>]
- <[d a' d> <d a' d> <d a' c> <d a' c>]
- |
-%23
- <[b d b'> <b d b'> <b d a'> <b d a'>]
- <[b d g \< > <b d g> <b d fis> < \! b d fis >]
- |
-%24
- <[b d e \> > <b d e> <gis b e> < \! gis b e >]
- <[a c e> <a c e> <e' a> <e a>]
- |
-%25
- <[d a' c> <d a' c> <d a' c> <d a' c>]
- <[d a'> <d a' \> > <c d fis> < \! c d fis \p >]
- |
-%26
- <[b d g> <b d g> <b d g> <b d g>]
- <[b d g> <b d g> <b d g> <b d g>]
- |
-%27
- <[c d g > <c d g > <c d fis > <c d fis >]
- <[c d fis \< > <c d fis >< \! c d fis ><c d fis >]
- |
-%28
- <[d f gis \> > <d f gis> < \! d f gis > <d f gis>]
- <[c e a> <c e a> <e a c> <e a c>]
-%29
- <[d a' b> <d a' b> <d g! b> <d g b>]
- <[d g a> <d g a> < d fis! a> <d fis a>]
- }
-%30
- <b2 d2 g2> 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 }
- }
-}
-
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
[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'
{
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|
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.
}
(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)
)
)
)
(list
(list 'stemLength number? 'length)
(list 'stemStyle string? 'style)
- (list 'noStemExtend boolean? 'no_stem_extend)
+ (list 'noStemExtend boolean? 'no-stem-extend)
))
)
(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))
)
)
(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
# ???
+
+#TODO:
+# UNDEF -> None
+
program_name = 'abc2ly'
--- /dev/null
+#!@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)