Skip to content

Commit

Permalink
feat: MixerProtocol prepared ChannelType based structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jun 27, 2019
1 parent 7b13349 commit bd05bb5
Show file tree
Hide file tree
Showing 11 changed files with 240 additions and 188 deletions.
30 changes: 20 additions & 10 deletions src/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,40 @@ export interface IMixerProtocolGeneric {

export interface IMixerProtocol extends IMixerProtocolGeneric{
leadingZeros: boolean,
pingCommand: Array<IMessageProtocol>,
pingCommand: Array<IMixerMessageProtocol>,
pingTime: number,
initializeCommands: Array<IMessageProtocol>,
initializeCommands: Array<IMixerMessageProtocol>,
channelTypes: Array<IChannelTypes>
}

export interface IChannelTypes {
channelTypeName: string,
channelTypeColor: string,
fromMixer: {
CHANNEL_FADER_LEVEL: string,
CHANNEL_OUT_GAIN: string,
CHANNEL_VU: string,
CHANNEL_NAME: string,
PFL: string
AUX_SEND: Array<string>
},
toMixer: {
CHANNEL_FADER_LEVEL: string,
CHANNEL_OUT_GAIN: string,
PFL_ON: IMessageProtocol,
PFL_OFF: IMessageProtocol
PFL_ON: IMixerMessageProtocol,
PFL_OFF: IMixerMessageProtocol
AUX_SEND: Array<string>
}
}

interface IMixerMessageProtocol {
mixerMessage: string,
value: any,
type: string
}


// CasparCG Specific interfaces:
export interface ICasparCGChannelLayerPair {
channel: number
layer: number
Expand Down Expand Up @@ -100,12 +116,6 @@ export interface ICasparCGMixerGeometry extends IMixerProtocolGeneric {
}
}

interface IMessageProtocol {
mixerMessage: string,
value: any,
type: string
}

export const MixerProtocolPresets: { [key: string]: IMixerProtocolGeneric } = Object.assign({
ardourMaster: ArdourMaster,
reaper: Reaper,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/EmberLawo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,33 @@ export const LawoClient: IMixerProtocol = {
type: "f"
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: 'Sapphire/Sources/Source{channel}/Fader',
CHANNEL_OUT_GAIN: '',
CHANNEL_VU: '/track/{channel}/vu',
CHANNEL_NAME: '/track/{channel}/name',
PFL: 'todo'
},
toMixer: {
CHANNEL_FADER_LEVEL: 'Sapphire/Sources/Source{channel}/Fader',
CHANNEL_OUT_GAIN: 'Sapphire/Sources/Source{channel}/Gain',
PFL_ON: {
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: 'Sapphire/Sources/Source{channel}/Fader',
CHANNEL_OUT_GAIN: '',
CHANNEL_VU: '/track/{channel}/vu',
CHANNEL_NAME: '/track/{channel}/name',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i"
}
},
toMixer: {
CHANNEL_FADER_LEVEL: 'Sapphire/Sources/Source{channel}/Fader',
CHANNEL_OUT_GAIN: 'Sapphire/Sources/Source{channel}/Gain',
PFL_ON: {
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i"
},
PFL_OFF: {
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i"
},
AUX_SEND: ['none'],
},
}],
fader: {
min: 0,
max: 1000,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/ardourMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,33 @@ export const ArdourMaster: IMixerProtocol = {
type: ""
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/strip/fader/{channel}',
CHANNEL_VU: '/strip/meter/{channel}',
CHANNEL_NAME: '/strip/name/{channel}',
PFL: 'todo'
},
toMixer: {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/strip/fader/{channel}',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/strip/fader/{channel}',
CHANNEL_VU: '/strip/meter/{channel}',
CHANNEL_NAME: '/strip/name/{channel}',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
}
},
toMixer: {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/strip/fader/{channel}',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
AUX_SEND: ['none'],
}
}],
fader: {
min: 0,
max: 1,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,33 @@ export const BehringerXrMaster: IMixerProtocol = {
type: "f"
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
CHANNEL_VU: '/meters/1',
CHANNEL_NAME: '/ch/{channel}/config/name',
PFL: 'todo'
},
toMixer : {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
CHANNEL_VU: '/meters/1',
CHANNEL_NAME: '/ch/{channel}/config/name',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
}
},
toMixer : {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
AUX_SEND: ['none'],
},
}],
fader: {
min: 0,
max: 1,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/genericMidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,33 @@ export const GenericMidi: IMixerProtocol = {
type: "f"
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: "39", //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: "0", //PgmChange 0 - ignores this command
CHANNEL_VU: "0", //PgmChange 0 - ignores this command
CHANNEL_NAME: 'some sysex not yet build',
PFL: 'todo'
},
toMixer: {
CHANNEL_FADER_LEVEL: "39",
CHANNEL_OUT_GAIN: "38",
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: "39", //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: "0", //PgmChange 0 - ignores this command
CHANNEL_VU: "0", //PgmChange 0 - ignores this command
CHANNEL_NAME: 'some sysex not yet build',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
}
},
toMixer: {
CHANNEL_FADER_LEVEL: "39",
CHANNEL_OUT_GAIN: "38",
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
AUX_SEND: ['none'],
},
}],
fader: {
min: 0,
max: 127,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,33 @@ export const MidasMaster: IMixerProtocol = {
type: "s"
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
CHANNEL_VU: '/meters/1',
CHANNEL_NAME: '/ch/{channel}/config/name',
PFL: 'todo'
},
toMixer: {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: 'none', //'none' ignores this command
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
CHANNEL_VU: '/meters/1',
CHANNEL_NAME: '/ch/{channel}/config/name',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
}
},
toMixer: {
CHANNEL_FADER_LEVEL: 'none',
CHANNEL_OUT_GAIN: '/ch/{channel}/mix/fader',
PFL_ON: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
PFL_OFF: {
mixerMessage: "/not_in_use",
value: 0,
type: "f"
},
AUX_SEND: ['none'],
},
}],
fader: {
min: 0,
max: 1,
Expand Down
46 changes: 26 additions & 20 deletions src/constants/mixerProtocols/reaper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,33 @@ export const Reaper: IMixerProtocol = {
type: "f"
}
],
fromMixer: {
CHANNEL_FADER_LEVEL: '/track/{channel}/volume',
CHANNEL_OUT_GAIN: '/track/{channel}/fx/1/fxparam/1/value',
CHANNEL_VU: '/track/{channel}/vu',
CHANNEL_NAME: '/track/{channel}/name',
PFL: 'todo'
},
toMixer: {
CHANNEL_FADER_LEVEL: '/track/{channel}/volume',
CHANNEL_OUT_GAIN: '/track/{channel}/fx/1/fxparam/1/value',
PFL_ON: {
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i"
channelTypes: [{
channelTypeName: 'Channels',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: '/track/{channel}/volume',
CHANNEL_OUT_GAIN: '/track/{channel}/fx/1/fxparam/1/value',
CHANNEL_VU: '/track/{channel}/vu',
CHANNEL_NAME: '/track/{channel}/name',
PFL: 'todo',
AUX_SEND: ['none'],
},
PFL_OFF: {
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i"
}
},
toMixer: {
CHANNEL_FADER_LEVEL: '/track/{channel}/volume',
CHANNEL_OUT_GAIN: '/track/{channel}/fx/1/fxparam/1/value',
PFL_ON: {
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i"
},
PFL_OFF: {
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i"
},
AUX_SEND: ['none'],
},
}],
fader: {
min: 0,
max: 1,
Expand Down
Loading

0 comments on commit bd05bb5

Please sign in to comment.