Skip to content

Commit

Permalink
Update to Latest Airwin
Browse files Browse the repository at this point in the history
  • Loading branch information
baconpaul committed Oct 14, 2024
1 parent 061b973 commit 7c7a1c2
Show file tree
Hide file tree
Showing 13 changed files with 2,200 additions and 127 deletions.
2 changes: 1 addition & 1 deletion libs/airwindows
Submodule airwindows updated 245 files
15 changes: 15 additions & 0 deletions res/awpdoc/Galactic3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Galactic3 is exactly Galactic again, but with better undersampling.

This is always a bit tricky: I try to revisit my biggest hits and make them better. The last time I did that with Galactic, not only was it merely different, it had a bug that Galactic doesn't have: four variables that didn't get initialized properly. Galactic2 is now fixed and presumably bugless, and is still just 'different', a variation on what Galactic does.

Galactic3 is straight up better. Because it's exactly Galactic again… but instead of the linear interpolation it used to use (like CrunchCoat) for high sample rates, it's now using my new Bezier curve technique to interpolate, like kCathedral3 and CreamCoat.

First, that means it should have better tone at high sample rates. Second, in theory it should gracefully handle even really outrageous sample rates (Galactic will eventually start scaling the verb space down in size, Galactic3 won't). But most importantly, that means you have a Derez control like CreamCoat, except on the reverb engine of Galactic. So you have exactly the sounds of Galactic, but you can further undersample them for a cool 'reduce sample rate' effect… and in doing so, increase the reverb space in size. How much? To unreasonable size: galaxy-sized.

To use the new tone with the same apparent room size, decrease Bigness until the giant space is back to what you want again.

Galactic3 takes in audio (dry/wet control available) and uses the Replace control to determine how much of the new sound coming in should replace the space that’s currently there. Detune shifts the pitch for both channels (in a quadrature pitch shift arrangement that means maximum widening for each sound) and Brightness controls both the brightness going into, and coming out of, the reverb. Replace, Brightness and Detune are designed to be playable on the fly to make your ambient spaces or evolve them. Bigness is the reverb buffers, so you can still alter that but it will make crashing noises when you do (that will then become more infinite spaces). And Derez, the new addition, will snap the whole pitch of the reverb space up and down without otherwise glitching it, so in theory it's playable as well.

I think this one is really fun! As you can see it fits with my experimental-music aesthetic (didn’t even have to add Srsly2 on the end of it to make it superwide… though of course I could, and so can you). If you’re not quite that abstract, you can still use it on pads for more normal things. Just set Replace to a lot higher, set the Brightness and Bigness appropriately, and use Detune to chorus out your new huge enormous synth pad, or whatever else needs to have an unreasonably huge and wide stereo field. I’m pretty sure this can become your go-to for epic fields of reverb, no matter what’s meant to be causing them. And Derez adds darkening abilities beyond the scope of original Galactic. Honestly, I think I finally managed to make it better rather than just different. Let me know what you think :)


