From 779270dc0490dc554a6ca3f0522556695dccffb3 Mon Sep 17 00:00:00 2001 From: GithubActions BaconPaul Bot Date: Sun, 18 Aug 2024 20:13:38 +0000 Subject: [PATCH] Update to Latest Airwin --- libs/airwindows | 2 +- res/awpdoc/ToTape6.txt | 1 + res/awpdoc/ToTape7.txt | 25 + src/ModuleAdd.h | 146 ++-- src/autogen_airwin/CMakeLists.txt | 4 + src/autogen_airwin/Cans.cpp | 229 ++++++ src/autogen_airwin/Cans.h | 200 +++++ src/autogen_airwin/CansProc.cpp | 888 ++++++++++++++++++++++ src/autogen_airwin/Isolator3.cpp | 148 ++++ src/autogen_airwin/Isolator3.h | 115 +++ src/autogen_airwin/Isolator3Proc.cpp | 1040 ++++++++++++++++++++++++++ src/autogen_airwin/ToTape7.cpp | 2 +- src/autogen_airwin/ToTape7Proc.cpp | 36 +- 13 files changed, 2757 insertions(+), 79 deletions(-) create mode 100644 res/awpdoc/ToTape7.txt create mode 100644 src/autogen_airwin/Cans.cpp create mode 100644 src/autogen_airwin/Cans.h create mode 100644 src/autogen_airwin/CansProc.cpp create mode 100644 src/autogen_airwin/Isolator3.cpp create mode 100644 src/autogen_airwin/Isolator3.h create mode 100644 src/autogen_airwin/Isolator3Proc.cpp diff --git a/libs/airwindows b/libs/airwindows index 4ae6d34..b77a11b 160000 --- a/libs/airwindows +++ b/libs/airwindows @@ -1 +1 @@ -Subproject commit 4ae6d34724ba0ad5f7d908f0194fdaa17f5adae9 +Subproject commit b77a11bab578fd53f1bc9c03659c272516d10fdc diff --git a/res/awpdoc/ToTape6.txt b/res/awpdoc/ToTape6.txt index ce82b9a..0423e75 100644 --- a/res/awpdoc/ToTape6.txt +++ b/res/awpdoc/ToTape6.txt @@ -14,4 +14,5 @@ The dry/wet control has a trick in store: it only works in the normal way if you Oh, one more thing: ToTape6 has the guts of ADClip built into it as a safety clipper. So you can use it as a final loudenator, at which it ought to be about as good as they get: if the tape slam isn’t getting you there, you can push the output volume past 0 dB to intentionally clip harder, or pull it back to make sure ToTape is the only distortion stage. If you’re seeing extended periods of -0.09 dB you’re seeing ADClip working. + diff --git a/res/awpdoc/ToTape7.txt b/res/awpdoc/ToTape7.txt new file mode 100644 index 0000000..bcabc7b --- /dev/null +++ b/res/awpdoc/ToTape7.txt @@ -0,0 +1,25 @@ +# ToTape7 is Airwindows tape emulation with Bias and Dubly. + +So about that simplification of ToTape? Nah. But… set everything to the middle and you can ignore all the many controls. + +ToTape7 not only upgrades pretty much every single thing about ToTape, but it brings new functionality beyond any previous version (even when they're good) and it lets you go completely bonkers tailoring signature new sounds however you like them. This is the ToTape for people who wanted all the controls, and more. It's the ToTape for salvaging any sort of audio no matter how DAW-like it is… and it's the ToTape that can be stripped right down to serve as its own FromTape, anytime you like, or if you're trying to run lots of channels of it because you want to tape all the things and then mix them down also to tape. Which it's great at, by the way, as it soaks up loudness super well and even has a ClipOnly2 built in so it can serve, standalone, as your ultimate loudness clipper. + +ToTape7 has exactly as many controls as you can fit in Airwindows Consolidated, which means it'll also run in VCV Rack. That means there are some possible controls it skips, and exactly one control that's dual-ganged with two things riding on one single knob. It's just a different knob this time: used to be dual-ganged on the knob marked Soften. The controls from top to bottom operate Dubly Encode, Drive, Flutter, Bias, Head Bump, and Dubly Decode. Again, set everything to the middle for 'normal', but you can go way past normal if you want. + +Dubly Encode (not the same thing but the same concept as a famous noise reduction system) applies a brightened and compressed boost to the audio pre-tape, with the amount governed by Amt and the highs cutoff by Freq. (Dubly Decode is exactly the same, except it simply subtracts the effect it makes: this is the secret Seventies tape sound, especially when you tune the Dublies to produce effects). Match them to get mostly 'normal' sound, mismatch them for effect: mind that you don't boost Decode Amt too much or it will produce sort of anti-crunch sound, going past 'cancellation' to obvious distortion. (or do it if you feel like it, I'm not your boss) + +Tape Drive is your boost (or pad). 0.5 is unity gain. Boost if you want lots of tape drive, or to loudenate. You should have a good ability to do this and make it sound the way you want. Since Dubly was added, it's even better at allowing for clean gain here, as Dubly tends to suppress harmonics from distortion. + +Flutter is like Flutter2, but is NOT exactly the same. It's updated, even since Flutter2, for the purpose of letting the '3D tape' emulation (letting tape bend laterally as well as stretch) be more accurate. It's also toned down a bit so 0.5 gives you a reasonable, real-world flutter effect. The two channels will use their randomness to try and chase each other a little, much like how TPDFWide does the same thing to be LESS correlated. Turns out with default settings this is really, really good at getting a spacious tape realism without letting the imaging go too weird. You can also bypass the whole thing by setting Flutter to zero: if you're running at low sample rate, consider doing that if you're running lots of ToTape and losing the extreme highs. I might not run Flutter on multitracks, just the buss. + +Bias is usually set to slight overbiasing. It's like GoldenSlew, but it's simplified and it's being run between Dubly encode and decode, so it's acting differently from the standalone GoldenSlew. Underbiasing also works but is a different algorithm that's probably not going to be people's first choice, but you can do it. Slight overbiasing is your best weapoon against unpleasant tizzy highs. + +Head Bump is like DubSub2, but it too is updated even more to get more out of ToTape7. There's a highpass built in at 0.5 setting that balances the bump against the rest of the audio, making it so if you stack up the plugin it doesn't get too messy, modeled after references of real tape machines doing multiple generations. Anywhere you set the head bump frequency should get reasonable results with Head Bump at 0.5. If you pull it back OR boost it, you begin to drop the highpass as you do that, meaning it will either crossfade over to the original digital bass (with extended subs) as you reduce the bump, or it'll start adding even more exaggerated bump to the original bass as you crank. So, it's a special voicing for doing all of the things, with 0.5 as the 'peak realism' and most restrictive setting. Ouside that, just pick whether you want less 'tape bass', or 'mega bass' by combining the source and the bump. + +Said bump still does the thing from DubSub2 where it's also giving a mild notch at double the frequency, which is characteristic of pretty much all real tape machines. You get to pick the frequency, because why would you be tied to a given machine when they're all different frequencies already, and when the heart of the effect is not getting the frequencyu right, but the unusual Airwindows head bump algorithm that'll work just fine however you voice it? + +And Dubly Decode helps you get even smoother, more compressed sound out of the tape saturation, and lets you dial it in by both amount and frequency. Be aware that it's a really gentle treble-slope, so making subtle changes to frequency will have an effect on the character of the sound but won't produce wild effects. Basically, if Dubly mostly balances but Enc is crossing over lower than Dec, there will be a sort of lower midrange hype that comes through: if Dec is lower than Enc, it's going to be drying up that energy and making it a bit tighter. They're supposed to cancel out, but half the reason classic records all sound different from each other is that this system in real life required a lot of fussy tuning, and some people set it up by ear and ended up with distinct tone qualities for their studios when they did. It's not so much 'EQ' qualities as texture. Experiment with it to see if you have preferences. + +And that's ToTape7! Ought to hold people for a while, and be a decent upgrade from ToTape6, even though people really like that one (and it's still there so you can still have it anytime you want). + + diff --git a/src/ModuleAdd.h b/src/ModuleAdd.h index 812272e..19335cf 100644 --- a/src/ModuleAdd.h +++ b/src/ModuleAdd.h @@ -17,7 +17,7 @@ int Air2_unused = AirwinRegistry::registerAirwindow({"Air2", "Brightness", 66, " #include "autogen_airwin/Air3.h" int Air3_unused = AirwinRegistry::registerAirwindow({"Air3", "Brightness", 53, "Air3 creates a new form of air-band EQ based on Kalman filtering.", airwinconsolidated::Air3::kNumParameters, "2024-03-10", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Apicolypse.h" -int Apicolypse_unused = AirwinRegistry::registerAirwindow({"Apicolypse", "Tone Color", 343, "Apicolypse is a re-release of my old API-style color adder, exacly as it was.", airwinconsolidated::Apicolypse::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Apicolypse_unused = AirwinRegistry::registerAirwindow({"Apicolypse", "Tone Color", 344, "Apicolypse is a re-release of my old API-style color adder, exacly as it was.", airwinconsolidated::Apicolypse::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/AtmosphereBuss.h" int AtmosphereBuss_unused = AirwinRegistry::registerAirwindow({"AtmosphereBuss", "Consoles", 123, "AtmosphereBuss is Console5 processing with powerful new acoustic distance effects.", airwinconsolidated::AtmosphereBuss::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/AtmosphereChannel.h" @@ -31,7 +31,7 @@ int AverMatrix_unused = AirwinRegistry::registerAirwindow({"AverMatrix", "Filter #include "autogen_airwin/Average.h" int Average_unused = AirwinRegistry::registerAirwindow({"Average", "Filter", 232, "Average is a distinctive sort of lowpass filter.", airwinconsolidated::Average::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Balanced.h" -int Balanced_unused = AirwinRegistry::registerAirwindow({"Balanced", "Utility", 376, "Balanced lets you run an XLR input into a stereo input, sum it to mono, and use it.", airwinconsolidated::Balanced::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int Balanced_unused = AirwinRegistry::registerAirwindow({"Balanced", "Utility", 377, "Balanced lets you run an XLR input into a stereo input, sum it to mono, and use it.", airwinconsolidated::Balanced::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/BassAmp.h" int BassAmp_unused = AirwinRegistry::registerAirwindow({"BassAmp", "Amp Sims", 35, "BassAmp is an old plugin with new tweaks, that gives some bass guitar tones.", airwinconsolidated::BassAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/BassDrive.h" @@ -67,9 +67,9 @@ int BiquadTriple_unused = AirwinRegistry::registerAirwindow({"BiquadTriple", "Bi #include "autogen_airwin/BitGlitter.h" int BitGlitter_unused = AirwinRegistry::registerAirwindow({"BitGlitter", "Lo-Fi", 256, "BitGlitter is an old-sampler style digital lo-fi plugin.", airwinconsolidated::BitGlitter::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/BitShiftGain.h" -int BitShiftGain_unused = AirwinRegistry::registerAirwindow({"BitShiftGain", "Utility", 360, "BitShiftGain is the ‘One Weird Trick’ perfect boost/pad, but in 6db increments ONLY.", airwinconsolidated::BitShiftGain::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Latest" }}); +int BitShiftGain_unused = AirwinRegistry::registerAirwindow({"BitShiftGain", "Utility", 361, "BitShiftGain is the ‘One Weird Trick’ perfect boost/pad, but in 6db increments ONLY.", airwinconsolidated::BitShiftGain::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Latest" }}); #include "autogen_airwin/BitShiftPan.h" -int BitShiftPan_unused = AirwinRegistry::registerAirwindow({"BitShiftPan", "Utility", 359, "BitShiftPan gives you a gain and a pan control that are ONLY done using bit shifts.", airwinconsolidated::BitShiftPan::kNumParameters, "2023-05-13", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int BitShiftPan_unused = AirwinRegistry::registerAirwindow({"BitShiftPan", "Utility", 360, "BitShiftPan gives you a gain and a pan control that are ONLY done using bit shifts.", airwinconsolidated::BitShiftPan::kNumParameters, "2023-05-13", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/Bite.h" int Bite_unused = AirwinRegistry::registerAirwindow({"Bite", "Lo-Fi", 262, "Bite is an unusual edge-maker.", airwinconsolidated::Bite::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/BlockParty.h" @@ -85,7 +85,7 @@ int BrightAmbience3_unused = AirwinRegistry::registerAirwindow({"BrightAmbience3 #include "autogen_airwin/BuildATPDF.h" int BuildATPDF_unused = AirwinRegistry::registerAirwindow({"BuildATPDF", "Dithers", 153, "BuildATPDF is a dither-making toolkit.", airwinconsolidated::BuildATPDF::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/BussColors4.h" -int BussColors4_unused = AirwinRegistry::registerAirwindow({"BussColors4", "Tone Color", 341, "BussColors4 is the Airwindows console emulations, now working up to 192K correctly.", airwinconsolidated::BussColors4::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int BussColors4_unused = AirwinRegistry::registerAirwindow({"BussColors4", "Tone Color", 342, "BussColors4 is the Airwindows console emulations, now working up to 192K correctly.", airwinconsolidated::BussColors4::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/ButterComp.h" int ButterComp_unused = AirwinRegistry::registerAirwindow({"ButterComp", "Dynamics", 180, "ButterComp is my softest, smoothest compressor.", airwinconsolidated::ButterComp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ButterComp2.h" @@ -101,7 +101,9 @@ int CStrip2_unused = AirwinRegistry::registerAirwindow({"CStrip2", "Filter", 224 #include "autogen_airwin/Cabs.h" int Cabs_unused = AirwinRegistry::registerAirwindow({"Cabs", "Amp Sims", 33, "Cabs is an Airwindows guitar speaker cabinet simulator.", airwinconsolidated::Cabs::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Calibre.h" -int Calibre_unused = AirwinRegistry::registerAirwindow({"Calibre", "Tone Color", 346, "Calibre is a re-release of another old Character plugin.", airwinconsolidated::Calibre::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Calibre_unused = AirwinRegistry::registerAirwindow({"Calibre", "Tone Color", 347, "Calibre is a re-release of another old Character plugin.", airwinconsolidated::Calibre::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +#include "autogen_airwin/Cans.h" +int Cans_unused = AirwinRegistry::registerAirwindow({"Cans", "Unclassified", -1, "", airwinconsolidated::Cans::kNumParameters, "2024-08-18", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Capacitor.h" int Capacitor_unused = AirwinRegistry::registerAirwindow({"Capacitor", "Filter", 238, "Capacitor is a lowpass/highpass filter of a new type.", airwinconsolidated::Capacitor::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Capacitor2.h" @@ -111,17 +113,17 @@ int Chamber_unused = AirwinRegistry::registerAirwindow({"Chamber", "Reverb", 286 #include "autogen_airwin/Chamber2.h" int Chamber2_unused = AirwinRegistry::registerAirwindow({"Chamber2", "Reverb", 285, "Chamber2 is a feedforward reverb, a blur delay, and a glitch topping!", airwinconsolidated::Chamber2::kNumParameters, "2023-02-04", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Channel4.h" -int Channel4_unused = AirwinRegistry::registerAirwindow({"Channel4", "Tone Color", 355, "Channel4 is a tone coloring plugin that gives more of an analog feel.", airwinconsolidated::Channel4::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Channel4_unused = AirwinRegistry::registerAirwindow({"Channel4", "Tone Color", 356, "Channel4 is a tone coloring plugin that gives more of an analog feel.", airwinconsolidated::Channel4::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Channel5.h" -int Channel5_unused = AirwinRegistry::registerAirwindow({"Channel5", "Tone Color", 354, "Channel5 is Channel for 2018, with new subtleties.", airwinconsolidated::Channel5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Channel5_unused = AirwinRegistry::registerAirwindow({"Channel5", "Tone Color", 355, "Channel5 is Channel for 2018, with new subtleties.", airwinconsolidated::Channel5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Channel6.h" -int Channel6_unused = AirwinRegistry::registerAirwindow({"Channel6", "Tone Color", 353, "Channel6 uses the Spiral algorithm.", airwinconsolidated::Channel6::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Channel6_unused = AirwinRegistry::registerAirwindow({"Channel6", "Tone Color", 354, "Channel6 uses the Spiral algorithm.", airwinconsolidated::Channel6::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Channel7.h" -int Channel7_unused = AirwinRegistry::registerAirwindow({"Channel7", "Tone Color", 352, "Channel7 improves slew clipping and lets you blend Channel 6 and 5.", airwinconsolidated::Channel7::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Channel7_unused = AirwinRegistry::registerAirwindow({"Channel7", "Tone Color", 353, "Channel7 improves slew clipping and lets you blend Channel 6 and 5.", airwinconsolidated::Channel7::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Channel8.h" -int Channel8_unused = AirwinRegistry::registerAirwindow({"Channel8", "Tone Color", 351, "Channel8 is Channel7 with updates from Capacitor2 and Slew3. More and better of what Channel is.", airwinconsolidated::Channel8::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Channel8_unused = AirwinRegistry::registerAirwindow({"Channel8", "Tone Color", 352, "Channel8 is Channel7 with updates from Capacitor2 and Slew3. More and better of what Channel is.", airwinconsolidated::Channel8::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Channel9.h" -int Channel9_unused = AirwinRegistry::registerAirwindow({"Channel9", "Tone Color", 342, "Channel9 is Channel8 with ultrasonic filtering, and new Teac and Mackie 'low end' settings.", airwinconsolidated::Channel9::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int Channel9_unused = AirwinRegistry::registerAirwindow({"Channel9", "Tone Color", 343, "Channel9 is Channel8 with ultrasonic filtering, and new Teac and Mackie 'low end' settings.", airwinconsolidated::Channel9::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Chorus.h" int Chorus_unused = AirwinRegistry::registerAirwindow({"Chorus", "Ambience", 22, "Chorus is a mono chorus, also works as a vibrato.", airwinconsolidated::Chorus::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/ChorusEnsemble.h" @@ -129,7 +131,7 @@ int ChorusEnsemble_unused = AirwinRegistry::registerAirwindow({"ChorusEnsemble", #include "autogen_airwin/ChromeOxide.h" int ChromeOxide_unused = AirwinRegistry::registerAirwindow({"ChromeOxide", "Lo-Fi", 259, "ChromeOxide is an alternate path to vibey old tape sonics.", airwinconsolidated::ChromeOxide::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Cider.h" -int Cider_unused = AirwinRegistry::registerAirwindow({"Cider", "Tone Color", 347, "Cider is a re-release of another old Character plugin.", airwinconsolidated::Cider::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Cider_unused = AirwinRegistry::registerAirwindow({"Cider", "Tone Color", 348, "Cider is a re-release of another old Character plugin.", airwinconsolidated::Cider::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ClearCoat.h" int ClearCoat_unused = AirwinRegistry::registerAirwindow({"ClearCoat", "Ambience", 0, "ClearCoat is an array of bright ambience reverbs.", airwinconsolidated::ClearCoat::kNumParameters, "2023-11-06", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ClipOnly2.h" @@ -215,7 +217,7 @@ int ConsoleXBuss_unused = AirwinRegistry::registerAirwindow({"ConsoleXBuss", "Un #include "autogen_airwin/ConsoleXChannel.h" int ConsoleXChannel_unused = AirwinRegistry::registerAirwindow({"ConsoleXChannel", "Unclassified", -1, "", airwinconsolidated::ConsoleXChannel::kNumParameters, "2024-05-25", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ContentHideD.h" -int ContentHideD_unused = AirwinRegistry::registerAirwindow({"ContentHideD", "Utility", 380, "ContentHideD mutes audio except for brief glimpses.", airwinconsolidated::ContentHideD::kNumParameters, "2024-03-30", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int ContentHideD_unused = AirwinRegistry::registerAirwindow({"ContentHideD", "Utility", 381, "ContentHideD mutes audio except for brief glimpses.", airwinconsolidated::ContentHideD::kNumParameters, "2024-03-30", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/CreamCoat.h" int CreamCoat_unused = AirwinRegistry::registerAirwindow({"CreamCoat", "Reverb", 274, "CreamCoat is a swiss army knife reverb with soft undersampling.", airwinconsolidated::CreamCoat::kNumParameters, "2024-06-23", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/Creature.h" @@ -227,9 +229,9 @@ int CrunchCoat_unused = AirwinRegistry::registerAirwindow({"CrunchCoat", "Reverb #include "autogen_airwin/CrunchyGrooveWear.h" int CrunchyGrooveWear_unused = AirwinRegistry::registerAirwindow({"CrunchyGrooveWear", "Lo-Fi", 251, "CrunchyGrooveWear is a version of GrooveWear for more edge and distortion.", airwinconsolidated::CrunchyGrooveWear::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/Crystal.h" -int Crystal_unused = AirwinRegistry::registerAirwindow({"Crystal", "Tone Color", 348, "Crystal is a tone shaper and buss soft-clipper.", airwinconsolidated::Crystal::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Crystal_unused = AirwinRegistry::registerAirwindow({"Crystal", "Tone Color", 349, "Crystal is a tone shaper and buss soft-clipper.", airwinconsolidated::Crystal::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/DCVoltage.h" -int DCVoltage_unused = AirwinRegistry::registerAirwindow({"DCVoltage", "Utility", 369, "DCVoltage is literally a DC control voltage, in a plugin.", airwinconsolidated::DCVoltage::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int DCVoltage_unused = AirwinRegistry::registerAirwindow({"DCVoltage", "Utility", 370, "DCVoltage is literally a DC control voltage, in a plugin.", airwinconsolidated::DCVoltage::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Dark.h" int Dark_unused = AirwinRegistry::registerAirwindow({"Dark", "Dithers", 140, "Dark is a wordlength reducer that gives your music a blacker backdrop.", airwinconsolidated::Dark::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/DarkNoise.h" @@ -305,11 +307,11 @@ int Dyno_unused = AirwinRegistry::registerAirwindow({"Dyno", "Saturation", 303, #include "autogen_airwin/EQ.h" int EQ_unused = AirwinRegistry::registerAirwindow({"EQ", "Filter", 237, "EQ is just the EQ parts of CStrip.", airwinconsolidated::EQ::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/EdIsDim.h" -int EdIsDim_unused = AirwinRegistry::registerAirwindow({"EdIsDim", "Utility", 370, "EdIsDim is mid/side conversion utility plugins.", airwinconsolidated::EdIsDim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int EdIsDim_unused = AirwinRegistry::registerAirwindow({"EdIsDim", "Utility", 371, "EdIsDim is mid/side conversion utility plugins.", airwinconsolidated::EdIsDim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Edge.h" int Edge_unused = AirwinRegistry::registerAirwindow({"Edge", "Distortion", 129, "Edge is a seven-stage distortion with Hypersonic filtering and tone shaping controls.", airwinconsolidated::Edge::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Elation.h" -int Elation_unused = AirwinRegistry::registerAirwindow({"Elation", "Tone Color", 345, "Elation is a re-release of another old Character plugin.", airwinconsolidated::Elation::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int Elation_unused = AirwinRegistry::registerAirwindow({"Elation", "Tone Color", 346, "Elation is a re-release of another old Character plugin.", airwinconsolidated::Elation::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/ElectroHat.h" int ElectroHat_unused = AirwinRegistry::registerAirwindow({"ElectroHat", "Noise", 270, "ElectroHat is a hi-hat tone generator that uses the original sound as a control voltage.", airwinconsolidated::ElectroHat::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Energy.h" @@ -323,7 +325,7 @@ int EveryConsole_unused = AirwinRegistry::registerAirwindow({"EveryConsole", "Co #include "autogen_airwin/EverySlew.h" int EverySlew_unused = AirwinRegistry::registerAirwindow({"EverySlew", "Brightness", 62, "EverySlew is a wide variety of unique sound processing tools.", airwinconsolidated::EverySlew::kNumParameters, "2023-07-22", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/EveryTrim.h" -int EveryTrim_unused = AirwinRegistry::registerAirwindow({"EveryTrim", "Utility", 363, "EveryTrim is Left/Right, Mid/Side, and Master in one plugin.", airwinconsolidated::EveryTrim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int EveryTrim_unused = AirwinRegistry::registerAirwindow({"EveryTrim", "Utility", 364, "EveryTrim is Left/Right, Mid/Side, and Master in one plugin.", airwinconsolidated::EveryTrim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Exciter.h" int Exciter_unused = AirwinRegistry::registerAirwindow({"Exciter", "Effects", 206, "Exciter is an Aural Exciter plugin that can be both subtle and extreme.", airwinconsolidated::Exciter::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Facet.h" @@ -335,7 +337,7 @@ int FinalClip_unused = AirwinRegistry::registerAirwindow({"FinalClip", "Clipping #include "autogen_airwin/FireAmp.h" int FireAmp_unused = AirwinRegistry::registerAirwindow({"FireAmp", "Amp Sims", 26, "FireAmp is a bright, loud, tubey amp sim for leads and dirt guitar.", airwinconsolidated::FireAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Flipity.h" -int Flipity_unused = AirwinRegistry::registerAirwindow({"Flipity", "Utility", 377, "Flipity is a channel phase flipper/swapper utility.", airwinconsolidated::Flipity::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int Flipity_unused = AirwinRegistry::registerAirwindow({"Flipity", "Utility", 378, "Flipity is a channel phase flipper/swapper utility.", airwinconsolidated::Flipity::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Floor.h" int Floor_unused = AirwinRegistry::registerAirwindow({"Floor", "Bass", 42, "Floor is fake bottom octave for fun and profit!", airwinconsolidated::Floor::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Flutter.h" @@ -349,7 +351,7 @@ int Fracture_unused = AirwinRegistry::registerAirwindow({"Fracture", "Effects", #include "autogen_airwin/Fracture2.h" int Fracture2_unused = AirwinRegistry::registerAirwindow({"Fracture2", "Effects", 194, "Fracture2 is a wavefolder that allows more extreme disruption.", airwinconsolidated::Fracture2::kNumParameters, "2023-06-25", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/FromTape.h" -int FromTape_unused = AirwinRegistry::registerAirwindow({"FromTape", "Tape", 335, "FromTape is a minimalist, cleaner analog tape emulation.", airwinconsolidated::FromTape::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int FromTape_unused = AirwinRegistry::registerAirwindow({"FromTape", "Tape", 336, "FromTape is a minimalist, cleaner analog tape emulation.", airwinconsolidated::FromTape::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Galactic.h" int Galactic_unused = AirwinRegistry::registerAirwindow({"Galactic", "Reverb", 275, "Galactic is a super-reverb designed specially for pads and space ambient.", airwinconsolidated::Galactic::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended" }}); #include "autogen_airwin/Galactic2.h" @@ -363,7 +365,7 @@ int GlitchShifter_unused = AirwinRegistry::registerAirwindow({"GlitchShifter", " #include "autogen_airwin/GoldenSlew.h" int GoldenSlew_unused = AirwinRegistry::registerAirwindow({"GoldenSlew", "Brightness", 56, "GoldenSlew is a multistage slew clipper based on the Golden Ratio.", airwinconsolidated::GoldenSlew::kNumParameters, "2023-07-02", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Golem.h" -int Golem_unused = AirwinRegistry::registerAirwindow({"Golem", "Utility", 368, "Golem lets you blend a stereo track of two mics on an amp.", airwinconsolidated::Golem::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int Golem_unused = AirwinRegistry::registerAirwindow({"Golem", "Utility", 369, "Golem lets you blend a stereo track of two mics on an amp.", airwinconsolidated::Golem::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/GrindAmp.h" int GrindAmp_unused = AirwinRegistry::registerAirwindow({"GrindAmp", "Amp Sims", 25, "GrindAmp is a heavier amp sim for many purposes.", airwinconsolidated::GrindAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Gringer.h" @@ -375,7 +377,7 @@ int GuitarConditioner_unused = AirwinRegistry::registerAirwindow({"GuitarConditi #include "autogen_airwin/HardVacuum.h" int HardVacuum_unused = AirwinRegistry::registerAirwindow({"HardVacuum", "Distortion", 137, "HardVacuum is tube style saturation effects.", airwinconsolidated::HardVacuum::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/HermeTrim.h" -int HermeTrim_unused = AirwinRegistry::registerAirwindow({"HermeTrim", "Utility", 364, "HermeTrim is Very Fine Adjustments, otherwise just like EveryTrim.", airwinconsolidated::HermeTrim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int HermeTrim_unused = AirwinRegistry::registerAirwindow({"HermeTrim", "Utility", 365, "HermeTrim is Very Fine Adjustments, otherwise just like EveryTrim.", airwinconsolidated::HermeTrim::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Hermepass.h" int Hermepass_unused = AirwinRegistry::registerAirwindow({"Hermepass", "Bass", 38, "Hermepass is a mastering highpass to set by ear only.", airwinconsolidated::Hermepass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/HighGlossDither.h" @@ -415,15 +417,17 @@ int Infrasonic_unused = AirwinRegistry::registerAirwindow({"Infrasonic", "Bass", #include "autogen_airwin/Interstage.h" int Interstage_unused = AirwinRegistry::registerAirwindow({"Interstage", "Subtlety", 326, "Interstage is a subtle and sophisticated analogifier.", airwinconsolidated::Interstage::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Latest" }}); #include "autogen_airwin/IronOxide5.h" -int IronOxide5_unused = AirwinRegistry::registerAirwindow({"IronOxide5", "Tape", 338, "IronOxide5 is the old school, heavily colored Airwindows tape emulation.", airwinconsolidated::IronOxide5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int IronOxide5_unused = AirwinRegistry::registerAirwindow({"IronOxide5", "Tape", 339, "IronOxide5 is the old school, heavily colored Airwindows tape emulation.", airwinconsolidated::IronOxide5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/IronOxideClassic.h" -int IronOxideClassic_unused = AirwinRegistry::registerAirwindow({"IronOxideClassic", "Tape", 340, "IronOxideClassic is the purer, simpler, early form of Iron Oxide before all the features.", airwinconsolidated::IronOxideClassic::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int IronOxideClassic_unused = AirwinRegistry::registerAirwindow({"IronOxideClassic", "Tape", 341, "IronOxideClassic is the purer, simpler, early form of Iron Oxide before all the features.", airwinconsolidated::IronOxideClassic::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/IronOxideClassic2.h" -int IronOxideClassic2_unused = AirwinRegistry::registerAirwindow({"IronOxideClassic2", "Tape", 337, "IronOxideClassic2 is my bandpassy tape sim, updated for high sample rate and aliasing control.", airwinconsolidated::IronOxideClassic2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int IronOxideClassic2_unused = AirwinRegistry::registerAirwindow({"IronOxideClassic2", "Tape", 338, "IronOxideClassic2 is my bandpassy tape sim, updated for high sample rate and aliasing control.", airwinconsolidated::IronOxideClassic2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Isolator.h" int Isolator_unused = AirwinRegistry::registerAirwindow({"Isolator", "Filter", 239, "Isolator is a steep highpass or lowpass filter, like you might find in a speaker crossover.", airwinconsolidated::Isolator::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Isolator2.h" int Isolator2_unused = AirwinRegistry::registerAirwindow({"Isolator2", "Filter", 226, "Isolator2 is Isolator, but with control smoothing and a new resonance booster.", airwinconsolidated::Isolator2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +#include "autogen_airwin/Isolator3.h" +int Isolator3_unused = AirwinRegistry::registerAirwindow({"Isolator3", "Unclassified", -1, "", airwinconsolidated::Isolator3::kNumParameters, "2024-08-18", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Kalman.h" int Kalman_unused = AirwinRegistry::registerAirwindow({"Kalman", "Filter", 227, "Kalman is not a real filter!", airwinconsolidated::Kalman::kNumParameters, "2024-03-10", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/LRFlipTimer.h" @@ -431,7 +435,7 @@ int LRFlipTimer_unused = AirwinRegistry::registerAirwindow({"LRFlipTimer", "Ster #include "autogen_airwin/LeadAmp.h" int LeadAmp_unused = AirwinRegistry::registerAirwindow({"LeadAmp", "Amp Sims", 27, "LeadAmp is an amp sim with a clear, penetrating, vocal tone.", airwinconsolidated::LeadAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/LeftoMono.h" -int LeftoMono_unused = AirwinRegistry::registerAirwindow({"LeftoMono", "Utility", 375, "LeftoMono copies one channel to both, losslessly.", airwinconsolidated::LeftoMono::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int LeftoMono_unused = AirwinRegistry::registerAirwindow({"LeftoMono", "Utility", 376, "LeftoMono copies one channel to both, losslessly.", airwinconsolidated::LeftoMono::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/LilAmp.h" int LilAmp_unused = AirwinRegistry::registerAirwindow({"LilAmp", "Amp Sims", 30, "LilAmp is a tiny amp sim, like a little bitty practice amp without that much gain.", airwinconsolidated::LilAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Logical4.h" @@ -443,7 +447,7 @@ int Lowpass_unused = AirwinRegistry::registerAirwindow({"Lowpass", "Filter", 246 #include "autogen_airwin/Lowpass2.h" int Lowpass2_unused = AirwinRegistry::registerAirwindow({"Lowpass2", "Filter", 242, "Lowpass2 is an unusual-sounding variable-slope lowpass filter.", airwinconsolidated::Lowpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Luxor.h" -int Luxor_unused = AirwinRegistry::registerAirwindow({"Luxor", "Tone Color", 350, "Luxor is a re-release of another old Character plugin.", airwinconsolidated::Luxor::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int Luxor_unused = AirwinRegistry::registerAirwindow({"Luxor", "Tone Color", 351, "Luxor is a re-release of another old Character plugin.", airwinconsolidated::Luxor::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/MSFlipTimer.h" int MSFlipTimer_unused = AirwinRegistry::registerAirwindow({"MSFlipTimer", "Stereo", 315, "MSFlipTimer is a utility that swaps stereo with mono every few (1-10) minutes.", airwinconsolidated::MSFlipTimer::kNumParameters, "2023-12-09", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/MV.h" @@ -461,17 +465,17 @@ int Melt_unused = AirwinRegistry::registerAirwindow({"Melt", "Ambience", 7, "Mel #include "autogen_airwin/MidAmp.h" int MidAmp_unused = AirwinRegistry::registerAirwindow({"MidAmp", "Amp Sims", 31, "MidAmp is a clean amp sim meant to work like a loud Twin or something of that nature.", airwinconsolidated::MidAmp::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/MidSide.h" -int MidSide_unused = AirwinRegistry::registerAirwindow({"MidSide", "Utility", 371, "MidSide is the other side of the EdIsDim mid/side conversion utility plugin.", airwinconsolidated::MidSide::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int MidSide_unused = AirwinRegistry::registerAirwindow({"MidSide", "Utility", 372, "MidSide is the other side of the EdIsDim mid/side conversion utility plugin.", airwinconsolidated::MidSide::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/MoNoam.h" -int MoNoam_unused = AirwinRegistry::registerAirwindow({"MoNoam", "Utility", 378, "MoNoam gives you variations on mono, mid, and side in different channels.", airwinconsolidated::MoNoam::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int MoNoam_unused = AirwinRegistry::registerAirwindow({"MoNoam", "Utility", 379, "MoNoam gives you variations on mono, mid, and side in different channels.", airwinconsolidated::MoNoam::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Mojo.h" int Mojo_unused = AirwinRegistry::registerAirwindow({"Mojo", "Saturation", 302, "Mojo is a biggenator that also works as a loudenator.", airwinconsolidated::Mojo::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Monitoring.h" -int Monitoring_unused = AirwinRegistry::registerAirwindow({"Monitoring", "Utility", 358, "Monitoring is your one-stop shop for final 2-buss work!", airwinconsolidated::Monitoring::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Monitoring_unused = AirwinRegistry::registerAirwindow({"Monitoring", "Utility", 359, "Monitoring is your one-stop shop for final 2-buss work!", airwinconsolidated::Monitoring::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Monitoring2.h" -int Monitoring2_unused = AirwinRegistry::registerAirwindow({"Monitoring2", "Utility", 357, "Monitoring2 is Monitoring, but with Dark as the wordlength reducer.", airwinconsolidated::Monitoring2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Monitoring2_unused = AirwinRegistry::registerAirwindow({"Monitoring2", "Utility", 358, "Monitoring2 is Monitoring, but with Dark as the wordlength reducer.", airwinconsolidated::Monitoring2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Monitoring3.h" -int Monitoring3_unused = AirwinRegistry::registerAirwindow({"Monitoring3", "Utility", 356, "Monitoring3 is Monitoring, but with Ten Nines into Dark as the wordlength reducer.", airwinconsolidated::Monitoring3::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int Monitoring3_unused = AirwinRegistry::registerAirwindow({"Monitoring3", "Utility", 357, "Monitoring3 is Monitoring, but with Ten Nines into Dark as the wordlength reducer.", airwinconsolidated::Monitoring3::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/MultiBandDistortion.h" int MultiBandDistortion_unused = AirwinRegistry::registerAirwindow({"MultiBandDistortion", "Distortion", 139, "MultiBandDistortion is an old weird gnarly sound wrecker :)", airwinconsolidated::MultiBandDistortion::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/NCSeventeen.h" @@ -479,7 +483,7 @@ int NCSeventeen_unused = AirwinRegistry::registerAirwindow({"NCSeventeen", "Satu #include "autogen_airwin/NaturalizeDither.h" int NaturalizeDither_unused = AirwinRegistry::registerAirwindow({"NaturalizeDither", "Dithers", 160, "NaturalizeDither is deterministic dither that uses Benford Realness calculations for each sample.", airwinconsolidated::NaturalizeDither::kNumParameters, "2023-04-12", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Neverland.h" -int Neverland_unused = AirwinRegistry::registerAirwindow({"Neverland", "Tone Color", 344, "Neverland is a re-release of my old Neve-style color adder, exacly as it was.", airwinconsolidated::Neverland::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Neverland_unused = AirwinRegistry::registerAirwindow({"Neverland", "Tone Color", 345, "Neverland is a re-release of my old Neve-style color adder, exacly as it was.", airwinconsolidated::Neverland::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Nikola.h" int Nikola_unused = AirwinRegistry::registerAirwindow({"Nikola", "Effects", 214, "Nikola is an Audio Tesla Coil plugin! Note: audio tesla coils don't sound nice.", airwinconsolidated::Nikola::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/NodeDither.h" @@ -513,7 +517,7 @@ int PaulDither_unused = AirwinRegistry::registerAirwindow({"PaulDither", "Dither #include "autogen_airwin/PaulWide.h" int PaulWide_unused = AirwinRegistry::registerAirwindow({"PaulWide", "Dithers", 141, "PaulWide is a highpassed TPDF wide dither. (quieter, airier AND wider)", airwinconsolidated::PaulWide::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended" }}); #include "autogen_airwin/PeaksOnly.h" -int PeaksOnly_unused = AirwinRegistry::registerAirwindow({"PeaksOnly", "Utility", 367, "PeaksOnly is a transformative mix check tool.", airwinconsolidated::PeaksOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int PeaksOnly_unused = AirwinRegistry::registerAirwindow({"PeaksOnly", "Utility", 368, "PeaksOnly is a transformative mix check tool.", airwinconsolidated::PeaksOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Pear.h" int Pear_unused = AirwinRegistry::registerAirwindow({"Pear", "Filter", 221, "Pear is the testbed for a new filter, implemented as a highpass/lowpass shelf.", airwinconsolidated::Pear::kNumParameters, "2023-06-25", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Pear2.h" @@ -549,7 +553,7 @@ int PowerSag_unused = AirwinRegistry::registerAirwindow({"PowerSag", "Effects", #include "autogen_airwin/PowerSag2.h" int PowerSag2_unused = AirwinRegistry::registerAirwindow({"PowerSag2", "Effects", 211, "PowerSag2 is my improved circuit-starve plugin, now with inverse effect!", airwinconsolidated::PowerSag2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Precious.h" -int Precious_unused = AirwinRegistry::registerAirwindow({"Precious", "Tone Color", 349, "Precious is a re-release of another old Character plugin.", airwinconsolidated::Precious::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Precious_unused = AirwinRegistry::registerAirwindow({"Precious", "Tone Color", 350, "Precious is a re-release of another old Character plugin.", airwinconsolidated::Precious::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Preponderant.h" int Preponderant_unused = AirwinRegistry::registerAirwindow({"Preponderant", "Effects", 213, "Preponderant is Airwindows Anti-Soothe, a strange tone intensifier and balancer.", airwinconsolidated::Preponderant::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Pressure4.h" @@ -575,9 +579,9 @@ int PurestDrive_unused = AirwinRegistry::registerAirwindow({"PurestDrive", "Satu #include "autogen_airwin/PurestEcho.h" int PurestEcho_unused = AirwinRegistry::registerAirwindow({"PurestEcho", "Ambience", 13, "PurestEcho is optimized Airwindows echo with exactly four evenly spaced taps on tap.", airwinconsolidated::PurestEcho::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/PurestFade.h" -int PurestFade_unused = AirwinRegistry::registerAirwindow({"PurestFade", "Utility", 362, "PurestFade is just like PurestGain, but for LONG fades.", airwinconsolidated::PurestFade::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int PurestFade_unused = AirwinRegistry::registerAirwindow({"PurestFade", "Utility", 363, "PurestFade is just like PurestGain, but for LONG fades.", airwinconsolidated::PurestFade::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/PurestGain.h" -int PurestGain_unused = AirwinRegistry::registerAirwindow({"PurestGain", "Utility", 361, "PurestGain is a high-res noise shaped gain, with smoothed fader.", airwinconsolidated::PurestGain::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int PurestGain_unused = AirwinRegistry::registerAirwindow({"PurestGain", "Utility", 362, "PurestGain is a high-res noise shaped gain, with smoothed fader.", airwinconsolidated::PurestGain::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/PurestSquish.h" int PurestSquish_unused = AirwinRegistry::registerAirwindow({"PurestSquish", "Dynamics", 187, "PurestSquish is an open-sounding compressor with bass bloom.", airwinconsolidated::PurestSquish::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/PurestWarm.h" @@ -603,7 +607,7 @@ int Reverb_unused = AirwinRegistry::registerAirwindow({"Reverb", "Reverb", 293, #include "autogen_airwin/Righteous4.h" int Righteous4_unused = AirwinRegistry::registerAirwindow({"Righteous4", "Saturation", 307, "Righteous4 is a final output stage for targeting dynamic range.", airwinconsolidated::Righteous4::kNumParameters, "2023-04-12", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/RightoMono.h" -int RightoMono_unused = AirwinRegistry::registerAirwindow({"RightoMono", "Utility", 374, "RightoMono copies one channel to both, losslessly.", airwinconsolidated::RightoMono::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int RightoMono_unused = AirwinRegistry::registerAirwindow({"RightoMono", "Utility", 375, "RightoMono copies one channel to both, losslessly.", airwinconsolidated::RightoMono::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/SampleDelay.h" int SampleDelay_unused = AirwinRegistry::registerAirwindow({"SampleDelay", "Ambience", 4, "SampleDelay is three delays combined: millisecond, sample and subsample.", airwinconsolidated::SampleDelay::kNumParameters, "2023-03-20", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Shape.h" @@ -627,7 +631,7 @@ int Slew2_unused = AirwinRegistry::registerAirwindow({"Slew2", "Brightness", 64, #include "autogen_airwin/Slew3.h" int Slew3_unused = AirwinRegistry::registerAirwindow({"Slew3", "Brightness", 63, "Slew3 is a new approach to slew clipping meant for a more analog-like darkening effect.", airwinconsolidated::Slew3::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/SlewOnly.h" -int SlewOnly_unused = AirwinRegistry::registerAirwindow({"SlewOnly", "Utility", 365, "SlewOnly is a mix check plugin that shows you only the extreme highs.", airwinconsolidated::SlewOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int SlewOnly_unused = AirwinRegistry::registerAirwindow({"SlewOnly", "Utility", 366, "SlewOnly is a mix check plugin that shows you only the extreme highs.", airwinconsolidated::SlewOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/SlewSonic.h" int SlewSonic_unused = AirwinRegistry::registerAirwindow({"SlewSonic", "Brightness", 58, "SlewSonic combines SlewOnly with ultrasonic filtering to solo brightness.", airwinconsolidated::SlewSonic::kNumParameters, "2023-02-27", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/Smooth.h" @@ -667,7 +671,7 @@ int StudioTan_unused = AirwinRegistry::registerAirwindow({"StudioTan", "Dithers" #include "autogen_airwin/SubTight.h" int SubTight_unused = AirwinRegistry::registerAirwindow({"SubTight", "Filter", 223, "SubTight uses a variation on the Creature algorithm to tighten sub-lows.", airwinconsolidated::SubTight::kNumParameters, "2023-11-26", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/SubsOnly.h" -int SubsOnly_unused = AirwinRegistry::registerAirwindow({"SubsOnly", "Utility", 366, "SubsOnly is a mix check plugin that shows you only the extreme lows.", airwinconsolidated::SubsOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int SubsOnly_unused = AirwinRegistry::registerAirwindow({"SubsOnly", "Utility", 367, "SubsOnly is a mix check plugin that shows you only the extreme lows.", airwinconsolidated::SubsOnly::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Surge.h" int Surge_unused = AirwinRegistry::registerAirwindow({"Surge", "Dynamics", 189, "Surge is a compressor for accentuating beats and pulses.", airwinconsolidated::Surge::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/SurgeTide.h" @@ -681,7 +685,7 @@ int TPDFDither_unused = AirwinRegistry::registerAirwindow({"TPDFDither", "Dither #include "autogen_airwin/TPDFWide.h" int TPDFWide_unused = AirwinRegistry::registerAirwindow({"TPDFWide", "Dithers", 143, "TPDFWide is still TPDF dither but better and wider. With 16/24 bit output and a DeRez control.", airwinconsolidated::TPDFWide::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/Tape.h" -int Tape_unused = AirwinRegistry::registerAirwindow({"Tape", "Tape", 336, "Tape is simplified, all-purpose tape mojo: my personal jam.", airwinconsolidated::Tape::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int Tape_unused = AirwinRegistry::registerAirwindow({"Tape", "Tape", 337, "Tape is simplified, all-purpose tape mojo: my personal jam.", airwinconsolidated::Tape::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/TapeBias.h" int TapeBias_unused = AirwinRegistry::registerAirwindow({"TapeBias", "Lo-Fi", 258, "TapeBias is a new piece of ToTape allowing you to underbias or overbias.", airwinconsolidated::TapeBias::kNumParameters, "2024-07-28", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/TapeDelay.h" @@ -701,11 +705,11 @@ int TexturizeMS_unused = AirwinRegistry::registerAirwindow({"TexturizeMS", "Nois #include "autogen_airwin/Thunder.h" int Thunder_unused = AirwinRegistry::registerAirwindow({"Thunder", "Dynamics", 177, "Thunder is a compressor that retains or exaggerates subsonic bass when you push it.", airwinconsolidated::Thunder::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/ToTape5.h" -int ToTape5_unused = AirwinRegistry::registerAirwindow({"ToTape5", "Tape", 339, "ToTape5 is Airwindows analog tape emulation.", airwinconsolidated::ToTape5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ToTape5_unused = AirwinRegistry::registerAirwindow({"ToTape5", "Tape", 340, "ToTape5 is Airwindows analog tape emulation.", airwinconsolidated::ToTape5::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ToTape6.h" -int ToTape6_unused = AirwinRegistry::registerAirwindow({"ToTape6", "Tape", 334, "ToTape6 is Airwindows tape emulation for 2020!", airwinconsolidated::ToTape6::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ToTape6_unused = AirwinRegistry::registerAirwindow({"ToTape6", "Tape", 335, "ToTape6 is Airwindows tape emulation for 2020!", airwinconsolidated::ToTape6::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ToTape7.h" -int ToTape7_unused = AirwinRegistry::registerAirwindow({"ToTape7", "Unclassified", -1, "", airwinconsolidated::ToTape7::kNumParameters, "2024-08-11", []() { return std::make_unique(0); }, -1, { }}); +int ToTape7_unused = AirwinRegistry::registerAirwindow({"ToTape7", "Tape", 334, "ToTape7 is Airwindows tape emulation with bias and Dubly.", airwinconsolidated::ToTape7::kNumParameters, "2024-08-18", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ToVinyl4.h" int ToVinyl4_unused = AirwinRegistry::registerAirwindow({"ToVinyl4", "Stereo", 312, "ToVinyl4 is a vinyl-mastering simulator bringing several vinyl-type colors.", airwinconsolidated::ToVinyl4::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/ToneSlant.h" @@ -749,7 +753,7 @@ int VinylDither_unused = AirwinRegistry::registerAirwindow({"VinylDither", "Dith #include "autogen_airwin/VoiceOfTheStarship.h" int VoiceOfTheStarship_unused = AirwinRegistry::registerAirwindow({"VoiceOfTheStarship", "Noise", 268, "VoiceOfTheStarship is a deep noise tone source.", airwinconsolidated::VoiceOfTheStarship::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/VoiceTrick.h" -int VoiceTrick_unused = AirwinRegistry::registerAirwindow({"VoiceTrick", "Utility", 379, "VoiceTrick lets you record vocals while monitoring over speakers.", airwinconsolidated::VoiceTrick::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int VoiceTrick_unused = AirwinRegistry::registerAirwindow({"VoiceTrick", "Utility", 380, "VoiceTrick lets you record vocals while monitoring over speakers.", airwinconsolidated::VoiceTrick::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/Weight.h" int Weight_unused = AirwinRegistry::registerAirwindow({"Weight", "Filter", 225, "Weight is a very accurate sub-bass boost based on Holt.", airwinconsolidated::Weight::kNumParameters, "2023-02-10", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/Wider.h" @@ -757,53 +761,53 @@ int Wider_unused = AirwinRegistry::registerAirwindow({"Wider", "Stereo", 310, "W #include "autogen_airwin/Wolfbot.h" int Wolfbot_unused = AirwinRegistry::registerAirwindow({"Wolfbot", "Amp Sims", 29, "Wolfbot is an aggressive Kalman bandpass with evil in its heart.", airwinconsolidated::Wolfbot::kNumParameters, "2024-05-25", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/XBandpass.h" -int XBandpass_unused = AirwinRegistry::registerAirwindow({"XBandpass", "XYZ Filters", 399, "XBandpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int XBandpass_unused = AirwinRegistry::registerAirwindow({"XBandpass", "XYZ Filters", 400, "XBandpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/XHighpass.h" -int XHighpass_unused = AirwinRegistry::registerAirwindow({"XHighpass", "XYZ Filters", 400, "XHighpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int XHighpass_unused = AirwinRegistry::registerAirwindow({"XHighpass", "XYZ Filters", 401, "XHighpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/XLowpass.h" -int XLowpass_unused = AirwinRegistry::registerAirwindow({"XLowpass", "XYZ Filters", 401, "XLowpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int XLowpass_unused = AirwinRegistry::registerAirwindow({"XLowpass", "XYZ Filters", 402, "XLowpass is a distorted digital EQ, inspired by retro sampler DSP.", airwinconsolidated::XLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/XNotch.h" -int XNotch_unused = AirwinRegistry::registerAirwindow({"XNotch", "XYZ Filters", 402, "XNotch is a distorted digital EQ, not as glitchy as the others.", airwinconsolidated::XNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int XNotch_unused = AirwinRegistry::registerAirwindow({"XNotch", "XYZ Filters", 403, "XNotch is a distorted digital EQ, not as glitchy as the others.", airwinconsolidated::XNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/XRegion.h" -int XRegion_unused = AirwinRegistry::registerAirwindow({"XRegion", "XYZ Filters", 403, "XRegion is distorted staggered bandpasses, for extreme soundmangling.", airwinconsolidated::XRegion::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int XRegion_unused = AirwinRegistry::registerAirwindow({"XRegion", "XYZ Filters", 404, "XRegion is distorted staggered bandpasses, for extreme soundmangling.", airwinconsolidated::XRegion::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/YBandpass.h" -int YBandpass_unused = AirwinRegistry::registerAirwindow({"YBandpass", "XYZ Filters", 391, "YBandpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int YBandpass_unused = AirwinRegistry::registerAirwindow({"YBandpass", "XYZ Filters", 392, "YBandpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/YHighpass.h" -int YHighpass_unused = AirwinRegistry::registerAirwindow({"YHighpass", "XYZ Filters", 393, "YHighpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int YHighpass_unused = AirwinRegistry::registerAirwindow({"YHighpass", "XYZ Filters", 394, "YHighpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/YLowpass.h" -int YLowpass_unused = AirwinRegistry::registerAirwindow({"YLowpass", "XYZ Filters", 395, "YLowpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int YLowpass_unused = AirwinRegistry::registerAirwindow({"YLowpass", "XYZ Filters", 396, "YLowpass is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/YNotBandpass.h" -int YNotBandpass_unused = AirwinRegistry::registerAirwindow({"YNotBandpass", "XYZ Filters", 392, "YNotBandpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotBandpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); +int YNotBandpass_unused = AirwinRegistry::registerAirwindow({"YNotBandpass", "XYZ Filters", 393, "YNotBandpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotBandpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/YNotHighpass.h" -int YNotHighpass_unused = AirwinRegistry::registerAirwindow({"YNotHighpass", "XYZ Filters", 394, "YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotHighpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); +int YNotHighpass_unused = AirwinRegistry::registerAirwindow({"YNotHighpass", "XYZ Filters", 395, "YNotHighpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotHighpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/YNotLowpass.h" -int YNotLowpass_unused = AirwinRegistry::registerAirwindow({"YNotLowpass", "XYZ Filters", 396, "YNotLowpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotLowpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); +int YNotLowpass_unused = AirwinRegistry::registerAirwindow({"YNotLowpass", "XYZ Filters", 397, "YNotLowpass is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotLowpass::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/YNotNotch.h" -int YNotNotch_unused = AirwinRegistry::registerAirwindow({"YNotNotch", "XYZ Filters", 398, "YNotNotch is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotNotch::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); +int YNotNotch_unused = AirwinRegistry::registerAirwindow({"YNotNotch", "XYZ Filters", 399, "YNotNotch is soft and smooth to nasty, edgy texture-varying filtering, no control smoothing.", airwinconsolidated::YNotNotch::kNumParameters, "2023-10-01", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/YNotch.h" -int YNotch_unused = AirwinRegistry::registerAirwindow({"YNotch", "XYZ Filters", 397, "YNotch is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); +int YNotch_unused = AirwinRegistry::registerAirwindow({"YNotch", "XYZ Filters", 398, "YNotch is soft and smooth to nasty, edgy texture-varying filtering.", airwinconsolidated::YNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/ZBandpass.h" -int ZBandpass_unused = AirwinRegistry::registerAirwindow({"ZBandpass", "XYZ Filters", 386, "ZBandpass is a bandpass made to sound and act like the Emu e6400 Ultra bandpass.", airwinconsolidated::ZBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ZBandpass_unused = AirwinRegistry::registerAirwindow({"ZBandpass", "XYZ Filters", 387, "ZBandpass is a bandpass made to sound and act like the Emu e6400 Ultra bandpass.", airwinconsolidated::ZBandpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ZBandpass2.h" -int ZBandpass2_unused = AirwinRegistry::registerAirwindow({"ZBandpass2", "XYZ Filters", 381, "ZBandpass2 acts more like the Emu e6400 Ultra bandpass in motion, with control smoothing.", airwinconsolidated::ZBandpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ZBandpass2_unused = AirwinRegistry::registerAirwindow({"ZBandpass2", "XYZ Filters", 382, "ZBandpass2 acts more like the Emu e6400 Ultra bandpass in motion, with control smoothing.", airwinconsolidated::ZBandpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ZHighpass.h" -int ZHighpass_unused = AirwinRegistry::registerAirwindow({"ZHighpass", "XYZ Filters", 387, "ZHighpass is a highpass made to sound and act like the Emu e6400 Ultra highpass.", airwinconsolidated::ZHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ZHighpass_unused = AirwinRegistry::registerAirwindow({"ZHighpass", "XYZ Filters", 388, "ZHighpass is a highpass made to sound and act like the Emu e6400 Ultra highpass.", airwinconsolidated::ZHighpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ZHighpass2.h" -int ZHighpass2_unused = AirwinRegistry::registerAirwindow({"ZHighpass2", "XYZ Filters", 382, "ZHighpass2 acts more like the Emu e6400 Ultra highpass in motion, with control smoothing.", airwinconsolidated::ZHighpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ZHighpass2_unused = AirwinRegistry::registerAirwindow({"ZHighpass2", "XYZ Filters", 383, "ZHighpass2 acts more like the Emu e6400 Ultra highpass in motion, with control smoothing.", airwinconsolidated::ZHighpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ZLowpass.h" -int ZLowpass_unused = AirwinRegistry::registerAirwindow({"ZLowpass", "XYZ Filters", 388, "ZLowpass is a lowpass made to sound and act like the Emu e6400 Ultra lowpass.", airwinconsolidated::ZLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ZLowpass_unused = AirwinRegistry::registerAirwindow({"ZLowpass", "XYZ Filters", 389, "ZLowpass is a lowpass made to sound and act like the Emu e6400 Ultra lowpass.", airwinconsolidated::ZLowpass::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ZLowpass2.h" -int ZLowpass2_unused = AirwinRegistry::registerAirwindow({"ZLowpass2", "XYZ Filters", 383, "ZLowpass2 acts more like the Emu e6400 Ultra lowpass in motion, with control smoothing.", airwinconsolidated::ZLowpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ZLowpass2_unused = AirwinRegistry::registerAirwindow({"ZLowpass2", "XYZ Filters", 384, "ZLowpass2 acts more like the Emu e6400 Ultra lowpass in motion, with control smoothing.", airwinconsolidated::ZLowpass2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ZNotch.h" -int ZNotch_unused = AirwinRegistry::registerAirwindow({"ZNotch", "XYZ Filters", 389, "ZNotch is a notch filter made to sound and act like the Emu e6400 Phaser.", airwinconsolidated::ZNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ZNotch_unused = AirwinRegistry::registerAirwindow({"ZNotch", "XYZ Filters", 390, "ZNotch is a notch filter made to sound and act like the Emu e6400 Phaser.", airwinconsolidated::ZNotch::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ZNotch2.h" -int ZNotch2_unused = AirwinRegistry::registerAirwindow({"ZNotch2", "XYZ Filters", 384, "ZNotch2 acts more like the Emu e6400 Ultra phaser in motion, with control smoothing.", airwinconsolidated::ZNotch2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ZNotch2_unused = AirwinRegistry::registerAirwindow({"ZNotch2", "XYZ Filters", 385, "ZNotch2 acts more like the Emu e6400 Ultra phaser in motion, with control smoothing.", airwinconsolidated::ZNotch2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/ZOutputStage.h" int ZOutputStage_unused = AirwinRegistry::registerAirwindow({"ZOutputStage", "Distortion", 132, "ZOutputStage is the output clipping from the Emu e6400 style Z filters.", airwinconsolidated::ZOutputStage::kNumParameters, "2023-12-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/ZRegion.h" -int ZRegion_unused = AirwinRegistry::registerAirwindow({"ZRegion", "XYZ Filters", 390, "ZRegion is an Emu e6400 style Airwindows Region filter.", airwinconsolidated::ZRegion::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); +int ZRegion_unused = AirwinRegistry::registerAirwindow({"ZRegion", "XYZ Filters", 391, "ZRegion is an Emu e6400 style Airwindows Region filter.", airwinconsolidated::ZRegion::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { }}); #include "autogen_airwin/ZRegion2.h" -int ZRegion2_unused = AirwinRegistry::registerAirwindow({"ZRegion2", "XYZ Filters", 385, "ZRegion2 is an Emu e6400 style Airwindows Region filter, with control smoothing.", airwinconsolidated::ZRegion2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); +int ZRegion2_unused = AirwinRegistry::registerAirwindow({"ZRegion2", "XYZ Filters", 386, "ZRegion2 is an Emu e6400 style Airwindows Region filter, with control smoothing.", airwinconsolidated::ZRegion2::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Basic", "Recommended", "Latest" }}); #include "autogen_airwin/curve.h" int curve_unused = AirwinRegistry::registerAirwindow({"curve", "Dynamics", 171, "curve is the simplest, purest form of Recurve with no extra boosts.", airwinconsolidated::curve::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/kCathedral.h" @@ -829,7 +833,7 @@ int kPlateC_unused = AirwinRegistry::registerAirwindow({"kPlateC", "Reverb", 279 #include "autogen_airwin/kPlateD.h" int kPlateD_unused = AirwinRegistry::registerAirwindow({"kPlateD", "Reverb", 276, "kPlateD is a plate reverb, not unlike its namesake atop Abbey Road.", airwinconsolidated::kPlateD::kNumParameters, "2023-04-09", []() { return std::make_unique(0); }, -1, { "Recommended", "Latest" }}); #include "autogen_airwin/uLawDecode.h" -int uLawDecode_unused = AirwinRegistry::registerAirwindow({"uLawDecode", "Utility", 373, "uLawDecode is a Console-like encode/decode pair, but much more extreme.", airwinconsolidated::uLawDecode::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int uLawDecode_unused = AirwinRegistry::registerAirwindow({"uLawDecode", "Utility", 374, "uLawDecode is a Console-like encode/decode pair, but much more extreme.", airwinconsolidated::uLawDecode::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); #include "autogen_airwin/uLawEncode.h" -int uLawEncode_unused = AirwinRegistry::registerAirwindow({"uLawEncode", "Utility", 372, "uLawEncode is a Console-like encode/decode pair, but much more extreme.", airwinconsolidated::uLawEncode::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); +int uLawEncode_unused = AirwinRegistry::registerAirwindow({"uLawEncode", "Utility", 373, "uLawEncode is a Console-like encode/decode pair, but much more extreme.", airwinconsolidated::uLawEncode::kNumParameters, "2022-11-21", []() { return std::make_unique(0); }, -1, { "Latest" }}); int unusedComplete = AirwinRegistry::completeRegistry(); diff --git a/src/autogen_airwin/CMakeLists.txt b/src/autogen_airwin/CMakeLists.txt index c1ea746..fdb9dbf 100644 --- a/src/autogen_airwin/CMakeLists.txt +++ b/src/autogen_airwin/CMakeLists.txt @@ -103,6 +103,8 @@ set(AIRWIN_SOURCES src/autogen_airwin/CabsProc.cpp src/autogen_airwin/Calibre.cpp src/autogen_airwin/CalibreProc.cpp + src/autogen_airwin/Cans.cpp + src/autogen_airwin/CansProc.cpp src/autogen_airwin/Capacitor.cpp src/autogen_airwin/CapacitorProc.cpp src/autogen_airwin/Capacitor2.cpp @@ -425,6 +427,8 @@ set(AIRWIN_SOURCES src/autogen_airwin/IsolatorProc.cpp src/autogen_airwin/Isolator2.cpp src/autogen_airwin/Isolator2Proc.cpp + src/autogen_airwin/Isolator3.cpp + src/autogen_airwin/Isolator3Proc.cpp src/autogen_airwin/Kalman.cpp src/autogen_airwin/KalmanProc.cpp src/autogen_airwin/LRFlipTimer.cpp diff --git a/src/autogen_airwin/Cans.cpp b/src/autogen_airwin/Cans.cpp new file mode 100644 index 0000000..01b863b --- /dev/null +++ b/src/autogen_airwin/Cans.cpp @@ -0,0 +1,229 @@ +/* ======================================== + * Cans - Cans.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Cans_H +#include "Cans.h" +#endif +#include +#include +namespace airwinconsolidated::Cans { + +AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Cans(audioMaster);} + +Cans::Cans(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 0.5; + B = 0.5; + C = 0.5; + D = 0.5; + E = 0.5; + + for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;} + for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;} + for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;} + for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;} + for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;} + for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;} + for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;} + for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;} + for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;} + for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;} + for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;} + for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;} + for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;} + for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;} + for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;} + for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;} + + feedbackAL = 0.0; + feedbackBL = 0.0; + feedbackCL = 0.0; + feedbackDL = 0.0; + feedbackAR = 0.0; + feedbackBR = 0.0; + feedbackCR = 0.0; + feedbackDR = 0.0; + + iirInL = 0.0; + iirFAL = 0.0; + iirFBL = 0.0; + iirFCL = 0.0; + iirFDL = 0.0; + iirOutL = 0.0; + iirInR = 0.0; + iirFAR = 0.0; + iirFBR = 0.0; + iirFCR = 0.0; + iirFDR = 0.0; + iirOutR = 0.0; + + countA = 1; + countB = 1; + countC = 1; + countD = 1; + countE = 1; + countF = 1; + countG = 1; + countH = 1; + countI = 1; + countJ = 1; + countK = 1; + countL = 1; + countM = 1; + countN = 1; + countO = 1; + countP = 1; + + shortA = 23; + shortB = 357; + shortC = 305; + shortD = 186; + shortE = 104; + shortF = 255; + shortG = 163; + shortH = 147; + shortI = 56; + shortJ = 480; + shortK = 317; + shortL = 107; + shortM = 11; + shortN = 704; + shortO = 26; + shortP = 543; + prevclearcoat = -1; + + for (int x = 0; x < bez_total; x++) bez[x] = 0.0; + bez[bez_cycle] = 1.0; + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + setUniqueID(kUniqueId); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +Cans::~Cans() {} +VstInt32 Cans::getVendorVersion () {return 1000;} +void Cans::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void Cans::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +void Cans::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + case kParamE: E = value; break; + default: break; // unknown parameter, shouldn't happen! + } +} + +float Cans::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + case kParamE: return E; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Cans::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Room", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Diffuse", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Damping", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Crossfd", kVstMaxParamStrLen); break; + case kParamE: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Cans::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: switch((VstInt32)( A * 4.999 )) //0 to almost edge of # of params + { case 0: vst_strncpy (text, "StudioA", kVstMaxParamStrLen); break; + case 1: vst_strncpy (text, "StudioB", kVstMaxParamStrLen); break; + case 2: vst_strncpy (text, "StudioC", kVstMaxParamStrLen); break; + case 3: vst_strncpy (text, "StudioD", kVstMaxParamStrLen); break; + case 4: vst_strncpy (text, "StudioE", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } break; //Z as example 'popup' parameter with four values */ + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + case kParamE: float2string (E, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Cans::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Cans::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Cans::getEffectName(char* name) { + vst_strncpy(name, "Cans", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Cans::getPlugCategory() {return kPlugCategEffect;} + +bool Cans::getProductString(char* text) { + vst_strncpy (text, "airwindows Cans", kVstMaxProductStrLen); return true; +} + +bool Cans::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} +bool Cans::parameterTextToValue(VstInt32 index, const char *text, float &value) { + switch(index) { + case kParamB: { auto b = string2float(text, value); return b; break; } + case kParamC: { auto b = string2float(text, value); return b; break; } + case kParamD: { auto b = string2float(text, value); return b; break; } + case kParamE: { auto b = string2float(text, value); return b; break; } + + } + return false; +} +bool Cans::canConvertParameterTextToValue(VstInt32 index) { + switch(index) { + case kParamB: return true; + case kParamC: return true; + case kParamD: return true; + case kParamE: return true; + + } + return false; +} +} // end namespace diff --git a/src/autogen_airwin/Cans.h b/src/autogen_airwin/Cans.h new file mode 100644 index 0000000..80daba3 --- /dev/null +++ b/src/autogen_airwin/Cans.h @@ -0,0 +1,200 @@ +/* ======================================== + * Cans - Cans.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Cans_Cans_H +#define __Cans_Cans_H + +#ifndef __audioeffect__ +#include "../airwin_consolidated_base.h" +#endif + +#include +#include +#include + +namespace airwinconsolidated::Cans { +enum { + kParamA =0, + kParamB =1, + kParamC =2, + kParamD =3, + kParamE =4, + kNumParameters = 5 +}; // + +const int kshortA = 193; +const int kshortB = 588; +const int kshortC = 551; +const int kshortD = 325; +const int kshortE = 166; +const int kshortF = 427; +const int kshortG = 313; +const int kshortH = 575; +const int kshortI = 101; +const int kshortJ = 794; +const int kshortK = 789; +const int kshortL = 385; +const int kshortM = 12; +const int kshortN = 1009; +const int kshortO = 64; +const int kshortP = 544; + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'cans'; //Change this to what the AU identity is! + +class Cans : + public AudioEffectX +{ +public: + Cans(audioMasterCallback audioMaster); + ~Cans(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + // Added by the perl as inverses + virtual bool parameterTextToValue(VstInt32 index, const char *text, float &value); + virtual bool canConvertParameterTextToValue(VstInt32 index); + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + float C; + float D; + float E; + + double aAL[kshortA+5]; + double aBL[kshortB+5]; + double aCL[kshortC+5]; + double aDL[kshortD+5]; + double aEL[kshortE+5]; + double aFL[kshortF+5]; + double aGL[kshortG+5]; + double aHL[kshortH+5]; + double aIL[kshortI+5]; + double aJL[kshortJ+5]; + double aKL[kshortK+5]; + double aLL[kshortL+5]; + double aML[kshortM+5]; + double aNL[kshortN+5]; + double aOL[kshortO+5]; + double aPL[kshortP+5]; + + double aAR[kshortA+5]; + double aBR[kshortB+5]; + double aCR[kshortC+5]; + double aDR[kshortD+5]; + double aER[kshortE+5]; + double aFR[kshortF+5]; + double aGR[kshortG+5]; + double aHR[kshortH+5]; + double aIR[kshortI+5]; + double aJR[kshortJ+5]; + double aKR[kshortK+5]; + double aLR[kshortL+5]; + double aMR[kshortM+5]; + double aNR[kshortN+5]; + double aOR[kshortO+5]; + double aPR[kshortP+5]; + + double feedbackAL; + double feedbackBL; + double feedbackCL; + double feedbackDL; + double feedbackAR; + double feedbackBR; + double feedbackCR; + double feedbackDR; + + double iirInL; + double iirFAL; + double iirFBL; + double iirFCL; + double iirFDL; + double iirOutL; + double iirInR; + double iirFAR; + double iirFBR; + double iirFCR; + double iirFDR; + double iirOutR; + + int countA; + int countB; + int countC; + int countD; + int countE; + int countF; + int countG; + int countH; + int countI; + int countJ; + int countK; + int countL; + int countM; + int countN; + int countO; + int countP; + + int shortA; + int shortB; + int shortC; + int shortD; + int shortE; + int shortF; + int shortG; + int shortH; + int shortI; + int shortJ; + int shortK; + int shortL; + int shortM; + int shortN; + int shortO; + int shortP; + + int prevclearcoat; + + enum { + bez_AL, + bez_AR, + bez_BL, + bez_BR, + bez_CL, + bez_CR, + bez_InL, + bez_InR, + bez_UnInL, + bez_UnInR, + bez_SampL, + bez_SampR, + bez_cycle, + bez_total + }; //the new undersampling. bez signifies the bezier curve reconstruction + double bez[bez_total]; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif +} // end namespace diff --git a/src/autogen_airwin/CansProc.cpp b/src/autogen_airwin/CansProc.cpp new file mode 100644 index 0000000..5211fed --- /dev/null +++ b/src/autogen_airwin/CansProc.cpp @@ -0,0 +1,888 @@ +/* ======================================== + * Cans - Cans.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Cans_H +#include "Cans.h" +#endif +namespace airwinconsolidated::Cans { + +void Cans::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + int clearcoat = (int)(A * 4.999); + if (clearcoat != prevclearcoat) { + for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;} + for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;} + for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;} + for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;} + for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;} + for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;} + for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;} + for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;} + for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;} + for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;} + for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;} + for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;} + for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;} + for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;} + for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;} + for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;} + countA = 1; + countB = 1; + countC = 1; + countD = 1; + countE = 1; + countF = 1; + countG = 1; + countH = 1; + countI = 1; + countJ = 1; + countK = 1; + countL = 1; + countM = 1; + countN = 1; + countO = 1; + countP = 1; + + switch (clearcoat) + { + case 0: + shortA = 34; shortB = 193; shortC = 255; shortD = 150; shortE = 24; shortF = 204; shortG = 85; shortH = 295; shortI = 40; shortJ = 371; shortK = 370; shortL = 202; shortM = 11; shortN = 431; shortO = 23; shortP = 323; //2 to 30 ms, 32 seat room + break; //32b-U rated incompressible if filesize larger than 20,150,000 bytes + case 1: + shortA = 32; shortB = 298; shortC = 402; shortD = 161; shortE = 165; shortF = 149; shortG = 43; shortH = 313; shortI = 83; shortJ = 397; shortK = 316; shortL = 315; shortM = 11; shortN = 685; shortO = 16; shortP = 486; //3 to 40 ms, 59 seat room + break; //59b-U rated incompressible if filesize larger than 21,035,831 bytes + case 2: + shortA = 23; shortB = 357; shortC = 305; shortD = 186; shortE = 104; shortF = 255; shortG = 163; shortH = 147; shortI = 56; shortJ = 480; shortK = 317; shortL = 107; shortM = 11; shortN = 704; shortO = 26; shortP = 543; //4 to 40 ms, 60 seat room + break; //60b-U rated incompressible if filesize larger than 21,035,831 bytes + case 3: + shortA = 192; shortB = 463; shortC = 420; shortD = 34; shortE = 161; shortF = 426; shortG = 160; shortH = 474; shortI = 21; shortJ = 343; shortK = 296; shortL = 294; shortM = 11; shortN = 987; shortO = 64; shortP = 482; //5 to 51 ms, 94 seat room + break; //94b-U rated incompressible if filesize larger than 21,700,000 bytes + case 4: + default: + shortA = 173; shortB = 587; shortC = 550; shortD = 324; shortE = 165; shortF = 324; shortG = 312; shortH = 574; shortI = 100; shortJ = 793; shortK = 788; shortL = 385; shortM = 11; shortN = 1008; shortO = 46; shortP = 380; //10 to 67 ms, 177 seat club + break; //177-U rated incompressible if filesize larger than 22,796,452 bytes + } + prevclearcoat = clearcoat; + } + double derez = 1.0/overallscale; + derez = 1.0 / ((int)(1.0/derez)); + //this hard-locks derez to exact subdivisions of 1.0 + + int diffuse = pow(B,1.618033988749894848204586)*16; + double iirAmt = 1.0-pow(1.0-C,1.618033988749894848204586); + double iirExt = iirAmt/overallscale; + double crossfade = (1.0-pow(1.0-D,1.618033988749894848204586)); + double wet = pow(E,1.618033988749894848204586); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + iirInL = (inputSampleL*iirExt)+(iirInL*(1.0-iirExt)); inputSampleL = iirInL; + iirInR = (inputSampleR*iirExt)+(iirInR*(1.0-iirExt)); inputSampleR = iirInR; + + bez[bez_cycle] += derez; + bez[bez_SampL] += ((inputSampleL+bez[bez_InL]) * derez); + bez[bez_SampR] += ((inputSampleR+bez[bez_InR]) * derez); + bez[bez_InL] = inputSampleL; bez[bez_InR] = inputSampleR; + if (bez[bez_cycle] > 1.0) { //hit the end point and we do a reverb sample + bez[bez_cycle] = 0.0; + + iirFAL = (feedbackAL*iirAmt)+(iirFAL*(1.0-iirAmt)); feedbackAL = iirFAL; + iirFAR = (feedbackAR*iirAmt)+(iirFAR*(1.0-iirAmt)); feedbackAR = iirFAR; + iirFBL = (feedbackBL*iirAmt)+(iirFBL*(1.0-iirAmt)); feedbackBL = iirFBL; + iirFBR = (feedbackBR*iirAmt)+(iirFBR*(1.0-iirAmt)); feedbackBR = iirFBR; + iirFCL = (feedbackCL*iirAmt)+(iirFCL*(1.0-iirAmt)); feedbackCL = iirFCL; + iirFCR = (feedbackCR*iirAmt)+(iirFCR*(1.0-iirAmt)); feedbackCR = iirFCR; + iirFDL = (feedbackDL*iirAmt)+(iirFDL*(1.0-iirAmt)); feedbackDL = iirFDL; + iirFDR = (feedbackDR*iirAmt)+(iirFDR*(1.0-iirAmt)); feedbackDR = iirFDR; + + double outAL, outBL, outCL, outDL, outAR, outBR, outCR, outDR; + if (diffuse < 4) { + aAL[countA] = (bez[bez_SampL]) + (feedbackAL * 0.03125); + aAR[countA] = (bez[bez_SampR]) + (feedbackAR * 0.03125); + countA++; if (countA < 0 || countA > shortA) countA = 0; + outAL = aAL[countA-((countA > shortA)?shortA+1:0)]; + outAR = aAR[countA-((countA > shortA)?shortA+1:0)]; + } else { + outAL = (bez[bez_SampL] - (aAL[(countA+1)-((countA+1 > shortA)?shortA+1:0)]*0.618033988749894848204586)) + (feedbackAL * 0.03125); + aAL[countA] = outAL; outAL *= 0.618033988749894848204586; + outAR = (bez[bez_SampR] - (aAR[(countA+1)-((countA+1 > shortA)?shortA+1:0)]*0.618033988749894848204586)) + (feedbackAR * 0.03125); + aAR[countA] = outAR; outAR *= 0.618033988749894848204586; + countA++; if (countA < 0 || countA > shortA) countA = 0; + outAL += aAL[countA-((countA > shortA)?shortA+1:0)]; + outAR += aAR[countA-((countA > shortA)?shortA+1:0)]; + } + + if (diffuse < 12) { + aBL[countB] = (bez[bez_SampL]) + (feedbackBL * 0.03125); + aBR[countB] = (bez[bez_SampR]) + (feedbackBR * 0.03125); + countB++; if (countB < 0 || countB > shortB) countB = 0; + outBL = aBL[countB-((countB > shortB)?shortB+1:0)]; + outBR = aBR[countB-((countB > shortB)?shortB+1:0)]; + } else { + outBL = (bez[bez_SampL] - (aBL[(countB+1)-((countB+1 > shortB)?shortB+1:0)]*0.618033988749894848204586)) + (feedbackBL * 0.03125); + aBL[countB] = outBL; outBL *= 0.618033988749894848204586; + outBR = (bez[bez_SampR] - (aBR[(countB+1)-((countB+1 > shortB)?shortB+1:0)]*0.618033988749894848204586)) + (feedbackBR * 0.03125); + aBR[countB] = outBR; outBR *= 0.618033988749894848204586; + countB++; if (countB < 0 || countB > shortB) countB = 0; + outBL += aBL[countB-((countB > shortB)?shortB+1:0)]; + outBR += aBR[countB-((countB > shortB)?shortB+1:0)]; + } + + if (diffuse < 10) { + aCL[countC] = (bez[bez_SampL]) + (feedbackCL * 0.03125); + aCR[countC] = (bez[bez_SampR]) + (feedbackCR * 0.03125); + countC++; if (countC < 0 || countC > shortC) countC = 0; + outCL = aCL[countC-((countC > shortC)?shortC+1:0)]; + outCR = aCR[countC-((countC > shortC)?shortC+1:0)]; + } else { + outCL = (bez[bez_SampL] - (aCL[(countC+1)-((countC+1 > shortC)?shortC+1:0)]*0.618033988749894848204586)) + (feedbackCL * 0.03125); + aCL[countC] = outCL; outCL *= 0.618033988749894848204586; + outCR = (bez[bez_SampR] - (aCR[(countC+1)-((countC+1 > shortC)?shortC+1:0)]*0.618033988749894848204586)) + (feedbackCR * 0.03125); + aCR[countC] = outCR; outCR *= 0.618033988749894848204586; + countC++; if (countC < 0 || countC > shortC) countC = 0; + outCL += aCL[countC-((countC > shortC)?shortC+1:0)]; + outCR += aCR[countC-((countC > shortC)?shortC+1:0)]; + } + + if (diffuse < 6) { + aDL[countD] = (bez[bez_SampL]) + (feedbackDL * 0.03125); + aDR[countD] = (bez[bez_SampR]) + (feedbackDR * 0.03125); + countD++; if (countD < 0 || countD > shortD) countD = 0; + outDL = aDL[countD-((countD > shortD)?shortD+1:0)]; + outDR = aDR[countD-((countD > shortD)?shortD+1:0)]; + } else { + outDL = (bez[bez_SampL] - (aDL[(countD+1)-((countD+1 > shortD)?shortD+1:0)]*0.618033988749894848204586)) + (feedbackDL * 0.03125); + aDL[countD] = outDL; outDL *= 0.618033988749894848204586; + outDR = (bez[bez_SampR] - (aDR[(countD+1)-((countD+1 > shortD)?shortD+1:0)]*0.618033988749894848204586)) + (feedbackDR * 0.03125); + aDR[countD] = outDR; outDR *= 0.618033988749894848204586; + countD++; if (countD < 0 || countD > shortD) countD = 0; + outDL += aDL[countD-((countD > shortD)?shortD+1:0)]; + outDR += aDR[countD-((countD > shortD)?shortD+1:0)]; + } + + double outEL, outFL, outGL, outHL, outER, outFR, outGR, outHR; + if (diffuse < 3) { + aEL[countE] = outAL - (outBL + outCL + outDL); + aER[countE] = outAR - (outBR + outCR + outDR); + countE++; if (countE < 0 || countE > shortE) countE = 0; + outEL = aEL[countE-((countE > shortE)?shortE+1:0)]; + outER = aER[countE-((countE > shortE)?shortE+1:0)]; + } else { + outEL = (outAL - (outBL + outCL + outDL)) - (aEL[(countE+1)-((countE+1 > shortE)?shortE+1:0)]*0.618033988749894848204586); + aEL[countE] = outEL; outEL *= 0.618033988749894848204586; + outER = (outAR - (outBR + outCR + outDR)) - (aER[(countE+1)-((countE+1 > shortE)?shortE+1:0)]*0.618033988749894848204586); + aER[countE] = outER; outER *= 0.618033988749894848204586; + countE++; if (countE < 0 || countE > shortE) countE = 0; + outEL += aEL[countE-((countE > shortE)?shortE+1:0)]; + outER += aER[countE-((countE > shortE)?shortE+1:0)]; + } + + if (diffuse < 8) { + aFL[countF] = outBL - (outAL + outCL + outDL); + aFR[countF] = outBR - (outAR + outCR + outDR); + countF++; if (countF < 0 || countF > shortF) countF = 0; + outFL = aFL[countF-((countF > shortF)?shortF+1:0)]; + outFR = aFR[countF-((countF > shortF)?shortF+1:0)]; + } else { + outFL = (outBL - (outAL + outCL + outDL)) - (aFL[(countF+1)-((countF+1 > shortF)?shortF+1:0)]*0.618033988749894848204586); + aFL[countF] = outFL; outFL *= 0.618033988749894848204586; + outFR = (outBR - (outAR + outCR + outDR)) - (aFR[(countF+1)-((countF+1 > shortF)?shortF+1:0)]*0.618033988749894848204586); + aFR[countF] = outFR; outFR *= 0.618033988749894848204586; + countF++; if (countF < 0 || countF > shortF) countF = 0; + outFL += aFL[countF-((countF > shortF)?shortF+1:0)]; + outFR += aFR[countF-((countF > shortF)?shortF+1:0)]; + } + + if (diffuse < 5) { + aGL[countG] = outCL - (outAL + outBL + outDL); + aGR[countG] = outCR - (outAR + outBR + outDR); + countG++; if (countG < 0 || countG > shortG) countG = 0; + outGL = aGL[countG-((countG > shortG)?shortG+1:0)]; + outGR = aGR[countG-((countG > shortG)?shortG+1:0)]; + } else { + outGL = (outCL - (outAL + outBL + outDL)) - (aGL[(countG+1)-((countG+1 > shortG)?shortG+1:0)]*0.618033988749894848204586); + aGL[countG] = outGL; outGL *= 0.618033988749894848204586; + outGR = (outCR - (outAR + outBR + outDR)) - (aGR[(countG+1)-((countG+1 > shortG)?shortG+1:0)]*0.618033988749894848204586); + aGR[countG] = outGR; outGR *= 0.618033988749894848204586; + countG++; if (countG < 0 || countG > shortG) countG = 0; + outGL += aGL[countG-((countG > shortG)?shortG+1:0)]; + outGR += aGR[countG-((countG > shortG)?shortG+1:0)]; + } + + if (diffuse < 11) { + aHL[countH] = outDL - (outAL + outBL + outCL); + aHR[countH] = outDR - (outAR + outBR + outCR); + countH++; if (countH < 0 || countH > shortH) countH = 0; + outHL = aHL[countH-((countH > shortH)?shortH+1:0)]; + outHR = aHR[countH-((countH > shortH)?shortH+1:0)]; + } else { + outHL = (outDL - (outAL + outBL + outCL)) - (aHL[(countH+1)-((countH+1 > shortH)?shortH+1:0)]*0.618033988749894848204586); + aHL[countH] = outHL; outHL *= 0.618033988749894848204586; + outHR = (outDR - (outAR + outBR + outCR)) - (aHR[(countH+1)-((countH+1 > shortH)?shortH+1:0)]*0.618033988749894848204586); + aHR[countH] = outHR; outHR *= 0.618033988749894848204586; + countH++; if (countH < 0 || countH > shortH) countH = 0; + outHL += aHL[countH-((countH > shortH)?shortH+1:0)]; + outHR += aHR[countH-((countH > shortH)?shortH+1:0)]; + } + + double outIL, outJL, outKL, outLL, outIR, outJR, outKR, outLR; + if (diffuse < 2) { + aIL[countI] = outEL - (outFL + outGL + outHL); + aIR[countI] = outER - (outFR + outGR + outHR); + countI++; if (countI < 0 || countI > shortI) countI = 0; + outIL = aIL[countI-((countI > shortI)?shortI+1:0)]; + outIR = aIR[countI-((countI > shortI)?shortI+1:0)]; + } else { + outIL = (outEL - (outFL + outGL + outHL)) - (aIL[(countI+1)-((countI+1 > shortI)?shortI+1:0)]*0.618033988749894848204586); + aIL[countI] = outIL; outIL *= 0.618033988749894848204586; + outIR = (outER - (outFR + outGR + outHR)) - (aIR[(countI+1)-((countI+1 > shortI)?shortI+1:0)]*0.618033988749894848204586); + aIR[countI] = outIR; outIR *= 0.618033988749894848204586; + countI++; if (countI < 0 || countI > shortI) countI = 0; + outIL += aIL[countI-((countI > shortI)?shortI+1:0)]; + outIR += aIR[countI-((countI > shortI)?shortI+1:0)]; + } + + if (diffuse < 14) { + aJL[countJ] = outFL - (outEL + outGL + outHL); + aJR[countJ] = outFR - (outER + outGR + outHR); + countJ++; if (countJ < 0 || countJ > shortJ) countJ = 0; + outJL = aJL[countJ-((countJ > shortJ)?shortJ+1:0)]; + outJR = aJR[countJ-((countJ > shortJ)?shortJ+1:0)]; + } else { + outJL = (outFL - (outEL + outGL + outHL)) - (aJL[(countJ+1)-((countJ+1 > shortJ)?shortJ+1:0)]*0.618033988749894848204586); + aJL[countJ] = outJL; outJL *= 0.618033988749894848204586; + outJR = (outFR - (outER + outGR + outHR)) - (aJR[(countJ+1)-((countJ+1 > shortJ)?shortJ+1:0)]*0.618033988749894848204586); + aJR[countJ] = outJR; outJR *= 0.618033988749894848204586; + countJ++; if (countJ < 0 || countJ > shortJ) countJ = 0; + outJL += aJL[countJ-((countJ > shortJ)?shortJ+1:0)]; + outJR += aJR[countJ-((countJ > shortJ)?shortJ+1:0)]; + } + + if (diffuse < 13) { + aKL[countK] = outGL - (outEL + outFL + outHL); + aKR[countK] = outGR - (outER + outFR + outHR); + countK++; if (countK < 0 || countK > shortK) countK = 0; + outKL = aKL[countK-((countK > shortK)?shortK+1:0)]; + outKR = aKR[countK-((countK > shortK)?shortK+1:0)]; + } else { + outKL = (outGL - (outEL + outFL + outHL)) - (aKL[(countK+1)-((countK+1 > shortK)?shortK+1:0)]*0.618033988749894848204586); + aKL[countK] = outKL; outKL *= 0.618033988749894848204586; + outKR = (outGR - (outER + outFR + outHR)) - (aKR[(countK+1)-((countK+1 > shortK)?shortK+1:0)]*0.618033988749894848204586); + aKR[countK] = outKR; outKR *= 0.618033988749894848204586; + countK++; if (countK < 0 || countK > shortK) countK = 0; + outKL += aKL[countK-((countK > shortK)?shortK+1:0)]; + outKR += aKR[countK-((countK > shortK)?shortK+1:0)]; + } + + if (diffuse < 7) { + aLL[countL] = outHL - (outEL + outFL + outGL); + aLR[countL] = outHR - (outER + outFR + outGR); + countL++; if (countL < 0 || countL > shortL) countL = 0; + outLL = aLL[countL-((countL > shortL)?shortL+1:0)]; + outLR = aLR[countL-((countL > shortL)?shortL+1:0)]; + } else { + outLL = (outHL - (outEL + outFL + outGL)) - (aLL[(countL+1)-((countL+1 > shortL)?shortL+1:0)]*0.618033988749894848204586); + aLL[countL] = outLL; outLL *= 0.618033988749894848204586; + outLR = (outHR - (outER + outFR + outGR)) - (aLR[(countL+1)-((countL+1 > shortL)?shortL+1:0)]*0.618033988749894848204586); + aLR[countL] = outLR; outLR *= 0.618033988749894848204586; + countL++; if (countL < 0 || countL > shortL) countL = 0; + outLL += aLL[countL-((countL > shortL)?shortL+1:0)]; + outLR += aLR[countL-((countL > shortL)?shortL+1:0)]; + } + + double outML, outNL, outOL, outPL, outMR, outNR, outOR, outPR; + if (diffuse < 0) { + aML[countM] = outIL - (outJL + outKL + outLL); + aMR[countM] = outIR - (outJR + outKR + outLR); + countM++; if (countM < 0 || countM > shortM) countM = 0; + outML = aML[countM-((countM > shortM)?shortM+1:0)]; + outMR = aMR[countM-((countM > shortM)?shortM+1:0)]; + } else { + outML = (outIL - (outJL + outKL + outLL)) - (aML[(countM+1)-((countM+1 > shortM)?shortM+1:0)]*0.618033988749894848204586); + aML[countM] = outML; outML *= 0.618033988749894848204586; + outMR = (outIR - (outJR + outKR + outLR)) - (aMR[(countM+1)-((countM+1 > shortM)?shortM+1:0)]*0.618033988749894848204586); + aMR[countM] = outMR; outMR *= 0.618033988749894848204586; + countM++; if (countM < 0 || countM > shortM) countM = 0; + outML += aML[countM-((countM > shortM)?shortM+1:0)]; + outMR += aMR[countM-((countM > shortM)?shortM+1:0)]; + } + + if (diffuse < 15) { + aNL[countN] = outJL - (outIL + outKL + outLL); + aNR[countN] = outJR - (outIR + outKR + outLR); + countN++; if (countN < 0 || countN > shortN) countN = 0; + outNL = aNL[countN-((countN > shortN)?shortN+1:0)]; + outNR = aNR[countN-((countN > shortN)?shortN+1:0)]; + } else { + outNL = (outJL - (outIL + outKL + outLL)) - (aNL[(countN+1)-((countN+1 > shortN)?shortN+1:0)]*0.618033988749894848204586); + aNL[countN] = outNL; outNL *= 0.618033988749894848204586; + outNR = (outJR - (outIR + outKR + outLR)) - (aNR[(countN+1)-((countN+1 > shortN)?shortN+1:0)]*0.618033988749894848204586); + aNR[countN] = outNR; outNR *= 0.618033988749894848204586; + countN++; if (countN < 0 || countN > shortN) countN = 0; + outNL += aNL[countN-((countN > shortN)?shortN+1:0)]; + outNR += aNR[countN-((countN > shortN)?shortN+1:0)]; + } + + if (diffuse < 1) { + aOL[countO] = outKL - (outIL + outJL + outLL); + aOR[countO] = outKR - (outIR + outJR + outLR); + countO++; if (countO < 0 || countO > shortO) countO = 0; + outOL = aOL[countO-((countO > shortO)?shortO+1:0)]; + outOR = aOR[countO-((countO > shortO)?shortO+1:0)]; + } else { + outOL = (outKL - (outIL + outJL + outLL)) - (aOL[(countO+1)-((countO+1 > shortO)?shortO+1:0)]*0.618033988749894848204586); + aOL[countO] = outOL; outOL *= 0.618033988749894848204586; + outOR = (outKR - (outIR + outJR + outLR)) - (aOR[(countO+1)-((countO+1 > shortO)?shortO+1:0)]*0.618033988749894848204586); + aOR[countO] = outOR; outOR *= 0.618033988749894848204586; + countO++; if (countO < 0 || countO > shortO) countO = 0; + outOL += aOL[countO-((countO > shortO)?shortO+1:0)]; + outOR += aOR[countO-((countO > shortO)?shortO+1:0)]; + } + + if (diffuse < 9) { + aPL[countP] = outLL - (outIL + outJL + outKL); + aPR[countP] = outLR - (outIR + outJR + outKR); + countP++; if (countP < 0 || countP > shortP) countP = 0; + outPL = aPL[countP-((countP > shortP)?shortP+1:0)]; + outPR = aPR[countP-((countP > shortP)?shortP+1:0)]; + } else { + outPL = (outLL - (outIL + outJL + outKL)) - (aPL[(countP+1)-((countP+1 > shortP)?shortP+1:0)]*0.618033988749894848204586); + aPL[countP] = outPL; outPL *= 0.618033988749894848204586; + outPR = (outLR - (outIR + outJR + outKR)) - (aPR[(countP+1)-((countP+1 > shortP)?shortP+1:0)]*0.618033988749894848204586); + aPR[countP] = outPR; outPR *= 0.618033988749894848204586; + countP++; if (countP < 0 || countP > shortP) countP = 0; + outPL += aPL[countP-((countP > shortP)?shortP+1:0)]; + outPR += aPR[countP-((countP > shortP)?shortP+1:0)]; + } + + double steerAL = outML - (outNL + outOL + outPL); + double steerBL = outNL - (outML + outOL + outPL); + double steerCL = outOL - (outML + outNL + outPL); + double steerDL = outPL - (outML + outNL + outOL); + + double steerAR = outMR - (outNR + outOR + outPR); + double steerBR = outNR - (outMR + outOR + outPR); + double steerCR = outOR - (outMR + outNR + outPR); + double steerDR = outPR - (outMR + outNR + outOR); + + feedbackAL = (steerAL * (1.0-crossfade)) + (steerAR * crossfade); + feedbackBL = (steerBL * (1.0-crossfade)) + (steerBR * crossfade); + feedbackCL = (steerCL * (1.0-crossfade)) + (steerCR * crossfade); + feedbackDL = (steerDL * (1.0-crossfade)) + (steerDR * crossfade); + + feedbackAR = (steerAR * (1.0-crossfade)) + (steerAL * crossfade); + feedbackBR = (steerBR * (1.0-crossfade)) + (steerBL * crossfade); + feedbackCR = (steerCR * (1.0-crossfade)) + (steerCL * crossfade); + feedbackDR = (steerDR * (1.0-crossfade)) + (steerDL * crossfade); + //which we need to feed back into the input again, a bit + + inputSampleL = (outML + outNL + outOL + outPL)/16.0; + inputSampleR = (outMR + outNR + outOR + outPR)/16.0; + //and take the final combined sum of outputs, corrected for Householder gain and averaging + + bez[bez_CL] = bez[bez_BL]; + bez[bez_BL] = bez[bez_AL]; + bez[bez_AL] = inputSampleL; + bez[bez_SampL] = 0.0; + + bez[bez_CR] = bez[bez_BR]; + bez[bez_BR] = bez[bez_AR]; + bez[bez_AR] = inputSampleR; + bez[bez_SampR] = 0.0; + } + double CBL = (bez[bez_CL]*(1.0-bez[bez_cycle]))+(bez[bez_BL]*bez[bez_cycle]); + double CBR = (bez[bez_CR]*(1.0-bez[bez_cycle]))+(bez[bez_BR]*bez[bez_cycle]); + double BAL = (bez[bez_BL]*(1.0-bez[bez_cycle]))+(bez[bez_AL]*bez[bez_cycle]); + double BAR = (bez[bez_BR]*(1.0-bez[bez_cycle]))+(bez[bez_AR]*bez[bez_cycle]); + double CBAL = (bez[bez_BL]+(CBL*(1.0-bez[bez_cycle]))+(BAL*bez[bez_cycle]))*0.125; + double CBAR = (bez[bez_BR]+(CBR*(1.0-bez[bez_cycle]))+(BAR*bez[bez_cycle]))*0.125; + inputSampleL = CBAL; + inputSampleR = CBAR; + + iirOutL = (inputSampleL*iirExt)+(iirOutL*(1.0-iirExt)); inputSampleL = iirOutL; + iirOutR = (inputSampleR*iirExt)+(iirOutR*(1.0-iirExt)); inputSampleR = iirOutR; + + inputSampleL = (inputSampleL*wet)+(drySampleL*(1.0-wet)); + inputSampleR = (inputSampleR*wet)+(drySampleR*(1.0-wet)); + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Cans::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + + int clearcoat = (int)(A * 4.999); + if (clearcoat != prevclearcoat) { + for(int count = 0; count < kshortA+2; count++) {aAL[count] = 0.0; aAR[count] = 0.0;} + for(int count = 0; count < kshortB+2; count++) {aBL[count] = 0.0; aBR[count] = 0.0;} + for(int count = 0; count < kshortC+2; count++) {aCL[count] = 0.0; aCR[count] = 0.0;} + for(int count = 0; count < kshortD+2; count++) {aDL[count] = 0.0; aDR[count] = 0.0;} + for(int count = 0; count < kshortE+2; count++) {aEL[count] = 0.0; aER[count] = 0.0;} + for(int count = 0; count < kshortF+2; count++) {aFL[count] = 0.0; aFR[count] = 0.0;} + for(int count = 0; count < kshortG+2; count++) {aGL[count] = 0.0; aGR[count] = 0.0;} + for(int count = 0; count < kshortH+2; count++) {aHL[count] = 0.0; aHR[count] = 0.0;} + for(int count = 0; count < kshortI+2; count++) {aIL[count] = 0.0; aIR[count] = 0.0;} + for(int count = 0; count < kshortJ+2; count++) {aJL[count] = 0.0; aJR[count] = 0.0;} + for(int count = 0; count < kshortK+2; count++) {aKL[count] = 0.0; aKR[count] = 0.0;} + for(int count = 0; count < kshortL+2; count++) {aLL[count] = 0.0; aLR[count] = 0.0;} + for(int count = 0; count < kshortM+2; count++) {aML[count] = 0.0; aMR[count] = 0.0;} + for(int count = 0; count < kshortN+2; count++) {aNL[count] = 0.0; aNR[count] = 0.0;} + for(int count = 0; count < kshortO+2; count++) {aOL[count] = 0.0; aOR[count] = 0.0;} + for(int count = 0; count < kshortP+2; count++) {aPL[count] = 0.0; aPR[count] = 0.0;} + countA = 1; + countB = 1; + countC = 1; + countD = 1; + countE = 1; + countF = 1; + countG = 1; + countH = 1; + countI = 1; + countJ = 1; + countK = 1; + countL = 1; + countM = 1; + countN = 1; + countO = 1; + countP = 1; + + switch (clearcoat) + { + case 0: + shortA = 34; shortB = 193; shortC = 255; shortD = 150; shortE = 24; shortF = 204; shortG = 85; shortH = 295; shortI = 40; shortJ = 371; shortK = 370; shortL = 202; shortM = 11; shortN = 431; shortO = 23; shortP = 323; //2 to 30 ms, 32 seat room + break; //32b-U rated incompressible if filesize larger than 20,150,000 bytes + case 1: + shortA = 32; shortB = 298; shortC = 402; shortD = 161; shortE = 165; shortF = 149; shortG = 43; shortH = 313; shortI = 83; shortJ = 397; shortK = 316; shortL = 315; shortM = 11; shortN = 685; shortO = 16; shortP = 486; //3 to 40 ms, 59 seat room + break; //59b-U rated incompressible if filesize larger than 21,035,831 bytes + case 2: + shortA = 23; shortB = 357; shortC = 305; shortD = 186; shortE = 104; shortF = 255; shortG = 163; shortH = 147; shortI = 56; shortJ = 480; shortK = 317; shortL = 107; shortM = 11; shortN = 704; shortO = 26; shortP = 543; //4 to 40 ms, 60 seat room + break; //60b-U rated incompressible if filesize larger than 21,035,831 bytes + case 3: + shortA = 192; shortB = 463; shortC = 420; shortD = 34; shortE = 161; shortF = 426; shortG = 160; shortH = 474; shortI = 21; shortJ = 343; shortK = 296; shortL = 294; shortM = 11; shortN = 987; shortO = 64; shortP = 482; //5 to 51 ms, 94 seat room + break; //94b-U rated incompressible if filesize larger than 21,700,000 bytes + case 4: + default: + shortA = 173; shortB = 587; shortC = 550; shortD = 324; shortE = 165; shortF = 324; shortG = 312; shortH = 574; shortI = 100; shortJ = 793; shortK = 788; shortL = 385; shortM = 11; shortN = 1008; shortO = 46; shortP = 380; //10 to 67 ms, 177 seat club + break; //177-U rated incompressible if filesize larger than 22,796,452 bytes + } + prevclearcoat = clearcoat; + } + double derez = 1.0/overallscale; + derez = 1.0 / ((int)(1.0/derez)); + //this hard-locks derez to exact subdivisions of 1.0 + + int diffuse = pow(B,1.618033988749894848204586)*16; + double iirAmt = 1.0-pow(1.0-C,1.618033988749894848204586); + double iirExt = iirAmt/overallscale; + double crossfade = (1.0-pow(1.0-D,1.618033988749894848204586)); + double wet = pow(E,1.618033988749894848204586); + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + iirInL = (inputSampleL*iirExt)+(iirInL*(1.0-iirExt)); inputSampleL = iirInL; + iirInR = (inputSampleR*iirExt)+(iirInR*(1.0-iirExt)); inputSampleR = iirInR; + + bez[bez_cycle] += derez; + bez[bez_SampL] += ((inputSampleL+bez[bez_InL]) * derez); + bez[bez_SampR] += ((inputSampleR+bez[bez_InR]) * derez); + bez[bez_InL] = inputSampleL; bez[bez_InR] = inputSampleR; + if (bez[bez_cycle] > 1.0) { //hit the end point and we do a reverb sample + bez[bez_cycle] = 0.0; + + iirFAL = (feedbackAL*iirAmt)+(iirFAL*(1.0-iirAmt)); feedbackAL = iirFAL; + iirFAR = (feedbackAR*iirAmt)+(iirFAR*(1.0-iirAmt)); feedbackAR = iirFAR; + iirFBL = (feedbackBL*iirAmt)+(iirFBL*(1.0-iirAmt)); feedbackBL = iirFBL; + iirFBR = (feedbackBR*iirAmt)+(iirFBR*(1.0-iirAmt)); feedbackBR = iirFBR; + iirFCL = (feedbackCL*iirAmt)+(iirFCL*(1.0-iirAmt)); feedbackCL = iirFCL; + iirFCR = (feedbackCR*iirAmt)+(iirFCR*(1.0-iirAmt)); feedbackCR = iirFCR; + iirFDL = (feedbackDL*iirAmt)+(iirFDL*(1.0-iirAmt)); feedbackDL = iirFDL; + iirFDR = (feedbackDR*iirAmt)+(iirFDR*(1.0-iirAmt)); feedbackDR = iirFDR; + + double outAL, outBL, outCL, outDL, outAR, outBR, outCR, outDR; + if (diffuse < 4) { + aAL[countA] = (bez[bez_SampL]) + (feedbackAL * 0.03125); + aAR[countA] = (bez[bez_SampR]) + (feedbackAR * 0.03125); + countA++; if (countA < 0 || countA > shortA) countA = 0; + outAL = aAL[countA-((countA > shortA)?shortA+1:0)]; + outAR = aAR[countA-((countA > shortA)?shortA+1:0)]; + } else { + outAL = (bez[bez_SampL] - (aAL[(countA+1)-((countA+1 > shortA)?shortA+1:0)]*0.618033988749894848204586)) + (feedbackAL * 0.03125); + aAL[countA] = outAL; outAL *= 0.618033988749894848204586; + outAR = (bez[bez_SampR] - (aAR[(countA+1)-((countA+1 > shortA)?shortA+1:0)]*0.618033988749894848204586)) + (feedbackAR * 0.03125); + aAR[countA] = outAR; outAR *= 0.618033988749894848204586; + countA++; if (countA < 0 || countA > shortA) countA = 0; + outAL += aAL[countA-((countA > shortA)?shortA+1:0)]; + outAR += aAR[countA-((countA > shortA)?shortA+1:0)]; + } + + if (diffuse < 12) { + aBL[countB] = (bez[bez_SampL]) + (feedbackBL * 0.03125); + aBR[countB] = (bez[bez_SampR]) + (feedbackBR * 0.03125); + countB++; if (countB < 0 || countB > shortB) countB = 0; + outBL = aBL[countB-((countB > shortB)?shortB+1:0)]; + outBR = aBR[countB-((countB > shortB)?shortB+1:0)]; + } else { + outBL = (bez[bez_SampL] - (aBL[(countB+1)-((countB+1 > shortB)?shortB+1:0)]*0.618033988749894848204586)) + (feedbackBL * 0.03125); + aBL[countB] = outBL; outBL *= 0.618033988749894848204586; + outBR = (bez[bez_SampR] - (aBR[(countB+1)-((countB+1 > shortB)?shortB+1:0)]*0.618033988749894848204586)) + (feedbackBR * 0.03125); + aBR[countB] = outBR; outBR *= 0.618033988749894848204586; + countB++; if (countB < 0 || countB > shortB) countB = 0; + outBL += aBL[countB-((countB > shortB)?shortB+1:0)]; + outBR += aBR[countB-((countB > shortB)?shortB+1:0)]; + } + + if (diffuse < 10) { + aCL[countC] = (bez[bez_SampL]) + (feedbackCL * 0.03125); + aCR[countC] = (bez[bez_SampR]) + (feedbackCR * 0.03125); + countC++; if (countC < 0 || countC > shortC) countC = 0; + outCL = aCL[countC-((countC > shortC)?shortC+1:0)]; + outCR = aCR[countC-((countC > shortC)?shortC+1:0)]; + } else { + outCL = (bez[bez_SampL] - (aCL[(countC+1)-((countC+1 > shortC)?shortC+1:0)]*0.618033988749894848204586)) + (feedbackCL * 0.03125); + aCL[countC] = outCL; outCL *= 0.618033988749894848204586; + outCR = (bez[bez_SampR] - (aCR[(countC+1)-((countC+1 > shortC)?shortC+1:0)]*0.618033988749894848204586)) + (feedbackCR * 0.03125); + aCR[countC] = outCR; outCR *= 0.618033988749894848204586; + countC++; if (countC < 0 || countC > shortC) countC = 0; + outCL += aCL[countC-((countC > shortC)?shortC+1:0)]; + outCR += aCR[countC-((countC > shortC)?shortC+1:0)]; + } + + if (diffuse < 6) { + aDL[countD] = (bez[bez_SampL]) + (feedbackDL * 0.03125); + aDR[countD] = (bez[bez_SampR]) + (feedbackDR * 0.03125); + countD++; if (countD < 0 || countD > shortD) countD = 0; + outDL = aDL[countD-((countD > shortD)?shortD+1:0)]; + outDR = aDR[countD-((countD > shortD)?shortD+1:0)]; + } else { + outDL = (bez[bez_SampL] - (aDL[(countD+1)-((countD+1 > shortD)?shortD+1:0)]*0.618033988749894848204586)) + (feedbackDL * 0.03125); + aDL[countD] = outDL; outDL *= 0.618033988749894848204586; + outDR = (bez[bez_SampR] - (aDR[(countD+1)-((countD+1 > shortD)?shortD+1:0)]*0.618033988749894848204586)) + (feedbackDR * 0.03125); + aDR[countD] = outDR; outDR *= 0.618033988749894848204586; + countD++; if (countD < 0 || countD > shortD) countD = 0; + outDL += aDL[countD-((countD > shortD)?shortD+1:0)]; + outDR += aDR[countD-((countD > shortD)?shortD+1:0)]; + } + + double outEL, outFL, outGL, outHL, outER, outFR, outGR, outHR; + if (diffuse < 3) { + aEL[countE] = outAL - (outBL + outCL + outDL); + aER[countE] = outAR - (outBR + outCR + outDR); + countE++; if (countE < 0 || countE > shortE) countE = 0; + outEL = aEL[countE-((countE > shortE)?shortE+1:0)]; + outER = aER[countE-((countE > shortE)?shortE+1:0)]; + } else { + outEL = (outAL - (outBL + outCL + outDL)) - (aEL[(countE+1)-((countE+1 > shortE)?shortE+1:0)]*0.618033988749894848204586); + aEL[countE] = outEL; outEL *= 0.618033988749894848204586; + outER = (outAR - (outBR + outCR + outDR)) - (aER[(countE+1)-((countE+1 > shortE)?shortE+1:0)]*0.618033988749894848204586); + aER[countE] = outER; outER *= 0.618033988749894848204586; + countE++; if (countE < 0 || countE > shortE) countE = 0; + outEL += aEL[countE-((countE > shortE)?shortE+1:0)]; + outER += aER[countE-((countE > shortE)?shortE+1:0)]; + } + + if (diffuse < 8) { + aFL[countF] = outBL - (outAL + outCL + outDL); + aFR[countF] = outBR - (outAR + outCR + outDR); + countF++; if (countF < 0 || countF > shortF) countF = 0; + outFL = aFL[countF-((countF > shortF)?shortF+1:0)]; + outFR = aFR[countF-((countF > shortF)?shortF+1:0)]; + } else { + outFL = (outBL - (outAL + outCL + outDL)) - (aFL[(countF+1)-((countF+1 > shortF)?shortF+1:0)]*0.618033988749894848204586); + aFL[countF] = outFL; outFL *= 0.618033988749894848204586; + outFR = (outBR - (outAR + outCR + outDR)) - (aFR[(countF+1)-((countF+1 > shortF)?shortF+1:0)]*0.618033988749894848204586); + aFR[countF] = outFR; outFR *= 0.618033988749894848204586; + countF++; if (countF < 0 || countF > shortF) countF = 0; + outFL += aFL[countF-((countF > shortF)?shortF+1:0)]; + outFR += aFR[countF-((countF > shortF)?shortF+1:0)]; + } + + if (diffuse < 5) { + aGL[countG] = outCL - (outAL + outBL + outDL); + aGR[countG] = outCR - (outAR + outBR + outDR); + countG++; if (countG < 0 || countG > shortG) countG = 0; + outGL = aGL[countG-((countG > shortG)?shortG+1:0)]; + outGR = aGR[countG-((countG > shortG)?shortG+1:0)]; + } else { + outGL = (outCL - (outAL + outBL + outDL)) - (aGL[(countG+1)-((countG+1 > shortG)?shortG+1:0)]*0.618033988749894848204586); + aGL[countG] = outGL; outGL *= 0.618033988749894848204586; + outGR = (outCR - (outAR + outBR + outDR)) - (aGR[(countG+1)-((countG+1 > shortG)?shortG+1:0)]*0.618033988749894848204586); + aGR[countG] = outGR; outGR *= 0.618033988749894848204586; + countG++; if (countG < 0 || countG > shortG) countG = 0; + outGL += aGL[countG-((countG > shortG)?shortG+1:0)]; + outGR += aGR[countG-((countG > shortG)?shortG+1:0)]; + } + + if (diffuse < 11) { + aHL[countH] = outDL - (outAL + outBL + outCL); + aHR[countH] = outDR - (outAR + outBR + outCR); + countH++; if (countH < 0 || countH > shortH) countH = 0; + outHL = aHL[countH-((countH > shortH)?shortH+1:0)]; + outHR = aHR[countH-((countH > shortH)?shortH+1:0)]; + } else { + outHL = (outDL - (outAL + outBL + outCL)) - (aHL[(countH+1)-((countH+1 > shortH)?shortH+1:0)]*0.618033988749894848204586); + aHL[countH] = outHL; outHL *= 0.618033988749894848204586; + outHR = (outDR - (outAR + outBR + outCR)) - (aHR[(countH+1)-((countH+1 > shortH)?shortH+1:0)]*0.618033988749894848204586); + aHR[countH] = outHR; outHR *= 0.618033988749894848204586; + countH++; if (countH < 0 || countH > shortH) countH = 0; + outHL += aHL[countH-((countH > shortH)?shortH+1:0)]; + outHR += aHR[countH-((countH > shortH)?shortH+1:0)]; + } + + double outIL, outJL, outKL, outLL, outIR, outJR, outKR, outLR; + if (diffuse < 2) { + aIL[countI] = outEL - (outFL + outGL + outHL); + aIR[countI] = outER - (outFR + outGR + outHR); + countI++; if (countI < 0 || countI > shortI) countI = 0; + outIL = aIL[countI-((countI > shortI)?shortI+1:0)]; + outIR = aIR[countI-((countI > shortI)?shortI+1:0)]; + } else { + outIL = (outEL - (outFL + outGL + outHL)) - (aIL[(countI+1)-((countI+1 > shortI)?shortI+1:0)]*0.618033988749894848204586); + aIL[countI] = outIL; outIL *= 0.618033988749894848204586; + outIR = (outER - (outFR + outGR + outHR)) - (aIR[(countI+1)-((countI+1 > shortI)?shortI+1:0)]*0.618033988749894848204586); + aIR[countI] = outIR; outIR *= 0.618033988749894848204586; + countI++; if (countI < 0 || countI > shortI) countI = 0; + outIL += aIL[countI-((countI > shortI)?shortI+1:0)]; + outIR += aIR[countI-((countI > shortI)?shortI+1:0)]; + } + + if (diffuse < 14) { + aJL[countJ] = outFL - (outEL + outGL + outHL); + aJR[countJ] = outFR - (outER + outGR + outHR); + countJ++; if (countJ < 0 || countJ > shortJ) countJ = 0; + outJL = aJL[countJ-((countJ > shortJ)?shortJ+1:0)]; + outJR = aJR[countJ-((countJ > shortJ)?shortJ+1:0)]; + } else { + outJL = (outFL - (outEL + outGL + outHL)) - (aJL[(countJ+1)-((countJ+1 > shortJ)?shortJ+1:0)]*0.618033988749894848204586); + aJL[countJ] = outJL; outJL *= 0.618033988749894848204586; + outJR = (outFR - (outER + outGR + outHR)) - (aJR[(countJ+1)-((countJ+1 > shortJ)?shortJ+1:0)]*0.618033988749894848204586); + aJR[countJ] = outJR; outJR *= 0.618033988749894848204586; + countJ++; if (countJ < 0 || countJ > shortJ) countJ = 0; + outJL += aJL[countJ-((countJ > shortJ)?shortJ+1:0)]; + outJR += aJR[countJ-((countJ > shortJ)?shortJ+1:0)]; + } + + if (diffuse < 13) { + aKL[countK] = outGL - (outEL + outFL + outHL); + aKR[countK] = outGR - (outER + outFR + outHR); + countK++; if (countK < 0 || countK > shortK) countK = 0; + outKL = aKL[countK-((countK > shortK)?shortK+1:0)]; + outKR = aKR[countK-((countK > shortK)?shortK+1:0)]; + } else { + outKL = (outGL - (outEL + outFL + outHL)) - (aKL[(countK+1)-((countK+1 > shortK)?shortK+1:0)]*0.618033988749894848204586); + aKL[countK] = outKL; outKL *= 0.618033988749894848204586; + outKR = (outGR - (outER + outFR + outHR)) - (aKR[(countK+1)-((countK+1 > shortK)?shortK+1:0)]*0.618033988749894848204586); + aKR[countK] = outKR; outKR *= 0.618033988749894848204586; + countK++; if (countK < 0 || countK > shortK) countK = 0; + outKL += aKL[countK-((countK > shortK)?shortK+1:0)]; + outKR += aKR[countK-((countK > shortK)?shortK+1:0)]; + } + + if (diffuse < 7) { + aLL[countL] = outHL - (outEL + outFL + outGL); + aLR[countL] = outHR - (outER + outFR + outGR); + countL++; if (countL < 0 || countL > shortL) countL = 0; + outLL = aLL[countL-((countL > shortL)?shortL+1:0)]; + outLR = aLR[countL-((countL > shortL)?shortL+1:0)]; + } else { + outLL = (outHL - (outEL + outFL + outGL)) - (aLL[(countL+1)-((countL+1 > shortL)?shortL+1:0)]*0.618033988749894848204586); + aLL[countL] = outLL; outLL *= 0.618033988749894848204586; + outLR = (outHR - (outER + outFR + outGR)) - (aLR[(countL+1)-((countL+1 > shortL)?shortL+1:0)]*0.618033988749894848204586); + aLR[countL] = outLR; outLR *= 0.618033988749894848204586; + countL++; if (countL < 0 || countL > shortL) countL = 0; + outLL += aLL[countL-((countL > shortL)?shortL+1:0)]; + outLR += aLR[countL-((countL > shortL)?shortL+1:0)]; + } + + double outML, outNL, outOL, outPL, outMR, outNR, outOR, outPR; + if (diffuse < 0) { + aML[countM] = outIL - (outJL + outKL + outLL); + aMR[countM] = outIR - (outJR + outKR + outLR); + countM++; if (countM < 0 || countM > shortM) countM = 0; + outML = aML[countM-((countM > shortM)?shortM+1:0)]; + outMR = aMR[countM-((countM > shortM)?shortM+1:0)]; + } else { + outML = (outIL - (outJL + outKL + outLL)) - (aML[(countM+1)-((countM+1 > shortM)?shortM+1:0)]*0.618033988749894848204586); + aML[countM] = outML; outML *= 0.618033988749894848204586; + outMR = (outIR - (outJR + outKR + outLR)) - (aMR[(countM+1)-((countM+1 > shortM)?shortM+1:0)]*0.618033988749894848204586); + aMR[countM] = outMR; outMR *= 0.618033988749894848204586; + countM++; if (countM < 0 || countM > shortM) countM = 0; + outML += aML[countM-((countM > shortM)?shortM+1:0)]; + outMR += aMR[countM-((countM > shortM)?shortM+1:0)]; + } + + if (diffuse < 15) { + aNL[countN] = outJL - (outIL + outKL + outLL); + aNR[countN] = outJR - (outIR + outKR + outLR); + countN++; if (countN < 0 || countN > shortN) countN = 0; + outNL = aNL[countN-((countN > shortN)?shortN+1:0)]; + outNR = aNR[countN-((countN > shortN)?shortN+1:0)]; + } else { + outNL = (outJL - (outIL + outKL + outLL)) - (aNL[(countN+1)-((countN+1 > shortN)?shortN+1:0)]*0.618033988749894848204586); + aNL[countN] = outNL; outNL *= 0.618033988749894848204586; + outNR = (outJR - (outIR + outKR + outLR)) - (aNR[(countN+1)-((countN+1 > shortN)?shortN+1:0)]*0.618033988749894848204586); + aNR[countN] = outNR; outNR *= 0.618033988749894848204586; + countN++; if (countN < 0 || countN > shortN) countN = 0; + outNL += aNL[countN-((countN > shortN)?shortN+1:0)]; + outNR += aNR[countN-((countN > shortN)?shortN+1:0)]; + } + + if (diffuse < 1) { + aOL[countO] = outKL - (outIL + outJL + outLL); + aOR[countO] = outKR - (outIR + outJR + outLR); + countO++; if (countO < 0 || countO > shortO) countO = 0; + outOL = aOL[countO-((countO > shortO)?shortO+1:0)]; + outOR = aOR[countO-((countO > shortO)?shortO+1:0)]; + } else { + outOL = (outKL - (outIL + outJL + outLL)) - (aOL[(countO+1)-((countO+1 > shortO)?shortO+1:0)]*0.618033988749894848204586); + aOL[countO] = outOL; outOL *= 0.618033988749894848204586; + outOR = (outKR - (outIR + outJR + outLR)) - (aOR[(countO+1)-((countO+1 > shortO)?shortO+1:0)]*0.618033988749894848204586); + aOR[countO] = outOR; outOR *= 0.618033988749894848204586; + countO++; if (countO < 0 || countO > shortO) countO = 0; + outOL += aOL[countO-((countO > shortO)?shortO+1:0)]; + outOR += aOR[countO-((countO > shortO)?shortO+1:0)]; + } + + if (diffuse < 9) { + aPL[countP] = outLL - (outIL + outJL + outKL); + aPR[countP] = outLR - (outIR + outJR + outKR); + countP++; if (countP < 0 || countP > shortP) countP = 0; + outPL = aPL[countP-((countP > shortP)?shortP+1:0)]; + outPR = aPR[countP-((countP > shortP)?shortP+1:0)]; + } else { + outPL = (outLL - (outIL + outJL + outKL)) - (aPL[(countP+1)-((countP+1 > shortP)?shortP+1:0)]*0.618033988749894848204586); + aPL[countP] = outPL; outPL *= 0.618033988749894848204586; + outPR = (outLR - (outIR + outJR + outKR)) - (aPR[(countP+1)-((countP+1 > shortP)?shortP+1:0)]*0.618033988749894848204586); + aPR[countP] = outPR; outPR *= 0.618033988749894848204586; + countP++; if (countP < 0 || countP > shortP) countP = 0; + outPL += aPL[countP-((countP > shortP)?shortP+1:0)]; + outPR += aPR[countP-((countP > shortP)?shortP+1:0)]; + } + + double steerAL = outML - (outNL + outOL + outPL); + double steerBL = outNL - (outML + outOL + outPL); + double steerCL = outOL - (outML + outNL + outPL); + double steerDL = outPL - (outML + outNL + outOL); + + double steerAR = outMR - (outNR + outOR + outPR); + double steerBR = outNR - (outMR + outOR + outPR); + double steerCR = outOR - (outMR + outNR + outPR); + double steerDR = outPR - (outMR + outNR + outOR); + + feedbackAL = (steerAL * (1.0-crossfade)) + (steerAR * crossfade); + feedbackBL = (steerBL * (1.0-crossfade)) + (steerBR * crossfade); + feedbackCL = (steerCL * (1.0-crossfade)) + (steerCR * crossfade); + feedbackDL = (steerDL * (1.0-crossfade)) + (steerDR * crossfade); + + feedbackAR = (steerAR * (1.0-crossfade)) + (steerAL * crossfade); + feedbackBR = (steerBR * (1.0-crossfade)) + (steerBL * crossfade); + feedbackCR = (steerCR * (1.0-crossfade)) + (steerCL * crossfade); + feedbackDR = (steerDR * (1.0-crossfade)) + (steerDL * crossfade); + //which we need to feed back into the input again, a bit + + inputSampleL = (outML + outNL + outOL + outPL)/16.0; + inputSampleR = (outMR + outNR + outOR + outPR)/16.0; + //and take the final combined sum of outputs, corrected for Householder gain and averaging + + bez[bez_CL] = bez[bez_BL]; + bez[bez_BL] = bez[bez_AL]; + bez[bez_AL] = inputSampleL; + bez[bez_SampL] = 0.0; + + bez[bez_CR] = bez[bez_BR]; + bez[bez_BR] = bez[bez_AR]; + bez[bez_AR] = inputSampleR; + bez[bez_SampR] = 0.0; + } + double CBL = (bez[bez_CL]*(1.0-bez[bez_cycle]))+(bez[bez_BL]*bez[bez_cycle]); + double CBR = (bez[bez_CR]*(1.0-bez[bez_cycle]))+(bez[bez_BR]*bez[bez_cycle]); + double BAL = (bez[bez_BL]*(1.0-bez[bez_cycle]))+(bez[bez_AL]*bez[bez_cycle]); + double BAR = (bez[bez_BR]*(1.0-bez[bez_cycle]))+(bez[bez_AR]*bez[bez_cycle]); + double CBAL = (bez[bez_BL]+(CBL*(1.0-bez[bez_cycle]))+(BAL*bez[bez_cycle]))*0.125; + double CBAR = (bez[bez_BR]+(CBR*(1.0-bez[bez_cycle]))+(BAR*bez[bez_cycle]))*0.125; + inputSampleL = CBAL; + inputSampleR = CBAR; + + iirOutL = (inputSampleL*iirExt)+(iirOutL*(1.0-iirExt)); inputSampleL = iirOutL; + iirOutR = (inputSampleR*iirExt)+(iirOutR*(1.0-iirExt)); inputSampleR = iirOutR; + + inputSampleL = (inputSampleL*wet)+(drySampleL*(1.0-wet)); + inputSampleR = (inputSampleR*wet)+(drySampleR*(1.0-wet)); + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} +} // end namespace diff --git a/src/autogen_airwin/Isolator3.cpp b/src/autogen_airwin/Isolator3.cpp new file mode 100644 index 0000000..82a0f07 --- /dev/null +++ b/src/autogen_airwin/Isolator3.cpp @@ -0,0 +1,148 @@ +/* ======================================== + * Isolator3 - Isolator3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Isolator3_H +#include "Isolator3.h" +#endif +#include +#include +namespace airwinconsolidated::Isolator3 { + +AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Isolator3(audioMaster);} + +Isolator3::Isolator3(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 0.5; + B = 0.0; + + for (int x = 0; x < biq_total; x++) { + biquadA[x] = 0.0; + biquadB[x] = 0.0; + biquadC[x] = 0.0; + biquadD[x] = 0.0; + biquadE[x] = 0.0; + biquadF[x] = 0.0; + biquadG[x] = 0.0; + hiquadA[x] = 0.0; + hiquadB[x] = 0.0; + hiquadC[x] = 0.0; + hiquadD[x] = 0.0; + hiquadE[x] = 0.0; + hiquadF[x] = 0.0; + hiquadG[x] = 0.0; + } + + lastSampleL = 0.0; + wasPosClipL = false; + wasNegClipL = false; + lastSampleR = 0.0; + wasPosClipR = false; + wasNegClipR = false; + for (int x = 0; x < 16; x++) {intermediateL[x] = 0.0;intermediateR[x] = 0.0;} + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + setUniqueID(kUniqueId); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +Isolator3::~Isolator3() {} +VstInt32 Isolator3::getVendorVersion () {return 1000;} +void Isolator3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void Isolator3::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +void Isolator3::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + default: break; // unknown parameter, shouldn't happen! + } +} + +float Isolator3::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void Isolator3::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Iso", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Q", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void Isolator3::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void Isolator3::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 Isolator3::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool Isolator3::getEffectName(char* name) { + vst_strncpy(name, "Isolator3", kVstMaxProductStrLen); return true; +} + +VstPlugCategory Isolator3::getPlugCategory() {return kPlugCategEffect;} + +bool Isolator3::getProductString(char* text) { + vst_strncpy (text, "airwindows Isolator3", kVstMaxProductStrLen); return true; +} + +bool Isolator3::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} +bool Isolator3::parameterTextToValue(VstInt32 index, const char *text, float &value) { + switch(index) { + case kParamA: { auto b = string2float(text, value); return b; break; } + case kParamB: { auto b = string2float(text, value); return b; break; } + + } + return false; +} +bool Isolator3::canConvertParameterTextToValue(VstInt32 index) { + switch(index) { + case kParamA: return true; + case kParamB: return true; + + } + return false; +} +} // end namespace diff --git a/src/autogen_airwin/Isolator3.h b/src/autogen_airwin/Isolator3.h new file mode 100644 index 0000000..f327d6f --- /dev/null +++ b/src/autogen_airwin/Isolator3.h @@ -0,0 +1,115 @@ +/* ======================================== + * Isolator3 - Isolator3.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) Airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Isolator3_Isolator3_H +#define __Isolator3_Isolator3_H + +#ifndef __audioeffect__ +#include "../airwin_consolidated_base.h" +#endif + +#include +#include +#include + +namespace airwinconsolidated::Isolator3 { +enum { + kParamA =0, + kParamB =1, + kNumParameters = 2 +}; // + +const int kNumPrograms = 0; +const int kNumInputs = 2; +const int kNumOutputs = 2; +const unsigned long kUniqueId = 'ison'; //Change this to what the AU identity is! + +class Isolator3 : + public AudioEffectX +{ +public: + Isolator3(audioMasterCallback audioMaster); + ~Isolator3(); + virtual bool getEffectName(char* name); // The plug-in name + virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in + virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + virtual bool getVendorString(char* text); // Vendor info + virtual VstInt32 getVendorVersion(); // Version number + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + virtual void getProgramName(char *name); // read the name from the host + virtual void setProgramName(char *name); // changes the name of the preset displayed in the host + virtual float getParameter(VstInt32 index); // get the parameter value at the specified index + virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value + virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + virtual void getParameterName(VstInt32 index, char *text); // name of the parameter + virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + // Added by the perl as inverses + virtual bool parameterTextToValue(VstInt32 index, const char *text, float &value); + virtual bool canConvertParameterTextToValue(VstInt32 index); + virtual VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + float A; + float B; + + enum { + biq_freq, + biq_reso, + biq_a0, + biq_a1, + biq_a2, + biq_b1, + biq_b2, + biq_aA0, + biq_aA1, + biq_aA2, + biq_bA1, + biq_bA2, + biq_aB0, + biq_aB1, + biq_aB2, + biq_bB1, + biq_bB2, + biq_sL1, + biq_sL2, + biq_sR1, + biq_sR2, + biq_total + }; //coefficient interpolating biquad filter, stereo + double biquadA[biq_total]; + double biquadB[biq_total]; + double biquadC[biq_total]; + double biquadD[biq_total]; + double biquadE[biq_total]; + double biquadF[biq_total]; + double biquadG[biq_total]; + double hiquadA[biq_total]; + double hiquadB[biq_total]; + double hiquadC[biq_total]; + double hiquadD[biq_total]; + double hiquadE[biq_total]; + double hiquadF[biq_total]; + double hiquadG[biq_total]; + + double lastSampleL; + double intermediateL[16]; + bool wasPosClipL; + bool wasNegClipL; + double lastSampleR; + double intermediateR[16]; + bool wasPosClipR; + bool wasNegClipR; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff +}; + +#endif +} // end namespace diff --git a/src/autogen_airwin/Isolator3Proc.cpp b/src/autogen_airwin/Isolator3Proc.cpp new file mode 100644 index 0000000..45d4613 --- /dev/null +++ b/src/autogen_airwin/Isolator3Proc.cpp @@ -0,0 +1,1040 @@ +/* ======================================== + * Isolator3 - Isolator3.h + * Copyright (c) airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Isolator3_H +#include "Isolator3.h" +#endif +namespace airwinconsolidated::Isolator3 { + +void Isolator3::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + VstInt32 inFramesToProcess = sampleFrames; //vst doesn't give us this as a separate variable so we'll make it + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int spacing = floor(overallscale); //should give us working basic scaling, usually 2 or 4 + if (spacing < 1) spacing = 1; if (spacing > 16) spacing = 16; + + double f = A; + double q = B; + double isoFreq = ((f*2.0)*(1.0-q))+(f*q); + double hisoFreq = (((f*2.0)-1.0)*(1.0-q))+(f*q); + + if (isoFreq > 1.0) isoFreq = 1.0; + if (hisoFreq < 0.0) hisoFreq = 0.0; + + biquadA[biq_freq] = pow(isoFreq,(2.0*sqrt(overallscale)))*0.4999; + if (biquadA[biq_freq] < 0.00025) biquadA[biq_freq] = 0.00025; + biquadG[biq_freq] = biquadF[biq_freq] = biquadE[biq_freq] = biquadD[biq_freq] = biquadC[biq_freq] = biquadB[biq_freq] = biquadA[biq_freq]; + + hiquadA[biq_freq] = pow(hisoFreq,(2.0*sqrt(overallscale)))*0.4999; + if (hiquadA[biq_freq] < 0.00025) hiquadA[biq_freq] = 0.00025; + hiquadG[biq_freq] = hiquadF[biq_freq] = hiquadE[biq_freq] = hiquadD[biq_freq] = hiquadC[biq_freq] = hiquadB[biq_freq] = hiquadA[biq_freq]; + + hiquadA[biq_reso] = biquadA[biq_reso] = 4.46570214; + hiquadB[biq_reso] = biquadB[biq_reso] = 1.51387132; + hiquadC[biq_reso] = biquadC[biq_reso] = 0.93979296; + hiquadD[biq_reso] = biquadD[biq_reso] = 0.70710678; + hiquadE[biq_reso] = biquadE[biq_reso] = 0.59051105; + hiquadF[biq_reso] = biquadF[biq_reso] = 0.52972649; + hiquadG[biq_reso] = biquadG[biq_reso] = 0.50316379; + + biquadA[biq_aA0] = biquadA[biq_aB0]; + biquadA[biq_aA1] = biquadA[biq_aB1]; + biquadA[biq_aA2] = biquadA[biq_aB2]; + biquadA[biq_bA1] = biquadA[biq_bB1]; + biquadA[biq_bA2] = biquadA[biq_bB2]; + + biquadB[biq_aA0] = biquadB[biq_aB0]; + biquadB[biq_aA1] = biquadB[biq_aB1]; + biquadB[biq_aA2] = biquadB[biq_aB2]; + biquadB[biq_bA1] = biquadB[biq_bB1]; + biquadB[biq_bA2] = biquadB[biq_bB2]; + + biquadC[biq_aA0] = biquadC[biq_aB0]; + biquadC[biq_aA1] = biquadC[biq_aB1]; + biquadC[biq_aA2] = biquadC[biq_aB2]; + biquadC[biq_bA1] = biquadC[biq_bB1]; + biquadC[biq_bA2] = biquadC[biq_bB2]; + + biquadD[biq_aA0] = biquadD[biq_aB0]; + biquadD[biq_aA1] = biquadD[biq_aB1]; + biquadD[biq_aA2] = biquadD[biq_aB2]; + biquadD[biq_bA1] = biquadD[biq_bB1]; + biquadD[biq_bA2] = biquadD[biq_bB2]; + + biquadE[biq_aA0] = biquadE[biq_aB0]; + biquadE[biq_aA1] = biquadE[biq_aB1]; + biquadE[biq_aA2] = biquadE[biq_aB2]; + biquadE[biq_bA1] = biquadE[biq_bB1]; + biquadE[biq_bA2] = biquadE[biq_bB2]; + + biquadF[biq_aA0] = biquadF[biq_aB0]; + biquadF[biq_aA1] = biquadF[biq_aB1]; + biquadF[biq_aA2] = biquadF[biq_aB2]; + biquadF[biq_bA1] = biquadF[biq_bB1]; + biquadF[biq_bA2] = biquadF[biq_bB2]; + + biquadG[biq_aA0] = biquadG[biq_aB0]; + biquadG[biq_aA1] = biquadG[biq_aB1]; + biquadG[biq_aA2] = biquadG[biq_aB2]; + biquadG[biq_bA1] = biquadG[biq_bB1]; + biquadG[biq_bA2] = biquadG[biq_bB2]; + + hiquadA[biq_aA0] = hiquadA[biq_aB0]; + hiquadA[biq_aA1] = hiquadA[biq_aB1]; + hiquadA[biq_aA2] = hiquadA[biq_aB2]; + hiquadA[biq_bA1] = hiquadA[biq_bB1]; + hiquadA[biq_bA2] = hiquadA[biq_bB2]; + + hiquadB[biq_aA0] = hiquadB[biq_aB0]; + hiquadB[biq_aA1] = hiquadB[biq_aB1]; + hiquadB[biq_aA2] = hiquadB[biq_aB2]; + hiquadB[biq_bA1] = hiquadB[biq_bB1]; + hiquadB[biq_bA2] = hiquadB[biq_bB2]; + + hiquadC[biq_aA0] = hiquadC[biq_aB0]; + hiquadC[biq_aA1] = hiquadC[biq_aB1]; + hiquadC[biq_aA2] = hiquadC[biq_aB2]; + hiquadC[biq_bA1] = hiquadC[biq_bB1]; + hiquadC[biq_bA2] = hiquadC[biq_bB2]; + + hiquadD[biq_aA0] = hiquadD[biq_aB0]; + hiquadD[biq_aA1] = hiquadD[biq_aB1]; + hiquadD[biq_aA2] = hiquadD[biq_aB2]; + hiquadD[biq_bA1] = hiquadD[biq_bB1]; + hiquadD[biq_bA2] = hiquadD[biq_bB2]; + + hiquadE[biq_aA0] = hiquadE[biq_aB0]; + hiquadE[biq_aA1] = hiquadE[biq_aB1]; + hiquadE[biq_aA2] = hiquadE[biq_aB2]; + hiquadE[biq_bA1] = hiquadE[biq_bB1]; + hiquadE[biq_bA2] = hiquadE[biq_bB2]; + + hiquadF[biq_aA0] = hiquadF[biq_aB0]; + hiquadF[biq_aA1] = hiquadF[biq_aB1]; + hiquadF[biq_aA2] = hiquadF[biq_aB2]; + hiquadF[biq_bA1] = hiquadF[biq_bB1]; + hiquadF[biq_bA2] = hiquadF[biq_bB2]; + + hiquadG[biq_aA0] = hiquadG[biq_aB0]; + hiquadG[biq_aA1] = hiquadG[biq_aB1]; + hiquadG[biq_aA2] = hiquadG[biq_aB2]; + hiquadG[biq_bA1] = hiquadG[biq_bB1]; + hiquadG[biq_bA2] = hiquadG[biq_bB2]; + + //previous run through the buffer is still in the filter, so we move it + //to the A section and now it's the new starting point. + double K = tan(M_PI * biquadA[biq_freq]); + double norm = 1.0 / (1.0 + K / biquadA[biq_reso] + K * K); + biquadA[biq_aB0] = K * K * norm; + biquadA[biq_aB1] = 2.0 * biquadA[biq_aB0]; + biquadA[biq_aB2] = biquadA[biq_aB0]; + biquadA[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadA[biq_bB2] = (1.0 - K / biquadA[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadB[biq_freq]); + norm = 1.0 / (1.0 + K / biquadB[biq_reso] + K * K); + biquadB[biq_aB0] = K * K * norm; + biquadB[biq_aB1] = 2.0 * biquadB[biq_aB0]; + biquadB[biq_aB2] = biquadB[biq_aB0]; + biquadB[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadB[biq_bB2] = (1.0 - K / biquadB[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadC[biq_freq]); + norm = 1.0 / (1.0 + K / biquadC[biq_reso] + K * K); + biquadC[biq_aB0] = K * K * norm; + biquadC[biq_aB1] = 2.0 * biquadC[biq_aB0]; + biquadC[biq_aB2] = biquadC[biq_aB0]; + biquadC[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadC[biq_bB2] = (1.0 - K / biquadC[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadD[biq_freq]); + norm = 1.0 / (1.0 + K / biquadD[biq_reso] + K * K); + biquadD[biq_aB0] = K * K * norm; + biquadD[biq_aB1] = 2.0 * biquadD[biq_aB0]; + biquadD[biq_aB2] = biquadD[biq_aB0]; + biquadD[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadD[biq_bB2] = (1.0 - K / biquadD[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadE[biq_freq]); + norm = 1.0 / (1.0 + K / biquadE[biq_reso] + K * K); + biquadE[biq_aB0] = K * K * norm; + biquadE[biq_aB1] = 2.0 * biquadE[biq_aB0]; + biquadE[biq_aB2] = biquadE[biq_aB0]; + biquadE[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadE[biq_bB2] = (1.0 - K / biquadE[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadF[biq_freq]); + norm = 1.0 / (1.0 + K / biquadF[biq_reso] + K * K); + biquadF[biq_aB0] = K * K * norm; + biquadF[biq_aB1] = 2.0 * biquadF[biq_aB0]; + biquadF[biq_aB2] = biquadF[biq_aB0]; + biquadF[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadF[biq_bB2] = (1.0 - K / biquadF[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadG[biq_freq]); + norm = 1.0 / (1.0 + K / biquadG[biq_reso] + K * K); + biquadG[biq_aB0] = K * K * norm; + biquadG[biq_aB1] = 2.0 * biquadG[biq_aB0]; + biquadG[biq_aB2] = biquadG[biq_aB0]; + biquadG[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadG[biq_bB2] = (1.0 - K / biquadG[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadA[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadA[biq_reso] + K * K); + hiquadA[biq_aB0] = K * K * norm; + hiquadA[biq_aB1] = 2.0 * hiquadA[biq_aB0]; + hiquadA[biq_aB2] = hiquadA[biq_aB0]; + hiquadA[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadA[biq_bB2] = (1.0 - K / hiquadA[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadB[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadB[biq_reso] + K * K); + hiquadB[biq_aB0] = K * K * norm; + hiquadB[biq_aB1] = 2.0 * hiquadB[biq_aB0]; + hiquadB[biq_aB2] = hiquadB[biq_aB0]; + hiquadB[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadB[biq_bB2] = (1.0 - K / hiquadB[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadC[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadC[biq_reso] + K * K); + hiquadC[biq_aB0] = K * K * norm; + hiquadC[biq_aB1] = 2.0 * hiquadC[biq_aB0]; + hiquadC[biq_aB2] = hiquadC[biq_aB0]; + hiquadC[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadC[biq_bB2] = (1.0 - K / hiquadC[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadD[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadD[biq_reso] + K * K); + hiquadD[biq_aB0] = K * K * norm; + hiquadD[biq_aB1] = 2.0 * hiquadD[biq_aB0]; + hiquadD[biq_aB2] = hiquadD[biq_aB0]; + hiquadD[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadD[biq_bB2] = (1.0 - K / hiquadD[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadE[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadE[biq_reso] + K * K); + hiquadE[biq_aB0] = K * K * norm; + hiquadE[biq_aB1] = 2.0 * hiquadE[biq_aB0]; + hiquadE[biq_aB2] = hiquadE[biq_aB0]; + hiquadE[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadE[biq_bB2] = (1.0 - K / hiquadE[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadF[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadF[biq_reso] + K * K); + hiquadF[biq_aB0] = K * K * norm; + hiquadF[biq_aB1] = 2.0 * hiquadF[biq_aB0]; + hiquadF[biq_aB2] = hiquadF[biq_aB0]; + hiquadF[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadF[biq_bB2] = (1.0 - K / hiquadF[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadG[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadG[biq_reso] + K * K); + hiquadG[biq_aB0] = K * K * norm; + hiquadG[biq_aB1] = 2.0 * hiquadG[biq_aB0]; + hiquadG[biq_aB2] = hiquadG[biq_aB0]; + hiquadG[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadG[biq_bB2] = (1.0 - K / hiquadG[biq_reso] + K * K) * norm; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + double temp = (double)sampleFrames/inFramesToProcess; + + hiquadA[biq_a0] = (hiquadA[biq_aA0]*temp)+(hiquadA[biq_aB0]*(1.0-temp)); + hiquadA[biq_a1] = (hiquadA[biq_aA1]*temp)+(hiquadA[biq_aB1]*(1.0-temp)); + hiquadA[biq_a2] = (hiquadA[biq_aA2]*temp)+(hiquadA[biq_aB2]*(1.0-temp)); + hiquadA[biq_b1] = (hiquadA[biq_bA1]*temp)+(hiquadA[biq_bB1]*(1.0-temp)); + hiquadA[biq_b2] = (hiquadA[biq_bA2]*temp)+(hiquadA[biq_bB2]*(1.0-temp)); + + hiquadB[biq_a0] = (hiquadB[biq_aA0]*temp)+(hiquadB[biq_aB0]*(1.0-temp)); + hiquadB[biq_a1] = (hiquadB[biq_aA1]*temp)+(hiquadB[biq_aB1]*(1.0-temp)); + hiquadB[biq_a2] = (hiquadB[biq_aA2]*temp)+(hiquadB[biq_aB2]*(1.0-temp)); + hiquadB[biq_b1] = (hiquadB[biq_bA1]*temp)+(hiquadB[biq_bB1]*(1.0-temp)); + hiquadB[biq_b2] = (hiquadB[biq_bA2]*temp)+(hiquadB[biq_bB2]*(1.0-temp)); + + hiquadC[biq_a0] = (hiquadC[biq_aA0]*temp)+(hiquadC[biq_aB0]*(1.0-temp)); + hiquadC[biq_a1] = (hiquadC[biq_aA1]*temp)+(hiquadC[biq_aB1]*(1.0-temp)); + hiquadC[biq_a2] = (hiquadC[biq_aA2]*temp)+(hiquadC[biq_aB2]*(1.0-temp)); + hiquadC[biq_b1] = (hiquadC[biq_bA1]*temp)+(hiquadC[biq_bB1]*(1.0-temp)); + hiquadC[biq_b2] = (hiquadC[biq_bA2]*temp)+(hiquadC[biq_bB2]*(1.0-temp)); + + hiquadD[biq_a0] = (hiquadD[biq_aA0]*temp)+(hiquadD[biq_aB0]*(1.0-temp)); + hiquadD[biq_a1] = (hiquadD[biq_aA1]*temp)+(hiquadD[biq_aB1]*(1.0-temp)); + hiquadD[biq_a2] = (hiquadD[biq_aA2]*temp)+(hiquadD[biq_aB2]*(1.0-temp)); + hiquadD[biq_b1] = (hiquadD[biq_bA1]*temp)+(hiquadD[biq_bB1]*(1.0-temp)); + hiquadD[biq_b2] = (hiquadD[biq_bA2]*temp)+(hiquadD[biq_bB2]*(1.0-temp)); + + hiquadE[biq_a0] = (hiquadE[biq_aA0]*temp)+(hiquadE[biq_aB0]*(1.0-temp)); + hiquadE[biq_a1] = (hiquadE[biq_aA1]*temp)+(hiquadE[biq_aB1]*(1.0-temp)); + hiquadE[biq_a2] = (hiquadE[biq_aA2]*temp)+(hiquadE[biq_aB2]*(1.0-temp)); + hiquadE[biq_b1] = (hiquadE[biq_bA1]*temp)+(hiquadE[biq_bB1]*(1.0-temp)); + hiquadE[biq_b2] = (hiquadE[biq_bA2]*temp)+(hiquadE[biq_bB2]*(1.0-temp)); + + hiquadF[biq_a0] = (hiquadF[biq_aA0]*temp)+(hiquadF[biq_aB0]*(1.0-temp)); + hiquadF[biq_a1] = (hiquadF[biq_aA1]*temp)+(hiquadF[biq_aB1]*(1.0-temp)); + hiquadF[biq_a2] = (hiquadF[biq_aA2]*temp)+(hiquadF[biq_aB2]*(1.0-temp)); + hiquadF[biq_b1] = (hiquadF[biq_bA1]*temp)+(hiquadF[biq_bB1]*(1.0-temp)); + hiquadF[biq_b2] = (hiquadF[biq_bA2]*temp)+(hiquadF[biq_bB2]*(1.0-temp)); + + hiquadG[biq_a0] = (hiquadG[biq_aA0]*temp)+(hiquadG[biq_aB0]*(1.0-temp)); + hiquadG[biq_a1] = (hiquadG[biq_aA1]*temp)+(hiquadG[biq_aB1]*(1.0-temp)); + hiquadG[biq_a2] = (hiquadG[biq_aA2]*temp)+(hiquadG[biq_aB2]*(1.0-temp)); + hiquadG[biq_b1] = (hiquadG[biq_bA1]*temp)+(hiquadG[biq_bB1]*(1.0-temp)); + hiquadG[biq_b2] = (hiquadG[biq_bA2]*temp)+(hiquadG[biq_bB2]*(1.0-temp)); + //this is the interpolation code for the hiquad + + double outSample = (inputSampleL * hiquadA[biq_a0]) + hiquadA[biq_sL1]; + hiquadA[biq_sL1] = (inputSampleL * hiquadA[biq_a1]) - (outSample * hiquadA[biq_b1]) + hiquadA[biq_sL2]; + hiquadA[biq_sL2] = (inputSampleL * hiquadA[biq_a2]) - (outSample * hiquadA[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadA[biq_a0]) + hiquadA[biq_sR1]; + hiquadA[biq_sR1] = (inputSampleR * hiquadA[biq_a1]) - (outSample * hiquadA[biq_b1]) + hiquadA[biq_sR2]; + hiquadA[biq_sR2] = (inputSampleR * hiquadA[biq_a2]) - (outSample * hiquadA[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadB[biq_a0]) + hiquadB[biq_sL1]; + hiquadB[biq_sL1] = (inputSampleL * hiquadB[biq_a1]) - (outSample * hiquadB[biq_b1]) + hiquadB[biq_sL2]; + hiquadB[biq_sL2] = (inputSampleL * hiquadB[biq_a2]) - (outSample * hiquadB[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadB[biq_a0]) + hiquadB[biq_sR1]; + hiquadB[biq_sR1] = (inputSampleR * hiquadB[biq_a1]) - (outSample * hiquadB[biq_b1]) + hiquadB[biq_sR2]; + hiquadB[biq_sR2] = (inputSampleR * hiquadB[biq_a2]) - (outSample * hiquadB[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadC[biq_a0]) + hiquadC[biq_sL1]; + hiquadC[biq_sL1] = (inputSampleL * hiquadC[biq_a1]) - (outSample * hiquadC[biq_b1]) + hiquadC[biq_sL2]; + hiquadC[biq_sL2] = (inputSampleL * hiquadC[biq_a2]) - (outSample * hiquadC[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadC[biq_a0]) + hiquadC[biq_sR1]; + hiquadC[biq_sR1] = (inputSampleR * hiquadC[biq_a1]) - (outSample * hiquadC[biq_b1]) + hiquadC[biq_sR2]; + hiquadC[biq_sR2] = (inputSampleR * hiquadC[biq_a2]) - (outSample * hiquadC[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadD[biq_a0]) + hiquadD[biq_sL1]; + hiquadD[biq_sL1] = (inputSampleL * hiquadD[biq_a1]) - (outSample * hiquadD[biq_b1]) + hiquadD[biq_sL2]; + hiquadD[biq_sL2] = (inputSampleL * hiquadD[biq_a2]) - (outSample * hiquadD[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadD[biq_a0]) + hiquadD[biq_sR1]; + hiquadD[biq_sR1] = (inputSampleR * hiquadD[biq_a1]) - (outSample * hiquadD[biq_b1]) + hiquadD[biq_sR2]; + hiquadD[biq_sR2] = (inputSampleR * hiquadD[biq_a2]) - (outSample * hiquadD[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadE[biq_a0]) + hiquadE[biq_sL1]; + hiquadE[biq_sL1] = (inputSampleL * hiquadE[biq_a1]) - (outSample * hiquadE[biq_b1]) + hiquadE[biq_sL2]; + hiquadE[biq_sL2] = (inputSampleL * hiquadE[biq_a2]) - (outSample * hiquadE[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadE[biq_a0]) + hiquadE[biq_sR1]; + hiquadE[biq_sR1] = (inputSampleR * hiquadE[biq_a1]) - (outSample * hiquadE[biq_b1]) + hiquadE[biq_sR2]; + hiquadE[biq_sR2] = (inputSampleR * hiquadE[biq_a2]) - (outSample * hiquadE[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadF[biq_a0]) + hiquadF[biq_sL1]; + hiquadF[biq_sL1] = (inputSampleL * hiquadF[biq_a1]) - (outSample * hiquadF[biq_b1]) + hiquadF[biq_sL2]; + hiquadF[biq_sL2] = (inputSampleL * hiquadF[biq_a2]) - (outSample * hiquadF[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadF[biq_a0]) + hiquadF[biq_sR1]; + hiquadF[biq_sR1] = (inputSampleR * hiquadF[biq_a1]) - (outSample * hiquadF[biq_b1]) + hiquadF[biq_sR2]; + hiquadF[biq_sR2] = (inputSampleR * hiquadF[biq_a2]) - (outSample * hiquadF[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadG[biq_a0]) + hiquadG[biq_sL1]; + hiquadG[biq_sL1] = (inputSampleL * hiquadG[biq_a1]) - (outSample * hiquadG[biq_b1]) + hiquadG[biq_sL2]; + hiquadG[biq_sL2] = (inputSampleL * hiquadG[biq_a2]) - (outSample * hiquadG[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadG[biq_a0]) + hiquadG[biq_sR1]; + hiquadG[biq_sR1] = (inputSampleR * hiquadG[biq_a1]) - (outSample * hiquadG[biq_b1]) + hiquadG[biq_sR2]; + hiquadG[biq_sR2] = (inputSampleR * hiquadG[biq_a2]) - (outSample * hiquadG[biq_b2]); + inputSampleR = outSample; + + inputSampleL = (drySampleL - inputSampleL); + inputSampleR = (drySampleR - inputSampleR); + + biquadA[biq_a0] = (biquadA[biq_aA0]*temp)+(biquadA[biq_aB0]*(1.0-temp)); + biquadA[biq_a1] = (biquadA[biq_aA1]*temp)+(biquadA[biq_aB1]*(1.0-temp)); + biquadA[biq_a2] = (biquadA[biq_aA2]*temp)+(biquadA[biq_aB2]*(1.0-temp)); + biquadA[biq_b1] = (biquadA[biq_bA1]*temp)+(biquadA[biq_bB1]*(1.0-temp)); + biquadA[biq_b2] = (biquadA[biq_bA2]*temp)+(biquadA[biq_bB2]*(1.0-temp)); + + biquadB[biq_a0] = (biquadB[biq_aA0]*temp)+(biquadB[biq_aB0]*(1.0-temp)); + biquadB[biq_a1] = (biquadB[biq_aA1]*temp)+(biquadB[biq_aB1]*(1.0-temp)); + biquadB[biq_a2] = (biquadB[biq_aA2]*temp)+(biquadB[biq_aB2]*(1.0-temp)); + biquadB[biq_b1] = (biquadB[biq_bA1]*temp)+(biquadB[biq_bB1]*(1.0-temp)); + biquadB[biq_b2] = (biquadB[biq_bA2]*temp)+(biquadB[biq_bB2]*(1.0-temp)); + + biquadC[biq_a0] = (biquadC[biq_aA0]*temp)+(biquadC[biq_aB0]*(1.0-temp)); + biquadC[biq_a1] = (biquadC[biq_aA1]*temp)+(biquadC[biq_aB1]*(1.0-temp)); + biquadC[biq_a2] = (biquadC[biq_aA2]*temp)+(biquadC[biq_aB2]*(1.0-temp)); + biquadC[biq_b1] = (biquadC[biq_bA1]*temp)+(biquadC[biq_bB1]*(1.0-temp)); + biquadC[biq_b2] = (biquadC[biq_bA2]*temp)+(biquadC[biq_bB2]*(1.0-temp)); + + biquadD[biq_a0] = (biquadD[biq_aA0]*temp)+(biquadD[biq_aB0]*(1.0-temp)); + biquadD[biq_a1] = (biquadD[biq_aA1]*temp)+(biquadD[biq_aB1]*(1.0-temp)); + biquadD[biq_a2] = (biquadD[biq_aA2]*temp)+(biquadD[biq_aB2]*(1.0-temp)); + biquadD[biq_b1] = (biquadD[biq_bA1]*temp)+(biquadD[biq_bB1]*(1.0-temp)); + biquadD[biq_b2] = (biquadD[biq_bA2]*temp)+(biquadD[biq_bB2]*(1.0-temp)); + + biquadE[biq_a0] = (biquadE[biq_aA0]*temp)+(biquadE[biq_aB0]*(1.0-temp)); + biquadE[biq_a1] = (biquadE[biq_aA1]*temp)+(biquadE[biq_aB1]*(1.0-temp)); + biquadE[biq_a2] = (biquadE[biq_aA2]*temp)+(biquadE[biq_aB2]*(1.0-temp)); + biquadE[biq_b1] = (biquadE[biq_bA1]*temp)+(biquadE[biq_bB1]*(1.0-temp)); + biquadE[biq_b2] = (biquadE[biq_bA2]*temp)+(biquadE[biq_bB2]*(1.0-temp)); + + biquadF[biq_a0] = (biquadF[biq_aA0]*temp)+(biquadF[biq_aB0]*(1.0-temp)); + biquadF[biq_a1] = (biquadF[biq_aA1]*temp)+(biquadF[biq_aB1]*(1.0-temp)); + biquadF[biq_a2] = (biquadF[biq_aA2]*temp)+(biquadF[biq_aB2]*(1.0-temp)); + biquadF[biq_b1] = (biquadF[biq_bA1]*temp)+(biquadF[biq_bB1]*(1.0-temp)); + biquadF[biq_b2] = (biquadF[biq_bA2]*temp)+(biquadF[biq_bB2]*(1.0-temp)); + + biquadG[biq_a0] = (biquadG[biq_aA0]*temp)+(biquadG[biq_aB0]*(1.0-temp)); + biquadG[biq_a1] = (biquadG[biq_aA1]*temp)+(biquadG[biq_aB1]*(1.0-temp)); + biquadG[biq_a2] = (biquadG[biq_aA2]*temp)+(biquadG[biq_aB2]*(1.0-temp)); + biquadG[biq_b1] = (biquadG[biq_bA1]*temp)+(biquadG[biq_bB1]*(1.0-temp)); + biquadG[biq_b2] = (biquadG[biq_bA2]*temp)+(biquadG[biq_bB2]*(1.0-temp)); + //this is the interpolation code for the biquad + + outSample = (inputSampleL * biquadA[biq_a0]) + biquadA[biq_sL1]; + biquadA[biq_sL1] = (inputSampleL * biquadA[biq_a1]) - (outSample * biquadA[biq_b1]) + biquadA[biq_sL2]; + biquadA[biq_sL2] = (inputSampleL * biquadA[biq_a2]) - (outSample * biquadA[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadA[biq_a0]) + biquadA[biq_sR1]; + biquadA[biq_sR1] = (inputSampleR * biquadA[biq_a1]) - (outSample * biquadA[biq_b1]) + biquadA[biq_sR2]; + biquadA[biq_sR2] = (inputSampleR * biquadA[biq_a2]) - (outSample * biquadA[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadB[biq_a0]) + biquadB[biq_sL1]; + biquadB[biq_sL1] = (inputSampleL * biquadB[biq_a1]) - (outSample * biquadB[biq_b1]) + biquadB[biq_sL2]; + biquadB[biq_sL2] = (inputSampleL * biquadB[biq_a2]) - (outSample * biquadB[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadB[biq_a0]) + biquadB[biq_sR1]; + biquadB[biq_sR1] = (inputSampleR * biquadB[biq_a1]) - (outSample * biquadB[biq_b1]) + biquadB[biq_sR2]; + biquadB[biq_sR2] = (inputSampleR * biquadB[biq_a2]) - (outSample * biquadB[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadC[biq_a0]) + biquadC[biq_sL1]; + biquadC[biq_sL1] = (inputSampleL * biquadC[biq_a1]) - (outSample * biquadC[biq_b1]) + biquadC[biq_sL2]; + biquadC[biq_sL2] = (inputSampleL * biquadC[biq_a2]) - (outSample * biquadC[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadC[biq_a0]) + biquadC[biq_sR1]; + biquadC[biq_sR1] = (inputSampleR * biquadC[biq_a1]) - (outSample * biquadC[biq_b1]) + biquadC[biq_sR2]; + biquadC[biq_sR2] = (inputSampleR * biquadC[biq_a2]) - (outSample * biquadC[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadD[biq_a0]) + biquadD[biq_sL1]; + biquadD[biq_sL1] = (inputSampleL * biquadD[biq_a1]) - (outSample * biquadD[biq_b1]) + biquadD[biq_sL2]; + biquadD[biq_sL2] = (inputSampleL * biquadD[biq_a2]) - (outSample * biquadD[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadD[biq_a0]) + biquadD[biq_sR1]; + biquadD[biq_sR1] = (inputSampleR * biquadD[biq_a1]) - (outSample * biquadD[biq_b1]) + biquadD[biq_sR2]; + biquadD[biq_sR2] = (inputSampleR * biquadD[biq_a2]) - (outSample * biquadD[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadE[biq_a0]) + biquadE[biq_sL1]; + biquadE[biq_sL1] = (inputSampleL * biquadE[biq_a1]) - (outSample * biquadE[biq_b1]) + biquadE[biq_sL2]; + biquadE[biq_sL2] = (inputSampleL * biquadE[biq_a2]) - (outSample * biquadE[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadE[biq_a0]) + biquadE[biq_sR1]; + biquadE[biq_sR1] = (inputSampleR * biquadE[biq_a1]) - (outSample * biquadE[biq_b1]) + biquadE[biq_sR2]; + biquadE[biq_sR2] = (inputSampleR * biquadE[biq_a2]) - (outSample * biquadE[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadF[biq_a0]) + biquadF[biq_sL1]; + biquadF[biq_sL1] = (inputSampleL * biquadF[biq_a1]) - (outSample * biquadF[biq_b1]) + biquadF[biq_sL2]; + biquadF[biq_sL2] = (inputSampleL * biquadF[biq_a2]) - (outSample * biquadF[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadF[biq_a0]) + biquadF[biq_sR1]; + biquadF[biq_sR1] = (inputSampleR * biquadF[biq_a1]) - (outSample * biquadF[biq_b1]) + biquadF[biq_sR2]; + biquadF[biq_sR2] = (inputSampleR * biquadF[biq_a2]) - (outSample * biquadF[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadG[biq_a0]) + biquadG[biq_sL1]; + biquadG[biq_sL1] = (inputSampleL * biquadG[biq_a1]) - (outSample * biquadG[biq_b1]) + biquadG[biq_sL2]; + biquadG[biq_sL2] = (inputSampleL * biquadG[biq_a2]) - (outSample * biquadG[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadG[biq_a0]) + biquadG[biq_sR1]; + biquadG[biq_sR1] = (inputSampleR * biquadG[biq_a1]) - (outSample * biquadG[biq_b1]) + biquadG[biq_sR2]; + biquadG[biq_sR2] = (inputSampleR * biquadG[biq_a2]) - (outSample * biquadG[biq_b2]); + inputSampleR = outSample; + + //begin ClipOnly2 stereo as a little, compressed chunk that can be dropped into code + if (inputSampleL > 4.0) inputSampleL = 4.0; if (inputSampleL < -4.0) inputSampleL = -4.0; + if (wasPosClipL == true) { //current will be over + if (inputSampleL0.9549925859) {wasPosClipL=true;inputSampleL=0.7058208+(lastSampleL*0.2609148);} + if (wasNegClipL == true) { //current will be -over + if (inputSampleL > lastSampleL) lastSampleL=-0.7058208+(inputSampleL*0.2609148); + else lastSampleL=-0.2491717+(lastSampleL*0.7390851); + } wasNegClipL = false; + if (inputSampleL<-0.9549925859) {wasNegClipL=true;inputSampleL=-0.7058208+(lastSampleL*0.2609148);} + intermediateL[spacing] = inputSampleL; + inputSampleL = lastSampleL; //Latency is however many samples equals one 44.1k sample + for (int x = spacing; x > 0; x--) intermediateL[x-1] = intermediateL[x]; + lastSampleL = intermediateL[0]; //run a little buffer to handle this + + if (inputSampleR > 4.0) inputSampleR = 4.0; if (inputSampleR < -4.0) inputSampleR = -4.0; + if (wasPosClipR == true) { //current will be over + if (inputSampleR0.9549925859) {wasPosClipR=true;inputSampleR=0.7058208+(lastSampleR*0.2609148);} + if (wasNegClipR == true) { //current will be -over + if (inputSampleR > lastSampleR) lastSampleR=-0.7058208+(inputSampleR*0.2609148); + else lastSampleR=-0.2491717+(lastSampleR*0.7390851); + } wasNegClipR = false; + if (inputSampleR<-0.9549925859) {wasNegClipR=true;inputSampleR=-0.7058208+(lastSampleR*0.2609148);} + intermediateR[spacing] = inputSampleR; + inputSampleR = lastSampleR; //Latency is however many samples equals one 44.1k sample + for (int x = spacing; x > 0; x--) intermediateR[x-1] = intermediateR[x]; + lastSampleR = intermediateR[0]; //run a little buffer to handle this + //end ClipOnly2 stereo as a little, compressed chunk that can be dropped into code + + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void Isolator3::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + VstInt32 inFramesToProcess = sampleFrames; //vst doesn't give us this as a separate variable so we'll make it + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int spacing = floor(overallscale); //should give us working basic scaling, usually 2 or 4 + if (spacing < 1) spacing = 1; if (spacing > 16) spacing = 16; + + double f = A; + double q = B; + double isoFreq = ((f*2.0)*(1.0-q))+(f*q); + double hisoFreq = (((f*2.0)-1.0)*(1.0-q))+(f*q); + + if (isoFreq > 1.0) isoFreq = 1.0; + if (hisoFreq < 0.0) hisoFreq = 0.0; + + biquadA[biq_freq] = pow(isoFreq,(2.0*sqrt(overallscale)))*0.4999; + if (biquadA[biq_freq] < 0.00025) biquadA[biq_freq] = 0.00025; + biquadG[biq_freq] = biquadF[biq_freq] = biquadE[biq_freq] = biquadD[biq_freq] = biquadC[biq_freq] = biquadB[biq_freq] = biquadA[biq_freq]; + + hiquadA[biq_freq] = pow(hisoFreq,(2.0*sqrt(overallscale)))*0.4999; + if (hiquadA[biq_freq] < 0.00025) hiquadA[biq_freq] = 0.00025; + hiquadG[biq_freq] = hiquadF[biq_freq] = hiquadE[biq_freq] = hiquadD[biq_freq] = hiquadC[biq_freq] = hiquadB[biq_freq] = hiquadA[biq_freq]; + + hiquadA[biq_reso] = biquadA[biq_reso] = 4.46570214; + hiquadB[biq_reso] = biquadB[biq_reso] = 1.51387132; + hiquadC[biq_reso] = biquadC[biq_reso] = 0.93979296; + hiquadD[biq_reso] = biquadD[biq_reso] = 0.70710678; + hiquadE[biq_reso] = biquadE[biq_reso] = 0.59051105; + hiquadF[biq_reso] = biquadF[biq_reso] = 0.52972649; + hiquadG[biq_reso] = biquadG[biq_reso] = 0.50316379; + + biquadA[biq_aA0] = biquadA[biq_aB0]; + biquadA[biq_aA1] = biquadA[biq_aB1]; + biquadA[biq_aA2] = biquadA[biq_aB2]; + biquadA[biq_bA1] = biquadA[biq_bB1]; + biquadA[biq_bA2] = biquadA[biq_bB2]; + + biquadB[biq_aA0] = biquadB[biq_aB0]; + biquadB[biq_aA1] = biquadB[biq_aB1]; + biquadB[biq_aA2] = biquadB[biq_aB2]; + biquadB[biq_bA1] = biquadB[biq_bB1]; + biquadB[biq_bA2] = biquadB[biq_bB2]; + + biquadC[biq_aA0] = biquadC[biq_aB0]; + biquadC[biq_aA1] = biquadC[biq_aB1]; + biquadC[biq_aA2] = biquadC[biq_aB2]; + biquadC[biq_bA1] = biquadC[biq_bB1]; + biquadC[biq_bA2] = biquadC[biq_bB2]; + + biquadD[biq_aA0] = biquadD[biq_aB0]; + biquadD[biq_aA1] = biquadD[biq_aB1]; + biquadD[biq_aA2] = biquadD[biq_aB2]; + biquadD[biq_bA1] = biquadD[biq_bB1]; + biquadD[biq_bA2] = biquadD[biq_bB2]; + + biquadE[biq_aA0] = biquadE[biq_aB0]; + biquadE[biq_aA1] = biquadE[biq_aB1]; + biquadE[biq_aA2] = biquadE[biq_aB2]; + biquadE[biq_bA1] = biquadE[biq_bB1]; + biquadE[biq_bA2] = biquadE[biq_bB2]; + + biquadF[biq_aA0] = biquadF[biq_aB0]; + biquadF[biq_aA1] = biquadF[biq_aB1]; + biquadF[biq_aA2] = biquadF[biq_aB2]; + biquadF[biq_bA1] = biquadF[biq_bB1]; + biquadF[biq_bA2] = biquadF[biq_bB2]; + + biquadG[biq_aA0] = biquadG[biq_aB0]; + biquadG[biq_aA1] = biquadG[biq_aB1]; + biquadG[biq_aA2] = biquadG[biq_aB2]; + biquadG[biq_bA1] = biquadG[biq_bB1]; + biquadG[biq_bA2] = biquadG[biq_bB2]; + + hiquadA[biq_aA0] = hiquadA[biq_aB0]; + hiquadA[biq_aA1] = hiquadA[biq_aB1]; + hiquadA[biq_aA2] = hiquadA[biq_aB2]; + hiquadA[biq_bA1] = hiquadA[biq_bB1]; + hiquadA[biq_bA2] = hiquadA[biq_bB2]; + + hiquadB[biq_aA0] = hiquadB[biq_aB0]; + hiquadB[biq_aA1] = hiquadB[biq_aB1]; + hiquadB[biq_aA2] = hiquadB[biq_aB2]; + hiquadB[biq_bA1] = hiquadB[biq_bB1]; + hiquadB[biq_bA2] = hiquadB[biq_bB2]; + + hiquadC[biq_aA0] = hiquadC[biq_aB0]; + hiquadC[biq_aA1] = hiquadC[biq_aB1]; + hiquadC[biq_aA2] = hiquadC[biq_aB2]; + hiquadC[biq_bA1] = hiquadC[biq_bB1]; + hiquadC[biq_bA2] = hiquadC[biq_bB2]; + + hiquadD[biq_aA0] = hiquadD[biq_aB0]; + hiquadD[biq_aA1] = hiquadD[biq_aB1]; + hiquadD[biq_aA2] = hiquadD[biq_aB2]; + hiquadD[biq_bA1] = hiquadD[biq_bB1]; + hiquadD[biq_bA2] = hiquadD[biq_bB2]; + + hiquadE[biq_aA0] = hiquadE[biq_aB0]; + hiquadE[biq_aA1] = hiquadE[biq_aB1]; + hiquadE[biq_aA2] = hiquadE[biq_aB2]; + hiquadE[biq_bA1] = hiquadE[biq_bB1]; + hiquadE[biq_bA2] = hiquadE[biq_bB2]; + + hiquadF[biq_aA0] = hiquadF[biq_aB0]; + hiquadF[biq_aA1] = hiquadF[biq_aB1]; + hiquadF[biq_aA2] = hiquadF[biq_aB2]; + hiquadF[biq_bA1] = hiquadF[biq_bB1]; + hiquadF[biq_bA2] = hiquadF[biq_bB2]; + + hiquadG[biq_aA0] = hiquadG[biq_aB0]; + hiquadG[biq_aA1] = hiquadG[biq_aB1]; + hiquadG[biq_aA2] = hiquadG[biq_aB2]; + hiquadG[biq_bA1] = hiquadG[biq_bB1]; + hiquadG[biq_bA2] = hiquadG[biq_bB2]; + + //previous run through the buffer is still in the filter, so we move it + //to the A section and now it's the new starting point. + double K = tan(M_PI * biquadA[biq_freq]); + double norm = 1.0 / (1.0 + K / biquadA[biq_reso] + K * K); + biquadA[biq_aB0] = K * K * norm; + biquadA[biq_aB1] = 2.0 * biquadA[biq_aB0]; + biquadA[biq_aB2] = biquadA[biq_aB0]; + biquadA[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadA[biq_bB2] = (1.0 - K / biquadA[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadB[biq_freq]); + norm = 1.0 / (1.0 + K / biquadB[biq_reso] + K * K); + biquadB[biq_aB0] = K * K * norm; + biquadB[biq_aB1] = 2.0 * biquadB[biq_aB0]; + biquadB[biq_aB2] = biquadB[biq_aB0]; + biquadB[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadB[biq_bB2] = (1.0 - K / biquadB[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadC[biq_freq]); + norm = 1.0 / (1.0 + K / biquadC[biq_reso] + K * K); + biquadC[biq_aB0] = K * K * norm; + biquadC[biq_aB1] = 2.0 * biquadC[biq_aB0]; + biquadC[biq_aB2] = biquadC[biq_aB0]; + biquadC[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadC[biq_bB2] = (1.0 - K / biquadC[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadD[biq_freq]); + norm = 1.0 / (1.0 + K / biquadD[biq_reso] + K * K); + biquadD[biq_aB0] = K * K * norm; + biquadD[biq_aB1] = 2.0 * biquadD[biq_aB0]; + biquadD[biq_aB2] = biquadD[biq_aB0]; + biquadD[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadD[biq_bB2] = (1.0 - K / biquadD[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadE[biq_freq]); + norm = 1.0 / (1.0 + K / biquadE[biq_reso] + K * K); + biquadE[biq_aB0] = K * K * norm; + biquadE[biq_aB1] = 2.0 * biquadE[biq_aB0]; + biquadE[biq_aB2] = biquadE[biq_aB0]; + biquadE[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadE[biq_bB2] = (1.0 - K / biquadE[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadF[biq_freq]); + norm = 1.0 / (1.0 + K / biquadF[biq_reso] + K * K); + biquadF[biq_aB0] = K * K * norm; + biquadF[biq_aB1] = 2.0 * biquadF[biq_aB0]; + biquadF[biq_aB2] = biquadF[biq_aB0]; + biquadF[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadF[biq_bB2] = (1.0 - K / biquadF[biq_reso] + K * K) * norm; + + K = tan(M_PI * biquadG[biq_freq]); + norm = 1.0 / (1.0 + K / biquadG[biq_reso] + K * K); + biquadG[biq_aB0] = K * K * norm; + biquadG[biq_aB1] = 2.0 * biquadG[biq_aB0]; + biquadG[biq_aB2] = biquadG[biq_aB0]; + biquadG[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + biquadG[biq_bB2] = (1.0 - K / biquadG[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadA[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadA[biq_reso] + K * K); + hiquadA[biq_aB0] = K * K * norm; + hiquadA[biq_aB1] = 2.0 * hiquadA[biq_aB0]; + hiquadA[biq_aB2] = hiquadA[biq_aB0]; + hiquadA[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadA[biq_bB2] = (1.0 - K / hiquadA[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadB[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadB[biq_reso] + K * K); + hiquadB[biq_aB0] = K * K * norm; + hiquadB[biq_aB1] = 2.0 * hiquadB[biq_aB0]; + hiquadB[biq_aB2] = hiquadB[biq_aB0]; + hiquadB[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadB[biq_bB2] = (1.0 - K / hiquadB[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadC[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadC[biq_reso] + K * K); + hiquadC[biq_aB0] = K * K * norm; + hiquadC[biq_aB1] = 2.0 * hiquadC[biq_aB0]; + hiquadC[biq_aB2] = hiquadC[biq_aB0]; + hiquadC[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadC[biq_bB2] = (1.0 - K / hiquadC[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadD[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadD[biq_reso] + K * K); + hiquadD[biq_aB0] = K * K * norm; + hiquadD[biq_aB1] = 2.0 * hiquadD[biq_aB0]; + hiquadD[biq_aB2] = hiquadD[biq_aB0]; + hiquadD[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadD[biq_bB2] = (1.0 - K / hiquadD[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadE[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadE[biq_reso] + K * K); + hiquadE[biq_aB0] = K * K * norm; + hiquadE[biq_aB1] = 2.0 * hiquadE[biq_aB0]; + hiquadE[biq_aB2] = hiquadE[biq_aB0]; + hiquadE[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadE[biq_bB2] = (1.0 - K / hiquadE[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadF[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadF[biq_reso] + K * K); + hiquadF[biq_aB0] = K * K * norm; + hiquadF[biq_aB1] = 2.0 * hiquadF[biq_aB0]; + hiquadF[biq_aB2] = hiquadF[biq_aB0]; + hiquadF[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadF[biq_bB2] = (1.0 - K / hiquadF[biq_reso] + K * K) * norm; + + K = tan(M_PI * hiquadG[biq_freq]); + norm = 1.0 / (1.0 + K / hiquadG[biq_reso] + K * K); + hiquadG[biq_aB0] = K * K * norm; + hiquadG[biq_aB1] = 2.0 * hiquadG[biq_aB0]; + hiquadG[biq_aB2] = hiquadG[biq_aB0]; + hiquadG[biq_bB1] = 2.0 * (K * K - 1.0) * norm; + hiquadG[biq_bB2] = (1.0 - K / hiquadG[biq_reso] + K * K) * norm; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + double temp = (double)sampleFrames/inFramesToProcess; + + hiquadA[biq_a0] = (hiquadA[biq_aA0]*temp)+(hiquadA[biq_aB0]*(1.0-temp)); + hiquadA[biq_a1] = (hiquadA[biq_aA1]*temp)+(hiquadA[biq_aB1]*(1.0-temp)); + hiquadA[biq_a2] = (hiquadA[biq_aA2]*temp)+(hiquadA[biq_aB2]*(1.0-temp)); + hiquadA[biq_b1] = (hiquadA[biq_bA1]*temp)+(hiquadA[biq_bB1]*(1.0-temp)); + hiquadA[biq_b2] = (hiquadA[biq_bA2]*temp)+(hiquadA[biq_bB2]*(1.0-temp)); + + hiquadB[biq_a0] = (hiquadB[biq_aA0]*temp)+(hiquadB[biq_aB0]*(1.0-temp)); + hiquadB[biq_a1] = (hiquadB[biq_aA1]*temp)+(hiquadB[biq_aB1]*(1.0-temp)); + hiquadB[biq_a2] = (hiquadB[biq_aA2]*temp)+(hiquadB[biq_aB2]*(1.0-temp)); + hiquadB[biq_b1] = (hiquadB[biq_bA1]*temp)+(hiquadB[biq_bB1]*(1.0-temp)); + hiquadB[biq_b2] = (hiquadB[biq_bA2]*temp)+(hiquadB[biq_bB2]*(1.0-temp)); + + hiquadC[biq_a0] = (hiquadC[biq_aA0]*temp)+(hiquadC[biq_aB0]*(1.0-temp)); + hiquadC[biq_a1] = (hiquadC[biq_aA1]*temp)+(hiquadC[biq_aB1]*(1.0-temp)); + hiquadC[biq_a2] = (hiquadC[biq_aA2]*temp)+(hiquadC[biq_aB2]*(1.0-temp)); + hiquadC[biq_b1] = (hiquadC[biq_bA1]*temp)+(hiquadC[biq_bB1]*(1.0-temp)); + hiquadC[biq_b2] = (hiquadC[biq_bA2]*temp)+(hiquadC[biq_bB2]*(1.0-temp)); + + hiquadD[biq_a0] = (hiquadD[biq_aA0]*temp)+(hiquadD[biq_aB0]*(1.0-temp)); + hiquadD[biq_a1] = (hiquadD[biq_aA1]*temp)+(hiquadD[biq_aB1]*(1.0-temp)); + hiquadD[biq_a2] = (hiquadD[biq_aA2]*temp)+(hiquadD[biq_aB2]*(1.0-temp)); + hiquadD[biq_b1] = (hiquadD[biq_bA1]*temp)+(hiquadD[biq_bB1]*(1.0-temp)); + hiquadD[biq_b2] = (hiquadD[biq_bA2]*temp)+(hiquadD[biq_bB2]*(1.0-temp)); + + hiquadE[biq_a0] = (hiquadE[biq_aA0]*temp)+(hiquadE[biq_aB0]*(1.0-temp)); + hiquadE[biq_a1] = (hiquadE[biq_aA1]*temp)+(hiquadE[biq_aB1]*(1.0-temp)); + hiquadE[biq_a2] = (hiquadE[biq_aA2]*temp)+(hiquadE[biq_aB2]*(1.0-temp)); + hiquadE[biq_b1] = (hiquadE[biq_bA1]*temp)+(hiquadE[biq_bB1]*(1.0-temp)); + hiquadE[biq_b2] = (hiquadE[biq_bA2]*temp)+(hiquadE[biq_bB2]*(1.0-temp)); + + hiquadF[biq_a0] = (hiquadF[biq_aA0]*temp)+(hiquadF[biq_aB0]*(1.0-temp)); + hiquadF[biq_a1] = (hiquadF[biq_aA1]*temp)+(hiquadF[biq_aB1]*(1.0-temp)); + hiquadF[biq_a2] = (hiquadF[biq_aA2]*temp)+(hiquadF[biq_aB2]*(1.0-temp)); + hiquadF[biq_b1] = (hiquadF[biq_bA1]*temp)+(hiquadF[biq_bB1]*(1.0-temp)); + hiquadF[biq_b2] = (hiquadF[biq_bA2]*temp)+(hiquadF[biq_bB2]*(1.0-temp)); + + hiquadG[biq_a0] = (hiquadG[biq_aA0]*temp)+(hiquadG[biq_aB0]*(1.0-temp)); + hiquadG[biq_a1] = (hiquadG[biq_aA1]*temp)+(hiquadG[biq_aB1]*(1.0-temp)); + hiquadG[biq_a2] = (hiquadG[biq_aA2]*temp)+(hiquadG[biq_aB2]*(1.0-temp)); + hiquadG[biq_b1] = (hiquadG[biq_bA1]*temp)+(hiquadG[biq_bB1]*(1.0-temp)); + hiquadG[biq_b2] = (hiquadG[biq_bA2]*temp)+(hiquadG[biq_bB2]*(1.0-temp)); + //this is the interpolation code for the hiquad + + double outSample = (inputSampleL * hiquadA[biq_a0]) + hiquadA[biq_sL1]; + hiquadA[biq_sL1] = (inputSampleL * hiquadA[biq_a1]) - (outSample * hiquadA[biq_b1]) + hiquadA[biq_sL2]; + hiquadA[biq_sL2] = (inputSampleL * hiquadA[biq_a2]) - (outSample * hiquadA[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadA[biq_a0]) + hiquadA[biq_sR1]; + hiquadA[biq_sR1] = (inputSampleR * hiquadA[biq_a1]) - (outSample * hiquadA[biq_b1]) + hiquadA[biq_sR2]; + hiquadA[biq_sR2] = (inputSampleR * hiquadA[biq_a2]) - (outSample * hiquadA[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadB[biq_a0]) + hiquadB[biq_sL1]; + hiquadB[biq_sL1] = (inputSampleL * hiquadB[biq_a1]) - (outSample * hiquadB[biq_b1]) + hiquadB[biq_sL2]; + hiquadB[biq_sL2] = (inputSampleL * hiquadB[biq_a2]) - (outSample * hiquadB[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadB[biq_a0]) + hiquadB[biq_sR1]; + hiquadB[biq_sR1] = (inputSampleR * hiquadB[biq_a1]) - (outSample * hiquadB[biq_b1]) + hiquadB[biq_sR2]; + hiquadB[biq_sR2] = (inputSampleR * hiquadB[biq_a2]) - (outSample * hiquadB[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadC[biq_a0]) + hiquadC[biq_sL1]; + hiquadC[biq_sL1] = (inputSampleL * hiquadC[biq_a1]) - (outSample * hiquadC[biq_b1]) + hiquadC[biq_sL2]; + hiquadC[biq_sL2] = (inputSampleL * hiquadC[biq_a2]) - (outSample * hiquadC[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadC[biq_a0]) + hiquadC[biq_sR1]; + hiquadC[biq_sR1] = (inputSampleR * hiquadC[biq_a1]) - (outSample * hiquadC[biq_b1]) + hiquadC[biq_sR2]; + hiquadC[biq_sR2] = (inputSampleR * hiquadC[biq_a2]) - (outSample * hiquadC[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadD[biq_a0]) + hiquadD[biq_sL1]; + hiquadD[biq_sL1] = (inputSampleL * hiquadD[biq_a1]) - (outSample * hiquadD[biq_b1]) + hiquadD[biq_sL2]; + hiquadD[biq_sL2] = (inputSampleL * hiquadD[biq_a2]) - (outSample * hiquadD[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadD[biq_a0]) + hiquadD[biq_sR1]; + hiquadD[biq_sR1] = (inputSampleR * hiquadD[biq_a1]) - (outSample * hiquadD[biq_b1]) + hiquadD[biq_sR2]; + hiquadD[biq_sR2] = (inputSampleR * hiquadD[biq_a2]) - (outSample * hiquadD[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadE[biq_a0]) + hiquadE[biq_sL1]; + hiquadE[biq_sL1] = (inputSampleL * hiquadE[biq_a1]) - (outSample * hiquadE[biq_b1]) + hiquadE[biq_sL2]; + hiquadE[biq_sL2] = (inputSampleL * hiquadE[biq_a2]) - (outSample * hiquadE[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadE[biq_a0]) + hiquadE[biq_sR1]; + hiquadE[biq_sR1] = (inputSampleR * hiquadE[biq_a1]) - (outSample * hiquadE[biq_b1]) + hiquadE[biq_sR2]; + hiquadE[biq_sR2] = (inputSampleR * hiquadE[biq_a2]) - (outSample * hiquadE[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadF[biq_a0]) + hiquadF[biq_sL1]; + hiquadF[biq_sL1] = (inputSampleL * hiquadF[biq_a1]) - (outSample * hiquadF[biq_b1]) + hiquadF[biq_sL2]; + hiquadF[biq_sL2] = (inputSampleL * hiquadF[biq_a2]) - (outSample * hiquadF[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadF[biq_a0]) + hiquadF[biq_sR1]; + hiquadF[biq_sR1] = (inputSampleR * hiquadF[biq_a1]) - (outSample * hiquadF[biq_b1]) + hiquadF[biq_sR2]; + hiquadF[biq_sR2] = (inputSampleR * hiquadF[biq_a2]) - (outSample * hiquadF[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * hiquadG[biq_a0]) + hiquadG[biq_sL1]; + hiquadG[biq_sL1] = (inputSampleL * hiquadG[biq_a1]) - (outSample * hiquadG[biq_b1]) + hiquadG[biq_sL2]; + hiquadG[biq_sL2] = (inputSampleL * hiquadG[biq_a2]) - (outSample * hiquadG[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * hiquadG[biq_a0]) + hiquadG[biq_sR1]; + hiquadG[biq_sR1] = (inputSampleR * hiquadG[biq_a1]) - (outSample * hiquadG[biq_b1]) + hiquadG[biq_sR2]; + hiquadG[biq_sR2] = (inputSampleR * hiquadG[biq_a2]) - (outSample * hiquadG[biq_b2]); + inputSampleR = outSample; + + inputSampleL = (drySampleL - inputSampleL); + inputSampleR = (drySampleR - inputSampleR); + + biquadA[biq_a0] = (biquadA[biq_aA0]*temp)+(biquadA[biq_aB0]*(1.0-temp)); + biquadA[biq_a1] = (biquadA[biq_aA1]*temp)+(biquadA[biq_aB1]*(1.0-temp)); + biquadA[biq_a2] = (biquadA[biq_aA2]*temp)+(biquadA[biq_aB2]*(1.0-temp)); + biquadA[biq_b1] = (biquadA[biq_bA1]*temp)+(biquadA[biq_bB1]*(1.0-temp)); + biquadA[biq_b2] = (biquadA[biq_bA2]*temp)+(biquadA[biq_bB2]*(1.0-temp)); + + biquadB[biq_a0] = (biquadB[biq_aA0]*temp)+(biquadB[biq_aB0]*(1.0-temp)); + biquadB[biq_a1] = (biquadB[biq_aA1]*temp)+(biquadB[biq_aB1]*(1.0-temp)); + biquadB[biq_a2] = (biquadB[biq_aA2]*temp)+(biquadB[biq_aB2]*(1.0-temp)); + biquadB[biq_b1] = (biquadB[biq_bA1]*temp)+(biquadB[biq_bB1]*(1.0-temp)); + biquadB[biq_b2] = (biquadB[biq_bA2]*temp)+(biquadB[biq_bB2]*(1.0-temp)); + + biquadC[biq_a0] = (biquadC[biq_aA0]*temp)+(biquadC[biq_aB0]*(1.0-temp)); + biquadC[biq_a1] = (biquadC[biq_aA1]*temp)+(biquadC[biq_aB1]*(1.0-temp)); + biquadC[biq_a2] = (biquadC[biq_aA2]*temp)+(biquadC[biq_aB2]*(1.0-temp)); + biquadC[biq_b1] = (biquadC[biq_bA1]*temp)+(biquadC[biq_bB1]*(1.0-temp)); + biquadC[biq_b2] = (biquadC[biq_bA2]*temp)+(biquadC[biq_bB2]*(1.0-temp)); + + biquadD[biq_a0] = (biquadD[biq_aA0]*temp)+(biquadD[biq_aB0]*(1.0-temp)); + biquadD[biq_a1] = (biquadD[biq_aA1]*temp)+(biquadD[biq_aB1]*(1.0-temp)); + biquadD[biq_a2] = (biquadD[biq_aA2]*temp)+(biquadD[biq_aB2]*(1.0-temp)); + biquadD[biq_b1] = (biquadD[biq_bA1]*temp)+(biquadD[biq_bB1]*(1.0-temp)); + biquadD[biq_b2] = (biquadD[biq_bA2]*temp)+(biquadD[biq_bB2]*(1.0-temp)); + + biquadE[biq_a0] = (biquadE[biq_aA0]*temp)+(biquadE[biq_aB0]*(1.0-temp)); + biquadE[biq_a1] = (biquadE[biq_aA1]*temp)+(biquadE[biq_aB1]*(1.0-temp)); + biquadE[biq_a2] = (biquadE[biq_aA2]*temp)+(biquadE[biq_aB2]*(1.0-temp)); + biquadE[biq_b1] = (biquadE[biq_bA1]*temp)+(biquadE[biq_bB1]*(1.0-temp)); + biquadE[biq_b2] = (biquadE[biq_bA2]*temp)+(biquadE[biq_bB2]*(1.0-temp)); + + biquadF[biq_a0] = (biquadF[biq_aA0]*temp)+(biquadF[biq_aB0]*(1.0-temp)); + biquadF[biq_a1] = (biquadF[biq_aA1]*temp)+(biquadF[biq_aB1]*(1.0-temp)); + biquadF[biq_a2] = (biquadF[biq_aA2]*temp)+(biquadF[biq_aB2]*(1.0-temp)); + biquadF[biq_b1] = (biquadF[biq_bA1]*temp)+(biquadF[biq_bB1]*(1.0-temp)); + biquadF[biq_b2] = (biquadF[biq_bA2]*temp)+(biquadF[biq_bB2]*(1.0-temp)); + + biquadG[biq_a0] = (biquadG[biq_aA0]*temp)+(biquadG[biq_aB0]*(1.0-temp)); + biquadG[biq_a1] = (biquadG[biq_aA1]*temp)+(biquadG[biq_aB1]*(1.0-temp)); + biquadG[biq_a2] = (biquadG[biq_aA2]*temp)+(biquadG[biq_aB2]*(1.0-temp)); + biquadG[biq_b1] = (biquadG[biq_bA1]*temp)+(biquadG[biq_bB1]*(1.0-temp)); + biquadG[biq_b2] = (biquadG[biq_bA2]*temp)+(biquadG[biq_bB2]*(1.0-temp)); + //this is the interpolation code for the biquad + + outSample = (inputSampleL * biquadA[biq_a0]) + biquadA[biq_sL1]; + biquadA[biq_sL1] = (inputSampleL * biquadA[biq_a1]) - (outSample * biquadA[biq_b1]) + biquadA[biq_sL2]; + biquadA[biq_sL2] = (inputSampleL * biquadA[biq_a2]) - (outSample * biquadA[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadA[biq_a0]) + biquadA[biq_sR1]; + biquadA[biq_sR1] = (inputSampleR * biquadA[biq_a1]) - (outSample * biquadA[biq_b1]) + biquadA[biq_sR2]; + biquadA[biq_sR2] = (inputSampleR * biquadA[biq_a2]) - (outSample * biquadA[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadB[biq_a0]) + biquadB[biq_sL1]; + biquadB[biq_sL1] = (inputSampleL * biquadB[biq_a1]) - (outSample * biquadB[biq_b1]) + biquadB[biq_sL2]; + biquadB[biq_sL2] = (inputSampleL * biquadB[biq_a2]) - (outSample * biquadB[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadB[biq_a0]) + biquadB[biq_sR1]; + biquadB[biq_sR1] = (inputSampleR * biquadB[biq_a1]) - (outSample * biquadB[biq_b1]) + biquadB[biq_sR2]; + biquadB[biq_sR2] = (inputSampleR * biquadB[biq_a2]) - (outSample * biquadB[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadC[biq_a0]) + biquadC[biq_sL1]; + biquadC[biq_sL1] = (inputSampleL * biquadC[biq_a1]) - (outSample * biquadC[biq_b1]) + biquadC[biq_sL2]; + biquadC[biq_sL2] = (inputSampleL * biquadC[biq_a2]) - (outSample * biquadC[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadC[biq_a0]) + biquadC[biq_sR1]; + biquadC[biq_sR1] = (inputSampleR * biquadC[biq_a1]) - (outSample * biquadC[biq_b1]) + biquadC[biq_sR2]; + biquadC[biq_sR2] = (inputSampleR * biquadC[biq_a2]) - (outSample * biquadC[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadD[biq_a0]) + biquadD[biq_sL1]; + biquadD[biq_sL1] = (inputSampleL * biquadD[biq_a1]) - (outSample * biquadD[biq_b1]) + biquadD[biq_sL2]; + biquadD[biq_sL2] = (inputSampleL * biquadD[biq_a2]) - (outSample * biquadD[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadD[biq_a0]) + biquadD[biq_sR1]; + biquadD[biq_sR1] = (inputSampleR * biquadD[biq_a1]) - (outSample * biquadD[biq_b1]) + biquadD[biq_sR2]; + biquadD[biq_sR2] = (inputSampleR * biquadD[biq_a2]) - (outSample * biquadD[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadE[biq_a0]) + biquadE[biq_sL1]; + biquadE[biq_sL1] = (inputSampleL * biquadE[biq_a1]) - (outSample * biquadE[biq_b1]) + biquadE[biq_sL2]; + biquadE[biq_sL2] = (inputSampleL * biquadE[biq_a2]) - (outSample * biquadE[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadE[biq_a0]) + biquadE[biq_sR1]; + biquadE[biq_sR1] = (inputSampleR * biquadE[biq_a1]) - (outSample * biquadE[biq_b1]) + biquadE[biq_sR2]; + biquadE[biq_sR2] = (inputSampleR * biquadE[biq_a2]) - (outSample * biquadE[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadF[biq_a0]) + biquadF[biq_sL1]; + biquadF[biq_sL1] = (inputSampleL * biquadF[biq_a1]) - (outSample * biquadF[biq_b1]) + biquadF[biq_sL2]; + biquadF[biq_sL2] = (inputSampleL * biquadF[biq_a2]) - (outSample * biquadF[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadF[biq_a0]) + biquadF[biq_sR1]; + biquadF[biq_sR1] = (inputSampleR * biquadF[biq_a1]) - (outSample * biquadF[biq_b1]) + biquadF[biq_sR2]; + biquadF[biq_sR2] = (inputSampleR * biquadF[biq_a2]) - (outSample * biquadF[biq_b2]); + inputSampleR = outSample; + + outSample = (inputSampleL * biquadG[biq_a0]) + biquadG[biq_sL1]; + biquadG[biq_sL1] = (inputSampleL * biquadG[biq_a1]) - (outSample * biquadG[biq_b1]) + biquadG[biq_sL2]; + biquadG[biq_sL2] = (inputSampleL * biquadG[biq_a2]) - (outSample * biquadG[biq_b2]); + inputSampleL = outSample; + outSample = (inputSampleR * biquadG[biq_a0]) + biquadG[biq_sR1]; + biquadG[biq_sR1] = (inputSampleR * biquadG[biq_a1]) - (outSample * biquadG[biq_b1]) + biquadG[biq_sR2]; + biquadG[biq_sR2] = (inputSampleR * biquadG[biq_a2]) - (outSample * biquadG[biq_b2]); + inputSampleR = outSample; + + //begin ClipOnly2 stereo as a little, compressed chunk that can be dropped into code + if (inputSampleL > 4.0) inputSampleL = 4.0; if (inputSampleL < -4.0) inputSampleL = -4.0; + if (wasPosClipL == true) { //current will be over + if (inputSampleL0.9549925859) {wasPosClipL=true;inputSampleL=0.7058208+(lastSampleL*0.2609148);} + if (wasNegClipL == true) { //current will be -over + if (inputSampleL > lastSampleL) lastSampleL=-0.7058208+(inputSampleL*0.2609148); + else lastSampleL=-0.2491717+(lastSampleL*0.7390851); + } wasNegClipL = false; + if (inputSampleL<-0.9549925859) {wasNegClipL=true;inputSampleL=-0.7058208+(lastSampleL*0.2609148);} + intermediateL[spacing] = inputSampleL; + inputSampleL = lastSampleL; //Latency is however many samples equals one 44.1k sample + for (int x = spacing; x > 0; x--) intermediateL[x-1] = intermediateL[x]; + lastSampleL = intermediateL[0]; //run a little buffer to handle this + + if (inputSampleR > 4.0) inputSampleR = 4.0; if (inputSampleR < -4.0) inputSampleR = -4.0; + if (wasPosClipR == true) { //current will be over + if (inputSampleR0.9549925859) {wasPosClipR=true;inputSampleR=0.7058208+(lastSampleR*0.2609148);} + if (wasNegClipR == true) { //current will be -over + if (inputSampleR > lastSampleR) lastSampleR=-0.7058208+(inputSampleR*0.2609148); + else lastSampleR=-0.2491717+(lastSampleR*0.7390851); + } wasNegClipR = false; + if (inputSampleR<-0.9549925859) {wasNegClipR=true;inputSampleR=-0.7058208+(lastSampleR*0.2609148);} + intermediateR[spacing] = inputSampleR; + inputSampleR = lastSampleR; //Latency is however many samples equals one 44.1k sample + for (int x = spacing; x > 0; x--) intermediateR[x-1] = intermediateR[x]; + lastSampleR = intermediateR[0]; //run a little buffer to handle this + //end ClipOnly2 stereo as a little, compressed chunk that can be dropped into code + + //begin 64 bit stereo floating point dither + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} +} // end namespace diff --git a/src/autogen_airwin/ToTape7.cpp b/src/autogen_airwin/ToTape7.cpp index 409d37f..2ae9c8a 100644 --- a/src/autogen_airwin/ToTape7.cpp +++ b/src/autogen_airwin/ToTape7.cpp @@ -18,7 +18,7 @@ ToTape7::ToTape7(audioMasterCallback audioMaster) : A = 0.5; B = 0.5; C = 0.5; - D = 0.25; + D = 0.5; E = 0.5; F = 0.5; G = 0.5; diff --git a/src/autogen_airwin/ToTape7Proc.cpp b/src/autogen_airwin/ToTape7Proc.cpp index e1bb15d..17045e7 100644 --- a/src/autogen_airwin/ToTape7Proc.cpp +++ b/src/autogen_airwin/ToTape7Proc.cpp @@ -26,7 +26,7 @@ void ToTape7::processReplacing(float **inputs, float **outputs, VstInt32 sampleF double iirEncFreq = B/overallscale; double iirMidFreq = ((B * 0.618) + 0.382)/overallscale; double inputGain = pow(C*2.0,2.0); - double flutDepth = pow(D,5)*overallscale*60; + double flutDepth = pow(D,6)*overallscale*50; if (flutDepth > 498.0) flutDepth = 498.0; double flutFrequency = (0.02*pow(E,3))/overallscale; double bias = (F*2.0)-1.0; @@ -117,7 +117,13 @@ void ToTape7::processReplacing(float **inputs, float **outputs, VstInt32 sampleF int count = gcount; double offset = flutDepth + (flutDepth * sin(sweepL)); sweepL += nextmaxL * flutFrequency; - if (sweepL > (M_PI*2.0)) {sweepL -= M_PI*2.0; nextmaxL = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);} + if (sweepL > (M_PI*2.0)) { + sweepL -= M_PI*2.0; + double flutA = 0.24 + (fpdL / (double)UINT32_MAX * 0.74); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + double flutB = 0.24 + (fpdL / (double)UINT32_MAX * 0.74); + if (fabs(flutA-sin(sweepR+nextmaxR)) 999)?1000:0)] * (1-(offset-floor(offset)))); inputSampleL += (dL[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset))); @@ -125,7 +131,13 @@ void ToTape7::processReplacing(float **inputs, float **outputs, VstInt32 sampleF count = gcount; offset = flutDepth + (flutDepth * sin(sweepR)); sweepR += nextmaxR * flutFrequency; - if (sweepR > (M_PI*2.0)) {sweepR -= M_PI*2.0; nextmaxR = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);} + if (sweepR > (M_PI*2.0)) { + sweepR -= M_PI*2.0; + double flutA = 0.24 + (fpdR / (double)UINT32_MAX * 0.74); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + double flutB = 0.24 + (fpdR / (double)UINT32_MAX * 0.74); + if (fabs(flutA-sin(sweepL+nextmaxL)) 999)?1000:0)] * (1-(offset-floor(offset)))); inputSampleR += (dR[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset))); @@ -300,7 +312,7 @@ void ToTape7::processDoubleReplacing(double **inputs, double **outputs, VstInt32 double iirEncFreq = B/overallscale; double iirMidFreq = ((B * 0.618) + 0.382)/overallscale; double inputGain = pow(C*2.0,2.0); - double flutDepth = pow(D,5)*overallscale*60; + double flutDepth = pow(D,6)*overallscale*50; if (flutDepth > 498.0) flutDepth = 498.0; double flutFrequency = (0.02*pow(E,3))/overallscale; double bias = (F*2.0)-1.0; @@ -391,7 +403,13 @@ void ToTape7::processDoubleReplacing(double **inputs, double **outputs, VstInt32 int count = gcount; double offset = flutDepth + (flutDepth * sin(sweepL)); sweepL += nextmaxL * flutFrequency; - if (sweepL > (M_PI*2.0)) {sweepL -= M_PI*2.0; nextmaxL = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);} + if (sweepL > (M_PI*2.0)) { + sweepL -= M_PI*2.0; + double flutA = 0.24 + (fpdL / (double)UINT32_MAX * 0.74); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + double flutB = 0.24 + (fpdL / (double)UINT32_MAX * 0.74); + if (fabs(flutA-sin(sweepR+nextmaxR)) 999)?1000:0)] * (1-(offset-floor(offset)))); inputSampleL += (dL[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset))); @@ -399,7 +417,13 @@ void ToTape7::processDoubleReplacing(double **inputs, double **outputs, VstInt32 count = gcount; offset = flutDepth + (flutDepth * sin(sweepR)); sweepR += nextmaxR * flutFrequency; - if (sweepR > (M_PI*2.0)) {sweepR -= M_PI*2.0; nextmaxR = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);} + if (sweepR > (M_PI*2.0)) { + sweepR -= M_PI*2.0; + double flutA = 0.24 + (fpdR / (double)UINT32_MAX * 0.74); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + double flutB = 0.24 + (fpdR / (double)UINT32_MAX * 0.74); + if (fabs(flutA-sin(sweepL+nextmaxL)) 999)?1000:0)] * (1-(offset-floor(offset)))); inputSampleR += (dR[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset)));