This commit is contained in:
Christopher Johnson 2024-09-22 15:45:34 -04:00
parent 299be49c3f
commit 7d3b3c73bb
244 changed files with 71580 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,444 @@
/* ========================================
* ConsoleXPre - ConsoleXPre.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __ConsoleXPre_H
#include "ConsoleXPre.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new ConsoleXPre(audioMaster);}
ConsoleXPre::ConsoleXPre(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
HIP = 0.0;
LOP = 0.0;
AIR = 0.5;
FIR = 0.5;
STO = 0.5;
RNG = 0.5;
FCT = 1.0;
SCT = 1.0;
FCR = 1.0;
SCR = 1.0;
FCA = 0.5;
SCA = 0.5;
FCL = 0.5;
SCL = 0.5;
FGT = 0.0;
SGT = 0.0;
FGR = 1.0;
SGR = 1.0;
FGS = 0.5;
SGS = 0.5;
FGL = 0.5;
SGL = 0.5;
TRF = 0.5;
TRG = 0.5;
TRR = 0.5;
HMF = 0.5;
HMG = 0.5;
HMR = 0.5;
LMF = 0.5;
LMG = 0.5;
LMR = 0.5;
BSF = 0.5;
BSG = 0.5;
BSR = 0.5;
DSC = 0.5;
PAN = 0.5;
FAD = 0.5;
for (int x = 0; x < hilp_total; x++) {
highpass[x] = 0.0;
lowpass[x] = 0.0;
}
for (int x = 0; x < air_total; x++) air[x] = 0.0;
for (int x = 0; x < kal_total; x++) kal[x] = 0.0;
fireCompL = 1.0;
fireCompR = 1.0;
fireGate = 1.0;
stoneCompL = 1.0;
stoneCompR = 1.0;
stoneGate = 1.0;
for (int x = 0; x < biqs_total; x++) {
high[x] = 0.0;
hmid[x] = 0.0;
lmid[x] = 0.0;
bass[x] = 0.0;
}
for(int count = 0; count < dscBuf+2; count++) {
dBaL[count] = 0.0;
dBaR[count] = 0.0;
}
dBaPosL = 0.0;
dBaPosR = 0.0;
dBaXL = 1;
dBaXR = 1;
airGainA = 0.5; airGainB = 0.5;
fireGainA = 0.5; fireGainB = 0.5;
stoneGainA = 0.5; stoneGainB = 0.5;
panA = 0.5; panB = 0.5;
inTrimA = 1.0; inTrimB = 1.0;
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
//this is reset: values being initialized only once. Startup values, whatever they are.
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
_canDo.insert("x2in2out");
setNumInputs(kNumInputs);
setNumOutputs(kNumOutputs);
setUniqueID(kUniqueId);
canProcessReplacing(); // supports output replacing
canDoubleReplacing(); // supports double precision processing
programsAreChunks(true);
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
}
ConsoleXPre::~ConsoleXPre() {}
VstInt32 ConsoleXPre::getVendorVersion () {return 1000;}
void ConsoleXPre::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void ConsoleXPre::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 ConsoleXPre::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = HIP;
chunkData[1] = LOP;
chunkData[2] = AIR;
chunkData[3] = FIR;
chunkData[4] = STO;
chunkData[5] = RNG;
chunkData[6] = FCT;
chunkData[7] = SCT;
chunkData[8] = FCR;
chunkData[9] = SCR;
chunkData[10] = FCA;
chunkData[11] = SCA;
chunkData[12] = FCL;
chunkData[13] = SCL;
chunkData[14] = FGT;
chunkData[15] = SGT;
chunkData[16] = FGR;
chunkData[17] = SGR;
chunkData[18] = FGS;
chunkData[19] = SGS;
chunkData[20] = FGL;
chunkData[21] = SGL;
chunkData[22] = TRF;
chunkData[23] = TRG;
chunkData[24] = TRR;
chunkData[25] = HMF;
chunkData[26] = HMG;
chunkData[27] = HMR;
chunkData[28] = LMF;
chunkData[29] = LMG;
chunkData[30] = LMR;
chunkData[31] = BSF;
chunkData[32] = BSG;
chunkData[33] = BSR;
chunkData[34] = DSC;
chunkData[35] = PAN;
chunkData[36] = FAD;
/* 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 ConsoleXPre::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
HIP = pinParameter(chunkData[0]);
LOP = pinParameter(chunkData[1]);
AIR = pinParameter(chunkData[2]);
FIR = pinParameter(chunkData[3]);
STO = pinParameter(chunkData[4]);
RNG = pinParameter(chunkData[5]);
FCT = pinParameter(chunkData[6]);
SCT = pinParameter(chunkData[7]);
FCR = pinParameter(chunkData[8]);
SCR = pinParameter(chunkData[9]);
FCA = pinParameter(chunkData[10]);
SCA = pinParameter(chunkData[11]);
FCL = pinParameter(chunkData[12]);
SCL = pinParameter(chunkData[13]);
FGT = pinParameter(chunkData[14]);
SGT = pinParameter(chunkData[15]);
FGR = pinParameter(chunkData[16]);
SGR = pinParameter(chunkData[17]);
FGS = pinParameter(chunkData[18]);
SGS = pinParameter(chunkData[19]);
FGL = pinParameter(chunkData[20]);
SGL = pinParameter(chunkData[21]);
TRF = pinParameter(chunkData[22]);
TRG = pinParameter(chunkData[23]);
TRR = pinParameter(chunkData[24]);
HMF = pinParameter(chunkData[25]);
HMG = pinParameter(chunkData[26]);
HMR = pinParameter(chunkData[27]);
LMF = pinParameter(chunkData[28]);
LMG = pinParameter(chunkData[29]);
LMR = pinParameter(chunkData[30]);
BSF = pinParameter(chunkData[31]);
BSG = pinParameter(chunkData[32]);
BSR = pinParameter(chunkData[33]);
DSC = pinParameter(chunkData[34]);
PAN = pinParameter(chunkData[35]);
FAD = pinParameter(chunkData[36]);
/* 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 ConsoleXPre::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamHIP: HIP = value; break;
case kParamLOP: LOP = value; break;
case kParamAIR: AIR = value; break;
case kParamFIR: FIR = value; break;
case kParamSTO: STO = value; break;
case kParamRNG: RNG = value; break;
case kParamFCT: FCT = value; break;
case kParamSCT: SCT = value; break;
case kParamFCR: FCR = value; break;
case kParamSCR: SCR = value; break;
case kParamFCA: FCA = value; break;
case kParamSCA: SCA = value; break;
case kParamFCL: FCL = value; break;
case kParamSCL: SCL = value; break;
case kParamFGT: FGT = value; break;
case kParamSGT: SGT = value; break;
case kParamFGR: FGR = value; break;
case kParamSGR: SGR = value; break;
case kParamFGS: FGS = value; break;
case kParamSGS: SGS = value; break;
case kParamFGL: FGL = value; break;
case kParamSGL: SGL = value; break;
case kParamTRF: TRF = value; break;
case kParamTRG: TRG = value; break;
case kParamTRR: TRR = value; break;
case kParamHMF: HMF = value; break;
case kParamHMG: HMG = value; break;
case kParamHMR: HMR = value; break;
case kParamLMF: LMF = value; break;
case kParamLMG: LMG = value; break;
case kParamLMR: LMR = value; break;
case kParamBSF: BSF = value; break;
case kParamBSG: BSG = value; break;
case kParamBSR: BSR = value; break;
case kParamDSC: DSC = value; break;
case kParamPAN: PAN = value; break;
case kParamFAD: FAD = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float ConsoleXPre::getParameter(VstInt32 index) {
switch (index) {
case kParamHIP: return HIP; break;
case kParamLOP: return LOP; break;
case kParamAIR: return AIR; break;
case kParamFIR: return FIR; break;
case kParamSTO: return STO; break;
case kParamRNG: return RNG; break;
case kParamFCT: return FCT; break;
case kParamSCT: return SCT; break;
case kParamFCR: return FCR; break;
case kParamSCR: return SCR; break;
case kParamFCA: return FCA; break;
case kParamSCA: return SCA; break;
case kParamFCL: return FCL; break;
case kParamSCL: return SCL; break;
case kParamFGT: return FGT; break;
case kParamSGT: return SGT; break;
case kParamFGR: return FGR; break;
case kParamSGR: return SGR; break;
case kParamFGS: return FGS; break;
case kParamSGS: return SGS; break;
case kParamFGL: return FGL; break;
case kParamSGL: return SGL; break;
case kParamTRF: return TRF; break;
case kParamTRG: return TRG; break;
case kParamTRR: return TRR; break;
case kParamHMF: return HMF; break;
case kParamHMG: return HMG; break;
case kParamHMR: return HMR; break;
case kParamLMF: return LMF; break;
case kParamLMG: return LMG; break;
case kParamLMR: return LMR; break;
case kParamBSF: return BSF; break;
case kParamBSG: return BSG; break;
case kParamBSR: return BSR; break;
case kParamDSC: return DSC; break;
case kParamPAN: return PAN; break;
case kParamFAD: return FAD; 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 ConsoleXPre::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamHIP: vst_strncpy (text, "Highpas", kVstMaxParamStrLen); break;
case kParamLOP: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
case kParamAIR: vst_strncpy (text, "Air", kVstMaxParamStrLen); break;
case kParamFIR: vst_strncpy (text, "Fire", kVstMaxParamStrLen); break;
case kParamSTO: vst_strncpy (text, "Stone", kVstMaxParamStrLen); break;
case kParamRNG: vst_strncpy (text, "Range", kVstMaxParamStrLen); break;
case kParamFCT: vst_strncpy (text, "FC Thrs", kVstMaxParamStrLen); break;
case kParamSCT: vst_strncpy (text, "SC Thrs", kVstMaxParamStrLen); break;
case kParamFCR: vst_strncpy (text, "FC Rati", kVstMaxParamStrLen); break;
case kParamSCR: vst_strncpy (text, "SC Rati", kVstMaxParamStrLen); break;
case kParamFCA: vst_strncpy (text, "FC Atk", kVstMaxParamStrLen); break;
case kParamSCA: vst_strncpy (text, "SC Atk", kVstMaxParamStrLen); break;
case kParamFCL: vst_strncpy (text, "FC Rls", kVstMaxParamStrLen); break;
case kParamSCL: vst_strncpy (text, "SC Rls", kVstMaxParamStrLen); break;
case kParamFGT: vst_strncpy (text, "FG Thrs", kVstMaxParamStrLen); break;
case kParamSGT: vst_strncpy (text, "SG Thrs", kVstMaxParamStrLen); break;
case kParamFGR: vst_strncpy (text, "FG Rati", kVstMaxParamStrLen); break;
case kParamSGR: vst_strncpy (text, "SG Rati", kVstMaxParamStrLen); break;
case kParamFGS: vst_strncpy (text, "FG Sust", kVstMaxParamStrLen); break;
case kParamSGS: vst_strncpy (text, "SG Sust", kVstMaxParamStrLen); break;
case kParamFGL: vst_strncpy (text, "FG Rls", kVstMaxParamStrLen); break;
case kParamSGL: vst_strncpy (text, "SG Rls", kVstMaxParamStrLen); break;
case kParamTRF: vst_strncpy (text, "Tr Freq", kVstMaxParamStrLen); break;
case kParamTRG: vst_strncpy (text, "Treble", kVstMaxParamStrLen); break;
case kParamTRR: vst_strncpy (text, "Tr Reso", kVstMaxParamStrLen); break;
case kParamHMF: vst_strncpy (text, "HM Freq", kVstMaxParamStrLen); break;
case kParamHMG: vst_strncpy (text, "HighMid", kVstMaxParamStrLen); break;
case kParamHMR: vst_strncpy (text, "HM Reso", kVstMaxParamStrLen); break;
case kParamLMF: vst_strncpy (text, "LM Freq", kVstMaxParamStrLen); break;
case kParamLMG: vst_strncpy (text, "LowMid", kVstMaxParamStrLen); break;
case kParamLMR: vst_strncpy (text, "LM Reso", kVstMaxParamStrLen); break;
case kParamBSF: vst_strncpy (text, "Bs Freq", kVstMaxParamStrLen); break;
case kParamBSG: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
case kParamBSR: vst_strncpy (text, "Bs Reso", kVstMaxParamStrLen); break;
case kParamDSC: vst_strncpy (text, "Top dB", kVstMaxParamStrLen); break;
case kParamPAN: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
case kParamFAD: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void ConsoleXPre::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamHIP: float2string (HIP, text, kVstMaxParamStrLen); break;
case kParamLOP: float2string (LOP, text, kVstMaxParamStrLen); break;
case kParamAIR: float2string (AIR, text, kVstMaxParamStrLen); break;
case kParamFIR: float2string (FIR, text, kVstMaxParamStrLen); break;
case kParamSTO: float2string (STO, text, kVstMaxParamStrLen); break;
case kParamRNG: float2string (RNG, text, kVstMaxParamStrLen); break;
case kParamFCT: float2string (FCT, text, kVstMaxParamStrLen); break;
case kParamSCT: float2string (SCT, text, kVstMaxParamStrLen); break;
case kParamFCR: float2string (FCR, text, kVstMaxParamStrLen); break;
case kParamSCR: float2string (SCR, text, kVstMaxParamStrLen); break;
case kParamFCA: float2string (FCA, text, kVstMaxParamStrLen); break;
case kParamSCA: float2string (SCA, text, kVstMaxParamStrLen); break;
case kParamFCL: float2string (FCL, text, kVstMaxParamStrLen); break;
case kParamSCL: float2string (SCL, text, kVstMaxParamStrLen); break;
case kParamFGT: float2string (FGT, text, kVstMaxParamStrLen); break;
case kParamSGT: float2string (SGT, text, kVstMaxParamStrLen); break;
case kParamFGR: float2string (FGR, text, kVstMaxParamStrLen); break;
case kParamSGR: float2string (SGR, text, kVstMaxParamStrLen); break;
case kParamFGS: float2string (FGS, text, kVstMaxParamStrLen); break;
case kParamSGS: float2string (SGS, text, kVstMaxParamStrLen); break;
case kParamFGL: float2string (FGL, text, kVstMaxParamStrLen); break;
case kParamSGL: float2string (SGL, text, kVstMaxParamStrLen); break;
case kParamTRF: float2string (TRF, text, kVstMaxParamStrLen); break;
case kParamTRG: float2string (TRG, text, kVstMaxParamStrLen); break;
case kParamTRR: float2string (TRR, text, kVstMaxParamStrLen); break;
case kParamHMF: float2string (HMF, text, kVstMaxParamStrLen); break;
case kParamHMG: float2string (HMG, text, kVstMaxParamStrLen); break;
case kParamHMR: float2string (HMR, text, kVstMaxParamStrLen); break;
case kParamLMF: float2string (LMF, text, kVstMaxParamStrLen); break;
case kParamLMG: float2string (LMG, text, kVstMaxParamStrLen); break;
case kParamLMR: float2string (LMR, text, kVstMaxParamStrLen); break;
case kParamBSF: float2string (BSF, text, kVstMaxParamStrLen); break;
case kParamBSG: float2string (BSG, text, kVstMaxParamStrLen); break;
case kParamBSR: float2string (BSR, text, kVstMaxParamStrLen); break;
case kParamDSC: float2string ((DSC*70.0)+70.0, text, kVstMaxParamStrLen); break;
case kParamPAN: float2string (PAN, text, kVstMaxParamStrLen); break;
case kParamFAD: float2string (FAD, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void ConsoleXPre::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamHIP: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamLOP: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamAIR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFIR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSTO: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamRNG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFCT: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSCT: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFCR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSCR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFCA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSCA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFCL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSCL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFGT: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSGT: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFGR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSGR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFGS: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSGS: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFGL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamSGL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamTRF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamTRG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamTRR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamHMF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamHMG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamHMR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamLMF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamLMG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamLMR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamBSF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamBSG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamBSR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamDSC: vst_strncpy (text, "dB", kVstMaxParamStrLen); break;
case kParamPAN: vst_strncpy (text, "", kVstMaxParamStrLen); break;
case kParamFAD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 ConsoleXPre::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool ConsoleXPre::getEffectName(char* name) {
vst_strncpy(name, "ConsoleXPre", kVstMaxProductStrLen); return true;
}
VstPlugCategory ConsoleXPre::getPlugCategory() {return kPlugCategEffect;}
bool ConsoleXPre::getProductString(char* text) {
vst_strncpy (text, "airwindows ConsoleXPre", kVstMaxProductStrLen); return true;
}
bool ConsoleXPre::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,216 @@
/* ========================================
* ConsoleXPre - ConsoleXPre.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) Airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __ConsoleXPre_H
#define __ConsoleXPre_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamHIP = 0,
kParamLOP = 1,
kParamAIR = 2,
kParamFIR = 3,
kParamSTO = 4,
kParamRNG = 5,
kParamFCT = 6,
kParamSCT = 7,
kParamFCR = 8,
kParamSCR = 9,
kParamFCA = 10,
kParamSCA = 11,
kParamFCL = 12,
kParamSCL = 13,
kParamFGT = 14,
kParamSGT = 15,
kParamFGR = 16,
kParamSGR = 17,
kParamFGS = 18,
kParamSGS = 19,
kParamFGL = 20,
kParamSGL = 21,
kParamTRF = 22,
kParamTRG = 23,
kParamTRR = 24,
kParamHMF = 25,
kParamHMG = 26,
kParamHMR = 27,
kParamLMF = 28,
kParamLMG = 29,
kParamLMR = 30,
kParamBSF = 31,
kParamBSG = 32,
kParamBSR = 33,
kParamDSC = 34,
kParamPAN = 35,
kParamFAD = 36,
kNumParameters = 37
}; //
const int dscBuf = 90;
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'cnxp'; //Change this to what the AU identity is!
class ConsoleXPre :
public AudioEffectX
{
public:
ConsoleXPre(audioMasterCallback audioMaster);
~ConsoleXPre();
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 HIP;
float LOP;
float AIR;
float FIR;
float STO;
float RNG;
float FCT;
float SCT;
float FCR;
float SCR;
float FCA;
float SCA;
float FCL;
float SCL;
float FGT;
float SGT;
float FGR;
float SGR;
float FGS;
float SGS;
float FGL;
float SGL;
float TRF;
float TRG;
float TRR;
float HMF;
float HMG;
float HMR;
float LMF;
float LMG;
float LMR;
float BSF;
float BSG;
float BSR;
float DSC;
float PAN;
float FAD;
enum {
hilp_freq, hilp_temp,
hilp_a0, hilp_a1, hilp_b1, hilp_b2,
hilp_c0, hilp_c1, hilp_d1, hilp_d2,
hilp_e0, hilp_e1, hilp_f1, hilp_f2,
hilp_aL1, hilp_aL2, hilp_aR1, hilp_aR2,
hilp_cL1, hilp_cL2, hilp_cR1, hilp_cR2,
hilp_eL1, hilp_eL2, hilp_eR1, hilp_eR2,
hilp_total
};
double highpass[hilp_total];
double lowpass[hilp_total];
enum {
pvAL1, pvSL1, accSL1, acc2SL1,
pvAL2, pvSL2, accSL2, acc2SL2,
pvAL3, pvSL3, accSL3,
pvAL4, pvSL4,
gndavgL, outAL, gainAL,
pvAR1, pvSR1, accSR1, acc2SR1,
pvAR2, pvSR2, accSR2, acc2SR2,
pvAR3, pvSR3, accSR3,
pvAR4, pvSR4,
gndavgR, outAR, gainAR,
air_total
};
double air[air_total];
enum {
prevSampL1, prevSlewL1, accSlewL1,
prevSampL2, prevSlewL2, accSlewL2,
prevSampL3, prevSlewL3, accSlewL3,
kalGainL, kalOutL,
prevSampR1, prevSlewR1, accSlewR1,
prevSampR2, prevSlewR2, accSlewR2,
prevSampR3, prevSlewR3, accSlewR3,
kalGainR, kalOutR,
kal_total
};
double kal[kal_total];
double fireCompL;
double fireCompR;
double fireGate;
double stoneCompL;
double stoneCompR;
double stoneGate;
double airGainA;
double airGainB;
double fireGainA;
double fireGainB;
double stoneGainA;
double stoneGainB;
enum {
biqs_freq, biqs_reso, biqs_level,
biqs_nonlin, biqs_temp, biqs_dis,
biqs_a0, biqs_a1, biqs_b1, biqs_b2,
biqs_c0, biqs_c1, biqs_d1, biqs_d2,
biqs_e0, biqs_e1, biqs_f1, biqs_f2,
biqs_aL1, biqs_aL2, biqs_aR1, biqs_aR2,
biqs_cL1, biqs_cL2, biqs_cR1, biqs_cR2,
biqs_eL1, biqs_eL2, biqs_eR1, biqs_eR2,
biqs_outL, biqs_outR, biqs_total
};
double high[biqs_total];
double hmid[biqs_total];
double lmid[biqs_total];
double bass[biqs_total];
double dBaL[dscBuf+5];
double dBaR[dscBuf+5];
double dBaPosL;
double dBaPosR;
int dBaXL;
int dBaXR;
double panA;
double panB;
double inTrimA;
double inTrimB;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
};
#endif

File diff suppressed because it is too large Load diff

View 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

View 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="ConsoleXPre.cpp" />
<ClCompile Include="ConsoleXPreProc.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="ConsoleXPre.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
<RootNamespace>VSTProject</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>ConsoleXPre64</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>

View 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="ConsoleXPre.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ConsoleXPreProc.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="ConsoleXPre.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View 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>

View file

@ -0,0 +1,3 @@
EXPORTS
VSTPluginMain
main=VSTPluginMain

Binary file not shown.

Binary file not shown.

151
plugins/WinVST/Dubly3/Dubly3.cpp Executable file
View file

@ -0,0 +1,151 @@
/* ========================================
* Dubly3 - Dubly3.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __Dubly3_H
#include "Dubly3.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Dubly3(audioMaster);}
Dubly3::Dubly3(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.5;
B = 0.5;
C = 0.5;
D = 0.5;
iirEncL = 0.0; iirEncR = 0.0;
iirDecL = 0.0; iirDecR = 0.0;
compEncL = 1.0; compEncR = 1.0;
compDecL = 1.0; compDecR = 1.0;
avgEncL = 0.0; avgEncR = 0.0;
avgDecL = 0.0; avgDecR = 0.0;
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
//this is reset: values being initialized only once. Startup values, whatever they are.
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
_canDo.insert("x2in2out");
setNumInputs(kNumInputs);
setNumOutputs(kNumOutputs);
setUniqueID(kUniqueId);
canProcessReplacing(); // supports output replacing
canDoubleReplacing(); // supports double precision processing
programsAreChunks(true);
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
}
Dubly3::~Dubly3() {}
VstInt32 Dubly3::getVendorVersion () {return 1000;}
void Dubly3::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void Dubly3::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 Dubly3::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
chunkData[1] = B;
chunkData[2] = C;
chunkData[3] = D;
/* 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 Dubly3::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]);
/* 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 Dubly3::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;
default: throw; // unknown parameter, shouldn't happen!
}
}
float Dubly3::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;
default: break; // unknown parameter, shouldn't happen!
} return 0.0; //we only need to update the relevant name, this is simple to manage
}
void Dubly3::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Input", kVstMaxParamStrLen); break;
case kParamB: vst_strncpy (text, "Tilt", kVstMaxParamStrLen); break;
case kParamC: vst_strncpy (text, "Shape", kVstMaxParamStrLen); break;
case kParamD: vst_strncpy (text, "Output", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void Dubly3::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;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void Dubly3::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;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 Dubly3::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool Dubly3::getEffectName(char* name) {
vst_strncpy(name, "Dubly3", kVstMaxProductStrLen); return true;
}
VstPlugCategory Dubly3::getPlugCategory() {return kPlugCategEffect;}
bool Dubly3::getProductString(char* text) {
vst_strncpy (text, "airwindows Dubly3", kVstMaxProductStrLen); return true;
}
bool Dubly3::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

81
plugins/WinVST/Dubly3/Dubly3.h Executable file
View file

@ -0,0 +1,81 @@
/* ========================================
* Dubly3 - Dubly3.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) Airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __Dubly3_H
#define __Dubly3_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA =0,
kParamB =1,
kParamC =2,
kParamD =3,
kNumParameters = 4
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'dblz'; //Change this to what the AU identity is!
class Dubly3 :
public AudioEffectX
{
public:
Dubly3(audioMasterCallback audioMaster);
~Dubly3();
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;
double iirEncL;
double iirDecL;
double compEncL;
double compDecL;
double avgEncL;
double avgDecL;
double iirEncR;
double iirDecR;
double compEncR;
double compDecR;
double avgEncR;
double avgDecR;
uint32_t fpdL;
uint32_t fpdR;
//default stuff
};
#endif

View file

@ -0,0 +1,228 @@
/* ========================================
* Dubly3 - Dubly3.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __Dubly3_H
#include "Dubly3.h"
#endif
void Dubly3::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 inputGain = pow(A*2.0,2.0);
double dublyAmount = B*2.0;
double outlyAmount = (1.0-B)*-2.0;
if (outlyAmount < -1.0) outlyAmount = -1.0;
double iirEncFreq = (1.0-C)/overallscale;
double iirDecFreq = C/overallscale;
double outputGain = D*2.0;
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;
if (inputGain != 1.0) {
inputSampleL *= inputGain;
inputSampleR *= inputGain;
}
//Dubly encode
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
double highPart = ((inputSampleL-iirEncL)*2.848);
highPart += avgEncL; avgEncL = (inputSampleL-iirEncL)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
double dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncL = (compEncL*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleL += ((highPart*compEncL)*dublyAmount);
} //end Dubly encode L
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
highPart = ((inputSampleR-iirEncR)*2.848);
highPart += avgEncR; avgEncR = (inputSampleR-iirEncR)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncR = (compEncR*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleR += ((highPart*compEncR)*dublyAmount);
} //end Dubly encode R
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//Dubly decode
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
highPart = ((inputSampleL-iirDecL)*2.628);
highPart += avgDecL; avgDecL = (inputSampleL-iirDecL)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecL = (compDecL*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleL += ((highPart*compDecL)*outlyAmount);
} //end Dubly decode L
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
highPart = ((inputSampleR-iirDecR)*2.628);
highPart += avgDecR; avgDecR = (inputSampleR-iirDecR)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecR = (compDecR*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleR += ((highPart*compDecR)*outlyAmount);
} //end Dubly decode R
if (outputGain != 1.0) {
inputSampleL *= outputGain;
inputSampleR *= outputGain;
}
//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 Dubly3::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 inputGain = pow(A*2.0,2.0);
double dublyAmount = B*2.0;
double outlyAmount = (1.0-B)*-2.0;
if (outlyAmount < -1.0) outlyAmount = -1.0;
double iirEncFreq = (1.0-C)/overallscale;
double iirDecFreq = C/overallscale;
double outputGain = D*2.0;
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;
if (inputGain != 1.0) {
inputSampleL *= inputGain;
inputSampleR *= inputGain;
}
//Dubly encode
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
double highPart = ((inputSampleL-iirEncL)*2.848);
highPart += avgEncL; avgEncL = (inputSampleL-iirEncL)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
double dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncL = (compEncL*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleL += ((highPart*compEncL)*dublyAmount);
} //end Dubly encode L
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
highPart = ((inputSampleR-iirEncR)*2.848);
highPart += avgEncR; avgEncR = (inputSampleR-iirEncR)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncR = (compEncR*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleR += ((highPart*compEncR)*dublyAmount);
} //end Dubly encode R
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//Dubly decode
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
highPart = ((inputSampleL-iirDecL)*2.628);
highPart += avgDecL; avgDecL = (inputSampleL-iirDecL)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecL = (compDecL*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleL += ((highPart*compDecL)*outlyAmount);
} //end Dubly decode L
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
highPart = ((inputSampleR-iirDecR)*2.628);
highPart += avgDecR; avgDecR = (inputSampleR-iirDecR)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecR = (compDecR*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleR += ((highPart*compDecR)*outlyAmount);
} //end Dubly decode R
if (outputGain != 1.0) {
inputSampleL *= outputGain;
inputSampleR *= outputGain;
}
//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++;
}
}

View 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

View 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="Dubly3.cpp" />
<ClCompile Include="Dubly3Proc.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="Dubly3.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
<RootNamespace>VSTProject</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>Dubly364</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>

View 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="Dubly3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Dubly3Proc.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="Dubly3.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View 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>

View file

@ -0,0 +1,3 @@
EXPORTS
VSTPluginMain
main=VSTPluginMain

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,223 @@
/* ========================================
* ToTape8 - ToTape8.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __ToTape8_H
#include "ToTape8.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new ToTape8(audioMaster);}
ToTape8::ToTape8(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.5;
B = 0.5;
C = 0.5;
D = 0.5;
E = 0.5;
F = 0.5;
G = 0.5;
H = 0.5;
I = 0.5;
iirEncL = 0.0; iirDecL = 0.0;
compEncL = 1.0; compDecL = 1.0;
avgEncL = 0.0; avgDecL = 0.0;
iirEncR = 0.0; iirDecR = 0.0;
compEncR = 1.0; compDecR = 1.0;
avgEncR = 0.0; avgDecR = 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
}
ToTape8::~ToTape8() {}
VstInt32 ToTape8::getVendorVersion () {return 1000;}
void ToTape8::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void ToTape8::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 ToTape8::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;
/* 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 ToTape8::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]);
/* 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 ToTape8::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;
default: throw; // unknown parameter, shouldn't happen!
}
}
float ToTape8::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;
default: break; // unknown parameter, shouldn't happen!
} return 0.0; //we only need to update the relevant name, this is simple to manage
}
void ToTape8::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Input", kVstMaxParamStrLen); break;
case kParamB: vst_strncpy (text, "Tilt", kVstMaxParamStrLen); break;
case kParamC: vst_strncpy (text, "Shape", 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, "Output", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void ToTape8::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;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void ToTape8::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;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 ToTape8::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool ToTape8::getEffectName(char* name) {
vst_strncpy(name, "ToTape8", kVstMaxProductStrLen); return true;
}
VstPlugCategory ToTape8::getPlugCategory() {return kPlugCategEffect;}
bool ToTape8::getProductString(char* text) {
vst_strncpy (text, "airwindows ToTape8", kVstMaxProductStrLen); return true;
}
bool ToTape8::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

164
plugins/WinVST/ToTape8/ToTape8.h Executable file
View file

@ -0,0 +1,164 @@
/* ========================================
* ToTape8 - ToTape8.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) Airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __ToTape8_H
#define __ToTape8_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,
kNumParameters = 9
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'totw'; //Change this to what the AU identity is!
class ToTape8 :
public AudioEffectX
{
public:
ToTape8(audioMasterCallback audioMaster);
~ToTape8();
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;
double iirEncL;
double iirDecL;
double compEncL;
double compDecL;
double avgEncL;
double avgDecL;
double iirEncR;
double iirDecR;
double compEncR;
double compDecR;
double avgEncR;
double avgDecR;
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 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

View file

@ -0,0 +1,628 @@
/* ========================================
* ToTape8 - ToTape8.h
* Copyright (c) airwindows, Airwindows uses the MIT license
* ======================================== */
#ifndef __ToTape8_H
#include "ToTape8.h"
#endif
void ToTape8::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 inputGain = pow(A*2.0,2.0);
double dublyAmount = B*2.0;
double outlyAmount = (1.0-B)*-2.0;
if (outlyAmount < -1.0) outlyAmount = -1.0;
double iirEncFreq = (1.0-C)/overallscale;
double iirDecFreq = C/overallscale;
double iirMidFreq = ((C * 0.618) + 0.382)/overallscale;
double flutDepth = pow(D,6)*overallscale*50;
if (flutDepth > 498.0) flutDepth = 498.0;
double flutFrequency = (0.02*pow(E,3))/overallscale;
double bias = (F*2.0)-1.0;
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;
double subCurve = sin(G*M_PI);
double iirSubFreq = (subCurve*0.008)/overallscale;
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 outputGain = I*2.0;
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;
if (inputGain != 1.0) {
inputSampleL *= inputGain;
inputSampleR *= inputGain;
}
//Dubly encode
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
double highPart = ((inputSampleL-iirEncL)*2.848);
highPart += avgEncL; avgEncL = (inputSampleL-iirEncL)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
double dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncL = (compEncL*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleL += ((highPart*compEncL)*dublyAmount);
} //end Dubly encode L
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
highPart = ((inputSampleR-iirEncR)*2.848);
highPart += avgEncR; avgEncR = (inputSampleR-iirEncR)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncR = (compEncR*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleR += ((highPart*compEncR)*dublyAmount);
} //end Dubly encode R
//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;
double flutA = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
double flutB = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);
if (fabs(flutA-sin(sweepR+nextmaxR))<fabs(flutB-sin(sweepR+nextmaxR))) nextmaxL = flutA; else nextmaxL = flutB;
}
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;
double flutA = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
double flutB = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);
if (fabs(flutA-sin(sweepL+nextmaxL))<fabs(flutB-sin(sweepL+nextmaxL))) nextmaxR = flutA; else nextmaxR = flutB;
}
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);
//Dubly decode
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
highPart = ((inputSampleL-iirDecL)*2.628);
highPart += avgDecL; avgDecL = (inputSampleL-iirDecL)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecL = (compDecL*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleL += ((highPart*compDecL)*outlyAmount);
} //end Dubly decode L
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
highPart = ((inputSampleR-iirDecR)*2.628);
highPart += avgDecR; avgDecR = (inputSampleR-iirDecR)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecR = (compDecR*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleR += ((highPart*compDecR)*outlyAmount);
} //end Dubly decode R
if (outputGain != 1.0) {
inputSampleL *= outputGain;
inputSampleR *= outputGain;
}
//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 ToTape8::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 inputGain = pow(A*2.0,2.0);
double dublyAmount = B*2.0;
double outlyAmount = (1.0-B)*-2.0;
if (outlyAmount < -1.0) outlyAmount = -1.0;
double iirEncFreq = (1.0-C)/overallscale;
double iirDecFreq = C/overallscale;
double iirMidFreq = ((C * 0.618) + 0.382)/overallscale;
double flutDepth = pow(D,6)*overallscale*50;
if (flutDepth > 498.0) flutDepth = 498.0;
double flutFrequency = (0.02*pow(E,3))/overallscale;
double bias = (F*2.0)-1.0;
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;
double subCurve = sin(G*M_PI);
double iirSubFreq = (subCurve*0.008)/overallscale;
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 outputGain = I*2.0;
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;
if (inputGain != 1.0) {
inputSampleL *= inputGain;
inputSampleR *= inputGain;
}
//Dubly encode
iirEncL = (iirEncL * (1.0 - iirEncFreq)) + (inputSampleL * iirEncFreq);
double highPart = ((inputSampleL-iirEncL)*2.848);
highPart += avgEncL; avgEncL = (inputSampleL-iirEncL)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
double dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncL = (compEncL*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleL += ((highPart*compEncL)*dublyAmount);
} //end Dubly encode L
iirEncR = (iirEncR * (1.0 - iirEncFreq)) + (inputSampleR * iirEncFreq);
highPart = ((inputSampleR-iirEncR)*2.848);
highPart += avgEncR; avgEncR = (inputSampleR-iirEncR)*1.152;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compEncR = (compEncR*(1.0-iirEncFreq))+(dubly*iirEncFreq);
inputSampleR += ((highPart*compEncR)*dublyAmount);
} //end Dubly encode R
//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;
double flutA = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
double flutB = 0.24 + (fpdL / (double)UINT32_MAX * 0.74);
if (fabs(flutA-sin(sweepR+nextmaxR))<fabs(flutB-sin(sweepR+nextmaxR))) nextmaxL = flutA; else nextmaxL = flutB;
}
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;
double flutA = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
double flutB = 0.24 + (fpdR / (double)UINT32_MAX * 0.74);
if (fabs(flutA-sin(sweepL+nextmaxL))<fabs(flutB-sin(sweepL+nextmaxL))) nextmaxR = flutA; else nextmaxR = flutB;
}
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);
//Dubly decode
iirDecL = (iirDecL * (1.0 - iirDecFreq)) + (inputSampleL * iirDecFreq);
highPart = ((inputSampleL-iirDecL)*2.628);
highPart += avgDecL; avgDecL = (inputSampleL-iirDecL)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecL = (compDecL*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleL += ((highPart*compDecL)*outlyAmount);
} //end Dubly decode L
iirDecR = (iirDecR * (1.0 - iirDecFreq)) + (inputSampleR * iirDecFreq);
highPart = ((inputSampleR-iirDecR)*2.628);
highPart += avgDecR; avgDecR = (inputSampleR-iirDecR)*1.372;
if (highPart > 1.0) highPart = 1.0; if (highPart < -1.0) highPart = -1.0;
dubly = fabs(highPart);
if (dubly > 0.0) {
double adjust = log(1.0+(255.0*dubly))/2.40823996531;
if (adjust > 0.0) dubly /= adjust;
compDecR = (compDecR*(1.0-iirDecFreq))+(dubly*iirDecFreq);
inputSampleR += ((highPart*compDecR)*outlyAmount);
} //end Dubly decode R
if (outputGain != 1.0) {
inputSampleL *= outputGain;
inputSampleR *= outputGain;
}
//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++;
}
}

View 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

View 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="ToTape8.cpp" />
<ClCompile Include="ToTape8Proc.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="ToTape8.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
<RootNamespace>VSTProject</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>ToTape864</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>

View 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="ToTape8.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ToTape8Proc.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="ToTape8.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View 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>

View file

@ -0,0 +1,3 @@
EXPORTS
VSTPluginMain
main=VSTPluginMain