From edf95b0f2bc64f61707309529393e946bb1676f2 Mon Sep 17 00:00:00 2001 From: Peter C <12292660+PeterC89@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:25:51 +0100 Subject: [PATCH 1/3] feat: Optionally allow the fade time to be specified with the fader level --- server/src/utils/AutomationConnection.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/utils/AutomationConnection.ts b/server/src/utils/AutomationConnection.ts index c10dd44f..03d47c8b 100644 --- a/server/src/utils/AutomationConnection.ts +++ b/server/src/utils/AutomationConnection.ts @@ -147,7 +147,14 @@ export class AutomationConnection { } else if (check('CHANNEL_FADER_LEVEL')) { wrapChannelCommand((ch: any) => { store.dispatch(storeFaderLevel(ch - 1, message.args[0])) - mixerGenericConnection.updateOutLevel(ch - 1, -1) + if (message.args.length > 1) { + mixerGenericConnection.updateOutLevel( + ch - 1, + parseFloat(message.args[1]) + ) + } else { + mixerGenericConnection.updateOutLevel(ch - 1, -1) + } global.mainThreadHandler.updatePartialStore(ch - 1) }) } else if (check('INJECT_COMMAND')) { From 80a2cdfdd044b09f0b8062c5e3179c3562c85b03 Mon Sep 17 00:00:00 2001 From: Peter C <12292660+PeterC89@users.noreply.github.com> Date: Thu, 10 Aug 2023 00:44:00 +0100 Subject: [PATCH 2/3] fix: Don't fade if the start and end levels are the same --- server/src/utils/MixerConnection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/utils/MixerConnection.ts b/server/src/utils/MixerConnection.ts index d369306e..ebc84660 100644 --- a/server/src/utils/MixerConnection.ts +++ b/server/src/utils/MixerConnection.ts @@ -495,7 +495,7 @@ export class MixerGenericConnection { const currentTimeMS = Date.now() const elapsedTimeMS = currentTimeMS - startTimeAsMs - if (elapsedTimeMS >= fadeTime) { + if (elapsedTimeMS >= fadeTime || endLevel === startLevel) { this.mixerConnection[mixerIndex].updateFadeIOLevel( channelIndex, endLevel From e69b7b11e382e341ef76af6299117299dcec3db2 Mon Sep 17 00:00:00 2001 From: Peter C <12292660+PeterC89@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:33:20 +0100 Subject: [PATCH 3/3] docs: Document fadeTime arg for faderLevel --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29f95c85..644fec4d 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,9 @@ To set the state send these OSC commands from you Automation to ProducersAudioMi #### Set channel faderlevel: -/ch/1/mix/faderlevel - float {between 0 and 1} +(the first defines the fader level) +(if second is missing it will take default fade value) +/ch/1/mix/faderlevel - float {between 0 and 1} - float { fadetime in ms } #### Set channel label: