Skip to content

Commit

Permalink
Fixed issue with FL Studio compatibility mode not working
Browse files Browse the repository at this point in the history
  • Loading branch information
sauraen committed Jan 10, 2022
1 parent 662117f commit 003bf28
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/SeqFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,17 @@ int SeqFile::importMIDI(File midifile, ValueTree midiopts){
OwnedArray<MidiMessageSequence> chantracks;
for(int channel=0; channel<16; channel++){
chantracks.add(new MidiMessageSequence());
mastertrack->extractMidiChannelMessages(channel+1, *chantracks[channel], false);
mastertrack->deleteMidiChannelMessages(channel+1);
for(int m=0; m<mastertrack->getNumEvents(); ++m){
msg = mastertrack->getEventPointer(m)->message;
if(msg.getChannel() == channel+1 && (
!(bool)midiopts.getProperty("flstudio") ||
!msg.isController() ||
!(msg.getControllerNumber() == 114 || msg.getControllerNumber() == 115))){
chantracks[channel]->addEvent(msg);
mastertrack->deleteEvent(m, false);
--m;
}
}
mastertrack->updateMatchedPairs();
chantracks[channel]->updateMatchedPairs();
}
Expand Down

0 comments on commit 003bf28

Please sign in to comment.