diff options
author | Wohlstand <admin@wohlnet.ru> | 2018-09-25 19:26:21 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2018-09-25 19:26:21 +0300 |
commit | bb0d23251324fadd49cbf53c1673b80ef07ffeff (patch) | |
tree | 57a9a9b754f40877add55bde772d06791f5727e1 /src/adlmidi_private.hpp | |
parent | 36f58b5c73766e4173b1cb04168909fdbcf9a5bf (diff) | |
parent | 923ea2f4d2c26248d518c9af7cafb938cd5ee9d6 (diff) | |
download | libADLMIDI-bb0d23251324fadd49cbf53c1673b80ef07ffeff.tar.gz libADLMIDI-bb0d23251324fadd49cbf53c1673b80ef07ffeff.tar.bz2 libADLMIDI-bb0d23251324fadd49cbf53c1673b80ef07ffeff.zip |
Merge branch 'master' into stable
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index f719f01..c5b70ee 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -82,6 +82,7 @@ typedef int32_t ssize_t; //#else #include <map> #include <set> +#include <new> // nothrow //#endif #include <cstdlib> #include <cstring> @@ -399,10 +400,11 @@ public: /** * @brief On the note in specified chip channel with specified frequency of the tone - * @param c Channel of chip (Emulated chip choosing by next formula: [c = ch + (chipId * 23)]) + * @param c1 Channel of chip [or master 4-op channel] (Emulated chip choosing by next formula: [c = ch + (chipId * 23)]) + * @param c2 Slave 4-op channel of chip, unused for 2op (Emulated chip choosing by next formula: [c = ch + (chipId * 23)]) * @param hertz Frequency of the tone in hertzes */ - void noteOn(size_t c, double hertz); + void noteOn(size_t c1, size_t c2, double hertz); /** * @brief Change setup of instrument in specified chip channel @@ -447,6 +449,11 @@ public: */ void setVolumeScaleModel(ADLMIDI_VolumeModels volumeModel); + /** + * @brief Get the volume scaling model + */ + ADLMIDI_VolumeModels getVolumeScaleModel(); + #ifndef ADLMIDI_HW_OPL /** * @brief Clean up all running emulated chip instances @@ -558,7 +565,7 @@ public: //! Vibrato depth value vibdepth; //! Vibrato delay time - int64_t vibdelay; + int64_t vibdelay_us; //! Last LSB part of RPN value received uint8_t lastlrpn, //! Last MSB poart of RPN value received @@ -801,7 +808,7 @@ public: noteAfterTouchInUse = false; vibspeed = 2 * 3.141592653 * 5.0; vibdepth = 0.5 / 127; - vibdelay = 0; + vibdelay_us = 0; panning = 64; portamento = 0; portamentoEnable = false; @@ -866,12 +873,12 @@ public: //! Has fixed sustain, don't iterate "on" timeout bool fixed_sustain; //! Timeout until note will be allowed to be killed by channel manager while it is on - int64_t kon_time_until_neglible; - int64_t vibdelay; + int64_t kon_time_until_neglible_us; + int64_t vibdelay_us; }; //! Time left until sounding will be muted after key off - int64_t koff_time_until_neglible; + int64_t koff_time_until_neglible_us; enum { users_max = 128 }; LocationData *users_first, *users_free_cells; @@ -888,12 +895,12 @@ public: void users_assign(const LocationData *users, size_t count); // For channel allocation: - AdlChannel(): koff_time_until_neglible(0) + AdlChannel(): koff_time_until_neglible_us(0) { users_clear(); } - AdlChannel(const AdlChannel &oth): koff_time_until_neglible(oth.koff_time_until_neglible) + AdlChannel(const AdlChannel &oth): koff_time_until_neglible_us(oth.koff_time_until_neglible_us) { if(oth.users_first) { @@ -906,16 +913,16 @@ public: AdlChannel &operator=(const AdlChannel &oth) { - koff_time_until_neglible = oth.koff_time_until_neglible; + koff_time_until_neglible_us = oth.koff_time_until_neglible_us; users_assign(oth.users_first, oth.users_size); return *this; } /** - * @brief Increases age of active note in milliseconds time - * @param ms Amount time in milliseconds + * @brief Increases age of active note in microseconds time + * @param us Amount time in microseconds */ - void addAge(int64_t ms); + void addAge(int64_t us); }; #ifndef ADLMIDI_DISABLE_MIDI_SEQUENCER |