Skip to content

Commit

Permalink
Merge pull request tv2#118 from olzzon/feat/delay-control
Browse files Browse the repository at this point in the history
Feat/delay control
  • Loading branch information
olzzon authored Jan 31, 2020
2 parents c4cd7ee + 87540f3 commit e06e4cc
Show file tree
Hide file tree
Showing 25 changed files with 172 additions and 9 deletions.
5 changes: 5 additions & 0 deletions client/assets/css/ChanStrip.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
color: #fff;
}

.parameter-group > .horizontal-space {
width: 150px;
height: 50px;
}

.parameters > .group-text {
text-align: center;
line-height: 20px;
Expand Down
59 changes: 55 additions & 4 deletions client/components/ChanStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ import {
TOGGLE_SHOW_MONITOR_OPTIONS
} from '../../server/reducers/settingsActions'
import { IFader } from '../../server/reducers/fadersReducer'
import { SOCKET_SET_THRESHOLD, SOCKET_SET_RATIO, SOCKET_SET_LOW, SOCKET_SET_LO_MID, SOCKET_SET_MID, SOCKET_SET_HIGH, SOCKET_SET_AUX_LEVEL } from '../../server/constants/SOCKET_IO_DISPATCHERS';
import {
SOCKET_SET_THRESHOLD,
SOCKET_SET_RATIO,
SOCKET_SET_DELAY_TIME,
SOCKET_SET_LOW,
SOCKET_SET_LO_MID,
SOCKET_SET_MID,
SOCKET_SET_HIGH,
SOCKET_SET_AUX_LEVEL
} from '../../server/constants/SOCKET_IO_DISPATCHERS';
import CcgChannelInputSettings from './CcgChannelSettings';

interface IChanStripInjectProps {
Expand Down Expand Up @@ -79,6 +88,16 @@ class ChanStrip extends React.PureComponent<IChanStripProps & IChanStripInjectPr
}
)
}

handleDelay(event: any) {
window.socketIoClient.emit( SOCKET_SET_DELAY_TIME,
{
channel: this.props.faderIndex,
delayTime: parseFloat(event)
}
)
}

