diff options
-rw-r--r-- | src/adlmidi_midiplay.cpp | 10 | ||||
-rw-r--r-- | src/adlmidi_opl3.cpp | 4 | ||||
-rw-r--r-- | src/adlmidi_private.hpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index ecf2732..630c93f 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1063,7 +1063,7 @@ void MIDIplay::noteUpdate(uint16_t midCh, m_synth.noteOff(c); if(props_mask & Upd_Mute) // Mute the note { - m_synth.touchReal(c, 0); + m_synth.touchNote(c, 0); m_chipChannels[c].koff_time_until_neglible = 0; } else @@ -1162,7 +1162,7 @@ void MIDIplay::noteUpdate(uint16_t midCh, break; } - m_synth.touchReal(c, volume, brightness); + m_synth.touchNote(c, volume, brightness); /* DEBUG ONLY!!! static uint32_t max = 0; @@ -1723,11 +1723,11 @@ ADLMIDI_EXPORT void AdlInstrumentTester::Touch(unsigned c, unsigned volume) // V #ifndef DISABLE_EMBEDDED_BANKS OPL3 *opl = P->opl; if(opl->m_volumeScale == OPL3::VOLUME_NATIVE) - opl->touchReal(c, volume * 127 / (127 * 127 * 127) / 2); + opl->touchNote(c, volume * 127 / (127 * 127 * 127) / 2); else { // The formula below: SOLVE(V=127^3 * 2^( (A-63.49999) / 8), A) - opl->touchReal(c, volume > 8725 ? static_cast<unsigned int>(std::log((double)volume) * 11.541561 + (0.5 - 104.22845)) : 0); + opl->touchNote(c, volume > 8725 ? static_cast<unsigned int>(std::log((double)volume) * 11.541561 + (0.5 - 104.22845)) : 0); // The incorrect formula below: SOLVE(V=127^3 * (2^(A/63)-1), A) //Touch_Real(c, volume>11210 ? 91.61112 * std::log(4.8819E-7*volume + 1.0)+0.5 : 0); } @@ -1785,7 +1785,7 @@ ADLMIDI_EXPORT void AdlInstrumentTester::DoNote(int note) { if(adlchannel[c] < 0) continue; opl->setPatch(static_cast<size_t>(adlchannel[c]), ains.adl[c]); - opl->touchReal(static_cast<size_t>(adlchannel[c]), 63); + opl->touchNote(static_cast<size_t>(adlchannel[c]), 63); opl->setPan(static_cast<size_t>(adlchannel[c]), 0x30); opl->noteOn(static_cast<size_t>(adlchannel[c]), hertz); } diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 2d2bc78..09a1b3e 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -233,7 +233,7 @@ void OPL3::noteOn(size_t c, double hertz) // Hertz range: 0..131071 } } -void OPL3::touchReal(uint32_t c, uint8_t volume, uint8_t brightness) +void OPL3::touchNote(uint32_t c, uint8_t volume, uint8_t brightness) { if(volume > 63) volume = 63; @@ -362,7 +362,7 @@ void OPL3::silenceAll() // Silence all OPL channels. for(size_t c = 0; c < m_numChannels; ++c) { noteOff(c); - touchReal(c, 0); + touchNote(c, 0); } } diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index c2771fc..066eef7 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -385,7 +385,7 @@ public: * @param volume Volume level (from 0 to 63) * @param brightness CC74 Brightness level (from 0 to 127) */ - void touchReal(uint32_t c, uint8_t volume, uint8_t brightness = 127); + void touchNote(uint32_t c, uint8_t volume, uint8_t brightness = 127); /** * @brief Set the instrument into specified chip channel |