Skip to content

Commit

Permalink
feat: lawo ruby gain + input select
Browse files Browse the repository at this point in the history
  • Loading branch information
Balte de Wit committed Jun 10, 2020
1 parent 0de941d commit d5b552c
Show file tree
Hide file tree
Showing 3 changed files with 480 additions and 1 deletion.
70 changes: 69 additions & 1 deletion server/constants/mixerProtocols/LawoRuby.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IMixerProtocol, emptyMixerMessage } from '../MixerProtocolInterface'

export const LawoRuby: IMixerProtocol = {
protocol: 'EMBER',
protocol: 'LAWORUBY',
label: 'Lawo Ruby',
presetFileExtension: '',
loadPresetCommand: [emptyMixerMessage()],
Expand All @@ -16,6 +16,40 @@ export const LawoRuby: IMixerProtocol = {
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_INPUT_GAIN: [
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.Gain[dB]',
value: 0,
type: 'int',
min: -30,
max: 18,
zero: 0,
},
],
CHANNEL_INPUT_SELECTOR: [
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 0,
type: 'int',
label: 'LR',
},
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 4,
type: 'int',
label: 'LL',
},
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 1,
type: 'int',
label: 'RR',
},
],
CHANNEL_OUT_GAIN: [
{
mixerMessage:
Expand Down Expand Up @@ -53,6 +87,40 @@ export const LawoRuby: IMixerProtocol = {
CHANNEL_MUTE_OFF: [emptyMixerMessage()],
},
toMixer: {
CHANNEL_INPUT_GAIN: [
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.Gain[dB]',
value: 0,
type: 'int',
min: -30,
max: 18,
zero: 0,
},
],
CHANNEL_INPUT_SELECTOR: [
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 0,
type: 'int',
label: 'LR',
},
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 4,
type: 'int',
label: 'LL',
},
{
mixerMessage:
'Ruby.Sources.{channel}.DSP.Input.LR Mode',
value: 1,
type: 'int',
label: 'RR',
},
],
CHANNEL_OUT_GAIN: [
{
mixerMessage:
Expand Down
6 changes: 6 additions & 0 deletions server/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { MidiMixerConnection } from './mixerConnections/MidiMixerConnection'
import { QlClMixerConnection } from './mixerConnections/YamahaQlClConnection'
import { SSLMixerConnection } from './mixerConnections/SSLMixerConnection'
import { EmberMixerConnection } from './mixerConnections/EmberMixerConnection'
import { LawoRubyMixerConnection } from './mixerConnections/LawoRubyConnection'
import { StuderMixerConnection } from './mixerConnections/StuderMixerConnection'
import { StuderVistaMixerConnection } from './mixerConnections/StuderVistaMixerConnection'
import { CasparCGConnection } from './mixerConnections/CasparCGConnection'
Expand Down Expand Up @@ -64,6 +65,10 @@ export class MixerGenericConnection {
this.mixerConnection = new EmberMixerConnection(
this.mixerProtocol as IMixerProtocol
)
} else if (this.mixerProtocol.protocol === 'LAWORUBY') {
this.mixerConnection = new LawoRubyMixerConnection(
this.mixerProtocol as IMixerProtocol
)
} else if (this.mixerProtocol.protocol === 'STUDER') {
this.mixerConnection = new StuderMixerConnection(
this.mixerProtocol as IMixerProtocol
Expand Down Expand Up @@ -154,6 +159,7 @@ export class MixerGenericConnection {

updateInputSelector(faderIndex: number) {
let inputSelected = state.faders[0].fader[faderIndex].inputSelector
console.log(faderIndex, inputSelected)
state.channels[0].channel.map(
(channel: IChannel, channelIndex: number) => {
if (faderIndex === channel.assignedFader) {
Expand Down
Loading

0 comments on commit d5b552c

Please sign in to comment.