Skip to content

Commit

Permalink
Merge pull request rism-digital#3869 from DDMAL/c4-fix
Browse files Browse the repository at this point in the history
fix: change default octave to c4 when adjusting pitch
  • Loading branch information
lpugin authored Nov 28, 2024
2 parents d178cac + a0278a8 commit ea0397e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/editortoolkit_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4252,11 +4252,10 @@ bool EditorToolkitNeume::AdjustPitchFromPosition(Object *obj, Clef *clef)
LogError("Clef %s does not have valid shape. Shape is %s", clef->GetID().c_str(), clef->GetShape());
return false;
}
pi->SetOct(3);

// The default octave = 3, but the actual octave is calculated by
// The default octave = 4, but the actual octave is calculated by
// taking into account the displacement of the clef
int octave = 3;
int octave = 4;
if (clef->GetDis() && clef->GetDisPlace()) {
octave += (clef->GetDisPlace() == STAFFREL_basic_above ? 1 : -1) * (clef->GetDis() / 7);
}
Expand Down Expand Up @@ -4323,9 +4322,9 @@ bool EditorToolkitNeume::AdjustPitchFromPosition(Object *obj, Clef *clef)
assert(pi);
pi->SetPname(pname);

// The default octave = 3, but the actual octave is calculated by
// The default octave = 4, but the actual octave is calculated by
// taking into account the displacement of the clef
int octave = 3;
int octave = 4;
if (clef->GetDis() && clef->GetDisPlace()) {
octave += (clef->GetDisPlace() == STAFFREL_basic_above ? 1 : -1) * (clef->GetDis() / 7);
}
Expand Down

0 comments on commit ea0397e

Please sign in to comment.