subsect(Basic Note Specification)
A note specification has the form
-var(pitch)[var(octavespec)][code(!)][var(duration)].
+var(pitch)[var(octavespec)][code(!)][code(?)][var(duration)].
The pitch of the note is specified by the note's name.
LilyPond has predefined note names for various languages. The default
context.
A reminder accidental can be forced by
using the optional exclamation mark `code(!)'
-on a pitch.
+on the pitch.
+A cautionary accidental, i.e., an accidental within paranthesis
+can be obtained using the optional question mark `code(?)' on the pitch.
mudela(fragment,verbatim,center)(
-cis' d' e' cis' c'! d' e' c'
+cis' d' e' cis' c'? d' e' c'!
)
+pl 17.mb2
+ - Full support for cautionary accidentals. Try input/test/accid.fly
+ Note that the font has changed.
+
pl 17.mb1
- bf: No unnecessary warnings about time signatures
- Added optional second argument of \key. Set to \major or \minor
* integrate midi-elts from mi2mu and lily?
- * cautionary accidental
-
* score-bar-scripts
FMR: Free memory read:
* This is occurring while in:
MAJOR_VERSION=1
MINOR_VERSION=0
PATCH_LEVEL=17
-MY_PATCH_LEVEL=mb1
+MY_PATCH_LEVEL=mb2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+\time 3/4;
+cisis'' cisis! cisis? |
+cis cis! cis? |
+c c! c? |
+ces ces! ces? |
+ceses ceses! ceses? |
Lookup (Symtables const&);
virtual ~Lookup ();
- Atom accidental (int) const;
+ Atom accidental (int,bool) const;
void add (String, Symtable*);
virtual Atom afm_find (String s, bool warn=true) const = 0;
Atom afm_find (String, String, bool warn=true) const;
int octave_i_;
/// 0 natural, 1 sharp, etc
int accidental_i_;
+ /// Used for cautionary accidentals
+ bool cautionary_b_;
void init () ;
Musical_pitch to_relative_octave (Musical_pitch);
|| (old_pitch_arr_[i] == pitch_arr_[j]
&& old_acc_arr_[i] != acc_arr_[j]))
{
- Atom a =lookup_l ()->accidental (0);
+ Atom a =lookup_l ()->accidental (0,false);
a.translate_axis (calculate_position(old_pitch_arr_[i], old_acc_arr_[i]) * inter, Y_AXIS);
Molecule m (a);
output->add_at_edge (X_AXIS, RIGHT, m);
for (int i =0; i < pitch_arr_.size(); i++)
{
- Atom a =lookup_l ()->accidental (acc_arr_[i]);
+ Atom a =lookup_l ()->accidental (acc_arr_[i],false);
a.translate_axis (calculate_position(pitch_arr_[i], acc_arr_[i]) * inter, Y_AXIS);
Molecule m (a);
output->add_at_edge (X_AXIS, RIGHT, m);
key_item_p_ = new Local_key_item;
announce_element (Score_element_info (key_item_p_, 0));
}
- ///////// TODO: Handle cautionary accidentals
if (note_l->cautionary_b_)
{
- warning (_("cautionary accidentals are not yet supported"));
+ note_l->pitch_.cautionary_b_ = true;
}
key_item_p_->add (note_l->pitch_);
Real dy =
(c0_position_i_ + accidental_pitch_arr_[i].notename_i_)
* paper()->internote_f ();
- Atom a (lookup_l ()->accidental (accidental_pitch_arr_[i].accidental_i_));
+ Atom a (lookup_l ()->accidental (accidental_pitch_arr_[i].accidental_i_,
+ accidental_pitch_arr_[i].cautionary_b_));
a.translate_axis (dy, Y_AXIS);
Molecule m(a);
}
Atom
-Lookup::accidental (int j) const
+Lookup::accidental (int j, bool cautionary) const
{
- return afm_find (String ("accidentals") + String ("-") + to_str (j));
+ Atom a = afm_find (String ("accidentals") + String ("-") + to_str (j));
+ if (cautionary)
+ {
+ Box b=a.extent();
+ Atom lparen = afm_find (String ("accidentals") + String ("-("));
+ lparen.translate_axis(b.x().min(),X_AXIS);
+ b.unite(lparen.extent());
+ Atom rparen = afm_find (String ("accidentals") + String ("-)"));
+ rparen.translate_axis(b.x().max(),X_AXIS);
+ b.unite(rparen.extent());
+ a = Atom(lparen.str_ + a.str_ + rparen.str_, b);
+ }
+ return a;
}
void
notename_i_ = 0;
octave_i_ = 0;
accidental_i_ = 0;
+ cautionary_b_ = false;
}
void
currentpicture := currentpicture shifted (w/2,0);
- fet_endchar;
-
+fet_endchar;
+
+
+def draw_paren =
+ save leftindent;
+ leftindent# := .2 interline#;
+ define_pixels(leftindent);
+ set_char_box(0, .5 interline#+stafflinethickness#,
+ interline#, interline#);
+ z1 = (leftindent,h);
+ z2 = (w-stafflinethickness,0);
+ z3 = (leftindent,-d);
+
+ penpos1(stafflinethickness, 35);
+ penpos2(2 stafflinethickness, 0);
+ penpos3(stafflinethickness, -35);
+
+ penlabels(1,2,3);
+ fill z2l{down} .. simple_serif(z3l, z3r, 90) .. z2r{up}
+ .. simple_serif(z1r, z1l, 90) .. z2l{down} -- cycle;
+enddef;
+
+fet_beginchar("Right paranthesis", ")", "rightparen")
+ draw_paren;
+fet_endchar;
+
+fet_beginchar("Left paranthesis", "(", "leftparen")
+ draw_paren;
+ currentpicture := currentpicture xscaled -1;
+ set_char_box(charwd, charbp, chardp, charht);
+fet_endchar;
fet_endgroup("accidentals");
%compatibility
%urg
-\fetdef\repeatcolon{18}
+\fetdef\repeatcolon{20}
\def\repeatbar{\repeatstopbar}
\def\startrepeat{\repeatstartbar}
\def\repeatbarstartrepeat{\repeatstopstart}