restyle trackoutput

This commit is contained in:
Harry van Haaren 2017-03-27 21:15:35 +01:00
parent a2e154a8be
commit 504e5bf1a9

View file

@ -151,16 +151,15 @@ void TrackOutput::process(unsigned int nframes, Buffers* buffers)
float* jackoutputR = buffers->audio[Buffers::JACK_TRACK_0_R+track]; float* jackoutputR = buffers->audio[Buffers::JACK_TRACK_0_R+track];
/* Trial + Error leads to this algo - its cheap and cheerful */ /* Trial + Error leads to this algo - its cheap and cheerful */
float pan_l = 1.0f; float pan_l = 1.0f;
float pan_r = 1.0f; float pan_r = 1.0f;
if(_toMasterPan <= 0) { if(_toMasterPan <= 0) {
// pan to left channel, lower right one // pan to left channel, lower right one
pan_r = _toMasterPan + 1.0f; pan_r = _toMasterPan + 1.0f;
} } else {
else { // pan to right channel, lower left one
// pan to right channel, lower left one pan_l = (_toMasterPan * -1) + 1.0f;
pan_l = (_toMasterPan * -1) + 1.0f; }
}
for(unsigned int i = 0; i < nframes; i++) { for(unsigned int i = 0; i < nframes; i++) {
// * master for "post-fader" sends // * master for "post-fader" sends
@ -177,18 +176,18 @@ void TrackOutput::process(unsigned int nframes, Buffers* buffers)
if ( _toPostfaderActive ) { if ( _toPostfaderActive ) {
reverbL[i] += tmpL * _toReverb * _toMasterLag; reverbL[i] += tmpL * _toReverb * _toMasterLag;
reverbR[i] += tmpR * _toReverb * _toMasterLag; reverbR[i] += tmpR * _toReverb * _toMasterLag;
} }
if ( _toXSideActive ) { if ( _toXSideActive ) {
postSidechainL[i] += tmpL * _toPostSidechain * _toMasterLag; postSidechainL[i] += tmpL * _toPostSidechain * _toMasterLag;
postSidechainR[i] += tmpR * _toPostSidechain * _toMasterLag; postSidechainR[i] += tmpR * _toPostSidechain * _toMasterLag;
} }
// turning down an element in the mix should *NOT* influence sidechaining // turning down an element in the mix should *NOT* influence sidechaining
if ( _toKeyActive ) { if ( _toKeyActive ) {
sidechainL[i] += tmpL; sidechainL[i] += tmpL;
sidechainR[i] += tmpR; sidechainR[i] += tmpR;
} }
} }
} }