103 |
// -1.0..1.0). For 24 bit, we downscale from int32. |
// -1.0..1.0). For 24 bit, we downscale from int32. |
104 |
float volume = velocityAttenuation / (pSample->BitDepth == 16 ? 32768.0f : 32768.0f * 65536.0f); |
float volume = velocityAttenuation / (pSample->BitDepth == 16 ? 32768.0f : 32768.0f * 65536.0f); |
105 |
|
|
106 |
volume *= pDimRgn->SampleAttenuation; |
volume *= pDimRgn->SampleAttenuation * pEngineChannel->GlobalVolume * GLOBAL_VOLUME; |
107 |
|
|
108 |
// the volume of release triggered samples depends on note length |
// the volume of release triggered samples depends on note length |
109 |
if (Type == type_release_trigger) { |
if (Type == type_release_trigger) { |
141 |
|
|
142 |
float subfragmentRate = pEngine->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE; |
float subfragmentRate = pEngine->SampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE; |
143 |
CrossfadeSmoother.trigger(crossfadeVolume, subfragmentRate); |
CrossfadeSmoother.trigger(crossfadeVolume, subfragmentRate); |
144 |
VolumeSmoother.trigger(pEngineChannel->GlobalVolume * pEngineChannel->MidiVolume, subfragmentRate); |
VolumeSmoother.trigger(pEngineChannel->MidiVolume, subfragmentRate); |
145 |
PanLeftSmoother.trigger(pEngineChannel->GlobalPanLeft, subfragmentRate); |
PanLeftSmoother.trigger(pEngineChannel->GlobalPanLeft, subfragmentRate); |
146 |
PanRightSmoother.trigger(pEngineChannel->GlobalPanRight, subfragmentRate); |
PanRightSmoother.trigger(pEngineChannel->GlobalPanRight, subfragmentRate); |
147 |
|
|
241 |
else |
else |
242 |
#else |
#else |
243 |
{ |
{ |
244 |
float finalVolume = pEngineChannel->GlobalVolume * pEngineChannel->MidiVolume * crossfadeVolume * EG1.getLevel(); |
float finalVolume = pEngineChannel->MidiVolume * crossfadeVolume * EG1.getLevel(); |
245 |
|
|
246 |
finalSynthesisParameters.fFinalVolumeLeft = finalVolume * VolumeLeft * pEngineChannel->GlobalPanLeft; |
finalSynthesisParameters.fFinalVolumeLeft = finalVolume * VolumeLeft * pEngineChannel->GlobalPanLeft; |
247 |
finalSynthesisParameters.fFinalVolumeRight = finalVolume * VolumeRight * pEngineChannel->GlobalPanRight; |
finalSynthesisParameters.fFinalVolumeRight = finalVolume * VolumeRight * pEngineChannel->GlobalPanRight; |
768 |
* @param Skip - number of sample points to skip in output buffer |
* @param Skip - number of sample points to skip in output buffer |
769 |
*/ |
*/ |
770 |
void Voice::Synthesize(uint Samples, sample_t* pSrc, uint Skip) { |
void Voice::Synthesize(uint Samples, sample_t* pSrc, uint Skip) { |
771 |
finalSynthesisParameters.pOutLeft = &pEngineChannel->pOutputLeft[Skip]; |
finalSynthesisParameters.pOutLeft = &pEngineChannel->pChannelLeft->Buffer()[Skip]; |
772 |
finalSynthesisParameters.pOutRight = &pEngineChannel->pOutputRight[Skip]; |
finalSynthesisParameters.pOutRight = &pEngineChannel->pChannelRight->Buffer()[Skip]; |
773 |
finalSynthesisParameters.pSrc = pSrc; |
finalSynthesisParameters.pSrc = pSrc; |
774 |
|
|
775 |
RTList<Event>::Iterator itCCEvent = pEngineChannel->pEvents->first(); |
RTList<Event>::Iterator itCCEvent = pEngineChannel->pEvents->first(); |