diff --git a/companion/HELP.md b/companion/HELP.md index b3e5a14..0548568 100644 --- a/companion/HELP.md +++ b/companion/HELP.md @@ -1,8 +1,9 @@ ## Voicemod API ### Configuration -Due to a limitation in the voicemod software, host address should always be 127.0.0.1. -It was stated in their issue tracker that they will be looking at adding a toggle to + +Due to a limitation in the voicemod software, host address should always be 127.0.0.1. +It was stated in their issue tracker that they will be looking at adding a toggle to allow connections from outside the local host. This would benefit users that want to run voicemod on another system from the controlling software. diff --git a/feedbacks.js b/feedbacks.js index bdae0d5..2dc4fd8 100644 --- a/feedbacks.js +++ b/feedbacks.js @@ -3,9 +3,9 @@ const { combineRgb } = require('@companion-module/base') module.exports = async function (self) { self.setFeedbackDefinitions({ VoiceChangerState: { - name: 'Voice Changer State', + name: 'Voice Changer Enabled', type: 'boolean', - label: 'Voice Changer State', + label: 'Voice Changer Enabled', defaultStyle: { bgcolor: combineRgb(255, 0, 0), color: combineRgb(0, 0, 0), @@ -16,9 +16,9 @@ module.exports = async function (self) { }, }, BackgroundEffectState: { - name: 'Background Effect State', + name: 'Background Effect Enabled', type: 'boolean', - label: 'Background Effect Status', + label: 'Background Effect Enabled', defaultStyle: { bgcolor: combineRgb(255, 0, 0), color: combineRgb(0, 0, 0), @@ -29,9 +29,9 @@ module.exports = async function (self) { }, }, HearMyVoiceState: { - name: 'Hear My Voice State', + name: 'Hear My Voice Enabled', type: 'boolean', - label: 'Hear My Voice State', + label: 'Hear My Voice Enabled', defaultStyle: { bgcolor: combineRgb(255, 0, 0), color: combineRgb(0, 0, 0), @@ -42,9 +42,9 @@ module.exports = async function (self) { }, }, MicMutedState: { - name: 'Microphone Mute State', + name: 'Microphone Mute Enabled', type: 'boolean', - label: 'Microphone Mute State', + label: 'Microphone Mute Enabled', defaultStyle: { bgcolor: combineRgb(255, 0, 0), color: combineRgb(0, 0, 0), @@ -55,9 +55,9 @@ module.exports = async function (self) { }, }, MemesMutedForMeState: { - name: 'Soundboard - Mute For Me State', + name: 'Soundboard - Mute For Me Enabled', type: 'boolean', - label: 'Soundboard Mute For Me State', + label: 'Soundboard Mute For Me Enabled', defaultStyle: { bgcolor: combineRgb(255, 0, 0), color: combineRgb(0, 0, 0), diff --git a/main.js b/main.js index 7f13839..213ec03 100644 --- a/main.js +++ b/main.js @@ -40,10 +40,12 @@ class ModuleInstance extends InstanceBase { this.vm.internal.on('backgroundEffectsEnabledEvent', (background) => { this.backgroundEffectsEnabled = true this.checkFeedbacks('BackgroundEffectState') + this.updateVariableDefinitions() }) this.vm.internal.on('backgroundEffectsDisabledEvent', (background) => { this.backgroundEffectsEnabled = false this.checkFeedbacks('BackgroundEffectState') + this.updateVariableDefinitions() }) this.vm.internal.on('voiceChangerEnabledEvent', (data) => { this.voiceChangerEnabled = true @@ -58,10 +60,12 @@ class ModuleInstance extends InstanceBase { this.vm.internal.on('hearMySelfEnabledEvent', (data) => { this.hearMyVoiceEnabled = true this.checkFeedbacks('HearMyVoiceState') + this.updateVariableDefinitions() }) this.vm.internal.on('hearMySelfDisabledEvent', (data) => { this.hearMyVoiceEnabled = false this.checkFeedbacks('HearMyVoiceState') + this.updateVariableDefinitions() }) this.vm.internal.on('muteMicrophoneEnabledEvent', (data) => { this.muteEnabled = true @@ -76,10 +80,12 @@ class ModuleInstance extends InstanceBase { this.vm.internal.on('muteMemeForMeEnabledEvent', (data) => { this.muteMemesEnabled = true this.checkFeedbacks('MemesMutedForMeState') + this.updateVariableDefinitions() }) this.vm.internal.on('muteMemeForMeDisabledEvent', (data) => { this.muteMemesEnabled = false this.checkFeedbacks('MemesMutedForMeState') + this.updateVariableDefinitions() }) this.vm.internal.on('getAllSoundboard', (data) => { this.updateActions() @@ -107,6 +113,7 @@ class ModuleInstance extends InstanceBase { this.vm.internal.getVoiceChangerStatus() this.vm.internal.getMuteMicStatus() + this.failure = 0 this.loaded = true this.updateStatus(InstanceStatus.Ok) this.updatePresets() @@ -173,6 +180,9 @@ class ModuleInstance extends InstanceBase { this.setVariableValues({ microphoneMuted: this.muteEnabled, + hearMyVoice: this.hearMyVoiceEnabled, + hearBackgroundMusic: this.backgroundEffectsEnabled, + hearMemesForMe: this.muteMemesEnabled, voiceChangerStatus: this.voiceChangerEnabled, voiceSelected: this.currentVoiceName, }) diff --git a/variables.js b/variables.js index 4bd7f26..888404e 100644 --- a/variables.js +++ b/variables.js @@ -3,5 +3,8 @@ module.exports = async function (self) { { variableId: 'microphoneMuted', name: 'Microphone Muted' }, { variableId: 'voiceChangerStatus', name: 'Voice Changer Enabled' }, { variableId: 'voiceSelected', name: 'Current Voice Selected' }, + { variableId: 'hearMyVoice', name: 'Hear My Voice Enabled' }, + { variableId: 'hearBackgroundMusic', name: 'Background Music Enabled' }, + { variableId: 'hearMemesForMe', name: 'Hear Memes for Me Enabled' }, ]) }