41 |
#include "EGDecay.h" |
#include "EGDecay.h" |
42 |
#include "Filter.h" |
#include "Filter.h" |
43 |
#include "../common/LFOBase.h" |
#include "../common/LFOBase.h" |
44 |
|
#include "SynthesisParam.h" |
45 |
|
|
46 |
// include the appropriate (unsigned) triangle LFO implementation |
// include the appropriate (unsigned) triangle LFO implementation |
47 |
#if CONFIG_UNSIGNED_TRIANG_ALGO == INT_MATH_SOLUTION |
#if CONFIG_UNSIGNED_TRIANG_ALGO == INT_MATH_SOLUTION |
138 |
float PanLeft; |
float PanLeft; |
139 |
float PanRight; |
float PanRight; |
140 |
float CrossfadeVolume; ///< Current attenuation level caused by a crossfade (only if a crossfade is defined of course) |
float CrossfadeVolume; ///< Current attenuation level caused by a crossfade (only if a crossfade is defined of course) |
141 |
double Pos; ///< Current playback position in sample |
//double Pos; ///< Current playback position in sample |
142 |
float PitchBase; ///< Basic pitch depth, stays the same for the whole life time of the voice |
float PitchBase; ///< Basic pitch depth, stays the same for the whole life time of the voice |
143 |
float PitchBend; ///< Current pitch value of the pitchbend wheel |
float PitchBend; ///< Current pitch value of the pitchbend wheel |
144 |
float CutoffBase; ///< Cutoff frequency before control change, EG and LFO are applied |
float CutoffBase; ///< Cutoff frequency before control change, EG and LFO are applied |
150 |
int RealSampleWordsLeftToRead; ///< Number of samples left to read, not including the silence added for the interpolator |
int RealSampleWordsLeftToRead; ///< Number of samples left to read, not including the silence added for the interpolator |
151 |
unsigned long MaxRAMPos; ///< The upper allowed limit (not actually the end) in the RAM sample cache, after that point it's not safe to chase the interpolator another time over over the current cache position, instead we switch to disk then. |
unsigned long MaxRAMPos; ///< The upper allowed limit (not actually the end) in the RAM sample cache, after that point it's not safe to chase the interpolator another time over over the current cache position, instead we switch to disk then. |
152 |
bool RAMLoop; ///< If this voice has a loop defined which completely fits into the cached RAM part of the sample, in this case we handle the looping within the voice class, else if the loop is located in the disk stream part, we let the disk stream handle the looping |
bool RAMLoop; ///< If this voice has a loop defined which completely fits into the cached RAM part of the sample, in this case we handle the looping within the voice class, else if the loop is located in the disk stream part, we let the disk stream handle the looping |
153 |
uint LoopCyclesLeft; ///< In case there is a RAMLoop and it's not an endless loop; reflects number of loop cycles left to be passed |
//uint LoopCyclesLeft; ///< In case there is a RAMLoop and it's not an endless loop; reflects number of loop cycles left to be passed |
154 |
uint Delay; ///< Number of sample points the rendering process of this voice should be delayed (jitter correction), will be set to 0 after the first audio fragment cycle |
uint Delay; ///< Number of sample points the rendering process of this voice should be delayed (jitter correction), will be set to 0 after the first audio fragment cycle |
155 |
EGADSR EG1; ///< Envelope Generator 1 (Amplification) |
EGADSR EG1; ///< Envelope Generator 1 (Amplification) |
156 |
EGADSR EG2; ///< Envelope Generator 2 (Filter cutoff frequency) |
EGADSR EG2; ///< Envelope Generator 2 (Filter cutoff frequency) |
157 |
EGDecay EG3; ///< Envelope Generator 3 (Pitch) |
EGDecay EG3; ///< Envelope Generator 3 (Pitch) |
|
Filter FilterLeft; |
|
|
Filter FilterRight; |
|
158 |
midi_ctrl VCFCutoffCtrl; |
midi_ctrl VCFCutoffCtrl; |
159 |
midi_ctrl VCFResonanceCtrl; |
midi_ctrl VCFResonanceCtrl; |
160 |
static const float FILTER_CUTOFF_COEFF; |
static const float FILTER_CUTOFF_COEFF; |
169 |
Pool<Event>::Iterator itKillEvent; ///< Event which caused this voice to be killed |
Pool<Event>::Iterator itKillEvent; ///< Event which caused this voice to be killed |
170 |
//private: |
//private: |
171 |
int SynthesisMode; |
int SynthesisMode; |
|
|
|
|
|
|
|
float fFinalPitch; |
|
172 |
float fFinalVolume; |
float fFinalVolume; |
173 |
float fFinalCutoff; |
float fFinalCutoff; |
174 |
float fFinalResonance; |
float fFinalResonance; |
175 |
|
SynthesisParam finalSynthesisParameters; |
176 |
|
Loop loop; |
177 |
|
|
178 |
// Static Methods |
// Static Methods |
179 |
static float CalculateFilterCutoffCoeff(); |
static float CalculateFilterCutoffCoeff(); |