From 18359b0a35ec614e8632d4f4a7e7c2f8e130ccb0 Mon Sep 17 00:00:00 2001 From: Florian Demmer Date: Tue, 25 Jun 2024 19:26:57 +0100 Subject: [PATCH] remove parameter update throttling --- src/actions/instances.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/actions/instances.ts b/src/actions/instances.ts index 0aa3602..7e4a4df 100644 --- a/src/actions/instances.ts +++ b/src/actions/instances.ts @@ -10,7 +10,6 @@ import { OSCArgument, writePacket } from "osc"; import { showNotification } from "./notifications"; import { NotificationLevel } from "../models/notification"; import { oscQueryBridge } from "../controller/oscqueryBridgeController"; -import throttle from "lodash.throttle"; import { PresetRecord } from "../models/preset"; import { AppSetting } from "../models/settings"; import { DataRefRecord } from "../models/dataref"; @@ -238,7 +237,7 @@ export const triggerInstanceMidiNoteOffEventOnRemote = (instance: InstanceStateR oscQueryBridge.sendPacket(writePacket(message)); }; -export const setInstanceParameterValueNormalizedOnRemote = throttle((instance: InstanceStateRecord, param: ParameterRecord, value: number): AppThunk => +export const setInstanceParameterValueNormalizedOnRemote = (instance: InstanceStateRecord, param: ParameterRecord, value: number): AppThunk => (dispatch) => { const message = { @@ -251,7 +250,7 @@ export const setInstanceParameterValueNormalizedOnRemote = throttle((instance: I oscQueryBridge.sendPacket(writePacket(message)); // optimistic local state update dispatch(setInstance(instance.setParameterNormalizedValue(param.id, value))); - }, 100); + } export const setInstanceDataRefValueOnRemote = (instance: InstanceStateRecord, dataref: DataRefRecord, file?: DataFileRecord): AppThunk => () => {