aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.hpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2020-08-21 13:31:53 +0300
committerWohlstand <admin@wohlnet.ru>2020-08-21 13:31:53 +0300
commit0f6e197d1f2243e1fb9415e1ea2209c39b972650 (patch)
tree5dc9e14cd51e914b200737815961e4b0d76079d9 /src/adlmidi_opl3.hpp
parentb073a8029a46b646f6d593a56ffbe449dd582e39 (diff)
downloadlibADLMIDI-0f6e197d1f2243e1fb9415e1ea2209c39b972650.tar.gz
libADLMIDI-0f6e197d1f2243e1fb9415e1ea2209c39b972650.tar.bz2
libADLMIDI-0f6e197d1f2243e1fb9415e1ea2209c39b972650.zip
More accurate DMX volume model
Also, move entire code of volume model from MIDIPlay into OPL3
Diffstat (limited to 'src/adlmidi_opl3.hpp')
-rw-r--r--src/adlmidi_opl3.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/adlmidi_opl3.hpp b/src/adlmidi_opl3.hpp
index b97b5d3..a12069e 100644
--- a/src/adlmidi_opl3.hpp
+++ b/src/adlmidi_opl3.hpp
@@ -110,6 +110,8 @@ public:
bool m_runAtPcmRate;
//! Enable soft panning
bool m_softPanning;
+ //! Master volume, controlled via SysEx (0...127)
+ uint8_t m_masterVolume;
//! Just a padding. Reserved.
char _padding2[3];
@@ -249,10 +251,14 @@ 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 63)
+ * @param volume Volume level (from 0 to 127)
* @param brightness CC74 Brightness level (from 0 to 127)
*/
- void touchNote(size_t c, uint8_t volume, uint8_t brightness = 127);
+ void touchNote(size_t c,
+ uint_fast32_t velocity,
+ uint_fast32_t channelVolume = 127,
+ uint_fast32_t channelExpression = 127,
+ uint8_t brightness = 127);
/**
* @brief Set the instrument into specified chip channel