From 28906d273ce143b9a48f200401ded7d375f2b472 Mon Sep 17 00:00:00 2001 From: olzzon Date: Wed, 24 Apr 2019 21:21:13 +0200 Subject: [PATCH] Fix: Index offset when calling snap from automation --- src/constants/AutomationPresets.js | 2 +- src/utils/AutomationConnection.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/constants/AutomationPresets.js b/src/constants/AutomationPresets.js index 37851db2..50658f7e 100644 --- a/src/constants/AutomationPresets.js +++ b/src/constants/AutomationPresets.js @@ -23,7 +23,7 @@ export const AutomationPresets = { X_MIX: '/take', SNAP_MIX: '/snap/{value1}' }, - toAutomation: { + toAutomation: { // ToDo: CHANNEL_PGM_ON_OFF: '/ch/{value1}/mix/pgm', CHANNEL_PST_ON_OFF: '/ch/{value1}/mix/pst', }, diff --git a/src/utils/AutomationConnection.js b/src/utils/AutomationConnection.js index 9837fee6..e5a98e6b 100644 --- a/src/utils/AutomationConnection.js +++ b/src/utils/AutomationConnection.js @@ -64,10 +64,10 @@ export class AutomationConnection { this.mixerConnection.updateOutLevel(ch-1); } else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation .SNAP_MIX)) { - let snapIndex = message.address.split("/")[2]; + let snapNumber = message.address.split("/")[2]; window.storeRedux.dispatch({ type:'SNAP_MIX', - snapIndex: snapIndex + snapIndex: snapNumber -1 }); } else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation .X_MIX)) {