Skip to content

Commit

Permalink
Added: Automation control of Groupd faders
Browse files Browse the repository at this point in the history
/grp/1/pgm - integer: { 0 or 1 }
/grp/1/pst - integer: { 0 or 1 }
/grp/1/faderlevel - float {between 0 and 1}
/grp/1/visible { 0 or 1 }
  • Loading branch information
olzzon committed May 8, 2019
1 parent aa8e130 commit ddb49bb
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 5 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ yarn start
### Following preset name are possible:
* reaper
* OSC protocol for control Reaper (reaper.fm)
* midas
* midasmaster
* OSC protocol for Midas M32 and Behringer X32
* Port 10023
* The volume change on the Midas/X32 desk is on it´s channel faders.
* midasclient
* OSC protocol for Midas M32 and Behringer X32
* Port 10023
* Route ch 1-16 to bus 1-2 and in main turn off main stereo
* Set send to Bus 1-2 to Post Fader on all channels
* Link Bus 1-2 to stereo and in main turn on main stereo
* Send to Bus 1-2 is then used for Fade In-Out
* Be aware of post faders mix% issues.
* behringerxrclient (same protocoltype as the midas M32)
* OSC protocol for Behringer XR12-16-18
* Port 10024
Expand All @@ -60,6 +65,12 @@ To set the state send these OSC commands from you Automation to ProducersAudioMi
/ch/1/mix/pst - integer: { 0 or 1 }
#### Set channel faderlevel:
/ch/1/mix/faderlevel - float {between 0 and 1}
#### Set group to PGM:
/grp/1/pgm - integer: { 0 or 1 }
#### Set group to PST:
/grp/1/pst - integer: { 0 or 1 }
#### Set group faderlevel:
/grp/1/faderlevel - float {between 0 and 1}
#### Crossfade between PGM and PST:
/take
#### Set snap 1-xx to PST:
Expand All @@ -68,11 +79,19 @@ To set the state send these OSC commands from you Automation to ProducersAudioMi
/fadetoblack
#### Hide or show channel strips on GUI:
/ch/{value1}/visible - integer { 0 or 1 }
#### Hide or show group strips on GUI:
/grp/{value1}/visible - integer { 0 or 1 }

