You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Using SetSurfaceSelected() rather than OnTrackSelection():
232
-
// SetSurfaceSelected() is less economical because it will be called multiple times (also for unselecting tracks).
232
+
// SetSurfaceSelected() is less economical because it will be called multiple times (also for unselecting tracks, change of any record arm, change of any auto mode).
233
233
// However, SetSurfaceSelected() is the more robust choice because of: https://forum.cockos.com/showpost.php?p=2138446&postcount=15
234
+
// Especially record arm leads to a cascade of calls with !selected. It thus requires some event filtering to avoid unecessary CPU and MIDI bandwidth usage
234
235
235
-
// Note: SetSurfaceSelected is also called on project tab change or when record arming. However, <selected> will only be true if a track selection has changed.
236
-
this->_metronomeUpdate(); //check if metronome status has changed when switching project tabs
237
-
// Track selection has changed:
238
236
if (selected) {
239
-
int id = CSurf_TrackToID(track, false);
237
+
int id = CSurf_TrackToID(track, false);
240
238
int numInBank = id % BANK_NUM_TRACKS;
241
-
int oldBankStart = this->_bankStart;
242
-
this->_bankStart = id - numInBank;
243
-
if (this->_bankStart != oldBankStart) {
244
-
// Update everything
245
-
this->_allMixerUpdate(); // Note: this will also update the g_muteStateBank and g_soloStateBank caches
246
-
}
247
-
else {
248
-
// Update track names
249
-
this->_namesMixerUpdate();
250
-
}
251
-
// Let Keyboard know about changed track selection
@@ -761,7 +773,7 @@ class NiMidiSurface: public BaseSurface {
761
773
}
762
774
MediaTrack* track = CSurf_TrackFromID(id, false);
763
775
int soloState = *(int*)GetSetMediaTrackInfo(track, "I_SOLO", nullptr);
764
-
CSurf_OnSoloChange(track, soloState == 0 ? 1 : 0); // ToDo: Consider settings solo state to 2 (soloed in place)
776
+
CSurf_OnSoloChange(track, soloState == 0 ? 1 : 0); // ToDo: Consider settings solo state to 2 (soloed in place)? If at all it this behaviour should be configured with a CONST
@@ -825,10 +837,39 @@ class NiMidiSurface: public BaseSurface {
825
837
return;
826
838
}
827
839
int soloState = *(int*)GetSetMediaTrackInfo(track, "I_SOLO", nullptr);
828
-
CSurf_OnSoloChange(track, soloState == 0 ? 1 : 0); // ToDo: Consider settings solo state to 2 (soloed in place)
840
+
CSurf_OnSoloChange(track, soloState == 0 ? 1 : 0); // ToDo: Consider settings solo state to 2 (soloed in place)? If at all it this behaviour should be configured with a CONST
829
841
}
830
842
}
831
843
844
+
void_onSelAutoToggle() {
845
+
if (g_trackInFocus == 0) {
846
+
// Special function: If the master track is selected & focused then the AUTO button toggles GlobalAutomationOverride
847
+
int globalAutoMode = GetGlobalAutomationOverride();
848
+
if (globalAutoMode > 1) {
849
+
globalAutoMode = -1; // no global override
850
+
}
851
+
else {
852
+
globalAutoMode = 4; // set global override to latch mode
0 commit comments