* no scan done unless user asks. scan paths
This commit is contained in:
parent
76920f97c0
commit
39d72e83bb
|
|
@ -25,6 +25,7 @@
|
|||
var voiceChatHelper = null;
|
||||
var profiles = null;
|
||||
var currentProfile = null;
|
||||
var enableVstTimeout = null;
|
||||
|
||||
|
||||
var configure_audio_instructions = {
|
||||
|
|
@ -208,10 +209,34 @@
|
|||
}
|
||||
|
||||
window.ConfigureTracksActions.reset(false);
|
||||
if(!window.SessionStore.inSession()) {
|
||||
delayEnableVst()
|
||||
}
|
||||
else {
|
||||
logger.debug("in a session, so no delayEnableVst()");
|
||||
}
|
||||
voiceChatHelper.reset();
|
||||
voiceChatHelper.beforeShow();
|
||||
}
|
||||
|
||||
function delayEnableVst() {
|
||||
if (enableVstTimeout) {
|
||||
clearTimeout(enableVstTimeout)
|
||||
}
|
||||
enableVstTimeout = setTimeout(function() { enableVst() }, 5000)
|
||||
}
|
||||
|
||||
function enableVst () {
|
||||
enableVstTimeout = null
|
||||
|
||||
if (app.layout.isDialogShowing('configure-tracks')) {
|
||||
ConfigureTracksActions.enableVst()
|
||||
}
|
||||
else {
|
||||
logger.debug("no longer in configure tracks dialog; not enabling VSTs at this time")
|
||||
}
|
||||
}
|
||||
|
||||
function afterShow() {
|
||||
sessionUtils.SessionPageEnter();
|
||||
|
||||
|
|
|
|||
|
|
@ -1053,6 +1053,7 @@
|
|||
function SaveSettings() {}
|
||||
|
||||
|
||||
function VSTLoad() {}
|
||||
function VSTScan(callback) {setTimeout(eval(callback+ "()"), 1000)}
|
||||
function hasVstHost() { return false;}
|
||||
function getPluginList() { return {vsts:[]} }
|
||||
|
|
@ -1325,6 +1326,7 @@
|
|||
this.StopNetworkTest = StopNetworkTest;
|
||||
this.log = log;
|
||||
this.getOperatingMode = getOperatingMode;
|
||||
this.VSTLoad = VSTLoad;
|
||||
this.VSTScan = VSTScan;
|
||||
this.hasVstHost = hasVstHost;
|
||||
this.getPluginList = getPluginList;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
cssClass: 'manage-vsts-popup',
|
||||
spikeGirth:0,
|
||||
spikeLength:0,
|
||||
width:190,
|
||||
width:250,
|
||||
closeWhenOthersOpen: true,
|
||||
offsetParent: $parent.closest('.dialog'),
|
||||
positions:['bottom'],
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@
|
|||
// if string passed, see if dialog is showing (even if buried) of a given name
|
||||
function isDialogShowing() {
|
||||
if(arguments.length == 1) {
|
||||
console.log("what?", arguments[0])
|
||||
// user passed in dialog id
|
||||
var dialogId = arguments[0];
|
||||
context._.each(openDialogs, function(dialog) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,10 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
inputTwoValue = @state.configureTracks.editingTrack[1].id
|
||||
|
||||
instrumentDisabled = @state.configureTracks.editingTrack.length == 0
|
||||
vstDisabled = @state.configureTracks.editingTrack.length == 0
|
||||
vstDisabled = @state.configureTracks.editingTrack.length == 0 || @state.configureTracks.unscanned
|
||||
|
||||
if @state.configureTracks.unscanned
|
||||
initialScan = `<a className="button-orange" onClick={this.initialScan}>SCAN</a>`
|
||||
|
||||
for input in @state.configureTracks.musicPorts.inputs
|
||||
|
||||
|
|
@ -84,7 +87,7 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
|
||||
|
||||
for plugin in @state.configureTracks.vstPluginList.vsts
|
||||
if plugin.isInstrument == false && plugin.category == 'Effect'
|
||||
if plugin.isInstrument == false
|
||||
vsts.push(`<option value={plugin.file}>{plugin.name} by {plugin.manuf}</option>`)
|
||||
else if plugin.category == 'NONE'
|
||||
vsts.push(`<option value={plugin.file}>No VST/AU plugin selected</option>`)
|
||||
|
|
@ -112,7 +115,7 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
</select>
|
||||
</div>
|
||||
<div className="audio-effects">
|
||||
<h3>Audio Effects (optional)</h3>
|
||||
<h3>Audio Effects (optional) {initialScan}</h3>
|
||||
<select className="vsts" name="vsts" onChange={this.vstsChanged} value={selectedVst} disabled={vstDisabled}>
|
||||
{vsts}
|
||||
</select>
|
||||
|
|
@ -211,6 +214,10 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
else
|
||||
cancelBtn = `<a onClick={this.onCancel} className="button-grey">CANCEL</a>`
|
||||
|
||||
if !@state.configureTracks?.unscanned
|
||||
scanHelp = `<a className="dont-see-plugin" onClick={this.dontSeePlugin}>Don't see your plug-in in the list above?</a>`
|
||||
|
||||
|
||||
`<div>
|
||||
<div className="content-head">
|
||||
<img className="content-icon" src="/assets/content/icon_add.png" height={19} width={19}/>
|
||||
|
|
@ -253,6 +260,7 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
|
||||
ConfigureTracksActions.associateInputsWithTrack(audioInput1, audioInput2)
|
||||
|
||||
|
||||
vstsChanged: (e) ->
|
||||
$root = $(@getDOMNode())
|
||||
$select = $root.find('select.vsts')
|
||||
|
|
@ -366,12 +374,22 @@ ConfigureTracksStore = @ConfigureTracksStore
|
|||
ConfigureTracksActions.desiredTrackType(value)
|
||||
#@setState({trackType: value})
|
||||
|
||||
initialScan: (e) ->
|
||||
e.preventDefault()
|
||||
ConfigureTracksActions.vstScan()
|
||||
|
||||
dontSeePlugin: (e) ->
|
||||
e.preventDefault()
|
||||
context.JK.popExternalLink('https://jamkazam.desk.com/customer/portal/articles/2252557-adding-a-scan-folder-path-for-plugins')
|
||||
|
||||
vstOperation: (e, data) ->
|
||||
|
||||
if data.vstOperation == 'scan'
|
||||
ConfigureTracksActions.vstScan()
|
||||
else if data.vstOperation == 'clear'
|
||||
ConfigureTracksActions.clearVsts()
|
||||
else if data.vstOperation == 'manage'
|
||||
ConfigureTracksActions.manageVsts()
|
||||
|
||||
manageAudioPlugins: (e) ->
|
||||
e.preventDefault()
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ gearUtils = context.JK.GearUtils
|
|||
trackTypeLabel = 'AUDIO'
|
||||
|
||||
vstName = 'None'
|
||||
if inputsForTrack.vst? && inputsForTrack.vst != 'NONE'
|
||||
if inputsForTrack.vst? && inputsForTrack.vst.name != 'NONE'
|
||||
vstName = "#{inputsForTrack.vst.name} by #{inputsForTrack.vst.manuf}"
|
||||
|
||||
liveTracks.push(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
context = window
|
||||
ConfigureTracksStore = @ConfigureTracksStore
|
||||
ConfigureTracksActions = @ConfigureTracksActions
|
||||
@ManageVstsDialog = React.createClass({
|
||||
|
||||
mixins: [Reflux.listenTo(@ConfigureTracksStore,"onConfigureTracksChanged"), Reflux.listenTo(@AppStore, "onAppInit")]
|
||||
|
||||
onConfigureTracksChanged:(configureTracks) ->
|
||||
@setState({configureTracks: configureTracks})
|
||||
|
||||
onAppInit: (@app) ->
|
||||
|
||||
getInitialState: () ->
|
||||
{configureTracks: null}
|
||||
|
||||
render: () ->
|
||||
|
||||
if @state.configureTracks?
|
||||
action = 'CLOSE'
|
||||
|
||||
paths = []
|
||||
for path in @state.configureTracks.scanPaths.paths
|
||||
if path.type == "VST"
|
||||
for vstPath in path.paths
|
||||
|
||||
paths.push(`<tr><td className="manage-vst-path"><div>{vstPath}</div></td><td className="manage-vst-action"><div><a onClick={this.deletePath.bind(this, vstPath)}>delete</a></div></td></tr>`)
|
||||
|
||||
contents = `<div>
|
||||
<table className="generaltable manage-vst-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="manage-vst-path">PATH</th>
|
||||
<th className="manage-vst-action"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="manage-vst-content">
|
||||
{paths}
|
||||
</tbody>
|
||||
</table></div>`
|
||||
|
||||
`<div>
|
||||
<div className="content-head">
|
||||
<img className="content-icon" src="/assets/content/icon_add.png" height={19} width={19}/>
|
||||
<h1>manage plug-in scan folders</h1>
|
||||
</div>
|
||||
<div className="dialog-inner">
|
||||
<h3></h3>
|
||||
<p className="instructions">
|
||||
If a scan is not finding the VST or AU plugin you want to use, it’s likely that we aren’t scanning the location where the plugin is installed. Click the ADD SCAN FOLDER button below, and navigate to the folder where the plugin is installed to add that location to the scan list.
|
||||
</p>
|
||||
|
||||
{contents}
|
||||
|
||||
<div className="actions">
|
||||
<a onClick={this.doClose} className="button-orange">CLOSE</a>
|
||||
<a onClick={this.selectVSTDirectory} className="button-orange add-scan-folder">ADD SCAN FOLDER</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
inputChanged: (e) ->
|
||||
$root = $(@getDOMNode())
|
||||
|
||||
deletePath: (path, e) ->
|
||||
e.preventDefault()
|
||||
|
||||
ConfigureTracksActions.removeSearchPath(path)
|
||||
|
||||
selectVSTDirectory: (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
ConfigureTracksActions.selectVSTDirectory()
|
||||
|
||||
doClose: (e) ->
|
||||
e.preventDefault()
|
||||
|
||||
@app.layout.closeDialog('manage-vsts-dialog', false)
|
||||
|
||||
componentDidMount: () ->
|
||||
$root = $(@getDOMNode())
|
||||
|
||||
componentWillUpdate: () ->
|
||||
@ignoreICheck = true
|
||||
$root = $(@getDOMNode())
|
||||
|
||||
componentDidUpdate: () ->
|
||||
$root = $(@getDOMNode())
|
||||
})
|
||||
|
|
@ -20,4 +20,9 @@ context = window
|
|||
associateMIDIWithTrack: {}
|
||||
desiredTrackType: {}
|
||||
vstChanged: {}
|
||||
manageVsts: {}
|
||||
enableVst: {}
|
||||
addSearchPath: {}
|
||||
removeSearchPath: {}
|
||||
selectVSTDirectory: {}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ context = window
|
|||
else
|
||||
trackAssignment = mixerData.oppositeMixer?.track
|
||||
|
||||
console.log("checking associations", @configureTracks.vstTrackAssignments.vsts, mixerData.mixer)
|
||||
for vst in @configureTracks.vstTrackAssignments.vsts
|
||||
if vst.track == trackAssignment - 1 && vst.name != 'NONE'
|
||||
logger.debug("found VST on track", vst, track)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ VOICE_CHAT = context.JK.VOICE_CHAT
|
|||
MAX_TRACKS = context.JK.MAX_TRACKS
|
||||
MAX_OUTPUTS = context.JK.MAX_OUTPUTS
|
||||
gearUtils = context.JK.GearUtils
|
||||
AUDIO_UNIT_TYPE_ID = 0
|
||||
VST_TYPE_ID = 1
|
||||
|
||||
###
|
||||
|
||||
|
|
@ -18,6 +20,9 @@ void VSTShowHideGui(bool show,const QString& trackId);
|
|||
void VST_ScanForMidiDevices();
|
||||
QVariantMap VST_GetMidiDeviceList();
|
||||
bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDeviceIndex);
|
||||
QVariantMap listSearchPaths();
|
||||
void addSearchPath(int typeId, QString pathToAdd);
|
||||
void removeSearchPath(int typeId, QString pathToRemove);
|
||||
###
|
||||
|
||||
@ConfigureTracksStore = Reflux.createStore(
|
||||
|
|
@ -31,8 +36,10 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
vstTrackAssignments: {vsts: []}
|
||||
attachedMidiDevices: {midiDevices: []}
|
||||
midiTrackAssignments: {tracks: []}
|
||||
scanPaths: {paths:[]}
|
||||
scanningVsts: false
|
||||
trackType: 'audio'
|
||||
hasVst: true
|
||||
|
||||
init: () ->
|
||||
this.listenTo(context.AppStore, this.onAppInit)
|
||||
|
|
@ -55,12 +62,25 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
@loadChannels()
|
||||
@loadTrackInstruments()
|
||||
|
||||
if force || context.jamClient.hasVstAssignment()
|
||||
@performVstScan()
|
||||
@performMidiScan()
|
||||
#if force || context.jamClient.hasVstAssignment()
|
||||
# @performVstScan()
|
||||
|
||||
@listVsts()
|
||||
@performMidiScan()
|
||||
@listPaths()
|
||||
@changed()
|
||||
|
||||
|
||||
onEnableVst: () ->
|
||||
logger.debug("enabling VSTs")
|
||||
context.jamClient.VSTLoad()
|
||||
|
||||
setTimeout((() =>
|
||||
@listVsts()
|
||||
|
||||
@changed()
|
||||
), 250)
|
||||
|
||||
onTrySave: () ->
|
||||
logger.debug("ConfigureTracksStore:trySave")
|
||||
@trySave()
|
||||
|
|
@ -73,11 +93,12 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
@changed()
|
||||
|
||||
performVstScan: (sendChanged) ->
|
||||
@hasVst = gon.global.vst_enabled & context.jamClient.hasVstHost()
|
||||
#@hasVst = gon.global.vst_enabled & context.jamClient.hasVstHost()
|
||||
logger.debug("hasVst", @hasVst)
|
||||
if @hasVst
|
||||
logger.debug("vstScan starting")
|
||||
@scanningVsts = true
|
||||
@scannedBefore = true
|
||||
result = context.jamClient.VSTScan("window.ConfigureTracksStore.onVstScanComplete")
|
||||
|
||||
onClearVsts: () ->
|
||||
|
|
@ -89,9 +110,13 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
@changed()
|
||||
), 250)
|
||||
|
||||
onManageVsts:() ->
|
||||
logger.debug("manage vst selected")
|
||||
@app.layout.showDialog('manage-vsts-dialog')
|
||||
|
||||
onVstScanComplete: () ->
|
||||
# XXX must wait a long time to get track assignments after scan/
|
||||
console.log("vst scan complete")
|
||||
logger.debug("vst scan complete")
|
||||
@scanningVsts = false
|
||||
setTimeout((() =>
|
||||
@listVsts()
|
||||
|
|
@ -107,6 +132,34 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
@changed()
|
||||
), 0)
|
||||
|
||||
listPaths: () ->
|
||||
@scanPaths = context.jamClient.VSTListSearchPaths()
|
||||
|
||||
onAddSearchPath: (path) ->
|
||||
logger.debug("VSTAddSearchPath: " + path)
|
||||
context.jamClient.VSTAddSearchPath(VST_TYPE_ID, path)
|
||||
@listPaths()
|
||||
@changed()
|
||||
|
||||
onRemoveSearchPath: (path) ->
|
||||
logger.debug("VSTRemoveSearchPath: " + path)
|
||||
context.jamClient.VSTRemoveSearchPath(VST_TYPE_ID, path)
|
||||
@listPaths()
|
||||
@changed()
|
||||
|
||||
onSelectVSTDirectory:() ->
|
||||
context.jamClient.ShowSelectVSTScanDialog("window.ConfigureTracksStore.onVSTPathSelected")
|
||||
|
||||
onVSTPathSelected: (result) ->
|
||||
success = result.success
|
||||
path = result.vstPath
|
||||
|
||||
if success
|
||||
logger.debug("vst path selected!", path)
|
||||
@onAddSearchPath(path)
|
||||
else
|
||||
logger.debug("nothing selected")
|
||||
|
||||
listVsts: () ->
|
||||
|
||||
@vstPluginList = context.jamClient.VSTListVsts()
|
||||
|
|
@ -168,7 +221,10 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
logger.debug("trackAssignments:", @trackAssignments)
|
||||
logger.debug("editingTrack:", @editingTrack)
|
||||
|
||||
unscanned = !@scannedBefore && @vstPluginList.vsts.length <= 1
|
||||
console.log("@vstPluginList, unscanned", @vstPluginList.vsts.length, unscanned)
|
||||
@item = {
|
||||
unscanned: unscanned,
|
||||
musicPorts: @musicPorts,
|
||||
trackAssignments: @trackAssignments,
|
||||
trackNumber: @trackNumber,
|
||||
|
|
@ -180,7 +236,8 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
newTrack: @newTrack,
|
||||
midiTrackAssignments: @midiTrackAssignments,
|
||||
scanningVsts: @scanningVsts,
|
||||
trackType: @trackType
|
||||
trackType: @trackType,
|
||||
scanPaths: @scanPaths
|
||||
}
|
||||
|
||||
@trigger(@item)
|
||||
|
|
@ -389,7 +446,7 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev
|
|||
# ensure that we always have an instrument set (50 = electric guitar
|
||||
context.jamClient.TrackSetInstrument(@trackNumber, 50)
|
||||
|
||||
@performVstScan()
|
||||
#@performVstScan()
|
||||
@performMidiScan()
|
||||
|
||||
@changed()
|
||||
|
|
|
|||
|
|
@ -734,7 +734,9 @@ ConfigureTracksActions = @ConfigureTracksActions
|
|||
@handleAutoOpenJamTrack()
|
||||
|
||||
@watchBackendStats()
|
||||
|
||||
ConfigureTracksActions.reset(false)
|
||||
@delayEnableVst()
|
||||
)
|
||||
.fail((xhr) =>
|
||||
@updateCurrentSession(null)
|
||||
|
|
@ -766,6 +768,22 @@ ConfigureTracksActions = @ConfigureTracksActions
|
|||
@app.notifyServerError(xhr, 'Unable to Join Session');
|
||||
)
|
||||
|
||||
delayEnableVst: () ->
|
||||
if @enableVstTimeout?
|
||||
clearTimeout(@enableVstTimeout)
|
||||
|
||||
@enableVstTimeout = setTimeout((() =>
|
||||
@enableVst()
|
||||
), 5000)
|
||||
|
||||
enableVst: () ->
|
||||
@enableVstTimeout = null
|
||||
|
||||
if @inSession()
|
||||
ConfigureTracksActions.enableVst()
|
||||
else
|
||||
logger.debug("no longer in session; not enabling VSTs at this time")
|
||||
|
||||
watchBackendStats: () ->
|
||||
@backendStatsInterval = window.setInterval((() => (@updateBackendStats())), 1000)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
.manage-vsts-popup {
|
||||
.bt-content {
|
||||
height:38px;
|
||||
width:190px;
|
||||
height:57px;
|
||||
width:250px;
|
||||
background-color:#333;
|
||||
overflow:auto;
|
||||
border:1px solid #ED3618;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
.manage-audio-plugins {
|
||||
font-size:12px;
|
||||
}
|
||||
.dont-see-plugin {
|
||||
font-size: 12px;
|
||||
margin-top: 2px;
|
||||
position: absolute;
|
||||
right: 60px;
|
||||
}
|
||||
.actions {
|
||||
clear:both;
|
||||
text-align:center;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
@import "client/common";
|
||||
|
||||
#manage-vsts-dialog {
|
||||
width: 800px;
|
||||
|
||||
.dialog-inner {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.actions {
|
||||
clear: both;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p { margin-bottom:20px;}
|
||||
table {
|
||||
max-height:400px;
|
||||
margin-bottom:20px;
|
||||
overflow:auto;
|
||||
tbody tr {
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
}
|
||||
th.manage-vst-path {
|
||||
width:90%;
|
||||
}
|
||||
th.manage-vst-action {
|
||||
width:10%;
|
||||
}
|
||||
td {
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
font-size:14px;
|
||||
|
||||
div {
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
font-size:14px;
|
||||
}
|
||||
}
|
||||
td.manage-vst-path {
|
||||
width:90%;
|
||||
}
|
||||
td.manage-vst-action {
|
||||
width:10%;
|
||||
text-align:center;
|
||||
}
|
||||
}
|
||||
|
||||
.add-scan-folder {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,5 +3,8 @@ script type='text/template' id='template-manage-vsts'
|
|||
li data-manage-vst-option="scan"
|
||||
a href='#' scan for new or updated plugins
|
||||
|
||||
li data-manage-vst-option="manage"
|
||||
a href='#' manage folders/paths to scan for plug-ins
|
||||
|
||||
li data-manage-vst-option="clear"
|
||||
a href='#' clear plug-in list
|
||||
|
|
@ -45,4 +45,5 @@
|
|||
= render 'dialogs/soundCloudPlayerDialog'
|
||||
= render 'dialogs/deleteVideoConfirmDialog'
|
||||
= render 'dialogs/configureLiveTracksDialog'
|
||||
= render 'dialogs/configureOutputsDialog'
|
||||
= render 'dialogs/configureOutputsDialog'
|
||||
= render 'dialogs/manageVstsDialog'
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
.dialog.dialog-overlay-sm.top-parent layout='dialog' layout-id='manage-vsts-dialog' id='manage-vsts-dialog'
|
||||
= react_component 'ManageVstsDialog', {}
|
||||
Loading…
Reference in New Issue