Skip to content

Commit

Permalink
chore: added zero value in IMixerMessageProtocol
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Jun 28, 2019
1 parent 96d4b7d commit 347d856
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 133 deletions.
4 changes: 2 additions & 2 deletions src/constants/MixerProtocolPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ interface IMixerMessageProtocol {
value: any,
type: string,
min: number,
max: number

max: number,
zero: number
}

// CasparCG Specific interfaces:
Expand Down
50 changes: 28 additions & 22 deletions src/constants/mixerProtocols/EmberLawo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const LawoClient: IMixerProtocol = {
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
pingTime: 0, //Bypass ping when pingTime is zero
Expand All @@ -25,69 +26,74 @@ export const LawoClient: IMixerProtocol = {
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
channelTypes: [{
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/Amplification', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/Amplification', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/track/{channel}/name',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/Amplification', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/FaderPosition', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/Amplification', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'R3LAYVRX4/Ex/GUI/FaderSlot_{channel}/FaderPosition', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
PFL_OFF: [{
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
},
{
channelTypeName: 'MST',
channelTypeColor: 'rgb(21, 21, 49)',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/track/{channel}/vu', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/track/{channel}/name',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Gain', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'Sapphire/Sums/Source{channel}/Gain', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/track/{channel}/solo",
value: 1,
type: "i",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
PFL_OFF: [{
mixerMessage: "/track/{channel}/solo",
value: 0,
type: "i",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
}],
fader: {
Expand Down
26 changes: 14 additions & 12 deletions src/constants/mixerProtocols/ardourMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const ArdourMaster: IMixerProtocol = {
value: "",
type: "",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
pingTime: 9500,
Expand All @@ -22,30 +23,31 @@ export const ArdourMaster: IMixerProtocol = {
value: "",
type: "",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
channelTypes: [{
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_VU: [{ mixerMessage: '/strip/meter/{channel}', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/strip/meter/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/strip/name/{channel}',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/strip/fader/{channel}', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use", value: 0, type: "f", min: 0, max: 1
mixerMessage: "/not_in_use", value: 0, type: "f", min: 0, max: 1, zero: 0.75
}],
PFL_OFF: [{
mixerMessage: "/not_in_use", value: 0, type: "f", min: 0, max: 1
mixerMessage: "/not_in_use", value: 0, type: "f", min: 0, max: 1, zero: 0.75
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
}
}],
fader: {
Expand Down
30 changes: 16 additions & 14 deletions src/constants/mixerProtocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,54 @@ export const BehringerXrMaster: IMixerProtocol = {
pingCommand: [
{
mixerMessage: "/xremote", value: 0,
type: "f", min: 0, max: 1
type: "f", min: 0, max: 1, zero: 0.75
},
{
mixerMessage: "/meters", value: "/meters/1",
type: "s", min: 0, max: 1
type: "s", min: 0, max: 1, zero: 0.75
},
{
mixerMessage: "/meters", value: "/meters/5",
type: "s", min: 0, max: 1
type: "s", min: 0, max: 1, zero: 0.75
}
],
pingTime: 9500,
initializeCommands: [
{
mixerMessage: "/info", value: 0, type: "f", min: 0, max: 1
mixerMessage: "/info", value: 0, type: "f", min: 0, max: 1, zero: 0.75
}
],
channelTypes: [{
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_VU: [{ mixerMessage: '/meters/1', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //'none' ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: '/meters/1', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: '/ch/{channel}/config/name',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer : {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: '/ch/{channel}/mix/fader', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use",
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
PFL_OFF: [{
mixerMessage: "/not_in_use",
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
}],
fader: {
Expand Down
32 changes: 10 additions & 22 deletions src/constants/mixerProtocols/casparCGMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,19 @@ if (geometry) {
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_VU: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_VU: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_NAME: 'none',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL_ON: [{
mixerMessage: "none",
value: 1,
type: "i",
min: 0,
max: 1
}],
PFL_OFF: [{
mixerMessage: "none",
value: 0,
type: "i",
min: 0,
max: 1
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{ mixerMessage: "none", value: 1, type: "i", min: 0, max: 1, zero: 0.75 }],
PFL_OFF: [{ mixerMessage: "none", value: 0, type: "i", min: 0, max: 1, zero: 0.75 }],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
}]
}
Expand Down
28 changes: 16 additions & 12 deletions src/constants/mixerProtocols/genericMidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const GenericMidi: IMixerProtocol = {
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
pingTime: 0,
Expand All @@ -22,38 +23,41 @@ export const GenericMidi: IMixerProtocol = {
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}
],
channelTypes: [{
channelTypeName: 'CH',
channelTypeColor: '#2f2f2f',
fromMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1}], //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1}], //PgmChange 0 - ignores this command
CHANNEL_VU: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1}], //PgmChange 0 - ignores this command
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_OUT_GAIN: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_VU: [{ mixerMessage: "0", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}], //PgmChange 0 - ignores this command
CHANNEL_NAME: 'some sysex not yet build',
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
PFL: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
toMixer: {
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_OUT_GAIN: [{ mixerMessage: "38", value: 0, type: 'f', min: 0, max: 1}],
CHANNEL_FADER_LEVEL: [{ mixerMessage: "39", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
CHANNEL_OUT_GAIN: [{ mixerMessage: "38", value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
PFL_ON: [{
mixerMessage: "/not_in_use",
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
PFL_OFF: [{
mixerMessage: "/not_in_use",
value: 0,
type: "f",
min: 0,
max: 1
max: 1,
zero: 0.75
}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1}],
AUX_SEND: [{ mixerMessage: 'none', value: 0, type: 'f', min: 0, max: 1, zero: 0.75}],
},
}],
fader: {
Expand Down
Loading

0 comments on commit 347d856

Please sign in to comment.