Skip to content

Commit 2c4c89e

Browse files
committed
get simplified note name
1 parent 2f0cbd4 commit 2c4c89e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lib/FretBoard.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { onMount } from "svelte";
33
import { scaleBand, scalePoint } from "d3-scale";
44
import { range } from "d3-array";
5+
import { Note } from "tonal";
56
67
let { fretData } = $props();
78
@@ -57,7 +58,8 @@
5758
font-size="10"
5859
text-anchor="middle"
5960
class="fill-white"
60-
dominant-baseline="middle">{stringNote.note.letter}</text>
61+
dominant-baseline="middle"
62+
>{Note.simplify(stringNote.note.pc)}</text>
6163
</g>
6264
</g>
6365
{/each}

0 commit comments

Comments
 (0)