Allow negatives and multi-accidentals
This commit is contained in:
parent
b08890bd9e
commit
79453ac2c3
4 changed files with 9 additions and 23 deletions
|
|
@ -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 [];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue