Skip to content

Commit

Permalink
feat: Studer Vista
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Mar 27, 2020
1 parent 474443a commit baa248e
Show file tree
Hide file tree
Showing 5 changed files with 568 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import { CasparCGMaster } from './mixerProtocols/casparCGMaster';
import { DMXIS } from './mixerProtocols/DmxIs';
import { YamahaQLCL } from './mixerProtocols/yamahaQLCL'
import { SSLSystemT } from './mixerProtocols/SSLsystemT'
import { StuderOnAirMaster } from './mixerProtocols/StuderOnAirEmber';
import { StuderVistaMaster } from './mixerProtocols/StuderVistaEmber';

interface IMessageProtocol {
mixerMessage: string,
value: any,
type: string
}
import { StuderOnAirMaster } from './mixerProtocols/StuderOnAirEmber';
// Interface:
import { IMixerProtocolGeneric} from './MixerProtocolInterface'

Expand All @@ -33,6 +34,7 @@ export const MixerProtocolPresets: { [key: string]: IMixerProtocolGeneric } = Ob
yamahaQlCl: YamahaQLCL,
sslSystemT: SSLSystemT,
studerOnAirMaster: StuderOnAirMaster,
studerVistaMaster: StuderVistaMaster,
}, {
casparCGMaster: CasparCGMaster
});
Expand Down
240 changes: 240 additions & 0 deletions server/constants/mixerProtocols/StuderVistaEmber.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
import { IMixerProtocol, emptyMixerMessage } from '../MixerProtocolInterface';

export const StuderVistaMaster: IMixerProtocol = {
protocol: 'STUDER',
label: 'Studer Vista 1-5-9',
mode: "master",
FADE_DISPATCH_RESOLUTION: 50,
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: 'MONO',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_OUT_GAIN: [emptyMixerMessage()],
CHANNEL_VU: [emptyMixerMessage()],
CHANNEL_NAME: [emptyMixerMessage()],
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_OUT_GAIN: [{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 a4 18 31 16 a2 14 31 12 {channel} 10 31 0e a6 0c 31 0a e1 08 31 06 63 04 02 02 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

},
{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 bf 83 90 80 00 1e 31 1c a4 1a 31 18 a2 16 31 14 {channel} 12 31 10 a6 0e 31 0c e1 0a 31 08 63 06 02 04 00 00 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

}],
CHANNEL_NAME: [{
mixerMessage: 'System/Mixer/Channels/Inp Mono/Inp Mono #{channel}/Functions/Channel Attribute/User Label',
value: 0,
type: 'real',
min: -90,
max: 10,
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()]
},
},
{
channelTypeName: 'ST',
channelTypeColor: '#3f2f2f',
fromMixer: {
CHANNEL_OUT_GAIN: [{
mixerMessage: 'System/Mixer/Channels/Inp Stereo/Inp Stereo #{channel}/Functions/Fader/Value',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750
}],
CHANNEL_VU: [emptyMixerMessage()],
CHANNEL_NAME: [{
mixerMessage: 'System/Mixer/Channels/Inp Stereo/Inp Stereo #{channel}/Functions/Channel Attribute/User Label',
value: 0,
type: 'real',
min: -90,
max: 10,
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_OUT_GAIN: [{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 a4 18 31 16 a2 14 31 12 {channel} 10 31 0e a6 0c 31 0a e1 08 31 06 63 04 02 02 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

},
{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 bf 83 90 80 00 1e 31 1c a4 1a 31 18 a2 16 31 14 {channel} 12 31 10 a6 0e 31 0c e1 0a 31 08 63 06 02 04 00 00 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

}],
CHANNEL_NAME: [{
mixerMessage: 'System/Mixer/Channels/Inp Stereo/Inp Stereo #{channel}/Functions/Channel Attribute/User Label',
value: 0,
type: 'real',
min: -90,
max: 10,
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()]
},
},
{
channelTypeName: 'Inp X',
channelTypeColor: '#2f3f2f',
fromMixer: {
CHANNEL_OUT_GAIN: [{
mixerMessage: 'System/Mixer/Channels/Inp 5_1/Inp 5_1 #{channel}/Functions/Fader/Value',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750
}],
CHANNEL_VU: [emptyMixerMessage()],
CHANNEL_NAME: [{
mixerMessage: 'System/Mixer/Channels/Inp 5_1/Inp 5_1 #{channel}/Functions/Channel Attribute/User Label',
value: 0,
type: 'real',
min: -90,
max: 10,
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_OUT_GAIN: [{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 a4 18 31 16 a2 14 31 12 {channel} 10 31 0e a6 0c 31 0a e1 08 31 06 63 04 02 02 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

},
{
mixerMessage: '7f 8f ff fe d9 5c 80 30 80 bf 83 90 80 00 1e 31 1c a4 1a 31 18 a2 16 31 14 {channel} 12 31 10 a6 0e 31 0c e1 0a 31 08 63 06 02 04 00 00 {level} 00 00 00 00',
value: 0,
type: 'real',
min: 0,
max: 1000,
zero: 750

}],
CHANNEL_NAME: [{
mixerMessage: 'System/Mixer/Channels/Inp 5_1/Inp 5_1 #{channel}/Functions/Channel Attribute/User Label',
value: 0,
type: 'real',
min: -90,
max: 10,
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: 1000,
zero: 750,
step: 1,
},
meter: {
min: 0,
max: 1,
zero: 0.75,
test: 0.6,
}
}

3 changes: 3 additions & 0 deletions server/utils/MixerConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { QlClMixerConnection } from './mixerConnections/YamahaQlClConnection';
import { SSLMixerConnection } from './mixerConnections/SSLMixerConnection';
import { EmberMixerConnection } from './mixerConnections/EmberMixerConnection';
import { StuderOnAirMixerConnection } from './mixerConnections/StuderOnAirMixerConnection';
import { StuderMixerConnection } from './mixerConnections/StuderMixerConnection';
import { CasparCGConnection } from './mixerConnections/CasparCGConnection';
import { IChannel } from '../reducers/channelsReducer';
import { SET_OUTPUT_LEVEL, FADE_ACTIVE } from '../reducers/channelActions'
Expand Down Expand Up @@ -49,6 +50,8 @@ export class MixerGenericConnection {
this.mixerConnection = new EmberMixerConnection(this.mixerProtocol as IMixerProtocol);
} else if (this.mixerProtocol.protocol === 'STUDER_ONAIR') {
this.mixerConnection = new StuderOnAirMixerConnection(this.mixerProtocol as IMixerProtocol);
} else if (this.mixerProtocol.protocol === 'STUDER') {
this.mixerConnection = new StuderMixerConnection(this.mixerProtocol as IMixerProtocol);
} else if (this.mixerProtocol.protocol === 'SSL') {
this.mixerConnection = new SSLMixerConnection(this.mixerProtocol as IMixerProtocol);
}
Expand Down
9 changes: 9 additions & 0 deletions server/utils/mixerConnections/CasparCGConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const osc = require('osc')
const fs = require('fs')
import * as path from 'path';
import { CasparCG } from 'casparcg-connection'
import { socketServer } from '../../expressHandler'

//Utils:
import { store, state } from '../../reducers/store'
Expand All @@ -11,6 +12,7 @@ import { IChannel } from '../../reducers/channelsReducer';
import { SET_PRIVATE } from '../../reducers/channelActions'
import { SET_VU_LEVEL, SET_CHANNEL_LABEL } from '../../reducers/faderActions'
import { logger } from '../logger'
import { SOCKET_SET_VU } from '../../constants/SOCKET_IO_DISPATCHERS';

interface CommandChannelMap {
[key: string]: number
Expand Down Expand Up @@ -104,6 +106,13 @@ export class CasparCGConnection {
// We therefore want to premultiply this to show useful information about audio levels
level: Math.min(1, message.args[0] * state.faders[0].fader[index].faderLevel)
});
socketServer.emit(
SOCKET_SET_VU,
{
faderIndex: index,
level: Math.min(1, message.args[0] * state.faders[0].fader[index].faderLevel)
}
)
} else if (this.mixerProtocol.sourceOptions) {
const m = message.address.split('/');

Expand Down
Loading

0 comments on commit baa248e

Please sign in to comment.