diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-08-31 03:54:16 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-08-31 03:54:16 +0300 |
commit | c7b3199669a7b7e0ba11eb0d94d4e143a5fdd633 (patch) | |
tree | 3777a2b2ada15c9c3478427348acff63ab4642b8 /src/adlmidi_midiplay.cpp | |
parent | 399992184883f76a0cd8909a92c15dea85dc657c (diff) | |
download | libADLMIDI-c7b3199669a7b7e0ba11eb0d94d4e143a5fdd633.tar.gz libADLMIDI-c7b3199669a7b7e0ba11eb0d94d4e143a5fdd633.tar.bz2 libADLMIDI-c7b3199669a7b7e0ba11eb0d94d4e143a5fdd633.zip |
Added high tone frequency extension from OPL3-BE
Diffstat (limited to 'src/adlmidi_midiplay.cpp')
-rw-r--r-- | src/adlmidi_midiplay.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 49aa119..cdd4086 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1133,7 +1133,8 @@ void MIDIplay::noteUpdate(size_t midCh, for(unsigned ccount = 0; ccount < info.chip_channels_count; ccount++) { const MIDIchannel::NoteInfo::Phys &ins = info.chip_channels[ccount]; - uint16_t c = ins.chip_chan; + uint16_t c = ins.chip_chan; + uint16_t c_slave = info.chip_channels[1].chip_chan; if(select_adlchn >= 0 && c != select_adlchn) continue; @@ -1292,7 +1293,7 @@ void MIDIplay::noteUpdate(size_t midCh, bend += static_cast<double>(vibrato) * m_midiChannels[midCh].vibdepth * std::sin(m_midiChannels[midCh].vibpos); #define BEND_COEFFICIENT 172.4387 - m_synth.noteOn(c, BEND_COEFFICIENT * std::exp(0.057762265 * (currentTone + bend + phase))); + m_synth.noteOn(c, c_slave, BEND_COEFFICIENT * std::exp(0.057762265 * (currentTone + bend + phase))); #undef BEND_COEFFICIENT if(hooks.onNote) hooks.onNote(hooks.onNote_userData, c, noteTone, midiins, vol, midibend); |