From 48526824d60ed8324200620b5d50ed2b80df5407 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Sun, 14 Aug 2022 15:51:01 +0200 Subject: [PATCH] support old way of setting frequencies --- packages/core/util.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/util.mjs b/packages/core/util.mjs index 86d798d6..c98da8fc 100644 --- a/packages/core/util.mjs +++ b/packages/core/util.mjs @@ -53,6 +53,8 @@ export const getPlayableNoteValue = (hap) => { // if value is number => interpret as midi number as long as its not marked as frequency if (typeof note === 'number' && context.type !== 'frequency') { note = fromMidi(hap.value); + } else if (typeof note === 'number' && context.type === 'frequency') { + note = hap.value; // legacy workaround.. will be removed in the future } else if (typeof note !== 'string' || !isNote(note)) { throw new Error('not a note: ' + JSON.stringify(note)); }