Allow negatives and multi-accidentals

This commit is contained in:
Aria 2025-08-22 13:17:13 -05:00
parent b08890bd9e
commit 79453ac2c3
4 changed files with 9 additions and 23 deletions

View file

@ -7,7 +7,7 @@ export const tokenizeNote = (note) => {
if (typeof note !== 'string') {
return [];
}
const [pc, acc = '', oct] = note.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/)?.slice(1) || [];
const [pc, acc = '', oct] = note.match(/^([a-gA-G])([#bsf]*)(-?[0-9]*)$/)?.slice(1) || [];
if (!pc) {
return [];
}