File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -334,6 +334,16 @@ void SeqSourceProcessor::applyMIDI() {
334
334
/* * Callback */
335
335
auto callback = [ptr = SafePointer{ this }] {
336
336
if (ptr) {
337
+ /* * Current MIDI Track Change */
338
+ if (ptr->getTotalMIDITrackNum () > 0
339
+ && ptr->getCurrentMIDITrack () < 0 ) {
340
+ ptr->setCurrentMIDITrack (0 );
341
+ }
342
+ if (ptr->getTotalMIDITrackNum () <= 0
343
+ && ptr->getCurrentMIDITrack () >= 0 ) {
344
+ ptr->setCurrentMIDITrack (-1 );
345
+ }
346
+
337
347
/* * ARA Change */
338
348
if (auto plugin = ptr->getInstrProcessor ()) {
339
349
plugin->invokeARADocumentContextChange ();
Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ void SourceInternalContainer::initMidiData() {
98
98
this ->midiData = std::make_unique<SourceMIDITemp>();
99
99
}
100
100
101
- // this->midiData->addTrack(juce::MidiMessageSequence{});
101
+ /* * Add First Track */
102
+ if (this ->midiData ->getTrackNum () <= 0 ) {
103
+ this ->midiData ->addTrack (juce::MidiMessageSequence{});
104
+ }
102
105
103
106
this ->changed ();
104
107
}
You can’t perform that action at this time.
0 commit comments