aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_load.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-05-19 22:33:37 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-05-19 22:33:37 +0300
commitbb4797ee68c0f12018196d3ee8caddcdcad9fe38 (patch)
tree9cd938ebf9c39366eaf53401b439fa92a14f63bc /src/adlmidi_load.cpp
parentbed6bcb220346c622a307bf405b9a1e87fd99db5 (diff)
downloadlibADLMIDI-bb4797ee68c0f12018196d3ee8caddcdcad9fe38.tar.gz
libADLMIDI-bb4797ee68c0f12018196d3ee8caddcdcad9fe38.tar.bz2
libADLMIDI-bb4797ee68c0f12018196d3ee8caddcdcad9fe38.zip
Works and fixes
- Fixed an incorrect calculation of 4-op channels and choosing 4-op channels for 2-op only banks - Resolved trouble with automatically chosen flags because of internal confusion
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r--src/adlmidi_load.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp
index e524fe3..bd38620 100644
--- a/src/adlmidi_load.cpp
+++ b/src/adlmidi_load.cpp
@@ -88,6 +88,7 @@ static void cvt_WOPLI_to_FMIns(adlinsdata2 &ins, WOPLInstrument &in)
ins.tone = in.percussion_key_number;
ins.flags = (in.inst_flags & WOPL_Ins_4op) && (in.inst_flags & WOPL_Ins_Pseudo4op) ? adlinsdata::Flag_Pseudo4op : 0;
+ ins.flags|= (in.inst_flags & WOPL_Ins_4op) && ((in.inst_flags & WOPL_Ins_Pseudo4op) == 0) ? adlinsdata::Flag_Real4op : 0;
ins.flags|= (in.inst_flags & WOPL_Ins_IsBlank) ? adlinsdata::Flag_NoSound : 0;
bool fourOps = (in.inst_flags & WOPL_Ins_4op) || (in.inst_flags & WOPL_Ins_Pseudo4op);
@@ -178,9 +179,14 @@ bool MIDIplay::LoadBank(MIDIplay::fileReader &fr)
}
}
- m_setup.HighTremoloMode = (wopl->opl_flags & WOPL_FLAG_DEEP_TREMOLO) != 0;
- m_setup.HighVibratoMode = (wopl->opl_flags & WOPL_FLAG_DEEP_VIBRATO) != 0;
- m_setup.VolumeModel = wopl->volume_model;
+ opl.dynamic_bank_setup.adLibPercussions = false;
+ opl.dynamic_bank_setup.scaleModulators = false;
+ opl.dynamic_bank_setup.deepTremolo = (wopl->opl_flags & WOPL_FLAG_DEEP_TREMOLO) != 0;
+ opl.dynamic_bank_setup.deepVibrato = (wopl->opl_flags & WOPL_FLAG_DEEP_VIBRATO) != 0;
+ opl.dynamic_bank_setup.volumeModel = wopl->volume_model;
+ m_setup.HighTremoloMode = -1;
+ m_setup.HighVibratoMode = -1;
+ m_setup.VolumeModel = ADLMIDI_VolumeModels::ADLMIDI_VolumeModel_AUTO;
/* TODO: Avoid memory reallocation in nearest future! */
opl.dynamic_melodic_banks.clear();