aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.hpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2020-09-16 21:17:34 +0300
committerWohlstand <admin@wohlnet.ru>2020-09-16 21:18:48 +0300
commitace610fe613d6eb7633aec98632966d09540dd46 (patch)
tree46fce4cf237d468d4e32d7329ea08ab197e0d35d /src/adlmidi_opl3.hpp
parentd1951836d5e604eef5ea5edeee47c86cac2c1df2 (diff)
downloadlibADLMIDI-ace610fe613d6eb7633aec98632966d09540dd46.tar.gz
libADLMIDI-ace610fe613d6eb7633aec98632966d09540dd46.tar.bz2
libADLMIDI-ace610fe613d6eb7633aec98632966d09540dd46.zip
Added old and buggy HMI volume model
It's needed to make a correct sounding of music of some game soundtracks such as "Asterix & Obelix" TODO: Verify the behavior of drums, seems still being different!
Diffstat (limited to 'src/adlmidi_opl3.hpp')
-rw-r--r--src/adlmidi_opl3.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/adlmidi_opl3.hpp b/src/adlmidi_opl3.hpp
index c4a2b07..0165d02 100644
--- a/src/adlmidi_opl3.hpp
+++ b/src/adlmidi_opl3.hpp
@@ -157,7 +157,9 @@ public:
//! Windows 9x Generic FM driver volume scale table
VOLUME_9X_GENERIC_FM,
//! HMI Sound Operating System volume scale table
- VOLUME_HMI
+ VOLUME_HMI,
+ //! HMI Sound Operating System volume scale model, older variant
+ VOLUME_HMI_OLD
} m_volumeScale;
//! Reserved
@@ -263,14 +265,18 @@ public:
/**
* @brief Change setup of instrument in specified chip channel
* @param c Channel of chip (Emulated chip choosing by next formula: [c = ch + (chipId * 23)])
- * @param volume Volume level (from 0 to 127)
+ * @param velocity Note velocity (from 0 to 127)
+ * @param channelVolume Channel volume level (from 0 to 127)
+ * @param channelExpression Channel expression level (from 0 to 127)
* @param brightness CC74 Brightness level (from 0 to 127)
+ * @param isDrum Is this a drum note? This flag is needed for some volume model algorithms
*/
void touchNote(size_t c,
uint_fast32_t velocity,
uint_fast32_t channelVolume = 127,
uint_fast32_t channelExpression = 127,
- uint8_t brightness = 127);
+ uint_fast32_t brightness = 127,
+ bool isDrum = false);
/**
* @brief Set the instrument into specified chip channel