Write the staff one octave below sounding pitch.
AppImage release / appimage (push) Successful in 54s
AppImage release / appimage (push) Successful in 54s
Sounding C5 sits on the ledger line below the treble staff. Sharps and flats move with the note. Fingerings and the foot-up charts stay as they are. Version 0.2.2. Co-authored-by: catpersonisme <catpersonisme@gmail.com>
This commit is contained in:
6 files changed
+32
-26
No files matched your search
+11
-10
@@ -176,17 +176,18 @@ describe("fingering line", () => {
|
||||
});
|
||||
|
||||
describe("treble staff", () => {
|
||||
it("puts low C in the third space and high D on a ledger line", () => {
|
||||
expect(staffPlacement("C5")).toEqual({ index: 5, accidental: null });
|
||||
expect(staffPlacement("C#5")).toEqual({ index: 5, accidental: "sharp" });
|
||||
expect(staffPlacement("Eb5")).toEqual({ index: 7, accidental: "flat" });
|
||||
expect(staffPlacement("G5")).toEqual({ index: 9, accidental: null });
|
||||
expect(staffPlacement("A5")).toEqual({ index: 10, accidental: null });
|
||||
expect(staffPlacement("D7")).toEqual({ index: 20, accidental: null });
|
||||
it("writes each sounding pitch one octave lower", () => {
|
||||
expect(staffPlacement("C5")).toEqual({ index: -2, accidental: null });
|
||||
expect(staffPlacement("C#5")).toEqual({ index: -2, accidental: "sharp" });
|
||||
expect(staffPlacement("Eb5")).toEqual({ index: 0, accidental: "flat" });
|
||||
expect(staffPlacement("C6")).toEqual({ index: 5, accidental: null });
|
||||
expect(staffPlacement("C7")).toEqual({ index: 12, accidental: null });
|
||||
expect(staffPlacement("D7")).toEqual({ index: 13, accidental: null });
|
||||
expect(ledgerIndexes(-2)).toEqual([-2]);
|
||||
expect(ledgerIndexes(5)).toEqual([]);
|
||||
expect(ledgerIndexes(9)).toEqual([]);
|
||||
expect(ledgerIndexes(10)).toEqual([10]);
|
||||
expect(ledgerIndexes(20)).toEqual([10, 12, 14, 16, 18, 20]);
|
||||
expect(ledgerIndexes(12)).toEqual([10, 12]);
|
||||
expect(ledgerIndexes(13)).toEqual([10, 12]);
|
||||
expect(stemDown(-2)).toBe(false);
|
||||
expect(stemDown(5)).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user