From c0f006eef1d49000f8d3a317ee2f40a9f7d39f10 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Wed, 13 Apr 2022 19:01:46 +0200 Subject: [PATCH] objectify in osc --- packages/osc/osc.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/osc/osc.mjs b/packages/osc/osc.mjs index 330d1ec54..04d15b98a 100644 --- a/packages/osc/osc.mjs +++ b/packages/osc/osc.mjs @@ -1,6 +1,6 @@ import OSC from './osc.js'; import { Pattern } from '@strudel.cycles/core/strudel.mjs'; -import { dirtify } from '@strudel.cycles/core/util.mjs'; +import { dirtify, objectify } from '@strudel.cycles/core/util.mjs'; const comm = new OSC(); comm.open(); @@ -11,7 +11,7 @@ Pattern.prototype.osc = function () { const onTrigger = (time, event, currentTime) => { // time should be audio time of onset // currentTime should be current time of audio context (slightly before time) - const keyvals = Object.entries(event.value).flat(); + const keyvals = Object.entries(objectify(event.value)).flat(); const offset = (time - currentTime + latency) * 1000; const ts = Math.floor(Date.now() + offset); const message = new OSC.Message('/dirt/play', ...keyvals);