source file of the GNU LilyPond music typesetter
- (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "engraver.hh"
SCM key = scm_cons (scm_from_int (p->get_octave ()),
scm_from_int (p->get_notename ()));
+ int bn = measure_number (context());
+
SCM handle = scm_assoc (key, keysig);
+ if (handle != SCM_BOOL_F)
+ {
+ bool same_bar = (bn == robust_scm2int (scm_caddr (handle), 0));
+ bool same_alt
+ = (p->get_alteration () == robust_scm2rational (scm_cadr (handle), 0));
+
+ if (!same_bar || (same_bar && !same_alt))
+ handle = SCM_BOOL_F;
+ }
+
bool print_acc
- = (handle == SCM_BOOL_F) || p->get_alteration () == Rational (0);
+ = (handle == SCM_BOOL_F) || p->get_alteration () == Rational (0)
+ || (ev->get_property ("force-accidental") == SCM_BOOL_T);
if (trill_head_)
{
ADD_TRANSLATOR (Pitched_trill_engraver,
/* doc */
- "Print the bracketed notehead after a notehead with trill.",
+ "Print the bracketed note head after a note head with trill.",
/* create */
"TrillPitchHead "
"TrillPitchAccidental "
"TrillPitchGroup ",
- /* read */ "",
+ /* read */
+ "",
- /* write */ "");
+ /* write */
+ ""
+ );