diff options
author | Chris Johnson <jinx6568@sover.net> | 2020-02-04 03:55:47 -0500 |
---|---|---|
committer | Chris Johnson <jinx6568@sover.net> | 2020-02-04 03:55:47 -0500 |
commit | 828681015d65db1c4f6c39c1ffb9fe89b71f8af2 (patch) | |
tree | 7ab528032f038884229843ac8f1f3817db4902ad /plugins/MacAU/ToTape6/ToTape6.cpp | |
parent | 95d0811f50332fe99cdb52eed0bd929faec2d43c (diff) | |
download | airwindows-lv2-port-828681015d65db1c4f6c39c1ffb9fe89b71f8af2.tar.gz airwindows-lv2-port-828681015d65db1c4f6c39c1ffb9fe89b71f8af2.tar.bz2 airwindows-lv2-port-828681015d65db1c4f6c39c1ffb9fe89b71f8af2.zip |
Tape plugins update
Diffstat (limited to 'plugins/MacAU/ToTape6/ToTape6.cpp')
-rwxr-xr-x | plugins/MacAU/ToTape6/ToTape6.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/plugins/MacAU/ToTape6/ToTape6.cpp b/plugins/MacAU/ToTape6/ToTape6.cpp index 1291f73..30e06f4 100755 --- a/plugins/MacAU/ToTape6/ToTape6.cpp +++ b/plugins/MacAU/ToTape6/ToTape6.cpp @@ -267,6 +267,11 @@ void ToTape6::ToTape6Kernel::Process( const Float32 *inSourceP, long double inputSample = *sourceP; if (fabs(inputSample)<1.18e-37) inputSample = fpd * 1.18e-37; long double drySample = inputSample; + + if (inputgain < 1.0) { + inputSample *= inputgain; + } //gain cut before plugin + Float64 flutterrandy = fpd / (double)UINT32_MAX; //now we've got a random flutter, so we're messing with the pitch before tape effects go on @@ -351,7 +356,7 @@ void ToTape6::ToTape6Kernel::Process( const Float32 *inSourceP, long double groundSample = vibDrySample - inputSample; //set up UnBox on fluttered audio - if (inputgain != 1.0) { + if (inputgain > 1.0) { inputSample *= inputgain; } //gain boost inside UnBox/Mojo @@ -362,10 +367,13 @@ void ToTape6::ToTape6Kernel::Process( const Float32 *inSourceP, if (HighsSample < 0) inputSample += applySoften; //apply Soften depending on polarity - if (fabs(inputSample) < 0.0025) { - iirHeadBumpA *= 0.99; - iirHeadBumpB *= 0.99; - } //restrain resonant quality of head bump algorithm + Float64 suppress = (1.0-fabs(inputSample)) * 0.00013; + if (iirHeadBumpA > suppress) iirHeadBumpA -= suppress; + if (iirHeadBumpA < -suppress) iirHeadBumpA += suppress; + if (iirHeadBumpB > suppress) iirHeadBumpB -= suppress; + if (iirHeadBumpB < -suppress) iirHeadBumpB += suppress; + //restrain resonant quality of head bump algorithm + inputSample += ((iirHeadBumpA + iirHeadBumpB) * HeadBumpControl); //apply Fatten. |