mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-24 05:57:17 -04:00
consume n with scale
This commit is contained in:
@@ -150,6 +150,9 @@ export const scale = register('scale', function (scale, pat) {
|
||||
return pat.withHap((hap) => {
|
||||
const isObject = typeof hap.value === 'object';
|
||||
let note = isObject ? hap.value.n : hap.value;
|
||||
if (isObject) {
|
||||
delete hap.value.n; // remove n so it won't cause trouble
|
||||
}
|
||||
const asNumber = Number(note);
|
||||
if (!isNaN(asNumber)) {
|
||||
// TODO: worth keeping for supporting ':' in (non-mininotation) strings?
|
||||
|
||||
Reference in New Issue
Block a user