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
@@ -299,7 +312,7 @@ class NiMidiSurface: public BaseSurface {
299
312
return;
300
313
}
301
314
if (id == g_trackInFocus) {
302
-
this->_sendCc(CMD_TOGGLE_SEL_TRACK_SOLO, solo ? 1 : 0); // ToDo: Button light does not work yet - why? Is an extra track_available required? Or instance? Or SysEx?
315
+
this->_sendSysex(CMD_TOGGLE_SEL_TRACK_SOLO, solo ? 1 : 0, 0);
303
316
}
304
317
if ((id >= this->_bankStart) && (id <= this->_bankEnd)) {
305
318
int numInBank = id % BANK_NUM_TRACKS;
@@ -340,7 +353,6 @@ class NiMidiSurface: public BaseSurface {
340
353
void_onMidiEvent(MIDI_event_t* event) override {
341
354
if (event->midi_message[0] != MIDI_CC) {
342
355
return;
343
-
// ToDo: Analyze other incoming MIDI messages too, like Sysex, MCU etc
344
356
}
345
357
unsignedchar& command = event->midi_message[1];
346
358
unsignedchar& value = event->midi_message[2];
@@ -413,6 +425,7 @@ class NiMidiSurface: public BaseSurface {
413
425
// ToDo: Scrubbing very slow. Rather than just amplifying this value
414
426
// have to evaluate incoming MIDI stream to allow for both fine as well
415
427
// coarse scrubbing
428
+
// Or move to next beat, bar etc
416
429
CSurf_ScrubAmt(convertSignedMidiValue(value));
417
430
break;
418
431
case CMD_TRACK_SELECTED:
@@ -513,7 +526,7 @@ class NiMidiSurface: public BaseSurface {
513
526
}
514
527
// If no tracks are soloed then muted tracks shall show no peaks
515
528
else {
516
-
if (*(bool*)GetSetMediaTrackInfo(track, "B_MUTE", nullptr)) {
529
+
if (g_muteStateBank[numInBank]) {
517
530
peakBank[j] = 1;
518
531
peakBank[j + 1] = 1;
519
532
}
@@ -526,8 +539,8 @@ class NiMidiSurface: public BaseSurface {
526
539
}
527
540
}
528
541
else {
529
-
// Tracks muted by solo show peaks but they appear greyed out. Muted tracks that are NOT soloed shall show no peaks.
530
-
if ((g_soloStateBank[numInBank] == 0) && (*(bool*)GetSetMediaTrackInfo(track, "B_MUTE", nullptr))) {
542
+
//Muted tracks that are NOT soloed shall show no peaks. Tracks muted by solo show peaks but they appear greyed out.
543
+
if ((g_soloStateBank[numInBank] == 0) && (g_muteStateBank[numInBank])) {
531
544
peakBank[j] = 1;
532
545
peakBank[j + 1] = 1;
533
546
}
@@ -553,6 +566,7 @@ class NiMidiSurface: public BaseSurface {
553
566
this->_bankEnd = this->_bankStart + BANK_NUM_TRACKS - 1; // avoid ambiguity: track counting always zero based
554
567
int numTracks = CSurf_NumTracks(false);
555
568
// Set bank select button lights
569
+
// ToDo: Consider optimizing this piece of code
556
570
int bankLights = 3; // left and right on
557
571
if (numTracks < BANK_NUM_TRACKS) {
558
572
bankLights = 0; // left and right off
@@ -613,6 +627,7 @@ class NiMidiSurface: public BaseSurface {
613
627
int selected = *(int*)GetSetMediaTrackInfo(track, "I_SELECTED", nullptr);
0 commit comments