29 |
#include <gig.h> |
#include <gig.h> |
30 |
|
|
31 |
#include "../../common/RTMath.h" |
#include "../../common/RTMath.h" |
|
#include "../../common/RingBuffer.h" |
|
32 |
#include "../../common/Pool.h" |
#include "../../common/Pool.h" |
33 |
#include "../../drivers/audio/AudioOutputDevice.h" |
#include "../../drivers/audio/AudioOutputDevice.h" |
|
#include "../common/BiquadFilter.h" |
|
34 |
#include "Engine.h" |
#include "Engine.h" |
35 |
#include "EngineChannel.h" |
#include "EngineChannel.h" |
36 |
#include "Stream.h" |
#include "Stream.h" |
147 |
float CutoffBase; ///< Cutoff frequency before control change, EG and LFO are applied |
float CutoffBase; ///< Cutoff frequency before control change, EG and LFO are applied |
148 |
::gig::Sample* pSample; ///< Pointer to the sample to be played back |
::gig::Sample* pSample; ///< Pointer to the sample to be played back |
149 |
::gig::DimensionRegion* pDimRgn; ///< Pointer to the articulation information of current dimension region of this voice |
::gig::DimensionRegion* pDimRgn; ///< Pointer to the articulation information of current dimension region of this voice |
150 |
|
bool Orphan; ///< true if this voice is playing a sample from an instrument that is unloaded. When the voice dies, the sample (and dimension region) will be handed back to the instrument resource manager. |
151 |
playback_state_t PlaybackState; ///< When a sample will be triggered, it will be first played from RAM cache and after a couple of sample points it will switch to disk streaming and at the end of a disk stream we have to add null samples, so the interpolator can do it's work correctly |
playback_state_t PlaybackState; ///< When a sample will be triggered, it will be first played from RAM cache and after a couple of sample points it will switch to disk streaming and at the end of a disk stream we have to add null samples, so the interpolator can do it's work correctly |
152 |
bool DiskVoice; ///< If the sample is very short it completely fits into the RAM cache and doesn't need to be streamed from disk, in that case this flag is set to false |
bool DiskVoice; ///< If the sample is very short it completely fits into the RAM cache and doesn't need to be streamed from disk, in that case this flag is set to false |
153 |
Stream::reference_t DiskStreamRef; ///< Reference / link to the disk stream |
Stream::reference_t DiskStreamRef; ///< Reference / link to the disk stream |
161 |
EGDecay EG3; ///< Envelope Generator 3 (Pitch) |
EGDecay EG3; ///< Envelope Generator 3 (Pitch) |
162 |
midi_ctrl VCFCutoffCtrl; |
midi_ctrl VCFCutoffCtrl; |
163 |
midi_ctrl VCFResonanceCtrl; |
midi_ctrl VCFResonanceCtrl; |
|
static const float FILTER_CUTOFF_COEFF; |
|
164 |
LFOUnsigned* pLFO1; ///< Low Frequency Oscillator 1 (Amplification) |
LFOUnsigned* pLFO1; ///< Low Frequency Oscillator 1 (Amplification) |
165 |
LFOUnsigned* pLFO2; ///< Low Frequency Oscillator 2 (Filter cutoff frequency) |
LFOUnsigned* pLFO2; ///< Low Frequency Oscillator 2 (Filter cutoff frequency) |
166 |
LFOSigned* pLFO3; ///< Low Frequency Oscillator 3 (Pitch) |
LFOSigned* pLFO3; ///< Low Frequency Oscillator 3 (Pitch) |