Skip to content

Commit

Permalink
Fixed: Use corresp instead of startid for fb
Browse files Browse the repository at this point in the history
Fixes #192
  • Loading branch information
ahankinson committed Feb 13, 2023
1 parent 1818b4d commit c37db4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/TextHandler.mss
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ function TempoTextHandler (this, textObject) {
function FiguredBassTextHandler (this, textObject) {
// 'text.staff.space.figuredbass'
harm = GenerateControlEvent(textObject, 'Harm');

// uniquely, for figured bass we do not use the startid here,
// since a figure can change halfway through a note. So we remove
// the startid and replace it with corresp, pointing to the
// same ID.
startidValue = libmei.GetAttribute(harm, 'startid');
libmei.RemoveAttribute(harm, 'startid');
libmei.AddAttribute(harm, 'corresp', startidValue);

fb = libmei.Fb();
libmei.AddChild(harm, fb);
ConvertFbFigures(fb, textObject);
Expand Down

0 comments on commit c37db4b

Please sign in to comment.