From eaa250a962a3852b012bef0c65721bac40dff658 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Thu, 17 Mar 2022 15:02:58 +0100 Subject: [PATCH] fix rootNotes with accidentals --- repl/src/voicings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repl/src/voicings.ts b/repl/src/voicings.ts index fb2b6f52..32d0099e 100644 --- a/repl/src/voicings.ts +++ b/repl/src/voicings.ts @@ -42,7 +42,7 @@ Pattern.prototype.voicings = function (range) { Pattern.prototype.rootNotes = function (octave = 2) { // range = ['G1', 'C3'] return this.fmap((value) => { - const [_, root] = value.match(/^([a-gA-G])[b#]?.*$/); + const [_, root] = value.match(/^([a-gA-G][b#]?).*$/); return root + octave; }); };