## Get state:
#### Set channel to PGM:
#### Get state channel PGM:
/state/ch/1/mix/pgm - returns pgm state integer { 0 or 1 }
#### Set channel to PST:
#### get state channel PST:
/state/ch/1/mix/pst - returns pgm state integer { 0 or 1 }
#### Set channel faderlevel:
#### Get state channel faderlevel:
/state/ch/1/mix/faderlevel - float {between 0 and 1}
#### Get state group PGM:
/state/ch/1/mix/pgm - returns pgm state integer { 0 or 1 }
#### get state group PST:
/state/ch/1/mix/pst - returns pgm state integer { 0 or 1 }
#### Get state group faderlevel:
/state/ch/1/mix/faderlevel - float {between 0 and 1}
11 changes: 10 additions & 1 deletion src/constants/AutomationPresets.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,27 @@ export const AutomationPresets = {
CHANNEL_PGM_ON_OFF: '/ch/{value1}/mix/pgm',
CHANNEL_PST_ON_OFF: '/ch/{value1}/mix/pst',
CHANNEL_FADER_LEVEL: '/ch/{value1}/mix/faderlevel',
CHANNEL_VISIBLE: '/ch/{value1}/visible',
GRP_FADER_PGM_ON_OFF: '/grp/{value1}/pgm',
GRP_FADER_PST_ON_OFF: '/grp/{value1}/pst',
GRP_FADER_LEVEL: '/grp/{value1}/faderlevel',
GRP_FADER_VISIBLE: '/grp/{value1}/visible',
X_MIX: '/take',
FADE_TO_BLACK: '/fadetoblack',
SNAP_RECALL: '/snap/{value1}',
STATE_CHANNEL_PGM: '/state/ch/{value1}/mix/pgm',
STATE_CHANNEL_PST: '/state/ch/{value1}/mix/pst',
STATE_CHANNEL_FADER_LEVEL: '/state/ch/{value1}/mix/faderlevel',
STATE_GRP_FADER_PGM: '/state/grp/{value1}/pgm',
STATE_GRP_FADER_PST: '/state/grp/{value1}/pst',
STATE_GRP_FADER_LEVEL: '/state/grp/{value1}/faderlevel',
},
toAutomation: {
STATE_CHANNEL_PGM: '/state/ch/{value1}/mix/pgm',
STATE_CHANNEL_PST: '/state/ch/{value1}/mix/pst',
STATE_CHANNEL_FADER_LEVEL: '/state/ch/{value1}/mix/faderlevel',
STATE_GRP_FADER_PGM: '/state/grp/{value1}/pgm',
STATE_GRP_FADER_PST: '/state/grp/{value1}/pst',
STATE_GRP_FADER_LEVEL: '/state/grp/{value1}/faderlevel',
},
fader: {
min: 0,
Expand Down
90 changes: 90 additions & 0 deletions src/utils/AutomationConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,69 @@ export class AutomationConnection {
});
this.mixerConnection.updateOutLevels();
// Get state from Producers Audio Mixer:
} else if ( this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.GRP_FADER_PGM_ON_OFF)){
let ch = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SET_GRP_PGM',
channel: ch - 1,
pgmOn: message.args[0]===1 ? true : false
});
this.mixerConnection.updateOutLevel(ch-1);
} else if ( this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.GRP_FADER_PST_ON_OFF)){
let ch = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SET_GRP_PST',
channel: ch - 1,
pstOn: message.args[0]===1 ? true : false
});
this.mixerConnection.updateOutLevel(ch-1);
} else if ( this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.GRP_FADER_LEVEL)){
let ch = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SET_GRP_FADER_LEVEL',
channel: ch - 1,
level: message.args[0]
});
this.mixerConnection.updateOutLevel(ch-1);
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.SNAP_RECALL)) {
let snapNumber = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SNAP_RECALL',
snapIndex: snapNumber -1
});
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.X_MIX)) {
window.storeRedux.dispatch({
type:'X_MIX'
});
this.mixerConnection.updateOutLevels();
} else if ( this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.CHANNEL_VISIBLE)){
let ch = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SHOW_CHANNEL',
channel: ch - 1,
showChannel: message.args[0]===1 ? true : false
});
} else if ( this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.GRP_FADER_VISIBLE)){
let ch = message.address.split("/")[2];
window.storeRedux.dispatch({
type:'SHOW_GRP_FADER',
channel: ch - 1,
showChannel: message.args[0]===1 ? true : false
});
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.FADE_TO_BLACK)) {
window.storeRedux.dispatch({
type:'FADE_TO_BLACK'
});
this.mixerConnection.updateOutLevels();
// Get state from Producers Audio Mixer:
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.STATE_CHANNEL_PGM)) {
let ch = message.address.split("/")[3];
Expand Down Expand Up @@ -118,6 +181,33 @@ export class AutomationConnection {
this.store.channels[0].channel[ch-1].faderLevel,
"f"
);
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.STATE_GRP_FADER_PGM)) {
let ch = message.address.split("/")[3];
this.sendOutMessage(
this.automationProtocol.toAutomation.STATE_GRP_FADER_PGM,
ch,
this.store.channels[0].grpFader[ch-1].pgmOn,
"i"
);
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.STATE_GRP_FADER_PST)) {
let ch = message.address.split("/")[3];
this.sendOutMessage(
this.automationProtocol.toAutomation.STATE_GRP_FADER_PST,
ch,
this.store.channels[0].grpFader[ch-1].pstOn,
"i"
);
} else if (this.checkOscCommand(message.address, this.automationProtocol.fromAutomation
.STATE_GRP_FADER_LEVEL)) {
let ch = message.address.split("/")[3];
this.sendOutMessage(
this.automationProtocol.toAutomation.STATE_GRP_FADER_LEVEL,
ch,
this.store.channels[0].grpFader[ch-1].faderLevel,
"f"
);
}
})
.on('error', (error) => {
Expand Down

0 comments on commit ddb49bb

Please sign in to comment.