handleLow(event: any) {
window.socketIoClient.emit( SOCKET_SET_LOW,
{
Expand Down Expand Up @@ -167,6 +186,27 @@ class ChanStrip extends React.PureComponent<IChanStripProps & IChanStripInjectPr
)
}

delay() {
return (
<div className="parameter-text">
Time ms
<ReactSlider
className="chan-strip-fader"
thumbClassName = "chan-strip-thumb"
orientation = "vertical"
invert
min={0}
max={1}
step={0.01}
value= {this.props.fader[this.props.faderIndex].delayTime || 0}
onChange={(event: any) => {
this.handleDelay(event)
}}
/>
</div>
)
}

low() {
return (
<div className="parameter-text">
Expand Down Expand Up @@ -287,14 +327,25 @@ class ChanStrip extends React.PureComponent<IChanStripProps & IChanStripInjectPr
else {
return (
<div className="parameters">
<div className="group-text">
{"COMPRESSOR"}
</div>
<p className="group-text">
COMPRESSOR
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
DELAY
</p>
<div className="parameter-group">
{this.threshold()}
<p className="zero-comp">______</p>
{this.ratio()}
<p className="zero-comp">______</p>
<p className="horizontal-space"></p>
{this.delay()}
<p className="zero-comp">______</p>

</div>
<hr/>
<div className="group-text">
Expand Down
18 changes: 16 additions & 2 deletions server/MainThreadHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ import {
SOCKET_SET_STORE_CHANNEL,
SOCKET_SET_LO_MID,
SOCKET_SET_INPUT_OPTION,
SOCKET_SAVE_CCG_FILE
SOCKET_SAVE_CCG_FILE,
SOCKET_SET_DELAY_TIME
} from './constants/SOCKET_IO_DISPATCHERS'
import {
TOGGLE_PGM,
Expand All @@ -59,7 +60,8 @@ import {
SET_FADER_HIGH,
SET_FADER_MONITOR,
IGNORE_AUTOMATION,
SET_FADER_LO_MID
SET_FADER_LO_MID,
SET_FADER_DELAY_TIME
} from './reducers/faderActions';
import { SET_FADER_LEVEL } from './reducers/faderActions';
import { SET_ASSIGNED_FADER, SET_AUX_LEVEL } from './reducers/channelActions';
Expand Down Expand Up @@ -252,6 +254,18 @@ export class MainThreadHandlers {
this.updatePartialStore(payload.channel)
})
)
.on(SOCKET_SET_DELAY_TIME, (
(payload: any) => {
logger.verbose('Set Delay:' + String(payload.channel),{})
store.dispatch({
type: SET_FADER_DELAY_TIME,
channel: payload.channel,
delayTime: payload.delayTime
});
mixerGenericConnection.updateDelayTime(payload.channel);
this.updatePartialStore(payload.channel)
})
)
.on(SOCKET_SET_LOW, (
(payload: any) => {
logger.verbose('Set Low:' + String(payload.channel),{})
Expand Down
2 changes: 2 additions & 0 deletions server/constants/MixerProtocolInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface IChannelTypes {
NEXT_SEND: Array<IMixerMessageProtocol>
THRESHOLD: Array<IMixerMessageProtocol>
RATIO: Array<IMixerMessageProtocol>
DELAY_TIME: Array<IMixerMessageProtocol>
LOW: Array<IMixerMessageProtocol>
LO_MID: Array<IMixerMessageProtocol>
MID: Array<IMixerMessageProtocol>
Expand All @@ -54,6 +55,7 @@ export interface IChannelTypes {
NEXT_SEND: Array<IMixerMessageProtocol>
THRESHOLD: Array<IMixerMessageProtocol>
RATIO: Array<IMixerMessageProtocol>
DELAY_TIME: Array<IMixerMessageProtocol>
LOW: Array<IMixerMessageProtocol>
LO_MID: Array<IMixerMessageProtocol>
MID: Array<IMixerMessageProtocol>
Expand Down
1 change: 1 addition & 0 deletions server/constants/SOCKET_IO_DISPATCHERS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const SOCKET_SET_AUX_LEVEL = 'setAuxLevel'
export const SOCKET_SET_INPUT_OPTION = 'setInputOption'
export const SOCKET_SET_THRESHOLD = 'setThreshold'
export const SOCKET_SET_RATIO = 'setRatio'
export const SOCKET_SET_DELAY_TIME = 'setDelayTime'
export const SOCKET_SET_LOW = 'setLow'
export const SOCKET_SET_LO_MID = 'setLoMid'
export const SOCKET_SET_MID = 'setMid'
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/DmxIs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const DMXIS: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -39,6 +40,7 @@ export const DMXIS: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/EmberLawo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const LawoClient: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -77,6 +78,7 @@ export const LawoClient: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/SSLsystemT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const SSLSystemT: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -39,6 +40,7 @@ export const SSLSystemT: IMixerProtocol = {
NEXT_SEND: [{ mixerMessage: "f1 06 00 80 00 {channel} {level}", value: 0, type: '', min: 0, max: 1, zero: 0.75}],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
6 changes: 6 additions & 0 deletions server/constants/mixerProtocols/StuderVistaEmber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -68,6 +69,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -103,6 +105,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -135,6 +138,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -170,6 +174,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -202,6 +207,7 @@ export const StuderVistaMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/ardourMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const ArdourMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -66,6 +67,7 @@ export const ArdourMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/behringerXrMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const BehringerXrMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -61,6 +62,7 @@ export const BehringerXrMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/casparCGMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ if (geometry) {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -148,6 +149,7 @@ if (geometry) {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
2 changes: 2 additions & 0 deletions server/constants/mixerProtocols/genericMidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const GenericMidi: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -39,6 +40,7 @@ export const GenericMidi: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
10 changes: 10 additions & 0 deletions server/constants/mixerProtocols/midasMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export const MidasMaster: IMixerProtocol = {
max: 1,
zero: 0.75
},
{
mixerMessage: '/ch/{channel}/delay/time',
value: "",
type: "s",
min: 0,
max: 1,
zero: 0.75
},
{
mixerMessage: '/ch/{channel}/eq/1/g',
value: "",
Expand Down Expand Up @@ -118,6 +126,7 @@ export const MidasMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [{ mixerMessage: '/ch/{channel}/dyn/thr', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
RATIO: [{ mixerMessage: '/ch/{channel}/dyn/ratio', value: 0, type: 'f', min: 0, max: 11, zero: 0}],
DELAY_TIME: [{ mixerMessage: '/ch/{channel}/delay/time', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
LOW: [{ mixerMessage: '/ch/{channel}/eq/1/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
LO_MID: [{ mixerMessage: '/ch/{channel}/eq/2/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
MID: [{ mixerMessage: '/ch/{channel}/eq/3/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
Expand All @@ -135,6 +144,7 @@ export const MidasMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [{ mixerMessage: '/ch/{channel}/dyn/thr', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
RATIO: [{ mixerMessage: '/ch/{channel}/dyn/ratio', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
DELAY_TIME: [{ mixerMessage: '/ch/{channel}/delay/time', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
LOW: [{ mixerMessage: '/ch/{channel}/eq/1/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
LO_MID: [{ mixerMessage: '/ch/{channel}/eq/2/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
MID: [{ mixerMessage: '/ch/{channel}/eq/3/g', value: 0, type: 'f', min: 0, max: 1, zero: 0}],
Expand Down
4 changes: 4 additions & 0 deletions server/constants/mixerProtocols/reaperMaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const ReaperMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down Expand Up @@ -53,6 +54,7 @@ export const ReaperMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -77,6 +79,7 @@ export const ReaperMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand All @@ -94,6 +97,7 @@ export const ReaperMaster: IMixerProtocol = {
NEXT_SEND: [emptyMixerMessage()],
THRESHOLD: [emptyMixerMessage()],
RATIO: [emptyMixerMessage()],
DELAY_TIME: [emptyMixerMessage()],
LOW: [emptyMixerMessage()],
LO_MID: [emptyMixerMessage()],
MID: [emptyMixerMessage()],
Expand Down
Loading

0 comments on commit e06e4cc

Please sign in to comment.