diff options
author | Wohlstand <admin@wohlnet.ru> | 2023-10-05 13:02:32 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2023-10-05 13:02:32 +0300 |
commit | 2ff142064bcb6fcc05daa6505c99a22077255536 (patch) | |
tree | 51dd20575e65eaf417a8f6d11d34049655c44e4a /src/adlmidi_opl3.cpp | |
parent | 996056412707bddacb00bd314e5e88ba83c94347 (diff) | |
download | libADLMIDI-2ff142064bcb6fcc05daa6505c99a22077255536.tar.gz libADLMIDI-2ff142064bcb6fcc05daa6505c99a22077255536.tar.bz2 libADLMIDI-2ff142064bcb6fcc05daa6505c99a22077255536.zip |
Don't change pitch for HiHat and Cymbal on CMF tracks
Diffstat (limited to 'src/adlmidi_opl3.cpp')
-rw-r--r-- | src/adlmidi_opl3.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 644fd18..e388d45 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -156,7 +156,7 @@ static const uint16_t g_channelsMap[NUM_OF_CHANNELS] = 0x006, 0x007, 0x008, 0x008, 0x008 // <- hw percussions, hihats and cymbals using tom-tom's channel as pitch source }; -//! Channel map to regoster offsets (separated copy for panning) +//! Channel map to regoster offsets (separated copy for panning and for CMF) static const uint16_t g_channelsMapPan[NUM_OF_CHANNELS] = { 0x000, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006, 0x007, 0x008, // 0..8 @@ -1068,7 +1068,7 @@ void OPL3::noteOn(size_t c1, size_t c2, double tone) } ftone = octave + static_cast<uint32_t>(hertz /*+ 0.5*/); - uint32_t chn = g_channelsMap[cc1]; + uint32_t chn = m_musicMode == MODE_CMF ? g_channelsMapPan[cc1] : g_channelsMap[cc1]; const OplTimbre &patch1 = m_insCache[c1]; const OplTimbre &patch2 = m_insCache[c2 < m_insCache.size() ? c2 : 0]; |