### Added

- three new variables

### Updated
- feedback labels have been reworded to make their value more obvious

### Fixed
- Reset failure variable in retry logic on successful connection
This commit is contained in:
2024-02-15 19:41:26 -05:00
parent 56d486e4cf
commit d5ce9d1810
4 changed files with 26 additions and 12 deletions

View File

@@ -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.

View File

@@ -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),

10
main.js
View File

@@ -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,
})

View File

@@ -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' },
])
}