From bb4797ee68c0f12018196d3ee8caddcdcad9fe38 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Sat, 19 May 2018 22:33:37 +0300 Subject: 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 --- src/adlmidi_load.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/adlmidi_load.cpp') 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(); -- cgit v1.2.3