{
#ifndef NPRINT
Dynamic_req::do_print();
- DOUT << " loudness " <<loudness_str (loudness_);
+ DOUT << " loudness " <<loudness_str ();
#endif
}
String
-Dynamic_req::loudness_str (Loudness l)
+Dynamic_req::loudness_static_str (Loudness l)
{
switch (l)
{
- case FFF: return "fff";
- case FF: return "ff";
- case F: return "f";
- case MF: return "mf";
- case MP: return "mp";
- case P: return "p";
- case PP: return "pp";
- case PPP: return "ppp";
+ case FFF: return "fff";
+ case FF: return "ff";
+ case F: return "f";
+ case MF: return "mf";
+ case MP: return "mp";
+ case P: return "p";
+ case PP: return "pp";
+ case PPP: return "ppp";
+ case FP: return "fp";
+ case SF: return "sf";
+ case SFZ: return "sfz";
}
- assert (false);
return "";
}
+String
+Absolute_dynamic_req::loudness_str () const
+{
+ String s = loudness_static_str (loudness_);
+ if (!s)
+ {
+ s = "mf";
+ warning (String ("Never heard of dynamic scale ")
+ + loudness_ + " assuming mf");
+ }
+ return s;
+}
+
+
Absolute_dynamic_req::Absolute_dynamic_req()
{
loudness_ = MF;
get_script_req (int d , General_script_def*def)
{
Musical_script_req* script_req_p = new Musical_script_req;
- script_req_p->dir_ =d;
+ script_req_p->dir_ =(Direction)d;
script_req_p->scriptdef_p_=def;
return script_req_p;
}
return a->position_i_ - b->position_i_;
}
+Interval
+Note_head::do_width () const
+{
+ Atom a = paper ()->lookup_l()->ball (balltype_i_);
+ Interval i = a.dim_[X_AXIS];
+ i+= x_dir_ * i.length ();
+ return i;
+}
+
Molecule*
Note_head::brew_molecule_p() const
{
// ugh
bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
- Symbol s = p->lookup_l()->ball (balltype_i_);
+ Atom s = p->lookup_l()->ball (balltype_i_);
out = new Molecule (Atom (s));
- out->translate (x_dir_ * s.dim.x().length (), X_AXIS);
+ out->translate (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
if (streepjes_b)
{
? -((-position_i_)/2)
: (position_i_-staff_size_i_)/2;
- Symbol str = p->lookup_l()->streepjes (s);
+ Atom str = p->lookup_l()->streepjes (s);
Molecule sm;
sm.add (Atom (str));
if (position_i_ % 2)
General_script_def * script;
Scalar *scalar;
String *string;
- Symbol * symbol;
+ Atom * symbol;
Symtable * symtable;
Symtables * symtables;
Text_def * textdef;
symboldef:
STRING box {
- $$ = new Symbol (*$1, *$2);
+ $$ = new Atom (*$1, *$2);
delete $1;
delete $2;
}
| STRING {
Box b (Interval (0,0), Interval (0,0));
- $$ = new Symbol (*$1, b);
+ $$ = new Atom (*$1, b);
delete $1;
}
;