diff --git a/server/constants/MixerProtocolPresets.ts b/server/constants/MixerProtocolPresets.ts index 4a94b9b3..beff3c91 100644 --- a/server/constants/MixerProtocolPresets.ts +++ b/server/constants/MixerProtocolPresets.ts @@ -3,7 +3,8 @@ import { ReaperMaster } from './mixerProtocols/reaperMaster'; import { BehringerXrMaster } from './mixerProtocols/behringerXrMaster'; import { MidasMaster } from './mixerProtocols/midasMaster'; import { GenericMidi } from './mixerProtocols/genericMidi'; -import { LawoClient } from './mixerProtocols/EmberLawo'; +import { LawoRelayVrx4 } from './mixerProtocols/LawoRelayVrx4'; +import { LawoMC2 } from './mixerProtocols/LawoMC2' import { CasparCGMaster } from './mixerProtocols/casparCGMaster'; import { DMXIS } from './mixerProtocols/DmxIs'; import { YamahaQLCL } from './mixerProtocols/yamahaQLCL' @@ -24,7 +25,8 @@ export const MixerProtocolPresets: { [key: string]: IMixerProtocolGeneric } = Ob behringerxrmaster: BehringerXrMaster, midasMaster: MidasMaster, genericMidi: GenericMidi, - lawoClient: LawoClient, + lawoRelayVrx4: LawoRelayVrx4, + lawoMC2: LawoMC2, dmxis: DMXIS, yamahaQlCl: YamahaQLCL, sslSystemT: SSLSystemT, diff --git a/server/constants/mixerProtocols/EmberLawo.ts b/server/constants/mixerProtocols/EmberLawo.ts deleted file mode 100644 index 133431be..00000000 --- a/server/constants/mixerProtocols/EmberLawo.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { IMixerProtocol, emptyMixerMessage } from '../MixerProtocolInterface'; - -export const LawoClient: IMixerProtocol = { - protocol: 'EMBER', - label: 'Lawo Relay VRX4 - client', - mode: "master", //master (ignores mixers faderlevel, and use faderlevel as gain preset), - //client (use feedback from mixers fader level) - leadingZeros: false, //some OSC protocols needs channels to be 01, 02 etc. - pingCommand: [emptyMixerMessage()], - pingResponseCommand: [emptyMixerMessage()], - pingTime: 0, //Bypass ping when pingTime is zero - initializeCommands: [emptyMixerMessage()], - channelTypes: [{ - channelTypeName: 'CH', - channelTypeColor: '#2f2f2f', - fromMixer: { - CHANNEL_FADER_LEVEL: [emptyMixerMessage()], - CHANNEL_OUT_GAIN: [{ - mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/FaderPosition', - value: 0, - type: 'real', - min: 0, - max: 100, - zero: 75 - }], - CHANNEL_VU: [emptyMixerMessage()], - CHANNEL_NAME: [{ - mixerMessage: '', - value: 0, - type: 'real', - min: -200, - max: 20, - zero: 0 - - }], - PFL: [emptyMixerMessage()], - NEXT_SEND: [emptyMixerMessage()], - THRESHOLD: [emptyMixerMessage()], - RATIO: [emptyMixerMessage()], - DELAY_TIME: [emptyMixerMessage()], - LOW: [emptyMixerMessage()], - LO_MID: [emptyMixerMessage()], - MID: [emptyMixerMessage()], - HIGH: [emptyMixerMessage()], - AUX_LEVEL: [emptyMixerMessage()], - CHANNEL_MUTE_ON: [emptyMixerMessage()], - CHANNEL_MUTE_OFF: [emptyMixerMessage()] - }, - toMixer: { - CHANNEL_FADER_LEVEL: [emptyMixerMessage()], - CHANNEL_OUT_GAIN: [{ - mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/FaderPosition', - value: 0, - type: 'real', - min: 0, - max: 100, - zero: 0 - - }], - CHANNEL_NAME: [{ - mixerMessage: '', - value: 0, - type: 'real', - min: -200, - max: 20, - zero: 0 - - }], - PFL_ON: [emptyMixerMessage()], - PFL_OFF: [emptyMixerMessage()], - NEXT_SEND: [emptyMixerMessage()], - THRESHOLD: [emptyMixerMessage()], - RATIO: [emptyMixerMessage()], - DELAY_TIME: [emptyMixerMessage()], - LOW: [emptyMixerMessage()], - LO_MID: [emptyMixerMessage()], - MID: [emptyMixerMessage()], - HIGH: [emptyMixerMessage()], - AUX_LEVEL: [emptyMixerMessage()], - CHANNEL_MUTE_ON: [emptyMixerMessage()], - CHANNEL_MUTE_OFF: [emptyMixerMessage()] - } - }], - fader: { - min: 0, - max: 200, - zero: 1300, - step: 10, - }, - meter: { - min: 0, - max: 1, - zero: 0.75, - test: 0.6, - } -} - diff --git a/server/utils/mixerConnections/EmberMixerConnection.ts b/server/utils/mixerConnections/EmberMixerConnection.ts index 718aada2..49be71f6 100644 --- a/server/utils/mixerConnections/EmberMixerConnection.ts +++ b/server/utils/mixerConnections/EmberMixerConnection.ts @@ -13,8 +13,8 @@ import { logger } from '../logger'; export class EmberMixerConnection { - mixerProtocol: IMixerProtocol; - emberConnection: any; + mixerProtocol: IMixerProtocol + emberConnection: EmberClient deviceRoot: any; emberNodeObject: Array; @@ -111,6 +111,7 @@ export class EmberMixerConnection { this.emberConnection.getElementByPath(this.mixerProtocol.channelTypes[typeIndex].fromMixer.CHANNEL_OUT_GAIN[0].mixerMessage.replace("{channel}", String(channelTypeIndex+1))) .then((node: any) => { this.emberNodeObject[ch-1] = node; + /* this.emberConnection.subscribe(node, (() => { if (!state.channels[0].channel[ch-1].fadeActive && !state.channels[0].channel[ch - 1].fadeActive @@ -127,6 +128,7 @@ export class EmberMixerConnection { }) ) + */ }) } @@ -167,6 +169,7 @@ export class EmberMixerConnection { /*this.emberConnection.getElementByPath(message) .then((element: any) => {*/ + console.log('Sending out message : ', message ) this.emberConnection.setValue( this.emberNodeObject[channel-1], typeof value === 'number' ? value : parseFloat(value) @@ -178,9 +181,10 @@ export class EmberMixerConnection { } sendOutLevelMessage(channel: number, value: number) { + console.log('Sending out Level : ', this.emberNodeObject[channel]) this.emberConnection.setValue( this.emberNodeObject[channel-1], - value + Math.round(value) ) .catch((error: any) => { console.log("Ember Error ", error)