diff --git a/web/app/assets/javascripts/dialog/configureTrackDialog.js b/web/app/assets/javascripts/dialog/configureTrackDialog.js index 421cb1d3c..17989b205 100644 --- a/web/app/assets/javascripts/dialog/configureTrackDialog.js +++ b/web/app/assets/javascripts/dialog/configureTrackDialog.js @@ -103,7 +103,7 @@ $musicAudioTabSelector.click(function () { // validate voice chat settings if (validateVoiceChatSettings()) { - window.ConfigureTracksActions.reset(); + window.ConfigureTracksActions.reset(false); voiceChatHelper.reset(); showMusicAudioPanel(); } @@ -113,7 +113,7 @@ // validate audio settings if (validateAudioSettings()) { logger.debug("initializing voice chat helper") - window.ConfigureTracksActions.reset(); + window.ConfigureTracksActions.reset(false); voiceChatHelper.reset(); showVoiceChatPanel(); } @@ -183,7 +183,7 @@ currentProfile = profile; - window.ConfigureTracksActions.reset(); + window.ConfigureTracksActions.reset(false); } function beforeShow() { @@ -207,7 +207,7 @@ return; } - window.ConfigureTracksActions.reset(); + window.ConfigureTracksActions.reset(false); voiceChatHelper.reset(); voiceChatHelper.beforeShow(); } diff --git a/web/app/assets/javascripts/react-components/ConfigureLiveTracksDialog.js.jsx.coffee b/web/app/assets/javascripts/react-components/ConfigureLiveTracksDialog.js.jsx.coffee index ea4d5a7d7..3bc426721 100644 --- a/web/app/assets/javascripts/react-components/ConfigureLiveTracksDialog.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/ConfigureLiveTracksDialog.js.jsx.coffee @@ -257,14 +257,13 @@ ConfigureTracksStore = @ConfigureTracksStore $root = $(@getDOMNode()) $select = $root.find('select.vsts') vstSelected = $select.val() - if vstSelected? + if vstSelected != 'NONE' vstSelected = {file: vstSelected} - ConfigureTracksActions.associateVSTWithTrack(vstSelected) - if @state.configureTracks?.trackType == 'midi' - if @state.midiInterface? - ConfigureTracksActions.associateMIDIWithTrack(@state.midiInterface) + @updateMidiAssociations() + else + ConfigureTracksActions.associateVSTWithTrack(vstSelected) @setState({midiInterface: null}) @@ -329,7 +328,7 @@ ConfigureTracksStore = @ConfigureTracksStore $root = $(@getDOMNode()) $radio = $root.find('input[type="radio"]') #$radio.iCheck('enable') - $radio.iCheck('disable') + $radio.iCheck('enable') componentDidUpdate: () -> $root = $(@getDOMNode()) @@ -339,8 +338,7 @@ ConfigureTracksStore = @ConfigureTracksStore if @state.configureTracks.editingTrack.assignment == 1 $radio.iCheck('disable') else - $radio.iCheck('disable') - #$radio.iCheck('enable') + $radio.iCheck('enable') @ignoreICheck = false @@ -382,14 +380,40 @@ ConfigureTracksStore = @ConfigureTracksStore midiInterfaceChanged: (e) -> + + @updateMidiAssociations() + + updateMidiAssociations: (e) -> $root = $(@getDOMNode()) $select = $root.find('select.midi-select') midiInterface = $select.val() + $select = $root.find('select.vsts') + vstSelected = $select.val() + + logger.debug("updateMidiAssocations", vstSelected, midiInterface) + if vstSelected != 'NONE' + vstSelected = {file: vstSelected} + else + vstSelected = null + if midiInterface == '' midiInterface = null - ConfigureTracksActions.associateMIDIWithTrack(midiInterface) + midi = @state.midiInterface || midiInterface + + if vstSelected? && midi? + logger.debug("updating midi:#{midi} & vst: #{vstSelected.file}") + + ConfigureTracksActions.associateVSTWithTrack(vstSelected) + setTimeout((() => + ConfigureTracksActions.associateMIDIWithTrack(midi) + ), 250) + + else if midi? + logger.debug("updating midi:#{midiInterface}") + ConfigureTracksActions.associateMIDIWithTrack(midiInterface) @setState({midiInterface: midiInterface}) + }) \ No newline at end of file diff --git a/web/app/assets/javascripts/react-components/stores/ConfigureTracksStore.js.coffee b/web/app/assets/javascripts/react-components/stores/ConfigureTracksStore.js.coffee index ed27b9b74..b3c2b23a0 100644 --- a/web/app/assets/javascripts/react-components/stores/ConfigureTracksStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/ConfigureTracksStore.js.coffee @@ -48,14 +48,16 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev @loadTrackInstruments() @changed() - onReset: () -> + onReset: (force) -> logger.debug("ConfigureTracksStore:reset", this) @trackNumber = null @editingTrack = null @loadChannels() @loadTrackInstruments() - @performVstScan() - @performMidiScan() + + if force || context.jamClient.hasVstAssignment() + @performVstScan() + @performMidiScan() @changed() @@ -92,13 +94,12 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev console.log("vst scan complete") @scanningVsts = false setTimeout((() => - console.log("!!") @listVsts() @changed() - ), 1000 ) + ), 100 ) onVstChanged: () -> - seTitemout() + setTimeout() logger.debug("vst changed") setTimeout((() => @@ -164,6 +165,9 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev if @editingTrack.vst? logger.debug("current track has a VST assigned:" + @editingTrack.vst.file) + logger.debug("trackAssignments:", @trackAssignments) + logger.debug("editingTrack:", @editingTrack) + @item = { musicPorts: @musicPorts, trackAssignments: @trackAssignments, @@ -286,7 +290,7 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev return if vst? - logger.debug("associating track:#{@trackNumber} with VST:#{vst.file}") + logger.debug("associating track:#{@trackNumber - 1} with VST:#{vst.file}") found = null for knownVst in @vstPluginList.vsts @@ -385,6 +389,9 @@ 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() + @performMidiScan() + @changed() @app.layout.showDialog('configure-live-tracks-dialog') @@ -392,6 +399,8 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev onDesiredTrackType: (trackType) -> @trackType = trackType + if @trackType == 'midi' + @trackNumber = 100 @changed() onUpdateOutputs: (outputId1, outputId2) -> @@ -411,6 +420,8 @@ bool VST_EnableMidiForTrack(const QString& trackId, bool enableMidi, int midiDev onAssociateMIDIWithTrack: (midiInterface) -> + @trackNumber = 100 + if !midiInterface? || midiInterface == '' logger.debug("disabling midiInterface:#{midiInterface}, track:#{@trackNumber - 1}") context.jamClient.VST_EnableMidiForTrack(@trackNumber - 1, false, 0) diff --git a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee index 08e291141..8ef0c06cb 100644 --- a/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/SessionStore.js.coffee @@ -733,7 +733,7 @@ ConfigureTracksActions = @ConfigureTracksActions @handleAutoOpenJamTrack() - ConfigureTracksActions.reset() + ConfigureTracksActions.reset(false) ) .fail((xhr) => @updateCurrentSession(null) diff --git a/web/app/assets/javascripts/wizard/gear/step_configure_tracks.js b/web/app/assets/javascripts/wizard/gear/step_configure_tracks.js index e40b81609..72e97aad3 100644 --- a/web/app/assets/javascripts/wizard/gear/step_configure_tracks.js +++ b/web/app/assets/javascripts/wizard/gear/step_configure_tracks.js @@ -38,7 +38,7 @@ function beforeShow() { var forceInputsToUnassigned = !successfullyAssignedOnce; - window.ConfigureTracksActions.reset(forceInputsToUnassigned, wizard.getChosenInputs()); + window.ConfigureTracksActions.reset(false); //configureTracksHelper.reset(forceInputsToUnassigned, wizard.getChosenInputs()) } diff --git a/web/app/assets/stylesheets/dialogs/configureLiveTracksDialog.css.scss b/web/app/assets/stylesheets/dialogs/configureLiveTracksDialog.css.scss index c69210e75..212e6869d 100644 --- a/web/app/assets/stylesheets/dialogs/configureLiveTracksDialog.css.scss +++ b/web/app/assets/stylesheets/dialogs/configureLiveTracksDialog.css.scss @@ -111,6 +111,24 @@ width:80%; margin-bottom:10px; } + + .down-arrow { + cursor:pointer; + width: 0; + height: 0; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + border-top: 8px solid #fc0; + position: relative; + top: -8px; + right: -125px; + } + + .settings-holder { + float: right; + margin-right: 65px; + margin-top: -1px; + } } .audio-effects { width:40%;