mirror of
https://github.com/airwindows/airwindows.git
synced 2026-05-21 06:46:21 -06:00
TapeBias
This commit is contained in:
parent
2cba64cb17
commit
4ae6d34724
84 changed files with 22982 additions and 1 deletions
BIN
plugins/WinVST/ToTape7/.vs/Console4Channel64/v14/.suo
Executable file
BIN
plugins/WinVST/ToTape7/.vs/Console4Channel64/v14/.suo
Executable file
Binary file not shown.
BIN
plugins/WinVST/ToTape7/.vs/VSTProject/v14/.suo
Executable file
BIN
plugins/WinVST/ToTape7/.vs/VSTProject/v14/.suo
Executable file
Binary file not shown.
226
plugins/WinVST/ToTape7/ToTape7.cpp
Executable file
226
plugins/WinVST/ToTape7/ToTape7.cpp
Executable file
|
|
@ -0,0 +1,226 @@
|
|||
/* ========================================
|
||||
* ToTape7 - ToTape7.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __ToTape7_H
|
||||
#include "ToTape7.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new ToTape7(audioMaster);}
|
||||
|
||||
ToTape7::ToTape7(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.5;
|
||||
C = 0.5;
|
||||
D = 0.25;
|
||||
E = 0.5;
|
||||
F = 0.5;
|
||||
G = 0.5;
|
||||
H = 0.5;
|
||||
I = 0.5;
|
||||
J = 0.5;
|
||||
|
||||
iirEncL = 0.0;
|
||||
iirEncR = 0.0;
|
||||
|
||||
for (int temp = 0; temp < 1001; temp++) {dL[temp] = 0.0;dR[temp] = 0.0;}
|
||||
sweepL = M_PI;
|
||||
sweepR = M_PI;
|
||||
nextmaxL = 0.5;
|
||||
nextmaxR = 0.5;
|
||||
gcount = 0;
|
||||
|
||||
for (int x = 0; x < gslew_total; x++) gslew[x] = 0.0;
|
||||
|
||||
iirMidRollerL = 0.0;
|
||||
iirLowCutoffL = 0.0;
|
||||
iirMidRollerR = 0.0;
|
||||
iirLowCutoffR = 0.0;
|
||||
|
||||
headBumpL = 0.0;
|
||||
headBumpR = 0.0;
|
||||
for (int x = 0; x < hdb_total; x++) {hdbA[x] = 0.0;hdbB[x] = 0.0;}
|
||||
//from ZBandpass, so I can use enums with it
|
||||
|
||||
iirDecL = 0.0;
|
||||
iirDecR = 0.0;
|
||||
|
||||
lastSampleL = 0.0;
|
||||
wasPosClipL = false;
|
||||
wasNegClipL = false;
|
||||
lastSampleR = 0.0;
|
||||
wasPosClipR = false;
|
||||
wasNegClipR = false;
|
||||
for (int x = 0; x < 16; x++) {intermediateL[x] = 0.0; intermediateR[x] = 0.0;}
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
|
||||
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
|
||||
_canDo.insert("x2in2out");
|
||||
setNumInputs(kNumInputs);
|
||||
setNumOutputs(kNumOutputs);
|
||||
setUniqueID(kUniqueId);
|
||||
canProcessReplacing(); // supports output replacing
|
||||
canDoubleReplacing(); // supports double precision processing
|
||||
programsAreChunks(true);
|
||||
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
|
||||
}
|
||||
|
||||
ToTape7::~ToTape7() {}
|
||||
VstInt32 ToTape7::getVendorVersion () {return 1000;}
|
||||
void ToTape7::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void ToTape7::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 ToTape7::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 ToTape7::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 ToTape7::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 ToTape7::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 ToTape7::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "EncAmt", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "EncFreq", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "TapeDrv", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "Flutter", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "FlutSpd", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "Bias", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "HeadBmp", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "HeadFrq", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "DecAmt", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "DecFreq", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void ToTape7::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
case kParamE: float2string (E, text, kVstMaxParamStrLen); break;
|
||||
case kParamF: float2string (F, text, kVstMaxParamStrLen); break;
|
||||
case kParamG: float2string (G, text, kVstMaxParamStrLen); break;
|
||||
case kParamH: float2string (((H*H)*175.0)+25.0, text, kVstMaxParamStrLen); break;
|
||||
case kParamI: float2string (I, 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 ToTape7::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, "hz", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 ToTape7::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool ToTape7::getEffectName(char* name) {
|
||||
vst_strncpy(name, "ToTape7", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory ToTape7::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool ToTape7::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows ToTape7", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool ToTape7::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
159
plugins/WinVST/ToTape7/ToTape7.h
Executable file
159
plugins/WinVST/ToTape7/ToTape7.h
Executable file
|
|
@ -0,0 +1,159 @@
|
|||
/* ========================================
|
||||
* ToTape7 - ToTape7.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) Airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __ToTape7_H
|
||||
#define __ToTape7_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 = 'totv'; //Change this to what the AU identity is!
|
||||
|
||||
class ToTape7 :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
ToTape7(audioMasterCallback audioMaster);
|
||||
~ToTape7();
|
||||
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;
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
float G;
|
||||
float H;
|
||||
float I;
|
||||
float J;
|
||||
|
||||
double iirEncL;
|
||||
double iirEncR;
|
||||
|
||||
double dL[1002];
|
||||
double dR[1002];
|
||||
double sweepL;
|
||||
double sweepR;
|
||||
double nextmaxL;
|
||||
double nextmaxR;
|
||||
int gcount;
|
||||
|
||||
enum {
|
||||
prevSampL1,
|
||||
prevSampR1,
|
||||
threshold1,
|
||||
prevSampL2,
|
||||
prevSampR2,
|
||||
threshold2,
|
||||
prevSampL3,
|
||||
prevSampR3,
|
||||
threshold3,
|
||||
prevSampL4,
|
||||
prevSampR4,
|
||||
threshold4,
|
||||
prevSampL5,
|
||||
prevSampR5,
|
||||
threshold5,
|
||||
prevSampL6,
|
||||
prevSampR6,
|
||||
threshold6,
|
||||
prevSampL7,
|
||||
prevSampR7,
|
||||
threshold7,
|
||||
prevSampL8,
|
||||
prevSampR8,
|
||||
threshold8,
|
||||
prevSampL9,
|
||||
prevSampR9,
|
||||
threshold9,
|
||||
gslew_total
|
||||
}; //fixed frequency pear filter for ultrasonics, stereo
|
||||
double gslew[gslew_total]; //end bias
|
||||
|
||||
double iirMidRollerL;
|
||||
double iirLowCutoffL;
|
||||
double iirMidRollerR;
|
||||
double iirLowCutoffR;
|
||||
|
||||
double headBumpL;
|
||||
double headBumpR;
|
||||
enum {
|
||||
hdb_freq,
|
||||
hdb_reso,
|
||||
hdb_a0,
|
||||
hdb_a1,
|
||||
hdb_a2,
|
||||
hdb_b1,
|
||||
hdb_b2,
|
||||
hdb_sL1,
|
||||
hdb_sL2,
|
||||
hdb_sR1,
|
||||
hdb_sR2,
|
||||
hdb_total
|
||||
}; //fixed frequency biquad filter for ultrasonics, stereo
|
||||
double hdbA[hdb_total];
|
||||
double hdbB[hdb_total];
|
||||
|
||||
double iirDecL;
|
||||
double iirDecR;
|
||||
|
||||
double lastSampleL;
|
||||
double intermediateL[16];
|
||||
bool wasPosClipL;
|
||||
bool wasNegClipL;
|
||||
double lastSampleR;
|
||||
double intermediateR[16];
|
||||
bool wasPosClipR;
|
||||
bool wasNegClipR; //Stereo ClipOnly2
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
//default stuff
|
||||
};
|
||||
|
||||
#endif
|
||||
556
plugins/WinVST/ToTape7/ToTape7Proc.cpp
Executable file
556
plugins/WinVST/ToTape7/ToTape7Proc.cpp
Executable file
|
|
@ -0,0 +1,556 @@
|
|||
/* ========================================
|
||||
* ToTape7 - ToTape7.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __ToTape7_H
|
||||
#include "ToTape7.h"
|
||||
#endif
|
||||
|
||||
void ToTape7::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
float* in1 = inputs[0];
|
||||
float* in2 = inputs[1];
|
||||
float* out1 = outputs[0];
|
||||
float* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
int spacing = floor(overallscale); //should give us working basic scaling, usually 2 or 4
|
||||
if (spacing < 1) spacing = 1; if (spacing > 16) spacing = 16;
|
||||
|
||||
double dublyAmount = pow(A,3)*0.105468;
|
||||
double iirEncFreq = B/overallscale;
|
||||
double iirMidFreq = ((B * 0.618) + 0.382)/overallscale;
|
||||
double inputGain = pow(C*2.0,2.0);
|
||||
double flutDepth = pow(D,5)*overallscale*60;
|
||||
if (flutDepth > 498.0) flutDepth = 498.0;
|
||||
double flutFrequency = (0.02*pow(E,3))/overallscale;
|
||||
double bias = (F*2.0)-1.0;
|
||||
double underBias = (pow(bias,4)*0.25)/overallscale;
|
||||
double overBias = pow(1.0-bias,3)/overallscale;
|
||||
if (bias > 0.0) underBias = 0.0;
|
||||
if (bias < 0.0) overBias = 1.0/overallscale;
|
||||
|
||||
gslew[threshold9] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold8] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold7] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold6] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold5] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold4] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold3] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold2] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold1] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
|
||||
double headBumpDrive = (G*0.1)/overallscale;
|
||||
double headBumpMix = G*0.5;
|
||||
|
||||
hdbA[hdb_freq] = (((H*H)*175.0)+25.0)/getSampleRate();
|
||||
hdbB[hdb_freq] = hdbA[hdb_freq]*0.9375;
|
||||
hdbB[hdb_reso] = hdbA[hdb_reso] = 0.618033988749894848204586;
|
||||
hdbB[hdb_a1] = hdbA[hdb_a1] = 0.0;
|
||||
|
||||
double K = tan(M_PI * hdbA[hdb_freq]);
|
||||
double norm = 1.0 / (1.0 + K / hdbA[hdb_reso] + K * K);
|
||||
hdbA[hdb_a0] = K / hdbA[hdb_reso] * norm;
|
||||
hdbA[hdb_a2] = -hdbA[hdb_a0];
|
||||
hdbA[hdb_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
hdbA[hdb_b2] = (1.0 - K / hdbA[hdb_reso] + K * K) * norm;
|
||||
K = tan(M_PI * hdbB[hdb_freq]);
|
||||
norm = 1.0 / (1.0 + K / hdbB[hdb_reso] + K * K);
|
||||
hdbB[hdb_a0] = K / hdbB[hdb_reso] * norm;
|
||||
hdbB[hdb_a2] = -hdbB[hdb_a0];
|
||||
hdbB[hdb_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
hdbB[hdb_b2] = (1.0 - K / hdbB[hdb_reso] + K * K) * norm;
|
||||
|
||||
double outlyAmount = pow(I,3)*0.109744;
|
||||
double iirDecFreq = J/overallscale;
|
||||
double subCurve = sin(G*M_PI);
|
||||
double iirSubFreq = (subCurve*0.008)/overallscale;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
//begin Dubly encode
|
||||
double doubly = 0.0;
|
||||
if (dublyAmount > 0.0) {
|
||||
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
|
||||
double doubly = inputSampleL - iirEncL;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleL += doubly*dublyAmount;
|
||||
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
|
||||
doubly = inputSampleR - iirEncR;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleR += doubly*dublyAmount;
|
||||
}
|
||||
//end Dubly encode
|
||||
|
||||
if (inputGain != 1.0) {
|
||||
inputSampleL *= inputGain;
|
||||
inputSampleR *= inputGain;
|
||||
}
|
||||
|
||||
//begin Flutter
|
||||
if (flutDepth > 0.0) {
|
||||
if (gcount < 0 || gcount > 999) gcount = 999;
|
||||
dL[gcount] = inputSampleL;
|
||||
int count = gcount;
|
||||
double offset = flutDepth + (flutDepth * sin(sweepL));
|
||||
sweepL += nextmaxL * flutFrequency;
|
||||
if (sweepL > (M_PI*2.0)) {sweepL -= M_PI*2.0; nextmaxL = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);}
|
||||
count += (int)floor(offset);
|
||||
inputSampleL = (dL[count-((count > 999)?1000:0)] * (1-(offset-floor(offset))));
|
||||
inputSampleL += (dL[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset)));
|
||||
dR[gcount] = inputSampleR;
|
||||
count = gcount;
|
||||
offset = flutDepth + (flutDepth * sin(sweepR));
|
||||
sweepR += nextmaxR * flutFrequency;
|
||||
if (sweepR > (M_PI*2.0)) {sweepR -= M_PI*2.0; nextmaxR = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);}
|
||||
count += (int)floor(offset);
|
||||
inputSampleR = (dR[count-((count > 999)?1000:0)] * (1-(offset-floor(offset))));
|
||||
inputSampleR += (dR[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset)));
|
||||
gcount--;
|
||||
}
|
||||
//end Flutter
|
||||
|
||||
//start bias routine
|
||||
if (fabs(bias) > 0.001) {
|
||||
for (int x = 0; x < gslew_total; x += 3) {
|
||||
if (underBias > 0.0) {
|
||||
double stuck = fabs(inputSampleL - (gslew[x]/0.975)) / underBias;
|
||||
if (stuck < 1.0) inputSampleL = (inputSampleL * stuck) + ((gslew[x]/0.975)*(1.0-stuck));
|
||||
stuck = fabs(inputSampleR - (gslew[x+1]/0.975)) / underBias;
|
||||
if (stuck < 1.0) inputSampleR = (inputSampleR * stuck) + ((gslew[x+1]/0.975)*(1.0-stuck));
|
||||
}
|
||||
if ((inputSampleL - gslew[x]) > gslew[x+2]) inputSampleL = gslew[x] + gslew[x+2];
|
||||
if (-(inputSampleL - gslew[x]) > gslew[x+2]) inputSampleL = gslew[x] - gslew[x+2];
|
||||
gslew[x] = inputSampleL * 0.975;
|
||||
if ((inputSampleR - gslew[x+1]) > gslew[x+2]) inputSampleR = gslew[x+1] + gslew[x+2];
|
||||
if (-(inputSampleR - gslew[x+1]) > gslew[x+2]) inputSampleR = gslew[x+1] - gslew[x+2];
|
||||
gslew[x+1] = inputSampleR * 0.975;
|
||||
}
|
||||
}
|
||||
//end bias routine
|
||||
|
||||
//toTape basic algorithm L
|
||||
iirMidRollerL = (iirMidRollerL * (1.0-iirMidFreq)) + (inputSampleL*iirMidFreq);
|
||||
double HighsSampleL = inputSampleL - iirMidRollerL;
|
||||
double LowsSampleL = iirMidRollerL;
|
||||
if (iirSubFreq > 0.0) {
|
||||
iirLowCutoffL = (iirLowCutoffL * (1.0-iirSubFreq)) + (LowsSampleL*iirSubFreq);
|
||||
LowsSampleL -= iirLowCutoffL;
|
||||
}
|
||||
if (LowsSampleL > 1.57079633) LowsSampleL = 1.57079633;
|
||||
if (LowsSampleL < -1.57079633) LowsSampleL = -1.57079633;
|
||||
LowsSampleL = sin(LowsSampleL);
|
||||
double thinnedHighSample = fabs(HighsSampleL)*1.57079633;
|
||||
if (thinnedHighSample > 1.57079633) thinnedHighSample = 1.57079633;
|
||||
thinnedHighSample = 1.0-cos(thinnedHighSample);
|
||||
if (HighsSampleL < 0) thinnedHighSample = -thinnedHighSample;
|
||||
HighsSampleL -= thinnedHighSample;
|
||||
|
||||
//toTape basic algorithm R
|
||||
iirMidRollerR = (iirMidRollerR * (1.0-iirMidFreq)) + (inputSampleR*iirMidFreq);
|
||||
double HighsSampleR = inputSampleR - iirMidRollerR;
|
||||
double LowsSampleR = iirMidRollerR;
|
||||
if (iirSubFreq > 0.0) {
|
||||
iirLowCutoffR = (iirLowCutoffR * (1.0-iirSubFreq)) + (LowsSampleR*iirSubFreq);
|
||||
LowsSampleR -= iirLowCutoffR;
|
||||
}
|
||||
if (LowsSampleR > 1.57079633) LowsSampleR = 1.57079633;
|
||||
if (LowsSampleR < -1.57079633) LowsSampleR = -1.57079633;
|
||||
LowsSampleR = sin(LowsSampleR);
|
||||
thinnedHighSample = fabs(HighsSampleR)*1.57079633;
|
||||
if (thinnedHighSample > 1.57079633) thinnedHighSample = 1.57079633;
|
||||
thinnedHighSample = 1.0-cos(thinnedHighSample);
|
||||
if (HighsSampleR < 0) thinnedHighSample = -thinnedHighSample;
|
||||
HighsSampleR -= thinnedHighSample;
|
||||
|
||||
//begin HeadBump
|
||||
double headBumpSampleL = 0.0;
|
||||
double headBumpSampleR = 0.0;
|
||||
if (headBumpMix > 0.0) {
|
||||
headBumpL += (LowsSampleL * headBumpDrive);
|
||||
headBumpL -= (headBumpL * headBumpL * headBumpL * (0.0618/sqrt(overallscale)));
|
||||
headBumpR += (LowsSampleR * headBumpDrive);
|
||||
headBumpR -= (headBumpR * headBumpR * headBumpR * (0.0618/sqrt(overallscale)));
|
||||
double headBiqSampleL = (headBumpL * hdbA[hdb_a0]) + hdbA[hdb_sL1];
|
||||
hdbA[hdb_sL1] = (headBumpL * hdbA[hdb_a1]) - (headBiqSampleL * hdbA[hdb_b1]) + hdbA[hdb_sL2];
|
||||
hdbA[hdb_sL2] = (headBumpL * hdbA[hdb_a2]) - (headBiqSampleL * hdbA[hdb_b2]);
|
||||
headBumpSampleL = (headBiqSampleL * hdbB[hdb_a0]) + hdbB[hdb_sL1];
|
||||
hdbB[hdb_sL1] = (headBiqSampleL * hdbB[hdb_a1]) - (headBumpSampleL * hdbB[hdb_b1]) + hdbB[hdb_sL2];
|
||||
hdbB[hdb_sL2] = (headBiqSampleL * hdbB[hdb_a2]) - (headBumpSampleL * hdbB[hdb_b2]);
|
||||
double headBiqSampleR = (headBumpR * hdbA[hdb_a0]) + hdbA[hdb_sR1];
|
||||
hdbA[hdb_sR1] = (headBumpR * hdbA[hdb_a1]) - (headBiqSampleR * hdbA[hdb_b1]) + hdbA[hdb_sR2];
|
||||
hdbA[hdb_sR2] = (headBumpR * hdbA[hdb_a2]) - (headBiqSampleR * hdbA[hdb_b2]);
|
||||
headBumpSampleR = (headBiqSampleR * hdbB[hdb_a0]) + hdbB[hdb_sR1];
|
||||
hdbB[hdb_sR1] = (headBiqSampleR * hdbB[hdb_a1]) - (headBumpSampleR * hdbB[hdb_b1]) + hdbB[hdb_sR2];
|
||||
hdbB[hdb_sR2] = (headBiqSampleR * hdbB[hdb_a2]) - (headBumpSampleR * hdbB[hdb_b2]);
|
||||
}
|
||||
//end HeadBump
|
||||
|
||||
inputSampleL = LowsSampleL + HighsSampleL + (headBumpSampleL * headBumpMix);
|
||||
inputSampleR = LowsSampleR + HighsSampleR + (headBumpSampleR * headBumpMix);
|
||||
|
||||
//begin Dubly decode
|
||||
if (outlyAmount > 0.0) {
|
||||
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
|
||||
doubly = inputSampleL - iirDecL;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleL -= doubly*outlyAmount;
|
||||
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
|
||||
doubly = inputSampleR - iirDecR;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleR -= doubly*outlyAmount;
|
||||
}
|
||||
//end Dubly decode
|
||||
|
||||
//begin ClipOnly2 stereo as a little, compressed chunk that can be dropped into code
|
||||
if (inputSampleL > 4.0) inputSampleL = 4.0; if (inputSampleL < -4.0) inputSampleL = -4.0;
|
||||
if (wasPosClipL == true) { //current will be over
|
||||
if (inputSampleL<lastSampleL) lastSampleL=0.7058208+(inputSampleL*0.2609148);
|
||||
else lastSampleL = 0.2491717+(lastSampleL*0.7390851);
|
||||
} wasPosClipL = false;
|
||||
if (inputSampleL>0.9549925859) {wasPosClipL=true;inputSampleL=0.7058208+(lastSampleL*0.2609148);}
|
||||
if (wasNegClipL == true) { //current will be -over
|
||||
if (inputSampleL > lastSampleL) lastSampleL=-0.7058208+(inputSampleL*0.2609148);
|
||||
else lastSampleL=-0.2491717+(lastSampleL*0.7390851);
|
||||
} wasNegClipL = false;
|
||||
if (inputSampleL<-0.9549925859) {wasNegClipL=true;inputSampleL=-0.7058208+(lastSampleL*0.2609148);}
|
||||
intermediateL[spacing] = inputSampleL;
|
||||
inputSampleL = lastSampleL; //Latency is however many samples equals one 44.1k sample
|
||||
for (int x = spacing; x > 0; x--) intermediateL[x-1] = intermediateL[x];
|
||||
lastSampleL = intermediateL[0]; //run a little buffer to handle this
|
||||
|
||||
if (inputSampleR > 4.0) inputSampleR = 4.0; if (inputSampleR < -4.0) inputSampleR = -4.0;
|
||||
if (wasPosClipR == true) { //current will be over
|
||||
if (inputSampleR<lastSampleR) lastSampleR=0.7058208+(inputSampleR*0.2609148);
|
||||
else lastSampleR = 0.2491717+(lastSampleR*0.7390851);
|
||||
} wasPosClipR = false;
|
||||
if (inputSampleR>0.9549925859) {wasPosClipR=true;inputSampleR=0.7058208+(lastSampleR*0.2609148);}
|
||||
if (wasNegClipR == true) { //current will be -over
|
||||
if (inputSampleR > lastSampleR) lastSampleR=-0.7058208+(inputSampleR*0.2609148);
|
||||
else lastSampleR=-0.2491717+(lastSampleR*0.7390851);
|
||||
} wasNegClipR = false;
|
||||
if (inputSampleR<-0.9549925859) {wasNegClipR=true;inputSampleR=-0.7058208+(lastSampleR*0.2609148);}
|
||||
intermediateR[spacing] = inputSampleR;
|
||||
inputSampleR = lastSampleR; //Latency is however many samples equals one 44.1k sample
|
||||
for (int x = spacing; x > 0; x--) intermediateR[x-1] = intermediateR[x];
|
||||
lastSampleR = intermediateR[0]; //run a little buffer to handle this
|
||||
//end ClipOnly2 stereo as a little, compressed chunk that can be dropped into code
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
|
||||
void ToTape7::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
double* out1 = outputs[0];
|
||||
double* out2 = outputs[1];
|
||||
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
|
||||
int spacing = floor(overallscale); //should give us working basic scaling, usually 2 or 4
|
||||
if (spacing < 1) spacing = 1; if (spacing > 16) spacing = 16;
|
||||
|
||||
double dublyAmount = pow(A,3)*0.105468;
|
||||
double iirEncFreq = B/overallscale;
|
||||
double iirMidFreq = ((B * 0.618) + 0.382)/overallscale;
|
||||
double inputGain = pow(C*2.0,2.0);
|
||||
double flutDepth = pow(D,5)*overallscale*60;
|
||||
if (flutDepth > 498.0) flutDepth = 498.0;
|
||||
double flutFrequency = (0.02*pow(E,3))/overallscale;
|
||||
double bias = (F*2.0)-1.0;
|
||||
double underBias = (pow(bias,4)*0.25)/overallscale;
|
||||
double overBias = pow(1.0-bias,3)/overallscale;
|
||||
if (bias > 0.0) underBias = 0.0;
|
||||
if (bias < 0.0) overBias = 1.0/overallscale;
|
||||
|
||||
gslew[threshold9] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold8] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold7] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold6] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold5] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold4] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold3] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold2] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
gslew[threshold1] = overBias;
|
||||
overBias *= 1.618033988749894848204586;
|
||||
|
||||
double headBumpDrive = (G*0.1)/overallscale;
|
||||
double headBumpMix = G*0.5;
|
||||
|
||||
hdbA[hdb_freq] = (((H*H)*175.0)+25.0)/getSampleRate();
|
||||
hdbB[hdb_freq] = hdbA[hdb_freq]*0.9375;
|
||||
hdbB[hdb_reso] = hdbA[hdb_reso] = 0.618033988749894848204586;
|
||||
hdbB[hdb_a1] = hdbA[hdb_a1] = 0.0;
|
||||
|
||||
double K = tan(M_PI * hdbA[hdb_freq]);
|
||||
double norm = 1.0 / (1.0 + K / hdbA[hdb_reso] + K * K);
|
||||
hdbA[hdb_a0] = K / hdbA[hdb_reso] * norm;
|
||||
hdbA[hdb_a2] = -hdbA[hdb_a0];
|
||||
hdbA[hdb_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
hdbA[hdb_b2] = (1.0 - K / hdbA[hdb_reso] + K * K) * norm;
|
||||
K = tan(M_PI * hdbB[hdb_freq]);
|
||||
norm = 1.0 / (1.0 + K / hdbB[hdb_reso] + K * K);
|
||||
hdbB[hdb_a0] = K / hdbB[hdb_reso] * norm;
|
||||
hdbB[hdb_a2] = -hdbB[hdb_a0];
|
||||
hdbB[hdb_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
hdbB[hdb_b2] = (1.0 - K / hdbB[hdb_reso] + K * K) * norm;
|
||||
|
||||
double outlyAmount = pow(I,3)*0.109744;
|
||||
double iirDecFreq = J/overallscale;
|
||||
double subCurve = sin(G*M_PI);
|
||||
double iirSubFreq = (subCurve*0.008)/overallscale;
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
//begin Dubly encode
|
||||
double doubly = 0.0;
|
||||
if (dublyAmount > 0.0) {
|
||||
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
|
||||
double doubly = inputSampleL - iirEncL;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleL += doubly*dublyAmount;
|
||||
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
|
||||
doubly = inputSampleR - iirEncR;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleR += doubly*dublyAmount;
|
||||
}
|
||||
//end Dubly encode
|
||||
|
||||
if (inputGain != 1.0) {
|
||||
inputSampleL *= inputGain;
|
||||
inputSampleR *= inputGain;
|
||||
}
|
||||
|
||||
//begin Flutter
|
||||
if (flutDepth > 0.0) {
|
||||
if (gcount < 0 || gcount > 999) gcount = 999;
|
||||
dL[gcount] = inputSampleL;
|
||||
int count = gcount;
|
||||
double offset = flutDepth + (flutDepth * sin(sweepL));
|
||||
sweepL += nextmaxL * flutFrequency;
|
||||
if (sweepL > (M_PI*2.0)) {sweepL -= M_PI*2.0; nextmaxL = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);}
|
||||
count += (int)floor(offset);
|
||||
inputSampleL = (dL[count-((count > 999)?1000:0)] * (1-(offset-floor(offset))));
|
||||
inputSampleL += (dL[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset)));
|
||||
dR[gcount] = inputSampleR;
|
||||
count = gcount;
|
||||
offset = flutDepth + (flutDepth * sin(sweepR));
|
||||
sweepR += nextmaxR * flutFrequency;
|
||||
if (sweepR > (M_PI*2.0)) {sweepR -= M_PI*2.0; nextmaxR = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);}
|
||||
count += (int)floor(offset);
|
||||
inputSampleR = (dR[count-((count > 999)?1000:0)] * (1-(offset-floor(offset))));
|
||||
inputSampleR += (dR[count+1-((count+1 > 999)?1000:0)] * (offset-floor(offset)));
|
||||
gcount--;
|
||||
}
|
||||
//end Flutter
|
||||
|
||||
//start bias routine
|
||||
if (fabs(bias) > 0.001) {
|
||||
for (int x = 0; x < gslew_total; x += 3) {
|
||||
if (underBias > 0.0) {
|
||||
double stuck = fabs(inputSampleL - (gslew[x]/0.975)) / underBias;
|
||||
if (stuck < 1.0) inputSampleL = (inputSampleL * stuck) + ((gslew[x]/0.975)*(1.0-stuck));
|
||||
stuck = fabs(inputSampleR - (gslew[x+1]/0.975)) / underBias;
|
||||
if (stuck < 1.0) inputSampleR = (inputSampleR * stuck) + ((gslew[x+1]/0.975)*(1.0-stuck));
|
||||
}
|
||||
if ((inputSampleL - gslew[x]) > gslew[x+2]) inputSampleL = gslew[x] + gslew[x+2];
|
||||
if (-(inputSampleL - gslew[x]) > gslew[x+2]) inputSampleL = gslew[x] - gslew[x+2];
|
||||
gslew[x] = inputSampleL * 0.975;
|
||||
if ((inputSampleR - gslew[x+1]) > gslew[x+2]) inputSampleR = gslew[x+1] + gslew[x+2];
|
||||
if (-(inputSampleR - gslew[x+1]) > gslew[x+2]) inputSampleR = gslew[x+1] - gslew[x+2];
|
||||
gslew[x+1] = inputSampleR * 0.975;
|
||||
}
|
||||
}
|
||||
//end bias routine
|
||||
|
||||
//toTape basic algorithm L
|
||||
iirMidRollerL = (iirMidRollerL * (1.0-iirMidFreq)) + (inputSampleL*iirMidFreq);
|
||||
double HighsSampleL = inputSampleL - iirMidRollerL;
|
||||
double LowsSampleL = iirMidRollerL;
|
||||
if (iirSubFreq > 0.0) {
|
||||
iirLowCutoffL = (iirLowCutoffL * (1.0-iirSubFreq)) + (LowsSampleL*iirSubFreq);
|
||||
LowsSampleL -= iirLowCutoffL;
|
||||
}
|
||||
if (LowsSampleL > 1.57079633) LowsSampleL = 1.57079633;
|
||||
if (LowsSampleL < -1.57079633) LowsSampleL = -1.57079633;
|
||||
LowsSampleL = sin(LowsSampleL);
|
||||
double thinnedHighSample = fabs(HighsSampleL)*1.57079633;
|
||||
if (thinnedHighSample > 1.57079633) thinnedHighSample = 1.57079633;
|
||||
thinnedHighSample = 1.0-cos(thinnedHighSample);
|
||||
if (HighsSampleL < 0) thinnedHighSample = -thinnedHighSample;
|
||||
HighsSampleL -= thinnedHighSample;
|
||||
|
||||
//toTape basic algorithm R
|
||||
iirMidRollerR = (iirMidRollerR * (1.0-iirMidFreq)) + (inputSampleR*iirMidFreq);
|
||||
double HighsSampleR = inputSampleR - iirMidRollerR;
|
||||
double LowsSampleR = iirMidRollerR;
|
||||
if (iirSubFreq > 0.0) {
|
||||
iirLowCutoffR = (iirLowCutoffR * (1.0-iirSubFreq)) + (LowsSampleR*iirSubFreq);
|
||||
LowsSampleR -= iirLowCutoffR;
|
||||
}
|
||||
if (LowsSampleR > 1.57079633) LowsSampleR = 1.57079633;
|
||||
if (LowsSampleR < -1.57079633) LowsSampleR = -1.57079633;
|
||||
LowsSampleR = sin(LowsSampleR);
|
||||
thinnedHighSample = fabs(HighsSampleR)*1.57079633;
|
||||
if (thinnedHighSample > 1.57079633) thinnedHighSample = 1.57079633;
|
||||
thinnedHighSample = 1.0-cos(thinnedHighSample);
|
||||
if (HighsSampleR < 0) thinnedHighSample = -thinnedHighSample;
|
||||
HighsSampleR -= thinnedHighSample;
|
||||
|
||||
//begin HeadBump
|
||||
double headBumpSampleL = 0.0;
|
||||
double headBumpSampleR = 0.0;
|
||||
if (headBumpMix > 0.0) {
|
||||
headBumpL += (LowsSampleL * headBumpDrive);
|
||||
headBumpL -= (headBumpL * headBumpL * headBumpL * (0.0618/sqrt(overallscale)));
|
||||
headBumpR += (LowsSampleR * headBumpDrive);
|
||||
headBumpR -= (headBumpR * headBumpR * headBumpR * (0.0618/sqrt(overallscale)));
|
||||
double headBiqSampleL = (headBumpL * hdbA[hdb_a0]) + hdbA[hdb_sL1];
|
||||
hdbA[hdb_sL1] = (headBumpL * hdbA[hdb_a1]) - (headBiqSampleL * hdbA[hdb_b1]) + hdbA[hdb_sL2];
|
||||
hdbA[hdb_sL2] = (headBumpL * hdbA[hdb_a2]) - (headBiqSampleL * hdbA[hdb_b2]);
|
||||
headBumpSampleL = (headBiqSampleL * hdbB[hdb_a0]) + hdbB[hdb_sL1];
|
||||
hdbB[hdb_sL1] = (headBiqSampleL * hdbB[hdb_a1]) - (headBumpSampleL * hdbB[hdb_b1]) + hdbB[hdb_sL2];
|
||||
hdbB[hdb_sL2] = (headBiqSampleL * hdbB[hdb_a2]) - (headBumpSampleL * hdbB[hdb_b2]);
|
||||
double headBiqSampleR = (headBumpR * hdbA[hdb_a0]) + hdbA[hdb_sR1];
|
||||
hdbA[hdb_sR1] = (headBumpR * hdbA[hdb_a1]) - (headBiqSampleR * hdbA[hdb_b1]) + hdbA[hdb_sR2];
|
||||
hdbA[hdb_sR2] = (headBumpR * hdbA[hdb_a2]) - (headBiqSampleR * hdbA[hdb_b2]);
|
||||
headBumpSampleR = (headBiqSampleR * hdbB[hdb_a0]) + hdbB[hdb_sR1];
|
||||
hdbB[hdb_sR1] = (headBiqSampleR * hdbB[hdb_a1]) - (headBumpSampleR * hdbB[hdb_b1]) + hdbB[hdb_sR2];
|
||||
hdbB[hdb_sR2] = (headBiqSampleR * hdbB[hdb_a2]) - (headBumpSampleR * hdbB[hdb_b2]);
|
||||
}
|
||||
//end HeadBump
|
||||
|
||||
inputSampleL = LowsSampleL + HighsSampleL + (headBumpSampleL * headBumpMix);
|
||||
inputSampleR = LowsSampleR + HighsSampleR + (headBumpSampleR * headBumpMix);
|
||||
|
||||
//begin Dubly decode
|
||||
if (outlyAmount > 0.0) {
|
||||
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
|
||||
doubly = inputSampleL - iirDecL;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleL -= doubly*outlyAmount;
|
||||
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
|
||||
doubly = inputSampleR - iirDecR;
|
||||
if (doubly > 1.0) doubly = 1.0; if (doubly < -1.0) doubly = -1.0;
|
||||
if (doubly > 0) doubly = log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
if (doubly < 0) doubly = -log(1.0+(255*fabs(doubly)))/2.40823996531;
|
||||
inputSampleR -= doubly*outlyAmount;
|
||||
}
|
||||
//end Dubly decode
|
||||
|
||||
//begin ClipOnly2 stereo as a little, compressed chunk that can be dropped into code
|
||||
if (inputSampleL > 4.0) inputSampleL = 4.0; if (inputSampleL < -4.0) inputSampleL = -4.0;
|
||||
if (wasPosClipL == true) { //current will be over
|
||||
if (inputSampleL<lastSampleL) lastSampleL=0.7058208+(inputSampleL*0.2609148);
|
||||
else lastSampleL = 0.2491717+(lastSampleL*0.7390851);
|
||||
} wasPosClipL = false;
|
||||
if (inputSampleL>0.9549925859) {wasPosClipL=true;inputSampleL=0.7058208+(lastSampleL*0.2609148);}
|
||||
if (wasNegClipL == true) { //current will be -over
|
||||
if (inputSampleL > lastSampleL) lastSampleL=-0.7058208+(inputSampleL*0.2609148);
|
||||
else lastSampleL=-0.2491717+(lastSampleL*0.7390851);
|
||||
} wasNegClipL = false;
|
||||
if (inputSampleL<-0.9549925859) {wasNegClipL=true;inputSampleL=-0.7058208+(lastSampleL*0.2609148);}
|
||||
intermediateL[spacing] = inputSampleL;
|
||||
inputSampleL = lastSampleL; //Latency is however many samples equals one 44.1k sample
|
||||
for (int x = spacing; x > 0; x--) intermediateL[x-1] = intermediateL[x];
|
||||
lastSampleL = intermediateL[0]; //run a little buffer to handle this
|
||||
|
||||
if (inputSampleR > 4.0) inputSampleR = 4.0; if (inputSampleR < -4.0) inputSampleR = -4.0;
|
||||
if (wasPosClipR == true) { //current will be over
|
||||
if (inputSampleR<lastSampleR) lastSampleR=0.7058208+(inputSampleR*0.2609148);
|
||||
else lastSampleR = 0.2491717+(lastSampleR*0.7390851);
|
||||
} wasPosClipR = false;
|
||||
if (inputSampleR>0.9549925859) {wasPosClipR=true;inputSampleR=0.7058208+(lastSampleR*0.2609148);}
|
||||
if (wasNegClipR == true) { //current will be -over
|
||||
if (inputSampleR > lastSampleR) lastSampleR=-0.7058208+(inputSampleR*0.2609148);
|
||||
else lastSampleR=-0.2491717+(lastSampleR*0.7390851);
|
||||
} wasNegClipR = false;
|
||||
if (inputSampleR<-0.9549925859) {wasNegClipR=true;inputSampleR=-0.7058208+(lastSampleR*0.2609148);}
|
||||
intermediateR[spacing] = inputSampleR;
|
||||
inputSampleR = lastSampleR; //Latency is however many samples equals one 44.1k sample
|
||||
for (int x = spacing; x > 0; x--) intermediateR[x-1] = intermediateR[x];
|
||||
lastSampleR = intermediateR[0]; //run a little buffer to handle this
|
||||
//end ClipOnly2 stereo as a little, compressed chunk that can be dropped into code
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
//inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//frexp((double)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
//inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//end 64 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
28
plugins/WinVST/ToTape7/VSTProject.sln
Executable file
28
plugins/WinVST/ToTape7/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/ToTape7/VSTProject.vcxproj
Executable file
183
plugins/WinVST/ToTape7/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="ToTape7.cpp" />
|
||||
<ClCompile Include="ToTape7Proc.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="ToTape7.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
|
||||
<RootNamespace>VSTProject</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
<ProjectName>ToTape764</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/ToTape7/VSTProject.vcxproj.filters
Executable file
48
plugins/WinVST/ToTape7/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="ToTape7.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ToTape7Proc.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="ToTape7.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
19
plugins/WinVST/ToTape7/VSTProject.vcxproj.user
Executable file
19
plugins/WinVST/ToTape7/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/ToTape7/vstplug.def
Executable file
3
plugins/WinVST/ToTape7/vstplug.def
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
VSTPluginMain
|
||||
main=VSTPluginMain
|
||||
Loading…
Add table
Add a link
Reference in a new issue