fix: better fix
This commit is contained in:
parent
8d9278419d
commit
a71c5957cc
1 changed files with 1 additions and 2 deletions
|
|
@ -145,7 +145,7 @@ export const scaleTranspose = register('scaleTranspose', function (offset /* : n
|
||||||
export const scale = register('scale', function (scale, pat) {
|
export const scale = register('scale', function (scale, pat) {
|
||||||
// Supports ':' list syntax in mininotation
|
// Supports ':' list syntax in mininotation
|
||||||
if (Array.isArray(scale)) {
|
if (Array.isArray(scale)) {
|
||||||
scale = scale.join(' ');
|
scale = scale.flat().join(' ');
|
||||||
}
|
}
|
||||||
return pat.withHap((hap) => {
|
return pat.withHap((hap) => {
|
||||||
const isObject = typeof hap.value === 'object';
|
const isObject = typeof hap.value === 'object';
|
||||||
|
|
@ -154,7 +154,6 @@ export const scale = register('scale', function (scale, pat) {
|
||||||
if (!isNaN(asNumber)) {
|
if (!isNaN(asNumber)) {
|
||||||
// TODO: worth keeping for supporting ':' in (non-mininotation) strings?
|
// TODO: worth keeping for supporting ':' in (non-mininotation) strings?
|
||||||
scale = scale.replaceAll(':', ' ');
|
scale = scale.replaceAll(':', ' ');
|
||||||
scale = scale.replaceAll(',', ' ');
|
|
||||||
let [tonic, scaleName] = Scale.tokenize(scale);
|
let [tonic, scaleName] = Scale.tokenize(scale);
|
||||||
const { pc, oct = 3 } = Note.get(tonic);
|
const { pc, oct = 3 } = Note.get(tonic);
|
||||||
note = scaleOffset(pc + ' ' + scaleName, asNumber, pc + oct);
|
note = scaleOffset(pc + ' ' + scaleName, asNumber, pc + oct);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue