mirror of
https://github.com/airwindows/airwindows.git
synced 2026-05-21 06:46:21 -06:00
DubSub
This commit is contained in:
parent
5d51c52e34
commit
4be92c81e7
44 changed files with 14203 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ add_airwindows_plugin(Distance2)
|
|||
add_airwindows_plugin(Ditherbox)
|
||||
add_airwindows_plugin(DoublePaul)
|
||||
add_airwindows_plugin(DrumSlam)
|
||||
add_airwindows_plugin(DubSub)
|
||||
add_airwindows_plugin(ElectroHat)
|
||||
add_airwindows_plugin(Energy)
|
||||
add_airwindows_plugin(EQ)
|
||||
|
|
|
|||
287
plugins/LinuxVST/src/DubSub/DubSub.cpp
Executable file
287
plugins/LinuxVST/src/DubSub/DubSub.cpp
Executable file
|
|
@ -0,0 +1,287 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new DubSub(audioMaster);}
|
||||
|
||||
DubSub::DubSub(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.9;
|
||||
B = 0.5;
|
||||
C = 0.74;
|
||||
D = 1.0;
|
||||
E = 0.95;
|
||||
F = 0.5;
|
||||
G = 0.2;
|
||||
H = 0.2;
|
||||
I = 0.5;
|
||||
J = 1.0;
|
||||
|
||||
WasNegativeL = false;
|
||||
SubOctaveL = false;
|
||||
WasNegativeR = false;
|
||||
SubOctaveR = false;
|
||||
flip = false;
|
||||
bflip = 0;
|
||||
|
||||
iirDriveSampleAL = 0.0;
|
||||
iirDriveSampleBL = 0.0;
|
||||
iirDriveSampleCL = 0.0;
|
||||
iirDriveSampleDL = 0.0;
|
||||
iirDriveSampleEL = 0.0;
|
||||
iirDriveSampleFL = 0.0;
|
||||
iirDriveSampleAR = 0.0;
|
||||
iirDriveSampleBR = 0.0;
|
||||
iirDriveSampleCR = 0.0;
|
||||
iirDriveSampleDR = 0.0;
|
||||
iirDriveSampleER = 0.0;
|
||||
iirDriveSampleFR = 0.0;
|
||||
|
||||
iirHeadBumpAL = 0.0;
|
||||
iirHeadBumpBL = 0.0;
|
||||
iirHeadBumpCL = 0.0;
|
||||
iirHeadBumpAR = 0.0;
|
||||
iirHeadBumpBR = 0.0;
|
||||
iirHeadBumpCR = 0.0;
|
||||
|
||||
iirSubBumpAL = 0.0;
|
||||
iirSubBumpBL = 0.0;
|
||||
iirSubBumpCL = 0.0;
|
||||
iirSubBumpAR = 0.0;
|
||||
iirSubBumpBR = 0.0;
|
||||
iirSubBumpCR = 0.0;
|
||||
|
||||
lastHeadBumpL = 0.0;
|
||||
lastSubBumpL = 0.0;
|
||||
lastHeadBumpR = 0.0;
|
||||
lastSubBumpR = 0.0;
|
||||
|
||||
iirSampleAL = 0.0;
|
||||
iirSampleBL = 0.0;
|
||||
iirSampleCL = 0.0;
|
||||
iirSampleDL = 0.0;
|
||||
iirSampleEL = 0.0;
|
||||
iirSampleFL = 0.0;
|
||||
iirSampleGL = 0.0;
|
||||
iirSampleHL = 0.0;
|
||||
iirSampleIL = 0.0;
|
||||
iirSampleJL = 0.0;
|
||||
iirSampleKL = 0.0;
|
||||
iirSampleLL = 0.0;
|
||||
iirSampleML = 0.0;
|
||||
iirSampleNL = 0.0;
|
||||
iirSampleOL = 0.0;
|
||||
iirSamplePL = 0.0;
|
||||
iirSampleQL = 0.0;
|
||||
iirSampleRL = 0.0;
|
||||
iirSampleSL = 0.0;
|
||||
iirSampleTL = 0.0;
|
||||
iirSampleUL = 0.0;
|
||||
iirSampleVL = 0.0;
|
||||
iirSampleWL = 0.0;
|
||||
iirSampleXL = 0.0;
|
||||
iirSampleYL = 0.0;
|
||||
iirSampleZL = 0.0;
|
||||
iirSampleAR = 0.0;
|
||||
iirSampleBR = 0.0;
|
||||
iirSampleCR = 0.0;
|
||||
iirSampleDR = 0.0;
|
||||
iirSampleER = 0.0;
|
||||
iirSampleFR = 0.0;
|
||||
iirSampleGR = 0.0;
|
||||
iirSampleHR = 0.0;
|
||||
iirSampleIR = 0.0;
|
||||
iirSampleJR = 0.0;
|
||||
iirSampleKR = 0.0;
|
||||
iirSampleLR = 0.0;
|
||||
iirSampleMR = 0.0;
|
||||
iirSampleNR = 0.0;
|
||||
iirSampleOR = 0.0;
|
||||
iirSamplePR = 0.0;
|
||||
iirSampleQR = 0.0;
|
||||
iirSampleRR = 0.0;
|
||||
iirSampleSR = 0.0;
|
||||
iirSampleTR = 0.0;
|
||||
iirSampleUR = 0.0;
|
||||
iirSampleVR = 0.0;
|
||||
iirSampleWR = 0.0;
|
||||
iirSampleXR = 0.0;
|
||||
iirSampleYR = 0.0;
|
||||
iirSampleZR = 0.0;
|
||||
|
||||
oscGateL = 1.0;
|
||||
oscGateR = 1.0;
|
||||
|
||||
fpNShapeL = 0.0;
|
||||
fpNShapeR = 0.0;
|
||||
//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
|
||||
}
|
||||
|
||||
DubSub::~DubSub() {}
|
||||
VstInt32 DubSub::getVendorVersion () {return 1000;}
|
||||
void DubSub::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void DubSub::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;
|
||||
}
|
||||
|
||||
VstInt32 DubSub::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
chunkData[4] = E;
|
||||
chunkData[5] = F;
|
||||
chunkData[6] = G;
|
||||
chunkData[7] = H;
|
||||
chunkData[8] = I;
|
||||
chunkData[9] = J;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 DubSub::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
E = pinParameter(chunkData[4]);
|
||||
F = pinParameter(chunkData[5]);
|
||||
G = pinParameter(chunkData[6]);
|
||||
H = pinParameter(chunkData[7]);
|
||||
I = pinParameter(chunkData[8]);
|
||||
J = pinParameter(chunkData[9]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: G = value; break;
|
||||
case kParamH: H = value; break;
|
||||
case kParamI: I = value; break;
|
||||
case kParamJ: J = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float DubSub::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;
|
||||
case kParamG: return G; break;
|
||||
case kParamH: return H; break;
|
||||
case kParamI: return I; break;
|
||||
case kParamJ: return J; 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 DubSub::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "TGrind", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "Grd/Out", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "XOver", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "BsDrive", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "BsVoice", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "BassOut", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "SbDrive", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "SbVoice", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "SubOut", kVstMaxParamStrLen); break;
|
||||
case kParamJ: 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 DubSub::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string ((B*2.0)-1.0, 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*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamG: float2string (G, text, kVstMaxParamStrLen); break;
|
||||
case kParamH: float2string (H, text, kVstMaxParamStrLen); break;
|
||||
case kParamI: float2string ((I*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamJ: float2string (J, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 DubSub::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool DubSub::getEffectName(char* name) {
|
||||
vst_strncpy(name, "DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory DubSub::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool DubSub::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool DubSub::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
179
plugins/LinuxVST/src/DubSub/DubSub.h
Executable file
179
plugins/LinuxVST/src/DubSub/DubSub.h
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#define __DubSub_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA = 0,
|
||||
kParamB = 1,
|
||||
kParamC = 2,
|
||||
kParamD = 3,
|
||||
kParamE = 4,
|
||||
kParamF = 5,
|
||||
kParamG = 6,
|
||||
kParamH = 7,
|
||||
kParamI = 8,
|
||||
kParamJ = 9,
|
||||
kNumParameters = 10
|
||||
}; //
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'dbsb'; //Change this to what the AU identity is!
|
||||
|
||||
class DubSub :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
DubSub(audioMasterCallback audioMaster);
|
||||
~DubSub();
|
||||
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 VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
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
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
|
||||
private:
|
||||
double iirDriveSampleAL;
|
||||
double iirDriveSampleBL;
|
||||
double iirDriveSampleCL;
|
||||
double iirDriveSampleDL;
|
||||
double iirDriveSampleEL;
|
||||
double iirDriveSampleFL;
|
||||
double iirDriveSampleAR;
|
||||
double iirDriveSampleBR;
|
||||
double iirDriveSampleCR;
|
||||
double iirDriveSampleDR;
|
||||
double iirDriveSampleER;
|
||||
double iirDriveSampleFR;
|
||||
bool flip; //drive things
|
||||
|
||||
int bflip;
|
||||
bool WasNegativeL;
|
||||
bool SubOctaveL;
|
||||
bool WasNegativeR;
|
||||
bool SubOctaveR;
|
||||
|
||||
double iirHeadBumpAL;
|
||||
double iirHeadBumpBL;
|
||||
double iirHeadBumpCL;
|
||||
double iirHeadBumpAR;
|
||||
double iirHeadBumpBR;
|
||||
double iirHeadBumpCR;
|
||||
|
||||
double iirSubBumpAL;
|
||||
double iirSubBumpBL;
|
||||
double iirSubBumpCL;
|
||||
double iirSubBumpAR;
|
||||
double iirSubBumpBR;
|
||||
double iirSubBumpCR;
|
||||
|
||||
double lastHeadBumpL;
|
||||
double lastSubBumpL;
|
||||
double lastHeadBumpR;
|
||||
double lastSubBumpR;
|
||||
|
||||
double iirSampleAL;
|
||||
double iirSampleBL;
|
||||
double iirSampleCL;
|
||||
double iirSampleDL;
|
||||
double iirSampleEL;
|
||||
double iirSampleFL;
|
||||
double iirSampleGL;
|
||||
double iirSampleHL;
|
||||
double iirSampleIL;
|
||||
double iirSampleJL;
|
||||
double iirSampleKL;
|
||||
double iirSampleLL;
|
||||
double iirSampleML;
|
||||
double iirSampleNL;
|
||||
double iirSampleOL;
|
||||
double iirSamplePL;
|
||||
double iirSampleQL;
|
||||
double iirSampleRL;
|
||||
double iirSampleSL;
|
||||
double iirSampleTL;
|
||||
double iirSampleUL;
|
||||
double iirSampleVL;
|
||||
double iirSampleWL;
|
||||
double iirSampleXL;
|
||||
double iirSampleYL;
|
||||
double iirSampleZL;
|
||||
double iirSampleAR;
|
||||
double iirSampleBR;
|
||||
double iirSampleCR;
|
||||
double iirSampleDR;
|
||||
double iirSampleER;
|
||||
double iirSampleFR;
|
||||
double iirSampleGR;
|
||||
double iirSampleHR;
|
||||
double iirSampleIR;
|
||||
double iirSampleJR;
|
||||
double iirSampleKR;
|
||||
double iirSampleLR;
|
||||
double iirSampleMR;
|
||||
double iirSampleNR;
|
||||
double iirSampleOR;
|
||||
double iirSamplePR;
|
||||
double iirSampleQR;
|
||||
double iirSampleRR;
|
||||
double iirSampleSR;
|
||||
double iirSampleTR;
|
||||
double iirSampleUR;
|
||||
double iirSampleVR;
|
||||
double iirSampleWR;
|
||||
double iirSampleXR;
|
||||
double iirSampleYR;
|
||||
double iirSampleZR;
|
||||
|
||||
double oscGateL;
|
||||
double oscGateR;
|
||||
|
||||
|
||||
long double fpNShapeL;
|
||||
long double fpNShapeR;
|
||||
//default stuff
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
float G;
|
||||
float H;
|
||||
float I;
|
||||
float J;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
835
plugins/LinuxVST/src/DubSub/DubSubProc.cpp
Executable file
835
plugins/LinuxVST/src/DubSub/DubSubProc.cpp
Executable file
|
|
@ -0,0 +1,835 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = (B*2.0)-1.0;
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = (F*2.0)-1.0;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = (I*2.0)-1.0;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
long double drySampleL = inputSampleL;
|
||||
long double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 32-bit floating point
|
||||
float fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 32 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = pow(B,2);
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = pow(F,2) * 0.5;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = pow(I,2) * 0.45;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 64-bit floating point
|
||||
double fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 64 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
545
plugins/MacAU/DubSub/DubSub.cpp
Executable file
545
plugins/MacAU/DubSub/DubSub.cpp
Executable file
|
|
@ -0,0 +1,545 @@
|
|||
/*
|
||||
* File: DubSub.cpp
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 1/25/12
|
||||
*
|
||||
* Copyright: Copyright © 2012 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/*=============================================================================
|
||||
DubSub.cpp
|
||||
|
||||
=============================================================================*/
|
||||
#include "DubSub.h"
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
COMPONENT_ENTRY(DubSub)
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::DubSub
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
DubSub::DubSub(AudioUnit component)
|
||||
: AUEffectBase(component)
|
||||
{
|
||||
CreateElements();
|
||||
Globals()->UseIndexedParameters(kNumberOfParameters);
|
||||
SetParameter(kParam_One, kDefaultValue_ParamOne );
|
||||
SetParameter(kParam_Two, kDefaultValue_ParamTwo );
|
||||
SetParameter(kParam_Three, kDefaultValue_ParamThree );
|
||||
SetParameter(kParam_Four, kDefaultValue_ParamFour );
|
||||
SetParameter(kParam_Five, kDefaultValue_ParamFive );
|
||||
SetParameter(kParam_Six, kDefaultValue_ParamSix );
|
||||
SetParameter(kParam_Seven, kDefaultValue_ParamSeven );
|
||||
SetParameter(kParam_Eight, kDefaultValue_ParamEight );
|
||||
SetParameter(kParam_Nine, kDefaultValue_ParamNine );
|
||||
SetParameter(kParam_Ten, kDefaultValue_ParamTen );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::GetParameterValueStrings
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult DubSub::GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings)
|
||||
{
|
||||
|
||||
return kAudioUnitErr_InvalidProperty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::GetParameterInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult DubSub::GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo )
|
||||
{
|
||||
ComponentResult result = noErr;
|
||||
|
||||
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
|
||||
| kAudioUnitParameterFlag_IsReadable;
|
||||
|
||||
if (inScope == kAudioUnitScope_Global) {
|
||||
switch(inParameterID)
|
||||
{
|
||||
case kParam_One:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterOneName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamOne;
|
||||
break;
|
||||
case kParam_Two:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterTwoName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = -1.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamTwo;
|
||||
break;
|
||||
case kParam_Three:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterThreeName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamThree;
|
||||
break;
|
||||
case kParam_Four:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFourName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamFour;
|
||||
break;
|
||||
case kParam_Five:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFiveName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamFive;
|
||||
break;
|
||||
case kParam_Six:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterSixName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = -1.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamSix;
|
||||
break;
|
||||
case kParam_Seven:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterSevenName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamSeven;
|
||||
break;
|
||||
case kParam_Eight:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEightName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamEight;
|
||||
break;
|
||||
case kParam_Nine:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterNineName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = -1.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamNine;
|
||||
break;
|
||||
case kParam_Ten:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterTenName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamTen;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::GetPropertyInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult DubSub::GetPropertyInfo (AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable)
|
||||
{
|
||||
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::GetProperty
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult DubSub::GetProperty( AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData )
|
||||
{
|
||||
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
|
||||
}
|
||||
|
||||
// DubSub::Initialize
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult DubSub::Initialize()
|
||||
{
|
||||
ComponentResult result = AUEffectBase::Initialize();
|
||||
if (result == noErr)
|
||||
Reset(kAudioUnitScope_Global, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark ____DubSubEffectKernel
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::DubSubKernel::Reset()
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
void DubSub::DubSubKernel::Reset()
|
||||
{
|
||||
WasNegative = false;
|
||||
SubOctave = false;
|
||||
flip = false;
|
||||
bflip = 0;
|
||||
iirDriveSampleA = 0.0;
|
||||
iirDriveSampleB = 0.0;
|
||||
iirDriveSampleC = 0.0;
|
||||
iirDriveSampleD = 0.0;
|
||||
iirDriveSampleE = 0.0;
|
||||
iirDriveSampleF = 0.0;
|
||||
|
||||
iirHeadBumpA = 0.0;
|
||||
iirHeadBumpB = 0.0;
|
||||
iirHeadBumpC = 0.0;
|
||||
|
||||
iirSubBumpA = 0.0;
|
||||
iirSubBumpB = 0.0;
|
||||
iirSubBumpC = 0.0;
|
||||
|
||||
lastHeadBump = 0.0;
|
||||
lastSubBump = 0.0;
|
||||
|
||||
iirSampleA = 0.0;
|
||||
iirSampleB = 0.0;
|
||||
iirSampleC = 0.0;
|
||||
iirSampleD = 0.0;
|
||||
iirSampleE = 0.0;
|
||||
iirSampleF = 0.0;
|
||||
iirSampleG = 0.0;
|
||||
iirSampleH = 0.0;
|
||||
iirSampleI = 0.0;
|
||||
iirSampleJ = 0.0;
|
||||
iirSampleK = 0.0;
|
||||
iirSampleL = 0.0;
|
||||
iirSampleM = 0.0;
|
||||
iirSampleN = 0.0;
|
||||
iirSampleO = 0.0;
|
||||
iirSampleP = 0.0;
|
||||
iirSampleQ = 0.0;
|
||||
iirSampleR = 0.0;
|
||||
iirSampleS = 0.0;
|
||||
iirSampleT = 0.0;
|
||||
iirSampleU = 0.0;
|
||||
iirSampleV = 0.0;
|
||||
iirSampleW = 0.0;
|
||||
iirSampleX = 0.0;
|
||||
iirSampleY = 0.0;
|
||||
iirSampleZ = 0.0;
|
||||
|
||||
oscGate = 1.0;
|
||||
|
||||
fpNShape = 0.0;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// DubSub::DubSubKernel::Process
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
void DubSub::DubSubKernel::Process( const Float32 *inSourceP,
|
||||
Float32 *inDestP,
|
||||
UInt32 inFramesToProcess,
|
||||
UInt32 inNumChannels,
|
||||
bool &ioSilence )
|
||||
{
|
||||
UInt32 nSampleFrames = inFramesToProcess;
|
||||
const Float32 *sourceP = inSourceP;
|
||||
Float32 *destP = inDestP;
|
||||
Float64 overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
Float64 driveone = pow(GetParameter( kParam_One )*3.0,2);
|
||||
Float64 driveoutput = GetParameter( kParam_Two );
|
||||
Float64 iirAmount = ((GetParameter( kParam_Three )*0.33)+0.1)/overallscale;
|
||||
Float64 ataLowpass;
|
||||
Float64 randy;
|
||||
Float64 invrandy;
|
||||
Float64 HeadBump = 0.0;
|
||||
Float64 BassGain = GetParameter( kParam_Four ) * 0.1;
|
||||
Float64 HeadBumpFreq = ((GetParameter( kParam_Five )*0.1)+0.0001)/overallscale;
|
||||
Float64 iirBmount = HeadBumpFreq/44.1;
|
||||
Float64 altBmount = 1.0 - iirBmount;
|
||||
Float64 BassOutGain = GetParameter( kParam_Six );
|
||||
Float64 SubBump = 0.0;
|
||||
Float64 SubGain = GetParameter( kParam_Seven ) * 0.1;
|
||||
Float64 SubBumpFreq = ((GetParameter( kParam_Eight )*0.1)+0.0001)/overallscale;
|
||||
Float64 iirCmount = SubBumpFreq/44.1;
|
||||
Float64 altCmount = 1.0 - iirCmount;
|
||||
Float64 SubOutGain = GetParameter( kParam_Nine );
|
||||
Float64 clamp = 0.0;
|
||||
Float64 out;
|
||||
Float64 fuzz = 0.111;
|
||||
Float64 wet = GetParameter( kParam_Ten );
|
||||
Float64 dry = 1.0-wet;
|
||||
Float64 glitch = 0.60;
|
||||
Float64 tempSample;
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
long double inputSample = *sourceP;
|
||||
|
||||
static int noisesource = 0;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
noisesource = noisesource % 1700021; noisesource++;
|
||||
residue = noisesource * noisesource;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSample += applyresidue;
|
||||
if (inputSample<1.2e-38 && -inputSample<1.2e-38) {
|
||||
inputSample -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it again. We want a 'air' hiss
|
||||
long double drySample = inputSample;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGate += fabs(inputSample * 10.0);
|
||||
oscGate -= 0.001;
|
||||
if (oscGate > 1.0) oscGate = 1.0;
|
||||
if (oscGate < 0) oscGate = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clamp = 1.0-oscGate;
|
||||
clamp *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSample = inputSample;
|
||||
iirDriveSampleA = (iirDriveSampleA * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleA;
|
||||
iirDriveSampleC = (iirDriveSampleC * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleC;
|
||||
iirDriveSampleE = (iirDriveSampleE * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleE;
|
||||
ataLowpass = tempSample - inputSample;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSample = inputSample;
|
||||
iirDriveSampleB = (iirDriveSampleB * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleB;
|
||||
iirDriveSampleD = (iirDriveSampleD * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleD;
|
||||
iirDriveSampleF = (iirDriveSampleF * (1 - iirAmount)) + (inputSample * iirAmount);
|
||||
inputSample -= iirDriveSampleF;
|
||||
ataLowpass = tempSample - inputSample;
|
||||
}
|
||||
//highpass section
|
||||
if (inputSample > 1.0) {inputSample = 1.0;}
|
||||
if (inputSample < -1.0) {inputSample = -1.0;}
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSample -= (inputSample * (fabs(inputSample) * glitch) * (fabs(inputSample) * glitch) );
|
||||
inputSample *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSample -= (inputSample * (fabs(inputSample) * out) * (fabs(inputSample) * out) );
|
||||
inputSample *= (1.0+out);
|
||||
|
||||
if (ataLowpass > 0)
|
||||
{if (WasNegative){SubOctave = not SubOctave;} WasNegative = false;}
|
||||
else {WasNegative = true;}
|
||||
//set up polarities for sub-bass version
|
||||
randy = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandy = (1.0-randy);
|
||||
randy /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleA = (iirSampleA * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleA;
|
||||
iirSampleB = (iirSampleB * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleB;
|
||||
iirSampleC = (iirSampleC * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleC;
|
||||
iirSampleD = (iirSampleD * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleD;
|
||||
iirSampleE = (iirSampleE * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleE;
|
||||
iirSampleF = (iirSampleF * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleF;
|
||||
iirSampleG = (iirSampleG * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleG;
|
||||
iirSampleH = (iirSampleH * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleH;
|
||||
iirSampleI = (iirSampleI * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleI;
|
||||
iirSampleJ = (iirSampleJ * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleJ;
|
||||
iirSampleK = (iirSampleK * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleK;
|
||||
iirSampleL = (iirSampleL * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleL;
|
||||
iirSampleM = (iirSampleM * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleM;
|
||||
iirSampleN = (iirSampleN * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleN;
|
||||
iirSampleO = (iirSampleO * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleO;
|
||||
iirSampleP = (iirSampleP * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleP;
|
||||
iirSampleQ = (iirSampleQ * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleQ;
|
||||
iirSampleR = (iirSampleR * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleR;
|
||||
iirSampleS = (iirSampleS * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleS;
|
||||
iirSampleT = (iirSampleT * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleT;
|
||||
iirSampleU = (iirSampleU * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleU;
|
||||
iirSampleV = (iirSampleV * altBmount) + (ataLowpass * iirBmount); ataLowpass -= iirSampleV;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpA += (ataLowpass * BassGain);
|
||||
iirHeadBumpA -= (iirHeadBumpA * iirHeadBumpA * iirHeadBumpA * HeadBumpFreq);
|
||||
iirHeadBumpA = (invrandy * iirHeadBumpA) + (randy * iirHeadBumpB) + (randy * iirHeadBumpC);
|
||||
if (iirHeadBumpA > 0) iirHeadBumpA -= clamp;
|
||||
if (iirHeadBumpA < 0) iirHeadBumpA += clamp;
|
||||
HeadBump = iirHeadBumpA;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpB += (ataLowpass * BassGain);
|
||||
iirHeadBumpB -= (iirHeadBumpB * iirHeadBumpB * iirHeadBumpB * HeadBumpFreq);
|
||||
iirHeadBumpB = (randy * iirHeadBumpA) + (invrandy * iirHeadBumpB) + (randy * iirHeadBumpC);
|
||||
if (iirHeadBumpB > 0) iirHeadBumpB -= clamp;
|
||||
if (iirHeadBumpB < 0) iirHeadBumpB += clamp;
|
||||
HeadBump = iirHeadBumpB;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpC += (ataLowpass * BassGain);
|
||||
iirHeadBumpC -= (iirHeadBumpC * iirHeadBumpC * iirHeadBumpC * HeadBumpFreq);
|
||||
iirHeadBumpC = (randy * iirHeadBumpA) + (randy * iirHeadBumpB) + (invrandy * iirHeadBumpC);
|
||||
if (iirHeadBumpC > 0) iirHeadBumpC -= clamp;
|
||||
if (iirHeadBumpC < 0) iirHeadBumpC += clamp;
|
||||
HeadBump = iirHeadBumpC;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleW = (iirSampleW * altBmount) + (HeadBump * iirBmount); HeadBump -= iirSampleW;
|
||||
iirSampleX = (iirSampleX * altBmount) + (HeadBump * iirBmount); HeadBump -= iirSampleX;
|
||||
|
||||
SubBump = HeadBump;
|
||||
iirSampleY = (iirSampleY * altCmount) + (SubBump * iirCmount); SubBump -= iirSampleY;
|
||||
|
||||
SubBump = fabs(SubBump);
|
||||
if (SubOctave == false) {SubBump = -SubBump;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpA += (SubBump * SubGain);
|
||||
iirSubBumpA -= (iirSubBumpA * iirSubBumpA * iirSubBumpA * SubBumpFreq);
|
||||
iirSubBumpA = (invrandy * iirSubBumpA) + (randy * iirSubBumpB) + (randy * iirSubBumpC);
|
||||
if (iirSubBumpA > 0) iirSubBumpA -= clamp;
|
||||
if (iirSubBumpA < 0) iirSubBumpA += clamp;
|
||||
SubBump = iirSubBumpA;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpB += (SubBump * SubGain);
|
||||
iirSubBumpB -= (iirSubBumpB * iirSubBumpB * iirSubBumpB * SubBumpFreq);
|
||||
iirSubBumpB = (randy * iirSubBumpA) + (invrandy * iirSubBumpB) + (randy * iirSubBumpC);
|
||||
if (iirSubBumpB > 0) iirSubBumpB -= clamp;
|
||||
if (iirSubBumpB < 0) iirSubBumpB += clamp;
|
||||
SubBump = iirSubBumpB;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpC += (SubBump * SubGain);
|
||||
iirSubBumpC -= (iirSubBumpC * iirSubBumpC * iirSubBumpC * SubBumpFreq);
|
||||
iirSubBumpC = (randy * iirSubBumpA) + (randy * iirSubBumpB) + (invrandy * iirSubBumpC);
|
||||
if (iirSubBumpC > 0) iirSubBumpC -= clamp;
|
||||
if (iirSubBumpC < 0) iirSubBumpC += clamp;
|
||||
SubBump = iirSubBumpC;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZ = (iirSampleZ * altCmount) + (SubBump * iirCmount); SubBump -= iirSampleZ;
|
||||
|
||||
inputSample *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSample += ((HeadBump + lastHeadBump) * BassOutGain);
|
||||
inputSample += ((SubBump + lastSubBump) * SubOutGain);
|
||||
|
||||
lastHeadBump = HeadBump;
|
||||
lastSubBump = SubBump;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSample = (inputSample * wet) + (drySample * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
|
||||
//noise shaping to 32-bit floating point
|
||||
Float32 fpTemp = inputSample;
|
||||
fpNShape += (inputSample-fpTemp);
|
||||
inputSample += fpNShape;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 32 bit output
|
||||
|
||||
*destP = inputSample;
|
||||
|
||||
sourceP += inNumChannels; destP += inNumChannels;
|
||||
}
|
||||
fpNShape *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
1
plugins/MacAU/DubSub/DubSub.exp
Executable file
1
plugins/MacAU/DubSub/DubSub.exp
Executable file
|
|
@ -0,0 +1 @@
|
|||
_DubSubEntry
|
||||
212
plugins/MacAU/DubSub/DubSub.h
Executable file
212
plugins/MacAU/DubSub/DubSub.h
Executable file
|
|
@ -0,0 +1,212 @@
|
|||
/*
|
||||
* File: DubSub.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 1/25/12
|
||||
*
|
||||
* Copyright: Copyright © 2012 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "AUEffectBase.h"
|
||||
#include "DubSubVersion.h"
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
#include "AUDebugDispatcher.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __DubSub_h__
|
||||
#define __DubSub_h__
|
||||
|
||||
|
||||
#pragma mark ____DubSub Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamOne = 0.9;
|
||||
static const float kDefaultValue_ParamTwo = 0.33;
|
||||
static const float kDefaultValue_ParamThree = 0.74;
|
||||
static const float kDefaultValue_ParamFour = 1.0;
|
||||
static const float kDefaultValue_ParamFive = 0.95;
|
||||
static const float kDefaultValue_ParamSix = 0.49;
|
||||
static const float kDefaultValue_ParamSeven = 0.2;
|
||||
static const float kDefaultValue_ParamEight = 0.2;
|
||||
static const float kDefaultValue_ParamNine = 0.0;
|
||||
static const float kDefaultValue_ParamTen = 1.0;
|
||||
|
||||
static CFStringRef kParameterOneName = CFSTR("Treble Grind");
|
||||
static CFStringRef kParameterTwoName = CFSTR("Grind Inv/Out");
|
||||
static CFStringRef kParameterThreeName = CFSTR("Crossover");
|
||||
static CFStringRef kParameterFourName = CFSTR("Bass Drive");
|
||||
static CFStringRef kParameterFiveName = CFSTR("Bass Voicing");
|
||||
static CFStringRef kParameterSixName = CFSTR("Bass Inv/Out");
|
||||
static CFStringRef kParameterSevenName = CFSTR("Sub Drive");
|
||||
static CFStringRef kParameterEightName = CFSTR("Sub Voicing");
|
||||
static CFStringRef kParameterNineName = CFSTR("Sub Inv/Out");
|
||||
static CFStringRef kParameterTenName = CFSTR("Dry/Wet");
|
||||
//Alter the name if desired, but using the plugin name is a start
|
||||
|
||||
enum {
|
||||
kParam_One =0,
|
||||
kParam_Two =1,
|
||||
kParam_Three =2,
|
||||
kParam_Four =3,
|
||||
kParam_Five =4,
|
||||
kParam_Six =5,
|
||||
kParam_Seven =6,
|
||||
kParam_Eight =7,
|
||||
kParam_Nine =8,
|
||||
kParam_Ten =9,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=10
|
||||
};
|
||||
|
||||
#pragma mark ____DubSub
|
||||
class DubSub : public AUEffectBase
|
||||
{
|
||||
public:
|
||||
DubSub(AudioUnit component);
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
virtual ~DubSub () { delete mDebugDispatcher; }
|
||||
#endif
|
||||
|
||||
virtual AUKernelBase * NewKernel() { return new DubSubKernel(this); }
|
||||
|
||||
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings);
|
||||
|
||||
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo);
|
||||
|
||||
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable );
|
||||
|
||||
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData);
|
||||
|
||||
virtual ComponentResult Initialize();
|
||||
virtual bool SupportsTail () { return true; }
|
||||
virtual Float64 GetTailTime() {return 0.0;} //in SECONDS!
|
||||
virtual Float64 GetLatency() {return 0.0;} // in SECONDS!
|
||||
|
||||
/*! @method Version */
|
||||
virtual ComponentResult Version() { return kDubSubVersion; }
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
class DubSubKernel : public AUKernelBase // most of the real work happens here
|
||||
{
|
||||
public:
|
||||
DubSubKernel(AUEffectBase *inAudioUnit )
|
||||
: AUKernelBase(inAudioUnit)
|
||||
{
|
||||
}
|
||||
|
||||
// *Required* overides for the process method for this effect
|
||||
// processes one channel of interleaved samples
|
||||
virtual void Process( const Float32 *inSourceP,
|
||||
Float32 *inDestP,
|
||||
UInt32 inFramesToProcess,
|
||||
UInt32 inNumChannels,
|
||||
bool &ioSilence);
|
||||
|
||||
virtual void Reset();
|
||||
|
||||
private:
|
||||
Float64 iirDriveSampleA;
|
||||
Float64 iirDriveSampleB;
|
||||
Float64 iirDriveSampleC;
|
||||
Float64 iirDriveSampleD;
|
||||
Float64 iirDriveSampleE;
|
||||
Float64 iirDriveSampleF;
|
||||
bool flip; //drive things
|
||||
|
||||
int bflip;
|
||||
bool WasNegative;
|
||||
bool SubOctave;
|
||||
Float64 iirHeadBumpA;
|
||||
Float64 iirHeadBumpB;
|
||||
Float64 iirHeadBumpC;
|
||||
|
||||
Float64 iirSubBumpA;
|
||||
Float64 iirSubBumpB;
|
||||
Float64 iirSubBumpC;
|
||||
|
||||
Float64 lastHeadBump;
|
||||
Float64 lastSubBump;
|
||||
|
||||
Float64 iirSampleA;
|
||||
Float64 iirSampleB;
|
||||
Float64 iirSampleC;
|
||||
Float64 iirSampleD;
|
||||
Float64 iirSampleE;
|
||||
Float64 iirSampleF;
|
||||
Float64 iirSampleG;
|
||||
Float64 iirSampleH;
|
||||
Float64 iirSampleI;
|
||||
Float64 iirSampleJ;
|
||||
Float64 iirSampleK;
|
||||
Float64 iirSampleL;
|
||||
Float64 iirSampleM;
|
||||
Float64 iirSampleN;
|
||||
Float64 iirSampleO;
|
||||
Float64 iirSampleP;
|
||||
Float64 iirSampleQ;
|
||||
Float64 iirSampleR;
|
||||
Float64 iirSampleS;
|
||||
Float64 iirSampleT;
|
||||
Float64 iirSampleU;
|
||||
Float64 iirSampleV;
|
||||
Float64 iirSampleW;
|
||||
Float64 iirSampleX;
|
||||
Float64 iirSampleY;
|
||||
Float64 iirSampleZ;
|
||||
Float64 oscGate;
|
||||
|
||||
long double fpNShape;
|
||||
};
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
61
plugins/MacAU/DubSub/DubSub.r
Executable file
61
plugins/MacAU/DubSub/DubSub.r
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* File: DubSub.r
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 1/25/12
|
||||
*
|
||||
* Copyright: Copyright © 2012 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <AudioUnit/AudioUnit.r>
|
||||
|
||||
#include "DubSubVersion.h"
|
||||
|
||||
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
|
||||
#define kAudioUnitResID_DubSub 1000
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DubSub~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#define RES_ID kAudioUnitResID_DubSub
|
||||
#define COMP_TYPE kAudioUnitType_Effect
|
||||
#define COMP_SUBTYPE DubSub_COMP_SUBTYPE
|
||||
#define COMP_MANUF DubSub_COMP_MANF
|
||||
|
||||
#define VERSION kDubSubVersion
|
||||
#define NAME "Airwindows: DubSub"
|
||||
#define DESCRIPTION "DubSub AU"
|
||||
#define ENTRY_POINT "DubSubEntry"
|
||||
|
||||
#include "AUResources.r"
|
||||
1371
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.mode1v3
Executable file
1371
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
140
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.pbxuser
Executable file
140
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,140 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* DubSub */;
|
||||
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
301,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 560565055;
|
||||
PBXWorkspaceStateSaveDate = 560565055;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B42FE3E21698BC50092969A /* PBXTextBookmark */ = 8B42FE3E21698BC50092969A /* PBXTextBookmark */;
|
||||
8B42FE3F21698BC50092969A /* PBXTextBookmark */ = 8B42FE3F21698BC50092969A /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B42FE3E21698BC50092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* DubSub.cpp */;
|
||||
name = "DubSub.cpp: 521";
|
||||
rLen = 0;
|
||||
rLoc = 22045;
|
||||
rType = 0;
|
||||
vrLen = 160;
|
||||
vrLoc = 21949;
|
||||
};
|
||||
8B42FE3F21698BC50092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* DubSub.cpp */;
|
||||
name = "DubSub.cpp: 521";
|
||||
rLen = 0;
|
||||
rLoc = 22045;
|
||||
rType = 0;
|
||||
vrLen = 160;
|
||||
vrLoc = 21915;
|
||||
};
|
||||
8BA05A660720730100365D66 /* DubSub.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {663, 7241}}";
|
||||
sepNavSelRange = "{22045, 0}";
|
||||
sepNavVisRange = "{21915, 160}";
|
||||
sepNavWindowFrame = "{{749, 66}, {1145, 812}}";
|
||||
};
|
||||
};
|
||||
8BA05A670720730100365D66 /* DubSub.exp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1098, 684}}";
|
||||
sepNavSelRange = "{13, 0}";
|
||||
sepNavVisRange = "{0, 13}";
|
||||
sepNavWindowFrame = "{{15, 61}, {1145, 812}}";
|
||||
};
|
||||
};
|
||||
8BA05A680720730100365D66 /* DubSub.r */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1086, 684}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 3192}";
|
||||
sepNavWindowFrame = "{{15, 61}, {1145, 812}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* DubSubVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1098, 767}}";
|
||||
sepNavSelRange = "{2869, 0}";
|
||||
sepNavVisRange = "{68, 2869}";
|
||||
sepNavWindowFrame = "{{295, 66}, {1145, 812}}";
|
||||
};
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* DubSub.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {824, 2392}}";
|
||||
sepNavSelRange = "{3332, 0}";
|
||||
sepNavVisRange = "{2519, 1677}";
|
||||
sepNavWindowFrame = "{{832, 72}, {608, 806}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8BD3CCB9148830B20062E48C /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* DubSub */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1484
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.perspectivev3
Executable file
1484
plugins/MacAU/DubSub/DubSub.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
490
plugins/MacAU/DubSub/DubSub.xcodeproj/project.pbxproj
Executable file
490
plugins/MacAU/DubSub/DubSub.xcodeproj/project.pbxproj
Executable file
|
|
@ -0,0 +1,490 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
|
||||
8B4119B70749654200361ABE /* DubSub.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* DubSub.r */; };
|
||||
8BA05A6B0720730100365D66 /* DubSub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* DubSub.cpp */; };
|
||||
8BA05A6E0720730100365D66 /* DubSubVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* DubSubVersion.h */; };
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; };
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; };
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; };
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; };
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; };
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; };
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; };
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; };
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; };
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; };
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; };
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; };
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; };
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; };
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; };
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; };
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; };
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; };
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; };
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; };
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; };
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; };
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; };
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; };
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; };
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; };
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; };
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; };
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; };
|
||||
8BC6025C073B072D006C4272 /* DubSub.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* DubSub.h */; };
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; };
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
8BA05A660720730100365D66 /* DubSub.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DubSub.cpp; sourceTree = "<group>"; };
|
||||
8BA05A670720730100365D66 /* DubSub.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = DubSub.exp; sourceTree = "<group>"; };
|
||||
8BA05A680720730100365D66 /* DubSub.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = DubSub.r; sourceTree = "<group>"; };
|
||||
8BA05A690720730100365D66 /* DubSubVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DubSubVersion.h; sourceTree = "<group>"; };
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = "<group>"; };
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = "<group>"; };
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
|
||||
8BC6025B073B072D006C4272 /* DubSub.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DubSub.h; sourceTree = "<group>"; };
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D01CCD20486CAD60068D4B7 /* DubSub.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DubSub.component; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* DubSub */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77ADFE841716C02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */,
|
||||
);
|
||||
name = DubSub;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */,
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */,
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77ADFE841716C02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A56072072A900365D66 /* AU Source */,
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */,
|
||||
8BA05A7D072073D200365D66 /* AUPublic */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD20486CAD60068D4B7 /* DubSub.component */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A56072072A900365D66 /* AU Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC6025B073B072D006C4272 /* DubSub.h */,
|
||||
8BA05A660720730100365D66 /* DubSub.cpp */,
|
||||
8BA05A670720730100365D66 /* DubSub.exp */,
|
||||
8BA05A680720730100365D66 /* DubSub.r */,
|
||||
8BA05A690720730100365D66 /* DubSubVersion.h */,
|
||||
);
|
||||
name = "AU Source";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A7D072073D200365D66 /* AUPublic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7E072073D200365D66 /* AUBase */,
|
||||
8BA05A99072073D200365D66 /* OtherBases */,
|
||||
8BA05AA6072073D200365D66 /* Utility */,
|
||||
);
|
||||
name = AUPublic;
|
||||
path = Extras/CoreAudio/AudioUnits/AUPublic;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
8BA05A7E072073D200365D66 /* AUBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */,
|
||||
8BA05A80072073D200365D66 /* AUBase.h */,
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */,
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */,
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */,
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */,
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */,
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */,
|
||||
8BA05A87072073D200365D66 /* AUResources.r */,
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */,
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */,
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */,
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */,
|
||||
);
|
||||
path = AUBase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A99072073D200365D66 /* OtherBases */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */,
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */,
|
||||
);
|
||||
path = OtherBases;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AA6072073D200365D66 /* Utility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */,
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */,
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */,
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */,
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */,
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */,
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */,
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */,
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */,
|
||||
);
|
||||
path = Utility;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */,
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */,
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */,
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */,
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */,
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */,
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */,
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */,
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
|
||||
);
|
||||
name = PublicUtility;
|
||||
path = Extras/CoreAudio/PublicUtility;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6E0720730100365D66 /* DubSubVersion.h in Headers */,
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */,
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */,
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */,
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */,
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */,
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */,
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */,
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */,
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */,
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */,
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */,
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */,
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */,
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */,
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */,
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */,
|
||||
8BC6025C073B072D006C4272 /* DubSub.h in Headers */,
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */,
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */,
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D01CCC60486CAD60068D4B7 /* DubSub */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "DubSub" */;
|
||||
buildPhases = (
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */,
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */,
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */,
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = DubSub;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = DubSub;
|
||||
productReference = 8D01CCD20486CAD60068D4B7 /* DubSub.component */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "DubSub" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* DubSub */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D01CCC60486CAD60068D4B7 /* DubSub */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXRezBuildPhase section */
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8B4119B70749654200361ABE /* DubSub.r in Rez */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6B0720730100365D66 /* DubSub.cpp in Sources */,
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */,
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */,
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */,
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */,
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */,
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */,
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */,
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */,
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */,
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */,
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */,
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */,
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */,
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */,
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3E4BA244089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
EXPORTED_SYMBOLS_FILE = DubSub.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = DubSub;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA245089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
x86_64,
|
||||
);
|
||||
EXPORTED_SYMBOLS_FILE = DubSub.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = DubSub;
|
||||
SDKROOT = macosx10.5;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = all;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3E4BA248089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA249089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "DubSub" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA244089833B7007656EC /* Debug */,
|
||||
3E4BA245089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "DubSub" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA248089833B7007656EC /* Debug */,
|
||||
3E4BA249089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
||||
58
plugins/MacAU/DubSub/DubSubVersion.h
Executable file
58
plugins/MacAU/DubSub/DubSubVersion.h
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* File: DubSubVersion.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 1/25/12
|
||||
*
|
||||
* Copyright: Copyright © 2012 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef __DubSubVersion_h__
|
||||
#define __DubSubVersion_h__
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
#define kDubSubVersion 0xFFFFFFFF
|
||||
#else
|
||||
#define kDubSubVersion 0x00010000
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
|
||||
#define DubSub_COMP_MANF 'Dthr'
|
||||
#define DubSub_COMP_SUBTYPE 'dbsb'
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#endif
|
||||
|
||||
BIN
plugins/MacAU/DubSub/English.lproj/InfoPlist.strings
Executable file
BIN
plugins/MacAU/DubSub/English.lproj/InfoPlist.strings
Executable file
Binary file not shown.
28
plugins/MacAU/DubSub/Info.plist
Executable file
28
plugins/MacAU/DubSub/Info.plist
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECTNAMEASIDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
16
plugins/MacAU/DubSub/version.plist
Executable file
16
plugins/MacAU/DubSub/version.plist
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>3</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>590000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
154
plugins/MacVST/DubSub/DubSub.xcodeproj/christopherjohnson.pbxuser
Executable file
154
plugins/MacVST/DubSub/DubSub.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,154 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* DubSub */;
|
||||
codeSenseManager = 8B02375F1D42B1C400E1E8C8 /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
324,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 560565932;
|
||||
PBXWorkspaceStateSaveDate = 560565932;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B42FC0221604E960092969A /* PBXTextBookmark */ = 8B42FC0221604E960092969A /* PBXTextBookmark */;
|
||||
8B42FC0321604E960092969A /* PBXTextBookmark */ = 8B42FC0321604E960092969A /* PBXTextBookmark */;
|
||||
8B42FE27216978EE0092969A /* PBXTextBookmark */ = 8B42FE27216978EE0092969A /* PBXTextBookmark */;
|
||||
8B42FE6F216992760092969A /* PBXTextBookmark */ = 8B42FE6F216992760092969A /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
2407DEB6089929BA00EB68BF /* DubSub.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {848, 3237}}";
|
||||
sepNavSelRange = "{7461, 0}";
|
||||
sepNavVisRange = "{6004, 3058}";
|
||||
sepNavWindowFrame = "{{4, 38}, {895, 831}}";
|
||||
};
|
||||
};
|
||||
245463B80991757100464AD3 /* DubSub.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {554, 2314}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 99}";
|
||||
sepNavWindowFrame = "{{20, 47}, {895, 831}}";
|
||||
};
|
||||
};
|
||||
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {859, 20267}}";
|
||||
sepNavSelRange = "{10616, 0}";
|
||||
sepNavVisRange = "{9653, 2414}";
|
||||
sepNavWindowFrame = "{{15, 42}, {895, 831}}";
|
||||
};
|
||||
};
|
||||
24D8286F09A914000093AEF8 /* DubSubProc.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {848, 10296}}";
|
||||
sepNavSelRange = "{30534, 0}";
|
||||
sepNavVisRange = "{29455, 2823}";
|
||||
sepNavWindowFrame = "{{229, 47}, {895, 831}}";
|
||||
};
|
||||
};
|
||||
8B02375E1D42B1C400E1E8C8 /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8B02375F1D42B1C400E1E8C8 /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8B42FC0221604E960092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 2407DEB6089929BA00EB68BF /* DubSub.cpp */;
|
||||
name = "DubSub.cpp: 142";
|
||||
rLen = 0;
|
||||
rLoc = 8745;
|
||||
rType = 0;
|
||||
vrLen = 281;
|
||||
vrLoc = 1938;
|
||||
};
|
||||
8B42FC0321604E960092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 24D8286F09A914000093AEF8 /* DubSubProc.cpp */;
|
||||
name = "DubSubProc.cpp: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 208;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B42FE27216978EE0092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 245463B80991757100464AD3 /* DubSub.h */;
|
||||
name = "DubSub.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 208;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B42FE6F216992760092969A /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 245463B80991757100464AD3 /* DubSub.h */;
|
||||
name = "DubSub.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 99;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* DubSub */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1512
plugins/MacVST/DubSub/DubSub.xcodeproj/christopherjohnson.perspectivev3
Executable file
1512
plugins/MacVST/DubSub/DubSub.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
2201
plugins/MacVST/DubSub/DubSub.xcodeproj/project.pbxproj
Executable file
2201
plugins/MacVST/DubSub/DubSub.xcodeproj/project.pbxproj
Executable file
File diff suppressed because it is too large
Load diff
7
plugins/MacVST/DubSub/DubSub.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Executable file
7
plugins/MacVST/DubSub/DubSub.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Sample.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
Binary file not shown.
Binary file not shown.
1372
plugins/MacVST/DubSub/DubSub.xcodeproj/spiadmin.mode1v3
Executable file
1372
plugins/MacVST/DubSub/DubSub.xcodeproj/spiadmin.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
143
plugins/MacVST/DubSub/DubSub.xcodeproj/spiadmin.pbxuser
Executable file
143
plugins/MacVST/DubSub/DubSub.xcodeproj/spiadmin.pbxuser
Executable file
|
|
@ -0,0 +1,143 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* Gain */;
|
||||
codeSenseManager = 91857D95148EF55400AAA11B /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
829,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
789,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 345089498;
|
||||
PBXWorkspaceStateSaveDate = 345089498;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = 911C2A9D1491A5F600A430AF /* PBXTextBookmark */;
|
||||
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 91857D94148EF55400AAA11B /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
2407DEB6089929BA00EB68BF /* Gain.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {992, 1768}}";
|
||||
sepNavSelRange = "{247, 0}";
|
||||
sepNavVisRange = "{0, 1657}";
|
||||
};
|
||||
};
|
||||
245463B80991757100464AD3 /* Gain.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {992, 975}}";
|
||||
sepNavSelRange = "{1552, 0}";
|
||||
sepNavVisRange = "{796, 1857}";
|
||||
sepNavWindowFrame = "{{15, 465}, {750, 558}}";
|
||||
};
|
||||
};
|
||||
24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {992, 488}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 798}";
|
||||
};
|
||||
};
|
||||
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {859, 19825}}";
|
||||
sepNavSelRange = "{10641, 0}";
|
||||
sepNavVisRange = "{10076, 1095}";
|
||||
};
|
||||
};
|
||||
24D8286F09A914000093AEF8 /* GainProc.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {992, 482}}";
|
||||
sepNavSelRange = "{239, 0}";
|
||||
sepNavVisRange = "{0, 950}";
|
||||
};
|
||||
};
|
||||
24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {992, 493}}";
|
||||
sepNavSelRange = "{249, 0}";
|
||||
sepNavVisRange = "{0, 249}";
|
||||
};
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* Gain */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
|
||||
name = "Gain.cpp: 10";
|
||||
rLen = 0;
|
||||
rLoc = 247;
|
||||
rType = 0;
|
||||
vrLen = 1657;
|
||||
vrLoc = 0;
|
||||
};
|
||||
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
|
||||
name = "Gain.cpp: 10";
|
||||
rLen = 0;
|
||||
rLoc = 247;
|
||||
rType = 0;
|
||||
vrLen = 1625;
|
||||
vrLoc = 0;
|
||||
};
|
||||
91857D94148EF55400AAA11B /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
91857D95148EF55400AAA11B /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0720"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "Gain.vst"
|
||||
BlueprintName = "Gain"
|
||||
ReferencedContainer = "container:Gain.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "Gain.vst"
|
||||
BlueprintName = "Gain"
|
||||
ReferencedContainer = "container:Gain.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "Gain.vst"
|
||||
BlueprintName = "Gain"
|
||||
ReferencedContainer = "container:Gain.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Gain.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>8</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D01CCC60486CAD60068D4B7</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>«PROJECTNAME».xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D01CCC60486CAD60068D4B7</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "«PROJECTNAME».vst"
|
||||
BlueprintName = "«PROJECTNAME»"
|
||||
ReferencedContainer = "container:Sample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
24
plugins/MacVST/DubSub/mac/Info.plist
Executable file
24
plugins/MacVST/DubSub/mac/Info.plist
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>DubSub</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.airwindows.DubSub</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
1
plugins/MacVST/DubSub/mac/PkgInfo
Executable file
1
plugins/MacVST/DubSub/mac/PkgInfo
Executable file
|
|
@ -0,0 +1 @@
|
|||
BNDL????
|
||||
17
plugins/MacVST/DubSub/mac/xcode_vst_prefix.h
Executable file
17
plugins/MacVST/DubSub/mac/xcode_vst_prefix.h
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#define MAC 1
|
||||
#define MACX 1
|
||||
|
||||
#define USE_NAMESPACE 0
|
||||
|
||||
#define TARGET_API_MAC_CARBON 1
|
||||
#define USENAVSERVICES 1
|
||||
|
||||
#define __CF_USE_FRAMEWORK_INCLUDES__
|
||||
|
||||
#if __MWERKS__
|
||||
#define __NOEXTENSIONS__
|
||||
#endif
|
||||
|
||||
#define QUARTZ 1
|
||||
|
||||
#include <AvailabilityMacros.h>
|
||||
287
plugins/MacVST/DubSub/source/DubSub.cpp
Executable file
287
plugins/MacVST/DubSub/source/DubSub.cpp
Executable file
|
|
@ -0,0 +1,287 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new DubSub(audioMaster);}
|
||||
|
||||
DubSub::DubSub(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.9;
|
||||
B = 0.5;
|
||||
C = 0.74;
|
||||
D = 1.0;
|
||||
E = 0.95;
|
||||
F = 0.5;
|
||||
G = 0.2;
|
||||
H = 0.2;
|
||||
I = 0.5;
|
||||
J = 1.0;
|
||||
|
||||
WasNegativeL = false;
|
||||
SubOctaveL = false;
|
||||
WasNegativeR = false;
|
||||
SubOctaveR = false;
|
||||
flip = false;
|
||||
bflip = 0;
|
||||
|
||||
iirDriveSampleAL = 0.0;
|
||||
iirDriveSampleBL = 0.0;
|
||||
iirDriveSampleCL = 0.0;
|
||||
iirDriveSampleDL = 0.0;
|
||||
iirDriveSampleEL = 0.0;
|
||||
iirDriveSampleFL = 0.0;
|
||||
iirDriveSampleAR = 0.0;
|
||||
iirDriveSampleBR = 0.0;
|
||||
iirDriveSampleCR = 0.0;
|
||||
iirDriveSampleDR = 0.0;
|
||||
iirDriveSampleER = 0.0;
|
||||
iirDriveSampleFR = 0.0;
|
||||
|
||||
iirHeadBumpAL = 0.0;
|
||||
iirHeadBumpBL = 0.0;
|
||||
iirHeadBumpCL = 0.0;
|
||||
iirHeadBumpAR = 0.0;
|
||||
iirHeadBumpBR = 0.0;
|
||||
iirHeadBumpCR = 0.0;
|
||||
|
||||
iirSubBumpAL = 0.0;
|
||||
iirSubBumpBL = 0.0;
|
||||
iirSubBumpCL = 0.0;
|
||||
iirSubBumpAR = 0.0;
|
||||
iirSubBumpBR = 0.0;
|
||||
iirSubBumpCR = 0.0;
|
||||
|
||||
lastHeadBumpL = 0.0;
|
||||
lastSubBumpL = 0.0;
|
||||
lastHeadBumpR = 0.0;
|
||||
lastSubBumpR = 0.0;
|
||||
|
||||
iirSampleAL = 0.0;
|
||||
iirSampleBL = 0.0;
|
||||
iirSampleCL = 0.0;
|
||||
iirSampleDL = 0.0;
|
||||
iirSampleEL = 0.0;
|
||||
iirSampleFL = 0.0;
|
||||
iirSampleGL = 0.0;
|
||||
iirSampleHL = 0.0;
|
||||
iirSampleIL = 0.0;
|
||||
iirSampleJL = 0.0;
|
||||
iirSampleKL = 0.0;
|
||||
iirSampleLL = 0.0;
|
||||
iirSampleML = 0.0;
|
||||
iirSampleNL = 0.0;
|
||||
iirSampleOL = 0.0;
|
||||
iirSamplePL = 0.0;
|
||||
iirSampleQL = 0.0;
|
||||
iirSampleRL = 0.0;
|
||||
iirSampleSL = 0.0;
|
||||
iirSampleTL = 0.0;
|
||||
iirSampleUL = 0.0;
|
||||
iirSampleVL = 0.0;
|
||||
iirSampleWL = 0.0;
|
||||
iirSampleXL = 0.0;
|
||||
iirSampleYL = 0.0;
|
||||
iirSampleZL = 0.0;
|
||||
iirSampleAR = 0.0;
|
||||
iirSampleBR = 0.0;
|
||||
iirSampleCR = 0.0;
|
||||
iirSampleDR = 0.0;
|
||||
iirSampleER = 0.0;
|
||||
iirSampleFR = 0.0;
|
||||
iirSampleGR = 0.0;
|
||||
iirSampleHR = 0.0;
|
||||
iirSampleIR = 0.0;
|
||||
iirSampleJR = 0.0;
|
||||
iirSampleKR = 0.0;
|
||||
iirSampleLR = 0.0;
|
||||
iirSampleMR = 0.0;
|
||||
iirSampleNR = 0.0;
|
||||
iirSampleOR = 0.0;
|
||||
iirSamplePR = 0.0;
|
||||
iirSampleQR = 0.0;
|
||||
iirSampleRR = 0.0;
|
||||
iirSampleSR = 0.0;
|
||||
iirSampleTR = 0.0;
|
||||
iirSampleUR = 0.0;
|
||||
iirSampleVR = 0.0;
|
||||
iirSampleWR = 0.0;
|
||||
iirSampleXR = 0.0;
|
||||
iirSampleYR = 0.0;
|
||||
iirSampleZR = 0.0;
|
||||
|
||||
oscGateL = 1.0;
|
||||
oscGateR = 1.0;
|
||||
|
||||
fpNShapeL = 0.0;
|
||||
fpNShapeR = 0.0;
|
||||
//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
|
||||
}
|
||||
|
||||
DubSub::~DubSub() {}
|
||||
VstInt32 DubSub::getVendorVersion () {return 1000;}
|
||||
void DubSub::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void DubSub::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;
|
||||
}
|
||||
|
||||
VstInt32 DubSub::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
chunkData[4] = E;
|
||||
chunkData[5] = F;
|
||||
chunkData[6] = G;
|
||||
chunkData[7] = H;
|
||||
chunkData[8] = I;
|
||||
chunkData[9] = J;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 DubSub::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
E = pinParameter(chunkData[4]);
|
||||
F = pinParameter(chunkData[5]);
|
||||
G = pinParameter(chunkData[6]);
|
||||
H = pinParameter(chunkData[7]);
|
||||
I = pinParameter(chunkData[8]);
|
||||
J = pinParameter(chunkData[9]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: G = value; break;
|
||||
case kParamH: H = value; break;
|
||||
case kParamI: I = value; break;
|
||||
case kParamJ: J = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float DubSub::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;
|
||||
case kParamG: return G; break;
|
||||
case kParamH: return H; break;
|
||||
case kParamI: return I; break;
|
||||
case kParamJ: return J; 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 DubSub::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "TGrind", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "Grd/Out", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "XOver", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "BsDrive", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "BsVoice", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "BassOut", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "SbDrive", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "SbVoice", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "SubOut", kVstMaxParamStrLen); break;
|
||||
case kParamJ: 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 DubSub::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string ((B*2.0)-1.0, 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*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamG: float2string (G, text, kVstMaxParamStrLen); break;
|
||||
case kParamH: float2string (H, text, kVstMaxParamStrLen); break;
|
||||
case kParamI: float2string ((I*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamJ: float2string (J, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 DubSub::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool DubSub::getEffectName(char* name) {
|
||||
vst_strncpy(name, "DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory DubSub::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool DubSub::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool DubSub::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
179
plugins/MacVST/DubSub/source/DubSub.h
Executable file
179
plugins/MacVST/DubSub/source/DubSub.h
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#define __DubSub_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA = 0,
|
||||
kParamB = 1,
|
||||
kParamC = 2,
|
||||
kParamD = 3,
|
||||
kParamE = 4,
|
||||
kParamF = 5,
|
||||
kParamG = 6,
|
||||
kParamH = 7,
|
||||
kParamI = 8,
|
||||
kParamJ = 9,
|
||||
kNumParameters = 10
|
||||
}; //
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'dbsb'; //Change this to what the AU identity is!
|
||||
|
||||
class DubSub :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
DubSub(audioMasterCallback audioMaster);
|
||||
~DubSub();
|
||||
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 VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
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
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
|
||||
private:
|
||||
double iirDriveSampleAL;
|
||||
double iirDriveSampleBL;
|
||||
double iirDriveSampleCL;
|
||||
double iirDriveSampleDL;
|
||||
double iirDriveSampleEL;
|
||||
double iirDriveSampleFL;
|
||||
double iirDriveSampleAR;
|
||||
double iirDriveSampleBR;
|
||||
double iirDriveSampleCR;
|
||||
double iirDriveSampleDR;
|
||||
double iirDriveSampleER;
|
||||
double iirDriveSampleFR;
|
||||
bool flip; //drive things
|
||||
|
||||
int bflip;
|
||||
bool WasNegativeL;
|
||||
bool SubOctaveL;
|
||||
bool WasNegativeR;
|
||||
bool SubOctaveR;
|
||||
|
||||
double iirHeadBumpAL;
|
||||
double iirHeadBumpBL;
|
||||
double iirHeadBumpCL;
|
||||
double iirHeadBumpAR;
|
||||
double iirHeadBumpBR;
|
||||
double iirHeadBumpCR;
|
||||
|
||||
double iirSubBumpAL;
|
||||
double iirSubBumpBL;
|
||||
double iirSubBumpCL;
|
||||
double iirSubBumpAR;
|
||||
double iirSubBumpBR;
|
||||
double iirSubBumpCR;
|
||||
|
||||
double lastHeadBumpL;
|
||||
double lastSubBumpL;
|
||||
double lastHeadBumpR;
|
||||
double lastSubBumpR;
|
||||
|
||||
double iirSampleAL;
|
||||
double iirSampleBL;
|
||||
double iirSampleCL;
|
||||
double iirSampleDL;
|
||||
double iirSampleEL;
|
||||
double iirSampleFL;
|
||||
double iirSampleGL;
|
||||
double iirSampleHL;
|
||||
double iirSampleIL;
|
||||
double iirSampleJL;
|
||||
double iirSampleKL;
|
||||
double iirSampleLL;
|
||||
double iirSampleML;
|
||||
double iirSampleNL;
|
||||
double iirSampleOL;
|
||||
double iirSamplePL;
|
||||
double iirSampleQL;
|
||||
double iirSampleRL;
|
||||
double iirSampleSL;
|
||||
double iirSampleTL;
|
||||
double iirSampleUL;
|
||||
double iirSampleVL;
|
||||
double iirSampleWL;
|
||||
double iirSampleXL;
|
||||
double iirSampleYL;
|
||||
double iirSampleZL;
|
||||
double iirSampleAR;
|
||||
double iirSampleBR;
|
||||
double iirSampleCR;
|
||||
double iirSampleDR;
|
||||
double iirSampleER;
|
||||
double iirSampleFR;
|
||||
double iirSampleGR;
|
||||
double iirSampleHR;
|
||||
double iirSampleIR;
|
||||
double iirSampleJR;
|
||||
double iirSampleKR;
|
||||
double iirSampleLR;
|
||||
double iirSampleMR;
|
||||
double iirSampleNR;
|
||||
double iirSampleOR;
|
||||
double iirSamplePR;
|
||||
double iirSampleQR;
|
||||
double iirSampleRR;
|
||||
double iirSampleSR;
|
||||
double iirSampleTR;
|
||||
double iirSampleUR;
|
||||
double iirSampleVR;
|
||||
double iirSampleWR;
|
||||
double iirSampleXR;
|
||||
double iirSampleYR;
|
||||
double iirSampleZR;
|
||||
|
||||
double oscGateL;
|
||||
double oscGateR;
|
||||
|
||||
|
||||
long double fpNShapeL;
|
||||
long double fpNShapeR;
|
||||
//default stuff
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
float G;
|
||||
float H;
|
||||
float I;
|
||||
float J;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
835
plugins/MacVST/DubSub/source/DubSubProc.cpp
Executable file
835
plugins/MacVST/DubSub/source/DubSubProc.cpp
Executable file
|
|
@ -0,0 +1,835 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = (B*2.0)-1.0;
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = (F*2.0)-1.0;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = (I*2.0)-1.0;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
long double drySampleL = inputSampleL;
|
||||
long double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 32-bit floating point
|
||||
float fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 32 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = pow(B,2);
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = pow(F,2) * 0.5;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = pow(I,2) * 0.45;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 64-bit floating point
|
||||
double fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 64 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
BIN
plugins/WinVST/DubSub/.vs/Console4Channel64/v14/.suo
Executable file
BIN
plugins/WinVST/DubSub/.vs/Console4Channel64/v14/.suo
Executable file
Binary file not shown.
BIN
plugins/WinVST/DubSub/.vs/VSTProject/v14/.suo
Executable file
BIN
plugins/WinVST/DubSub/.vs/VSTProject/v14/.suo
Executable file
Binary file not shown.
287
plugins/WinVST/DubSub/DubSub.cpp
Executable file
287
plugins/WinVST/DubSub/DubSub.cpp
Executable file
|
|
@ -0,0 +1,287 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new DubSub(audioMaster);}
|
||||
|
||||
DubSub::DubSub(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.9;
|
||||
B = 0.5;
|
||||
C = 0.74;
|
||||
D = 1.0;
|
||||
E = 0.95;
|
||||
F = 0.5;
|
||||
G = 0.2;
|
||||
H = 0.2;
|
||||
I = 0.5;
|
||||
J = 1.0;
|
||||
|
||||
WasNegativeL = false;
|
||||
SubOctaveL = false;
|
||||
WasNegativeR = false;
|
||||
SubOctaveR = false;
|
||||
flip = false;
|
||||
bflip = 0;
|
||||
|
||||
iirDriveSampleAL = 0.0;
|
||||
iirDriveSampleBL = 0.0;
|
||||
iirDriveSampleCL = 0.0;
|
||||
iirDriveSampleDL = 0.0;
|
||||
iirDriveSampleEL = 0.0;
|
||||
iirDriveSampleFL = 0.0;
|
||||
iirDriveSampleAR = 0.0;
|
||||
iirDriveSampleBR = 0.0;
|
||||
iirDriveSampleCR = 0.0;
|
||||
iirDriveSampleDR = 0.0;
|
||||
iirDriveSampleER = 0.0;
|
||||
iirDriveSampleFR = 0.0;
|
||||
|
||||
iirHeadBumpAL = 0.0;
|
||||
iirHeadBumpBL = 0.0;
|
||||
iirHeadBumpCL = 0.0;
|
||||
iirHeadBumpAR = 0.0;
|
||||
iirHeadBumpBR = 0.0;
|
||||
iirHeadBumpCR = 0.0;
|
||||
|
||||
iirSubBumpAL = 0.0;
|
||||
iirSubBumpBL = 0.0;
|
||||
iirSubBumpCL = 0.0;
|
||||
iirSubBumpAR = 0.0;
|
||||
iirSubBumpBR = 0.0;
|
||||
iirSubBumpCR = 0.0;
|
||||
|
||||
lastHeadBumpL = 0.0;
|
||||
lastSubBumpL = 0.0;
|
||||
lastHeadBumpR = 0.0;
|
||||
lastSubBumpR = 0.0;
|
||||
|
||||
iirSampleAL = 0.0;
|
||||
iirSampleBL = 0.0;
|
||||
iirSampleCL = 0.0;
|
||||
iirSampleDL = 0.0;
|
||||
iirSampleEL = 0.0;
|
||||
iirSampleFL = 0.0;
|
||||
iirSampleGL = 0.0;
|
||||
iirSampleHL = 0.0;
|
||||
iirSampleIL = 0.0;
|
||||
iirSampleJL = 0.0;
|
||||
iirSampleKL = 0.0;
|
||||
iirSampleLL = 0.0;
|
||||
iirSampleML = 0.0;
|
||||
iirSampleNL = 0.0;
|
||||
iirSampleOL = 0.0;
|
||||
iirSamplePL = 0.0;
|
||||
iirSampleQL = 0.0;
|
||||
iirSampleRL = 0.0;
|
||||
iirSampleSL = 0.0;
|
||||
iirSampleTL = 0.0;
|
||||
iirSampleUL = 0.0;
|
||||
iirSampleVL = 0.0;
|
||||
iirSampleWL = 0.0;
|
||||
iirSampleXL = 0.0;
|
||||
iirSampleYL = 0.0;
|
||||
iirSampleZL = 0.0;
|
||||
iirSampleAR = 0.0;
|
||||
iirSampleBR = 0.0;
|
||||
iirSampleCR = 0.0;
|
||||
iirSampleDR = 0.0;
|
||||
iirSampleER = 0.0;
|
||||
iirSampleFR = 0.0;
|
||||
iirSampleGR = 0.0;
|
||||
iirSampleHR = 0.0;
|
||||
iirSampleIR = 0.0;
|
||||
iirSampleJR = 0.0;
|
||||
iirSampleKR = 0.0;
|
||||
iirSampleLR = 0.0;
|
||||
iirSampleMR = 0.0;
|
||||
iirSampleNR = 0.0;
|
||||
iirSampleOR = 0.0;
|
||||
iirSamplePR = 0.0;
|
||||
iirSampleQR = 0.0;
|
||||
iirSampleRR = 0.0;
|
||||
iirSampleSR = 0.0;
|
||||
iirSampleTR = 0.0;
|
||||
iirSampleUR = 0.0;
|
||||
iirSampleVR = 0.0;
|
||||
iirSampleWR = 0.0;
|
||||
iirSampleXR = 0.0;
|
||||
iirSampleYR = 0.0;
|
||||
iirSampleZR = 0.0;
|
||||
|
||||
oscGateL = 1.0;
|
||||
oscGateR = 1.0;
|
||||
|
||||
fpNShapeL = 0.0;
|
||||
fpNShapeR = 0.0;
|
||||
//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
|
||||
}
|
||||
|
||||
DubSub::~DubSub() {}
|
||||
VstInt32 DubSub::getVendorVersion () {return 1000;}
|
||||
void DubSub::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void DubSub::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;
|
||||
}
|
||||
|
||||
VstInt32 DubSub::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
chunkData[4] = E;
|
||||
chunkData[5] = F;
|
||||
chunkData[6] = G;
|
||||
chunkData[7] = H;
|
||||
chunkData[8] = I;
|
||||
chunkData[9] = J;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 DubSub::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
E = pinParameter(chunkData[4]);
|
||||
F = pinParameter(chunkData[5]);
|
||||
G = pinParameter(chunkData[6]);
|
||||
H = pinParameter(chunkData[7]);
|
||||
I = pinParameter(chunkData[8]);
|
||||
J = pinParameter(chunkData[9]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: G = value; break;
|
||||
case kParamH: H = value; break;
|
||||
case kParamI: I = value; break;
|
||||
case kParamJ: J = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float DubSub::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;
|
||||
case kParamG: return G; break;
|
||||
case kParamH: return H; break;
|
||||
case kParamI: return I; break;
|
||||
case kParamJ: return J; 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 DubSub::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "TGrind", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "Grd/Out", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "XOver", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "BsDrive", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "BsVoice", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "BassOut", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "SbDrive", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "SbVoice", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "SubOut", kVstMaxParamStrLen); break;
|
||||
case kParamJ: 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 DubSub::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string ((B*2.0)-1.0, 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*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamG: float2string (G, text, kVstMaxParamStrLen); break;
|
||||
case kParamH: float2string (H, text, kVstMaxParamStrLen); break;
|
||||
case kParamI: float2string ((I*2.0)-1.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamJ: float2string (J, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void DubSub::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;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 DubSub::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool DubSub::getEffectName(char* name) {
|
||||
vst_strncpy(name, "DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory DubSub::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool DubSub::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows DubSub", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool DubSub::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
179
plugins/WinVST/DubSub/DubSub.h
Executable file
179
plugins/WinVST/DubSub/DubSub.h
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#define __DubSub_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA = 0,
|
||||
kParamB = 1,
|
||||
kParamC = 2,
|
||||
kParamD = 3,
|
||||
kParamE = 4,
|
||||
kParamF = 5,
|
||||
kParamG = 6,
|
||||
kParamH = 7,
|
||||
kParamI = 8,
|
||||
kParamJ = 9,
|
||||
kNumParameters = 10
|
||||
}; //
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'dbsb'; //Change this to what the AU identity is!
|
||||
|
||||
class DubSub :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
DubSub(audioMasterCallback audioMaster);
|
||||
~DubSub();
|
||||
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 VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
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
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
|
||||
private:
|
||||
double iirDriveSampleAL;
|
||||
double iirDriveSampleBL;
|
||||
double iirDriveSampleCL;
|
||||
double iirDriveSampleDL;
|
||||
double iirDriveSampleEL;
|
||||
double iirDriveSampleFL;
|
||||
double iirDriveSampleAR;
|
||||
double iirDriveSampleBR;
|
||||
double iirDriveSampleCR;
|
||||
double iirDriveSampleDR;
|
||||
double iirDriveSampleER;
|
||||
double iirDriveSampleFR;
|
||||
bool flip; //drive things
|
||||
|
||||
int bflip;
|
||||
bool WasNegativeL;
|
||||
bool SubOctaveL;
|
||||
bool WasNegativeR;
|
||||
bool SubOctaveR;
|
||||
|
||||
double iirHeadBumpAL;
|
||||
double iirHeadBumpBL;
|
||||
double iirHeadBumpCL;
|
||||
double iirHeadBumpAR;
|
||||
double iirHeadBumpBR;
|
||||
double iirHeadBumpCR;
|
||||
|
||||
double iirSubBumpAL;
|
||||
double iirSubBumpBL;
|
||||
double iirSubBumpCL;
|
||||
double iirSubBumpAR;
|
||||
double iirSubBumpBR;
|
||||
double iirSubBumpCR;
|
||||
|
||||
double lastHeadBumpL;
|
||||
double lastSubBumpL;
|
||||
double lastHeadBumpR;
|
||||
double lastSubBumpR;
|
||||
|
||||
double iirSampleAL;
|
||||
double iirSampleBL;
|
||||
double iirSampleCL;
|
||||
double iirSampleDL;
|
||||
double iirSampleEL;
|
||||
double iirSampleFL;
|
||||
double iirSampleGL;
|
||||
double iirSampleHL;
|
||||
double iirSampleIL;
|
||||
double iirSampleJL;
|
||||
double iirSampleKL;
|
||||
double iirSampleLL;
|
||||
double iirSampleML;
|
||||
double iirSampleNL;
|
||||
double iirSampleOL;
|
||||
double iirSamplePL;
|
||||
double iirSampleQL;
|
||||
double iirSampleRL;
|
||||
double iirSampleSL;
|
||||
double iirSampleTL;
|
||||
double iirSampleUL;
|
||||
double iirSampleVL;
|
||||
double iirSampleWL;
|
||||
double iirSampleXL;
|
||||
double iirSampleYL;
|
||||
double iirSampleZL;
|
||||
double iirSampleAR;
|
||||
double iirSampleBR;
|
||||
double iirSampleCR;
|
||||
double iirSampleDR;
|
||||
double iirSampleER;
|
||||
double iirSampleFR;
|
||||
double iirSampleGR;
|
||||
double iirSampleHR;
|
||||
double iirSampleIR;
|
||||
double iirSampleJR;
|
||||
double iirSampleKR;
|
||||
double iirSampleLR;
|
||||
double iirSampleMR;
|
||||
double iirSampleNR;
|
||||
double iirSampleOR;
|
||||
double iirSamplePR;
|
||||
double iirSampleQR;
|
||||
double iirSampleRR;
|
||||
double iirSampleSR;
|
||||
double iirSampleTR;
|
||||
double iirSampleUR;
|
||||
double iirSampleVR;
|
||||
double iirSampleWR;
|
||||
double iirSampleXR;
|
||||
double iirSampleYR;
|
||||
double iirSampleZR;
|
||||
|
||||
double oscGateL;
|
||||
double oscGateR;
|
||||
|
||||
|
||||
long double fpNShapeL;
|
||||
long double fpNShapeR;
|
||||
//default stuff
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
float G;
|
||||
float H;
|
||||
float I;
|
||||
float J;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
835
plugins/WinVST/DubSub/DubSubProc.cpp
Executable file
835
plugins/WinVST/DubSub/DubSubProc.cpp
Executable file
|
|
@ -0,0 +1,835 @@
|
|||
/* ========================================
|
||||
* DubSub - DubSub.h
|
||||
* Copyright (c) 2016 airwindows, All rights reserved
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __DubSub_H
|
||||
#include "DubSub.h"
|
||||
#endif
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = (B*2.0)-1.0;
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = (F*2.0)-1.0;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = (I*2.0)-1.0;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
long double drySampleL = inputSampleL;
|
||||
long double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 32-bit floating point
|
||||
float fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 32 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
|
||||
void DubSub::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();
|
||||
|
||||
double driveone = pow(A*3.0,2);
|
||||
double driveoutput = pow(B,2);
|
||||
double iirAmount = ((C*0.33)+0.1)/overallscale;
|
||||
double ataLowpassL;
|
||||
double ataLowpassR;
|
||||
double randyL;
|
||||
double invrandyL;
|
||||
double randyR;
|
||||
double invrandyR;
|
||||
double HeadBumpL = 0.0;
|
||||
double HeadBumpR = 0.0;
|
||||
double BassGain = D * 0.1;
|
||||
double HeadBumpFreq = ((E*0.1)+0.0001)/overallscale;
|
||||
double iirBmount = HeadBumpFreq/44.1;
|
||||
double altBmount = 1.0 - iirBmount;
|
||||
double BassOutGain = pow(F,2) * 0.5;
|
||||
double SubBumpL = 0.0;
|
||||
double SubBumpR = 0.0;
|
||||
double SubGain = G * 0.1;
|
||||
double SubBumpFreq = ((H*0.1)+0.0001)/overallscale;
|
||||
double iirCmount = SubBumpFreq/44.1;
|
||||
double altCmount = 1.0 - iirCmount;
|
||||
double SubOutGain = pow(I,2) * 0.45;
|
||||
double clampL = 0.0;
|
||||
double clampR = 0.0;
|
||||
double out;
|
||||
double fuzz = 0.111;
|
||||
double wet = J;
|
||||
double dry = 1.0-wet;
|
||||
double glitch = 0.60;
|
||||
double tempSampleL;
|
||||
double tempSampleR;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
long double inputSampleL = *in1;
|
||||
long double inputSampleR = *in2;
|
||||
|
||||
static int noisesourceL = 0;
|
||||
static int noisesourceR = 850010;
|
||||
int residue;
|
||||
double applyresidue;
|
||||
|
||||
noisesourceL = noisesourceL % 1700021; noisesourceL++;
|
||||
residue = noisesourceL * noisesourceL;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleL += applyresidue;
|
||||
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
|
||||
inputSampleL -= applyresidue;
|
||||
}
|
||||
|
||||
noisesourceR = noisesourceR % 1700021; noisesourceR++;
|
||||
residue = noisesourceR * noisesourceR;
|
||||
residue = residue % 170003; residue *= residue;
|
||||
residue = residue % 17011; residue *= residue;
|
||||
residue = residue % 1709; residue *= residue;
|
||||
residue = residue % 173; residue *= residue;
|
||||
residue = residue % 17;
|
||||
applyresidue = residue;
|
||||
applyresidue *= 0.00000001;
|
||||
applyresidue *= 0.00000001;
|
||||
inputSampleR += applyresidue;
|
||||
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
|
||||
inputSampleR -= applyresidue;
|
||||
}
|
||||
//for live air, we always apply the dither noise. Then, if our result is
|
||||
//effectively digital black, we'll subtract it aDubSub. We want a 'air' hiss
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
// here's the plan.
|
||||
// Grind Boost
|
||||
// Grind Output Level
|
||||
// Bass Split Freq
|
||||
// Bass Drive
|
||||
// Bass Voicing
|
||||
// Bass Output Level
|
||||
// Sub Oct Drive
|
||||
// Sub Voicing
|
||||
// Sub Output Level
|
||||
// Dry/Wet
|
||||
|
||||
oscGateL += fabs(inputSampleL * 10.0);
|
||||
oscGateL -= 0.001;
|
||||
if (oscGateL > 1.0) oscGateL = 1.0;
|
||||
if (oscGateL < 0) oscGateL = 0;
|
||||
oscGateR += fabs(inputSampleR * 10.0);
|
||||
oscGateR -= 0.001;
|
||||
if (oscGateR > 1.0) oscGateR = 1.0;
|
||||
if (oscGateR < 0) oscGateR = 0;
|
||||
//got a value that only goes down low when there's silence or near silence on input
|
||||
clampL = 1.0-oscGateL;
|
||||
clampL *= 0.00001;
|
||||
clampR = 1.0-oscGateR;
|
||||
clampR *= 0.00001;
|
||||
//set up the thing to choke off oscillations- belt and suspenders affair
|
||||
|
||||
if (flip)
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleAL = (iirDriveSampleAL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleAL;
|
||||
iirDriveSampleCL = (iirDriveSampleCL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleCL;
|
||||
iirDriveSampleEL = (iirDriveSampleEL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleEL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleAR = (iirDriveSampleAR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleAR;
|
||||
iirDriveSampleCR = (iirDriveSampleCR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleCR;
|
||||
iirDriveSampleER = (iirDriveSampleER * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleER;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempSampleL = inputSampleL;
|
||||
iirDriveSampleBL = (iirDriveSampleBL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleBL;
|
||||
iirDriveSampleDL = (iirDriveSampleDL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleDL;
|
||||
iirDriveSampleFL = (iirDriveSampleFL * (1 - iirAmount)) + (inputSampleL * iirAmount);
|
||||
inputSampleL -= iirDriveSampleFL;
|
||||
ataLowpassL = tempSampleL - inputSampleL;
|
||||
|
||||
tempSampleR = inputSampleR;
|
||||
iirDriveSampleBR = (iirDriveSampleBR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleBR;
|
||||
iirDriveSampleDR = (iirDriveSampleDR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleDR;
|
||||
iirDriveSampleFR = (iirDriveSampleFR * (1 - iirAmount)) + (inputSampleR * iirAmount);
|
||||
inputSampleR -= iirDriveSampleFR;
|
||||
ataLowpassR = tempSampleR - inputSampleR;
|
||||
}
|
||||
//highpass section
|
||||
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;}
|
||||
|
||||
out = driveone;
|
||||
while (out > glitch)
|
||||
{
|
||||
out -= glitch;
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * glitch) * (fabs(inputSampleL) * glitch) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * glitch) * (fabs(inputSampleR) * glitch) );
|
||||
inputSampleL *= (1.0+glitch);
|
||||
inputSampleR *= (1.0+glitch);
|
||||
}
|
||||
//that's taken care of the really high gain stuff
|
||||
|
||||
inputSampleL -= (inputSampleL * (fabs(inputSampleL) * out) * (fabs(inputSampleL) * out) );
|
||||
inputSampleR -= (inputSampleR * (fabs(inputSampleR) * out) * (fabs(inputSampleR) * out) );
|
||||
inputSampleL *= (1.0+out);
|
||||
inputSampleR *= (1.0+out);
|
||||
|
||||
if (ataLowpassL > 0)
|
||||
{if (WasNegativeL){SubOctaveL = !SubOctaveL;} WasNegativeL = false;}
|
||||
else {WasNegativeL = true;}
|
||||
|
||||
if (ataLowpassR > 0)
|
||||
{if (WasNegativeR){SubOctaveR = !SubOctaveR;} WasNegativeR = false;}
|
||||
else {WasNegativeR = true;}
|
||||
//set up polarities for sub-bass version
|
||||
|
||||
randyL = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyL = (1.0-randyL);
|
||||
randyL /= 2.0;
|
||||
|
||||
randyR = (rand()/(double)RAND_MAX)*fuzz; //0 to 1 the noise, may not be needed
|
||||
invrandyR = (1.0-randyR);
|
||||
randyR /= 2.0;
|
||||
//set up the noise
|
||||
|
||||
iirSampleAL = (iirSampleAL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleAL;
|
||||
iirSampleBL = (iirSampleBL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleBL;
|
||||
iirSampleCL = (iirSampleCL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleCL;
|
||||
iirSampleDL = (iirSampleDL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleDL;
|
||||
iirSampleEL = (iirSampleEL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleEL;
|
||||
iirSampleFL = (iirSampleFL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleFL;
|
||||
iirSampleGL = (iirSampleGL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleGL;
|
||||
iirSampleHL = (iirSampleHL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleHL;
|
||||
iirSampleIL = (iirSampleIL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleIL;
|
||||
iirSampleJL = (iirSampleJL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleJL;
|
||||
iirSampleKL = (iirSampleKL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleKL;
|
||||
iirSampleLL = (iirSampleLL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleLL;
|
||||
iirSampleML = (iirSampleML * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleML;
|
||||
iirSampleNL = (iirSampleNL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleNL;
|
||||
iirSampleOL = (iirSampleOL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleOL;
|
||||
iirSamplePL = (iirSamplePL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSamplePL;
|
||||
iirSampleQL = (iirSampleQL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleQL;
|
||||
iirSampleRL = (iirSampleRL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleRL;
|
||||
iirSampleSL = (iirSampleSL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleSL;
|
||||
iirSampleTL = (iirSampleTL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleTL;
|
||||
iirSampleUL = (iirSampleUL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleUL;
|
||||
iirSampleVL = (iirSampleVL * altBmount) + (ataLowpassL * iirBmount); ataLowpassL -= iirSampleVL;
|
||||
|
||||
iirSampleAR = (iirSampleAR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleAR;
|
||||
iirSampleBR = (iirSampleBR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleBR;
|
||||
iirSampleCR = (iirSampleCR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleCR;
|
||||
iirSampleDR = (iirSampleDR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleDR;
|
||||
iirSampleER = (iirSampleER * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleER;
|
||||
iirSampleFR = (iirSampleFR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleFR;
|
||||
iirSampleGR = (iirSampleGR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleGR;
|
||||
iirSampleHR = (iirSampleHR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleHR;
|
||||
iirSampleIR = (iirSampleIR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleIR;
|
||||
iirSampleJR = (iirSampleJR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleJR;
|
||||
iirSampleKR = (iirSampleKR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleKR;
|
||||
iirSampleLR = (iirSampleLR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleLR;
|
||||
iirSampleMR = (iirSampleMR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleMR;
|
||||
iirSampleNR = (iirSampleNR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleNR;
|
||||
iirSampleOR = (iirSampleOR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleOR;
|
||||
iirSamplePR = (iirSamplePR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSamplePR;
|
||||
iirSampleQR = (iirSampleQR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleQR;
|
||||
iirSampleRR = (iirSampleRR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleRR;
|
||||
iirSampleSR = (iirSampleSR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleSR;
|
||||
iirSampleTR = (iirSampleTR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleTR;
|
||||
iirSampleUR = (iirSampleUR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleUR;
|
||||
iirSampleVR = (iirSampleVR * altBmount) + (ataLowpassR * iirBmount); ataLowpassR -= iirSampleVR;
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirHeadBumpAL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpAL -= (iirHeadBumpAL * iirHeadBumpAL * iirHeadBumpAL * HeadBumpFreq);
|
||||
iirHeadBumpAL = (invrandyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpAL > 0) iirHeadBumpAL -= clampL;
|
||||
if (iirHeadBumpAL < 0) iirHeadBumpAL += clampL;
|
||||
HeadBumpL = iirHeadBumpAL;
|
||||
|
||||
iirHeadBumpAR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpAR -= (iirHeadBumpAR * iirHeadBumpAR * iirHeadBumpAR * HeadBumpFreq);
|
||||
iirHeadBumpAR = (invrandyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpAR > 0) iirHeadBumpAR -= clampR;
|
||||
if (iirHeadBumpAR < 0) iirHeadBumpAR += clampR;
|
||||
HeadBumpR = iirHeadBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirHeadBumpBL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpBL -= (iirHeadBumpBL * iirHeadBumpBL * iirHeadBumpBL * HeadBumpFreq);
|
||||
iirHeadBumpBL = (randyL * iirHeadBumpAL) + (invrandyL * iirHeadBumpBL) + (randyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpBL > 0) iirHeadBumpBL -= clampL;
|
||||
if (iirHeadBumpBL < 0) iirHeadBumpBL += clampL;
|
||||
HeadBumpL = iirHeadBumpBL;
|
||||
|
||||
iirHeadBumpBR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpBR -= (iirHeadBumpBR * iirHeadBumpBR * iirHeadBumpBR * HeadBumpFreq);
|
||||
iirHeadBumpBR = (randyR * iirHeadBumpAR) + (invrandyR * iirHeadBumpBR) + (randyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpBR > 0) iirHeadBumpBR -= clampR;
|
||||
if (iirHeadBumpBR < 0) iirHeadBumpBR += clampR;
|
||||
HeadBumpR = iirHeadBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirHeadBumpCL += (ataLowpassL * BassGain);
|
||||
iirHeadBumpCL -= (iirHeadBumpCL * iirHeadBumpCL * iirHeadBumpCL * HeadBumpFreq);
|
||||
iirHeadBumpCL = (randyL * iirHeadBumpAL) + (randyL * iirHeadBumpBL) + (invrandyL * iirHeadBumpCL);
|
||||
if (iirHeadBumpCL > 0) iirHeadBumpCL -= clampL;
|
||||
if (iirHeadBumpCL < 0) iirHeadBumpCL += clampL;
|
||||
HeadBumpL = iirHeadBumpCL;
|
||||
|
||||
iirHeadBumpCR += (ataLowpassR * BassGain);
|
||||
iirHeadBumpCR -= (iirHeadBumpCR * iirHeadBumpCR * iirHeadBumpCR * HeadBumpFreq);
|
||||
iirHeadBumpCR = (randyR * iirHeadBumpAR) + (randyR * iirHeadBumpBR) + (invrandyR * iirHeadBumpCR);
|
||||
if (iirHeadBumpCR > 0) iirHeadBumpCR -= clampR;
|
||||
if (iirHeadBumpCR < 0) iirHeadBumpCR += clampR;
|
||||
HeadBumpR = iirHeadBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleWL = (iirSampleWL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleWL;
|
||||
iirSampleXL = (iirSampleXL * altBmount) + (HeadBumpL * iirBmount); HeadBumpL -= iirSampleXL;
|
||||
|
||||
iirSampleWR = (iirSampleWR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleWR;
|
||||
iirSampleXR = (iirSampleXR * altBmount) + (HeadBumpR * iirBmount); HeadBumpR -= iirSampleXR;
|
||||
|
||||
SubBumpL = HeadBumpL;
|
||||
iirSampleYL = (iirSampleYL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleYL;
|
||||
|
||||
SubBumpR = HeadBumpR;
|
||||
iirSampleYR = (iirSampleYR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleYR;
|
||||
|
||||
SubBumpL = fabs(SubBumpL);
|
||||
if (SubOctaveL == false) {SubBumpL = -SubBumpL;}
|
||||
|
||||
SubBumpR = fabs(SubBumpR);
|
||||
if (SubOctaveR == false) {SubBumpR = -SubBumpR;}
|
||||
|
||||
switch (bflip)
|
||||
{
|
||||
case 1:
|
||||
iirSubBumpAL += (SubBumpL * SubGain);
|
||||
iirSubBumpAL -= (iirSubBumpAL * iirSubBumpAL * iirSubBumpAL * SubBumpFreq);
|
||||
iirSubBumpAL = (invrandyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpAL > 0) iirSubBumpAL -= clampL;
|
||||
if (iirSubBumpAL < 0) iirSubBumpAL += clampL;
|
||||
SubBumpL = iirSubBumpAL;
|
||||
|
||||
iirSubBumpAR += (SubBumpR * SubGain);
|
||||
iirSubBumpAR -= (iirSubBumpAR * iirSubBumpAR * iirSubBumpAR * SubBumpFreq);
|
||||
iirSubBumpAR = (invrandyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpAR > 0) iirSubBumpAR -= clampR;
|
||||
if (iirSubBumpAR < 0) iirSubBumpAR += clampR;
|
||||
SubBumpR = iirSubBumpAR;
|
||||
break;
|
||||
case 2:
|
||||
iirSubBumpBL += (SubBumpL * SubGain);
|
||||
iirSubBumpBL -= (iirSubBumpBL * iirSubBumpBL * iirSubBumpBL * SubBumpFreq);
|
||||
iirSubBumpBL = (randyL * iirSubBumpAL) + (invrandyL * iirSubBumpBL) + (randyL * iirSubBumpCL);
|
||||
if (iirSubBumpBL > 0) iirSubBumpBL -= clampL;
|
||||
if (iirSubBumpBL < 0) iirSubBumpBL += clampL;
|
||||
SubBumpL = iirSubBumpBL;
|
||||
|
||||
iirSubBumpBR += (SubBumpR * SubGain);
|
||||
iirSubBumpBR -= (iirSubBumpBR * iirSubBumpBR * iirSubBumpBR * SubBumpFreq);
|
||||
iirSubBumpBR = (randyR * iirSubBumpAR) + (invrandyR * iirSubBumpBR) + (randyR * iirSubBumpCR);
|
||||
if (iirSubBumpBR > 0) iirSubBumpBR -= clampR;
|
||||
if (iirSubBumpBR < 0) iirSubBumpBR += clampR;
|
||||
SubBumpR = iirSubBumpBR;
|
||||
break;
|
||||
case 3:
|
||||
iirSubBumpCL += (SubBumpL * SubGain);
|
||||
iirSubBumpCL -= (iirSubBumpCL * iirSubBumpCL * iirSubBumpCL * SubBumpFreq);
|
||||
iirSubBumpCL = (randyL * iirSubBumpAL) + (randyL * iirSubBumpBL) + (invrandyL * iirSubBumpCL);
|
||||
if (iirSubBumpCL > 0) iirSubBumpCL -= clampL;
|
||||
if (iirSubBumpCL < 0) iirSubBumpCL += clampL;
|
||||
SubBumpL = iirSubBumpCL;
|
||||
|
||||
iirSubBumpCR += (SubBumpR * SubGain);
|
||||
iirSubBumpCR -= (iirSubBumpCR * iirSubBumpCR * iirSubBumpCR * SubBumpFreq);
|
||||
iirSubBumpCR = (randyR * iirSubBumpAR) + (randyR * iirSubBumpBR) + (invrandyR * iirSubBumpCR);
|
||||
if (iirSubBumpCR > 0) iirSubBumpCR -= clampR;
|
||||
if (iirSubBumpCR < 0) iirSubBumpCR += clampR;
|
||||
SubBumpR = iirSubBumpCR;
|
||||
break;
|
||||
}
|
||||
|
||||
iirSampleZL = (iirSampleZL * altCmount) + (SubBumpL * iirCmount); SubBumpL -= iirSampleZL;
|
||||
iirSampleZR = (iirSampleZR * altCmount) + (SubBumpR * iirCmount); SubBumpR -= iirSampleZR;
|
||||
|
||||
inputSampleL *= driveoutput; //start with the drive section then add lows and subs
|
||||
inputSampleR *= driveoutput; //start with the drive section then add lows and subs
|
||||
|
||||
inputSampleL += ((HeadBumpL + lastHeadBumpL) * BassOutGain);
|
||||
inputSampleL += ((SubBumpL + lastSubBumpL) * SubOutGain);
|
||||
|
||||
inputSampleR += ((HeadBumpR + lastHeadBumpR) * BassOutGain);
|
||||
inputSampleR += ((SubBumpR + lastSubBumpR) * SubOutGain);
|
||||
|
||||
lastHeadBumpL = HeadBumpL;
|
||||
lastSubBumpL = SubBumpL;
|
||||
lastHeadBumpR = HeadBumpR;
|
||||
lastSubBumpR = SubBumpR;
|
||||
|
||||
if (wet !=1.0) {
|
||||
inputSampleL = (inputSampleL * wet) + (drySampleL * dry);
|
||||
inputSampleR = (inputSampleR * wet) + (drySampleR * dry);
|
||||
}
|
||||
//Dry/Wet control, defaults to the last slider
|
||||
|
||||
flip = !flip;
|
||||
bflip++;
|
||||
if (bflip < 1 || bflip > 3) bflip = 1;
|
||||
|
||||
//noise shaping to 64-bit floating point
|
||||
double fpTemp = inputSampleL;
|
||||
fpNShapeL += (inputSampleL-fpTemp);
|
||||
inputSampleL += fpNShapeL;
|
||||
//if this confuses you look at the wordlength for fpTemp :)
|
||||
fpTemp = inputSampleR;
|
||||
fpNShapeR += (inputSampleR-fpTemp);
|
||||
inputSampleR += fpNShapeR;
|
||||
//for deeper space and warmth, we try a non-oscillating noise shaping
|
||||
//that is kind of ruthless: it will forever retain the rounding errors
|
||||
//except we'll dial it back a hair at the end of every buffer processed
|
||||
//end noise shaping on 64 bit output
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
*in1++;
|
||||
*in2++;
|
||||
*out1++;
|
||||
*out2++;
|
||||
}
|
||||
fpNShapeL *= 0.999999;
|
||||
fpNShapeR *= 0.999999;
|
||||
//we will just delicately dial back the FP noise shaping, not even every sample
|
||||
//this is a good place to put subtle 'no runaway' calculations, though bear in mind
|
||||
//that it will be called more often when you use shorter sample buffers in the DAW.
|
||||
//So, very low latency operation will call these calculations more often.
|
||||
}
|
||||
28
plugins/WinVST/DubSub/VSTProject.sln
Executable file
28
plugins/WinVST/DubSub/VSTProject.sln
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VSTProject", "VSTProject.vcxproj", "{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x64.Build.0 = Debug|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.ActiveCfg = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x64.Build.0 = Release|x64
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
plugins/WinVST/DubSub/VSTProject.vcxproj
Executable file
183
plugins/WinVST/DubSub/VSTProject.vcxproj
Executable file
|
|
@ -0,0 +1,183 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp" />
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp" />
|
||||
<ClCompile Include="DubSub.cpp" />
|
||||
<ClCompile Include="DubSubProc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h" />
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h" />
|
||||
<ClInclude Include="DubSub.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
|
||||
<RootNamespace>VSTProject</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>DubSub64</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<ExecutablePath>$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>C:\Users\christopherjohnson\Documents\Visual Studio 2015\Projects\VSTProject\vst2.x;C:\Users\christopherjohnson\Documents\vstsdk2.4;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<PreprocessorDefinitions>WINDOWS;_WINDOWS;WIN32;_USRDLL;_USE_MATH_DEFINES;_CRT_SECURE_NO_DEPRECATE;VST_FORCE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<IgnoreSpecificDefaultLibraries>libcmt.dll;libcmtd.dll;msvcrt.lib;libc.lib;libcd.lib;libcmt.lib;msvcrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<AdditionalDependencies>libcmt.lib;uuid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>vstplug.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
48
plugins/WinVST/DubSub/VSTProject.vcxproj.filters
Executable file
48
plugins/WinVST/DubSub/VSTProject.vcxproj.filters
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\vstplugmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DubSub.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DubSubProc.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\aeffeditor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffect.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\vstsdk2.4\public.sdk\source\vst2.x\audioeffectx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DubSub.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
19
plugins/WinVST/DubSub/VSTProject.vcxproj.user
Executable file
19
plugins/WinVST/DubSub/VSTProject.vcxproj.user
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerAmpDefaultAccelerator>{ADEFF70D-84BF-47A1-91C3-FF6B0FC71218}</LocalDebuggerAmpDefaultAccelerator>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
3
plugins/WinVST/DubSub/vstplug.def
Executable file
3
plugins/WinVST/DubSub/vstplug.def
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
VSTPluginMain
|
||||
main=VSTPluginMain
|
||||
Loading…
Add table
Add a link
Reference in a new issue