fix: duck mode with n
+ detect chord obj in rootNotes
This commit is contained in:
parent
0fd9ac6da3
commit
bbb29ebd7c
2 changed files with 8 additions and 6 deletions
|
|
@ -159,9 +159,10 @@ export const voicings = register('voicings', function (dictionary, pat) {
|
|||
*/
|
||||
export const rootNotes = register('rootNotes', function (octave, pat) {
|
||||
return pat.fmap((value) => {
|
||||
value = value.chord || value;
|
||||
const root = value.match(/^([a-gA-G][b#]?).*$/)[1];
|
||||
return root + octave;
|
||||
const chord = value.chord || value;
|
||||
const root = chord.match(/^([a-gA-G][b#]?).*$/)[1];
|
||||
const note = root + octave;
|
||||
return value.chord ? { note } : note;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue