-
-
- /*
- We should not record the accidental if it is the first
- note and it is tied from the previous measure.
-
- Checking whether it is tied also works mostly, but will it
- always do the correct thing?
- */
-
-
- int n = pitch->get_notename ();
- int o = pitch->get_octave ();
- int a = pitch->get_alteration ();
- SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
-
- /*
- TODO: Speed this up!
-
- Perhaps only check translators mentioned in the auto-accidentals?
- -rz
-
- TODO: profile this.
-
- I'd be surprised if the impact of this would be
- measurable. Anyway, it seems localsig doesn't change
- every time-step, but a set_property() is done every
- time. We could save on that, probably.
-
- --hwn.
-
-
- */
-
- while (origin)
- {
- SCM localsig = origin->get_property ("localKeySignature");
- if (tie_changes)
- {
- /*
- Remember an alteration that is different both from
- that of the tied note and of the key signature.
- */
- localsig = ly_assoc_front_x
- (localsig, on_s, gh_cons (SCM_BOOL_T, barnum));
- }
- else
- {
- /*
- not really really correct if there are more than one
- noteheads with the same notename.
- */
- localsig = ly_assoc_front_x
- (localsig, on_s, gh_cons (scm_int2num (a), barnum));
- }
- origin->set_property ("localKeySignature", localsig);
- origin = origin->daddy_trans_;
- }