* midi not working still

This commit is contained in:
Seth Call 2015-12-04 15:29:59 -06:00
parent dd8e375766
commit 6d5db83aea
6 changed files with 75 additions and 22 deletions

View File

@ -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();
}

View File

@ -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})
})

View File

@ -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)

View File

@ -733,7 +733,7 @@ ConfigureTracksActions = @ConfigureTracksActions
@handleAutoOpenJamTrack()
ConfigureTracksActions.reset()
ConfigureTracksActions.reset(false)
)
.fail((xhr) =>
@updateCurrentSession(null)

View File

@ -38,7 +38,7 @@
function beforeShow() {
var forceInputsToUnassigned = !successfullyAssignedOnce;
window.ConfigureTracksActions.reset(forceInputsToUnassigned, wizard.getChosenInputs());
window.ConfigureTracksActions.reset(false);
//configureTracksHelper.reset(forceInputsToUnassigned, wizard.getChosenInputs())
}

View File

@ -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%;