mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 20:48:27 +00:00
fix rootNotes with accidentals
This commit is contained in:
parent
d87049c7f8
commit
eaa250a962
@ -42,7 +42,7 @@ Pattern.prototype.voicings = function (range) {
|
|||||||
Pattern.prototype.rootNotes = function (octave = 2) {
|
Pattern.prototype.rootNotes = function (octave = 2) {
|
||||||
// range = ['G1', 'C3']
|
// range = ['G1', 'C3']
|
||||||
return this.fmap((value) => {
|
return this.fmap((value) => {
|
||||||
const [_, root] = value.match(/^([a-gA-G])[b#]?.*$/);
|
const [_, root] = value.match(/^([a-gA-G][b#]?).*$/);
|
||||||
return root + octave;
|
return root + octave;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user