258 changes: 132 additions & 126 deletions src/ModuleAdd.h

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/autogen_airwin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ set(AIRWIN_SOURCES
src/autogen_airwin/GalacticProc.cpp
src/autogen_airwin/Galactic2.cpp
src/autogen_airwin/Galactic2Proc.cpp
src/autogen_airwin/Galactic3.cpp
src/autogen_airwin/Galactic3Proc.cpp
src/autogen_airwin/GalacticVibe.cpp
src/autogen_airwin/GalacticVibeProc.cpp
src/autogen_airwin/Gatelope.cpp
Expand Down Expand Up @@ -463,6 +465,8 @@ set(AIRWIN_SOURCES
src/autogen_airwin/MackEQProc.cpp
src/autogen_airwin/Mackity.cpp
src/autogen_airwin/MackityProc.cpp
src/autogen_airwin/Mastering.cpp
src/autogen_airwin/MasteringProc.cpp
src/autogen_airwin/MatrixVerb.cpp
src/autogen_airwin/MatrixVerbProc.cpp
src/autogen_airwin/Melt.cpp
Expand Down Expand Up @@ -815,6 +819,8 @@ set(AIRWIN_SOURCES
src/autogen_airwin/ZRegionProc.cpp
src/autogen_airwin/ZRegion2.cpp
src/autogen_airwin/ZRegion2Proc.cpp
src/autogen_airwin/Zoom.cpp
src/autogen_airwin/ZoomProc.cpp
src/autogen_airwin/curve.cpp
src/autogen_airwin/curveProc.cpp
src/autogen_airwin/kCathedral.cpp
Expand Down
204 changes: 204 additions & 0 deletions src/autogen_airwin/Galactic3.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
/* ========================================
* Galactic3 - Galactic3.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */

#ifndef __Galactic3_H
#include "Galactic3.h"
#endif
#include <cmath>
#include <algorithm>
namespace airwinconsolidated::Galactic3 {

AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Galactic3(audioMaster);}

Galactic3::Galactic3(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.5;
B = 0.5;
C = 0.5;
D = 1.0;
E = 1.0;
F = 1.0;

iirAL = 0.0; iirAR = 0.0;
iirBL = 0.0; iirBR = 0.0;

for(int count = 0; count < 6479; count++) {aIL[count] = 0.0;aIR[count] = 0.0;}
for(int count = 0; count < 3659; count++) {aJL[count] = 0.0;aJR[count] = 0.0;}
for(int count = 0; count < 1719; count++) {aKL[count] = 0.0;aKR[count] = 0.0;}
for(int count = 0; count < 679; count++) {aLL[count] = 0.0;aLR[count] = 0.0;}

for(int count = 0; count < 9699; count++) {aAL[count] = 0.0;aAR[count] = 0.0;}
for(int count = 0; count < 5999; count++) {aBL[count] = 0.0;aBR[count] = 0.0;}
for(int count = 0; count < 2319; count++) {aCL[count] = 0.0;aCR[count] = 0.0;}
for(int count = 0; count < 939; count++) {aDL[count] = 0.0;aDR[count] = 0.0;}

for(int count = 0; count < 15219; count++) {aEL[count] = 0.0;aER[count] = 0.0;}
for(int count = 0; count < 8459; count++) {aFL[count] = 0.0;aFR[count] = 0.0;}
for(int count = 0; count < 4539; count++) {aGL[count] = 0.0;aGR[count] = 0.0;}
for(int count = 0; count < 3199; count++) {aHL[count] = 0.0;aHR[count] = 0.0;}

for(int count = 0; count < 3110; count++) {aML[count] = aMR[count] = 0.0;}

feedbackAL = 0.0; feedbackAR = 0.0;
feedbackBL = 0.0; feedbackBR = 0.0;
feedbackCL = 0.0; feedbackCR = 0.0;
feedbackDL = 0.0; feedbackDR = 0.0;

countI = 1;
countJ = 1;
countK = 1;
countL = 1;

countA = 1;
countB = 1;
countC = 1;
countD = 1;

countE = 1;
countF = 1;
countG = 1;
countH = 1;
countM = 1;
//the predelay

vibM = 3.0;

oldfpd = 429496.7295;

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
}

Galactic3::~Galactic3() {}
VstInt32 Galactic3::getVendorVersion () {return 1000;}
void Galactic3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void Galactic3::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 Galactic3::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;
case kParamF: F = value; break;
default: break; // unknown parameter, shouldn't happen!
}
}

float Galactic3::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;
case kParamF: return F; 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 Galactic3::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Replace", kVstMaxParamStrLen); break;
case kParamB: vst_strncpy (text, "Brightns", kVstMaxParamStrLen); break;
case kParamC: vst_strncpy (text, "Detune", kVstMaxParamStrLen); break;
case kParamD: vst_strncpy (text, "Derez", kVstMaxParamStrLen); break;
case kParamE: vst_strncpy (text, "Bigness", kVstMaxParamStrLen); break;
case kParamF: 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 Galactic3::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
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;
case kParamF: float2string (F, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}

void Galactic3::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;
case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}

VstInt32 Galactic3::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know

bool Galactic3::getEffectName(char* name) {
vst_strncpy(name, "Galactic3", kVstMaxProductStrLen); return true;
}

VstPlugCategory Galactic3::getPlugCategory() {return kPlugCategEffect;}

bool Galactic3::getProductString(char* text) {
vst_strncpy (text, "airwindows Galactic3", kVstMaxProductStrLen); return true;
}

bool Galactic3::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}
bool Galactic3::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; }
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; }
case kParamF: { auto b = string2float(text, value); return b; break; }

}
return false;
}
bool Galactic3::canConvertParameterTextToValue(VstInt32 index) {
switch(index) {
case kParamA: return true;
case kParamB: return true;
case kParamC: return true;
case kParamD: return true;
case kParamE: return true;
case kParamF: return true;

}
return false;
}
} // end namespace
Loading

0 comments on commit 7c7a1c2

Please sign in to comment.