Skip to content

Commit

Permalink
feat(scale_degree): ✨ add case for ScaleDegree.i.lowered
Browse files Browse the repository at this point in the history
  • Loading branch information
albertms10 committed Mar 2, 2024
1 parent 45f5fa9 commit 02382b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/scale/scale_degree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ final class MovableDoScaleDegreeNotation extends ScaleDegreeNotation {
@override
String scaleDegree(ScaleDegree scaleDegree) => switch (scaleDegree) {
ScaleDegree(ordinal: 1) => switch (scaleDegree) {
// TODO(albertms10): duplicated from `ScaleDegree.vii`
_ when scaleDegree.isLowered => 'Ti',
_ when scaleDegree.isRaised => 'Di',
_ => 'Do',
},
Expand Down
5 changes: 5 additions & 0 deletions test/src/scale/scale_degree_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ void main() {
test(
'returns the movable Do string representation of this ScaleDegree',
() {
expect(
ScaleDegree.i.lowered
.toString(system: ScaleDegreeNotation.movableDo),
'Ti',
);
expect(
ScaleDegree.i.toString(system: ScaleDegreeNotation.movableDo),
'Do',
Expand Down

0 comments on commit 02382b8

Please sign in to comment.