C5RawConsole

This commit is contained in:
airwindows 2018-03-25 19:03:53 -04:00
parent 917a22e599
commit 9f95683034
103 changed files with 28253 additions and 0 deletions

View file

@ -9,6 +9,8 @@ include(Helpers.cmake)
add_subdirectory(include/vstsdk)
add_airwindows_plugin(Acceleration)
add_airwindows_plugin(BitShiftGain)
add_airwindows_plugin(C5RawBuss)
add_airwindows_plugin(C5RawChannel)
add_airwindows_plugin(ElectroHat)
add_airwindows_plugin(GrooveWear)
add_airwindows_plugin(HardVacuum)

Binary file not shown.

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawBuss(audioMaster);}
C5RawBuss::C5RawBuss(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXBussL = 0.0;
lastSampleBussL = 0.0;
lastFXBussR = 0.0;
lastSampleBussR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawBuss::~C5RawBuss() {}
VstInt32 C5RawBuss::getVendorVersion () {return 1000;}
void C5RawBuss::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawBuss::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 C5RawBuss::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawBuss::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawBuss::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawBuss::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawBuss::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawBuss::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawBuss::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawBuss::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawBuss::getEffectName(char* name) {
vst_strncpy(name, "C5RawBuss", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawBuss::getPlugCategory() {return kPlugCategEffect;}
bool C5RawBuss::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawBuss", kVstMaxProductStrLen); return true;
}
bool C5RawBuss::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#define __C5RawBuss_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conm'; //Change this to what the AU identity is!
class C5RawBuss :
public AudioEffectX
{
public:
C5RawBuss(audioMasterCallback audioMaster);
~C5RawBuss();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXBussL;
double lastSampleBussL;
double lastFXBussR;
double lastSampleBussR;
float A;
};
#endif

View file

@ -0,0 +1,276 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
void C5RawBuss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawBuss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}

Binary file not shown.

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawChannel(audioMaster);}
C5RawChannel::C5RawChannel(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXChannelL = 0.0;
lastSampleChannelL = 0.0;
lastFXChannelR = 0.0;
lastSampleChannelR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawChannel::~C5RawChannel() {}
VstInt32 C5RawChannel::getVendorVersion () {return 1000;}
void C5RawChannel::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawChannel::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 C5RawChannel::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawChannel::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawChannel::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawChannel::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawChannel::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawChannel::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawChannel::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawChannel::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawChannel::getEffectName(char* name) {
vst_strncpy(name, "C5RawChannel", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawChannel::getPlugCategory() {return kPlugCategEffect;}
bool C5RawChannel::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawChannel", kVstMaxProductStrLen); return true;
}
bool C5RawChannel::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#define __C5RawChannel_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conn'; //Change this to what the AU identity is!
class C5RawChannel :
public AudioEffectX
{
public:
C5RawChannel(audioMasterCallback audioMaster);
~C5RawChannel();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXChannelL;
double lastSampleChannelL;
double lastFXChannelR;
double lastSampleChannelR;
float A;
};
#endif

View file

@ -0,0 +1,274 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
void C5RawChannel::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawChannel::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}

View file

@ -0,0 +1,259 @@
/*
* File: C5RawBuss.cpp
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*=============================================================================
C5RawBuss.cpp
=============================================================================*/
#include "C5RawBuss.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENT_ENTRY(C5RawBuss)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::C5RawBuss
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C5RawBuss::C5RawBuss(AudioUnit component)
: AUEffectBase(component)
{
CreateElements();
Globals()->UseIndexedParameters(kNumberOfParameters);
SetParameter(kParam_One, kDefaultValue_ParamOne );
#if AU_DEBUG_DISPATCHER
mDebugDispatcher = new AUDebugDispatcher (this);
#endif
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::GetParameterValueStrings
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawBuss::GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings)
{
return kAudioUnitErr_InvalidProperty;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::GetParameterInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawBuss::GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo &outParameterInfo )
{
ComponentResult result = noErr;
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
| kAudioUnitParameterFlag_IsReadable;
if (inScope == kAudioUnitScope_Global) {
switch(inParameterID)
{
case kParam_One:
AUBase::FillInParameterName (outParameterInfo, kParameterOneName, false);
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
outParameterInfo.minValue = 0.0;
outParameterInfo.maxValue = 1.0;
outParameterInfo.defaultValue = kDefaultValue_ParamOne;
break;
default:
result = kAudioUnitErr_InvalidParameter;
break;
}
} else {
result = kAudioUnitErr_InvalidParameter;
}
return result;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::GetPropertyInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawBuss::GetPropertyInfo (AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable)
{
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::GetProperty
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawBuss::GetProperty( AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData )
{
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
}
// C5RawBuss::Initialize
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawBuss::Initialize()
{
ComponentResult result = AUEffectBase::Initialize();
if (result == noErr)
Reset(kAudioUnitScope_Global, 0);
return result;
}
#pragma mark ____C5RawBussEffectKernel
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::C5RawBussKernel::Reset()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void C5RawBuss::C5RawBussKernel::Reset()
{
lastFXBuss = 0.0;
lastSampleBuss = 0.0;
fpNShapeA = 0.0;
fpNShapeB = 0.0;
fpFlip = true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawBuss::C5RawBussKernel::Process
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void C5RawBuss::C5RawBussKernel::Process( const Float32 *inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence )
{
UInt32 nSampleFrames = inFramesToProcess;
const Float32 *sourceP = inSourceP;
Float32 *destP = inDestP;
Float32 fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = GetParameter( kParam_One ) * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
Float64 difference;
long double inputSample;
while (nSampleFrames-- > 0) {
inputSample = *sourceP;
if (inputSample<1.2e-38 && -inputSample<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSample = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSample > 1.0) inputSample = 1.0;
if (inputSample < -1.0) inputSample = -1.0;
inputSample = asin(inputSample);
//amplitude aspect
difference = lastSampleBuss - inputSample;
lastSampleBuss = inputSample;
//derive slew part off direct sample measurement + from last time
if (difference > 1.57079633) difference = 1.57079633;
if (difference < -1.57079633) difference = -1.57079633;
inputSample = lastFXBuss + sin(difference);
lastFXBuss = inputSample;
if (centering < 1.0) lastFXBuss *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBuss > 1.0) lastFXBuss = 1.0;
if (lastFXBuss < -1.0) lastFXBuss = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSample;
fpNShapeA = (fpNShapeA*fpOld)+((inputSample-fpTemp)*fpNew);
inputSample += fpNShapeA;
}
else {
fpTemp = inputSample;
fpNShapeB = (fpNShapeB*fpOld)+((inputSample-fpTemp)*fpNew);
inputSample += fpNShapeB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*destP = inputSample;
sourceP += inNumChannels; destP += inNumChannels;
}
}

View file

@ -0,0 +1 @@
_C5RawBussEntry

View file

@ -0,0 +1,139 @@
/*
* File: C5RawBuss.h
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "AUEffectBase.h"
#include "C5RawBussVersion.h"
#if AU_DEBUG_DISPATCHER
#include "AUDebugDispatcher.h"
#endif
#ifndef __C5RawBuss_h__
#define __C5RawBuss_h__
#pragma mark ____C5RawBuss Parameters
// parameters
static const float kDefaultValue_ParamOne = 0.0;
static CFStringRef kParameterOneName = CFSTR("Centering Force");
//Alter the name if desired, but using the plugin name is a start
enum {
kParam_One =0,
//Add your parameters here...
kNumberOfParameters=1
};
#pragma mark ____C5RawBuss
class C5RawBuss : public AUEffectBase
{
public:
C5RawBuss(AudioUnit component);
#if AU_DEBUG_DISPATCHER
virtual ~C5RawBuss () { delete mDebugDispatcher; }
#endif
virtual AUKernelBase * NewKernel() { return new C5RawBussKernel(this); }
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings);
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo &outParameterInfo);
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable );
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData);
virtual ComponentResult Initialize();
virtual bool SupportsTail () { return true; }
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
/*! @method Version */
virtual ComponentResult Version() { return kC5RawBussVersion; }
protected:
class C5RawBussKernel : public AUKernelBase // most of the real work happens here
{
public:
C5RawBussKernel(AUEffectBase *inAudioUnit )
: AUKernelBase(inAudioUnit)
{
}
// *Required* overides for the process method for this effect
// processes one channel of interleaved samples
virtual void Process( const Float32 *inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence);
virtual void Reset();
private:
Float64 lastFXBuss;
Float64 lastSampleBuss;
long double fpNShapeA;
long double fpNShapeB;
bool fpFlip;
};
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#endif

View file

@ -0,0 +1,61 @@
/*
* File: C5RawBuss.r
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <AudioUnit/AudioUnit.r>
#include "C5RawBussVersion.h"
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
#define kAudioUnitResID_C5RawBuss 1000
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C5RawBuss~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define RES_ID kAudioUnitResID_C5RawBuss
#define COMP_TYPE kAudioUnitType_Effect
#define COMP_SUBTYPE C5RawBuss_COMP_SUBTYPE
#define COMP_MANUF C5RawBuss_COMP_MANF
#define VERSION kC5RawBussVersion
#define NAME "Airwindows: C5RawBuss"
#define DESCRIPTION "C5RawBuss AU"
#define ENTRY_POINT "C5RawBussEntry"
#include "AUResources.r"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,144 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* C5RawBuss */;
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
133,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
252,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 538699005;
PBXWorkspaceStateSaveDate = 538699005;
};
perUserProjectItems = {
8B4E55B3201BC48D00B5DC2A /* PlistBookmark */ = 8B4E55B3201BC48D00B5DC2A /* PlistBookmark */;
8B4E57B0201BE78F00B5DC2A /* PBXBookmark */ = 8B4E57B0201BE78F00B5DC2A /* PBXBookmark */;
8B4E57B9201BF00900B5DC2A /* PlistBookmark */ = 8B4E57B9201BF00900B5DC2A /* PlistBookmark */;
8B4E57BC201BF00900B5DC2A /* PBXTextBookmark */ = 8B4E57BC201BF00900B5DC2A /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
8B4E55B3201BC48D00B5DC2A /* PlistBookmark */ = {
isa = PlistBookmark;
fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */;
fallbackIsa = PBXBookmark;
isK = 0;
kPath = (
CFBundleName,
);
name = /Users/christopherjohnson/Desktop/C5RawBuss/Info.plist;
rLen = 0;
rLoc = 9223372036854775808;
};
8B4E57B0201BE78F00B5DC2A /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = 8BA05A660720730100365D66 /* C5RawBuss.cpp */;
};
8B4E57B9201BF00900B5DC2A /* PlistBookmark */ = {
isa = PlistBookmark;
fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */;
fallbackIsa = PBXBookmark;
isK = 0;
kPath = (
CFBundleName,
);
name = /Users/christopherjohnson/Desktop/MacAU/C5RawBuss/Info.plist;
rLen = 0;
rLoc = 9223372036854775807;
};
8B4E57BC201BF00900B5DC2A /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A660720730100365D66 /* C5RawBuss.cpp */;
name = "C5RawBuss.cpp: 220";
rLen = 762;
rLoc = 9965;
rType = 0;
vrLen = 1877;
vrLoc = 9307;
};
8BA05A660720730100365D66 /* C5RawBuss.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {876, 3380}}";
sepNavSelRange = "{9965, 762}";
sepNavVisRange = "{9307, 1877}";
sepNavWindowFrame = "{{-64, 50}, {923, 828}}";
};
};
8BA05A690720730100365D66 /* C5RawBussVersion.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {876, 767}}";
sepNavSelRange = "{2894, 0}";
sepNavVisRange = "{52, 2905}";
sepNavWindowFrame = "{{549, 50}, {923, 828}}";
};
};
8BC6025B073B072D006C4272 /* C5RawBuss.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {894, 1807}}";
sepNavSelRange = "{5077, 48}";
sepNavVisRange = "{2715, 1805}";
sepNavWindowFrame = "{{517, 50}, {923, 828}}";
};
};
8BD3CCB8148830B20062E48C /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
8BD3CCB9148830B20062E48C /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
8D01CCC60486CAD60068D4B7 /* C5RawBuss */ = {
activeExec = 0;
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,490 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
8B4119B70749654200361ABE /* C5RawBuss.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* C5RawBuss.r */; };
8BA05A6B0720730100365D66 /* C5RawBuss.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* C5RawBuss.cpp */; };
8BA05A6E0720730100365D66 /* C5RawBussVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* C5RawBussVersion.h */; };
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; };
8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; };
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; };
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; };
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; };
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; };
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; };
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; };
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; };
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; };
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; };
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; };
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; };
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; };
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; };
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; };
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; };
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; };
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; };
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; };
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; };
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; };
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; };
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; };
8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; };
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; };
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; };
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; };
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; };
8BC6025C073B072D006C4272 /* C5RawBuss.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* C5RawBuss.h */; };
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; };
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
8BA05A660720730100365D66 /* C5RawBuss.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = C5RawBuss.cpp; sourceTree = "<group>"; };
8BA05A670720730100365D66 /* C5RawBuss.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = C5RawBuss.exp; sourceTree = "<group>"; };
8BA05A680720730100365D66 /* C5RawBuss.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = C5RawBuss.r; sourceTree = "<group>"; };
8BA05A690720730100365D66 /* C5RawBussVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = C5RawBussVersion.h; sourceTree = "<group>"; };
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = "<group>"; };
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = "<group>"; };
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
8BC6025B073B072D006C4272 /* C5RawBuss.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = C5RawBuss.h; sourceTree = "<group>"; };
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D01CCD20486CAD60068D4B7 /* C5RawBuss.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = C5RawBuss.component; sourceTree = BUILT_PRODUCTS_DIR; };
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* C5RawBuss */ = {
isa = PBXGroup;
children = (
08FB77ADFE841716C02AAC07 /* Source */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
19C28FB4FE9D528D11CA2CBB /* Products */,
);
name = C5RawBuss;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
8BA05B01072074F900365D66 /* CoreServices.framework */,
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
8D01CCD10486CAD60068D4B7 /* Info.plist */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77ADFE841716C02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
8BA05A56072072A900365D66 /* AU Source */,
8BA05AEB0720742700365D66 /* PublicUtility */,
8BA05A7D072073D200365D66 /* AUPublic */,
);
name = Source;
sourceTree = "<group>";
};
19C28FB4FE9D528D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D01CCD20486CAD60068D4B7 /* C5RawBuss.component */,
);
name = Products;
sourceTree = "<group>";
};
8BA05A56072072A900365D66 /* AU Source */ = {
isa = PBXGroup;
children = (
8BC6025B073B072D006C4272 /* C5RawBuss.h */,
8BA05A660720730100365D66 /* C5RawBuss.cpp */,
8BA05A670720730100365D66 /* C5RawBuss.exp */,
8BA05A680720730100365D66 /* C5RawBuss.r */,
8BA05A690720730100365D66 /* C5RawBussVersion.h */,
);
name = "AU Source";
sourceTree = "<group>";
};
8BA05A7D072073D200365D66 /* AUPublic */ = {
isa = PBXGroup;
children = (
8BA05A7E072073D200365D66 /* AUBase */,
8BA05A99072073D200365D66 /* OtherBases */,
8BA05AA6072073D200365D66 /* Utility */,
);
name = AUPublic;
path = Extras/CoreAudio/AudioUnits/AUPublic;
sourceTree = SYSTEM_DEVELOPER_DIR;
};
8BA05A7E072073D200365D66 /* AUBase */ = {
isa = PBXGroup;
children = (
8BA05A7F072073D200365D66 /* AUBase.cpp */,
8BA05A80072073D200365D66 /* AUBase.h */,
8BA05A81072073D200365D66 /* AUDispatch.cpp */,
8BA05A82072073D200365D66 /* AUDispatch.h */,
8BA05A83072073D200365D66 /* AUInputElement.cpp */,
8BA05A84072073D200365D66 /* AUInputElement.h */,
8BA05A85072073D200365D66 /* AUOutputElement.cpp */,
8BA05A86072073D200365D66 /* AUOutputElement.h */,
8BA05A87072073D200365D66 /* AUResources.r */,
8BA05A88072073D200365D66 /* AUScopeElement.cpp */,
8BA05A89072073D200365D66 /* AUScopeElement.h */,
8BA05A8A072073D200365D66 /* ComponentBase.cpp */,
8BA05A8B072073D200365D66 /* ComponentBase.h */,
);
path = AUBase;
sourceTree = "<group>";
};
8BA05A99072073D200365D66 /* OtherBases */ = {
isa = PBXGroup;
children = (
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */,
8BA05A9B072073D200365D66 /* AUEffectBase.h */,
);
path = OtherBases;
sourceTree = "<group>";
};
8BA05AA6072073D200365D66 /* Utility */ = {
isa = PBXGroup;
children = (
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */,
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */,
8BA05AA7072073D200365D66 /* AUBuffer.cpp */,
8BA05AA8072073D200365D66 /* AUBuffer.h */,
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */,
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */,
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */,
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */,
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */,
);
path = Utility;
sourceTree = "<group>";
};
8BA05AEB0720742700365D66 /* PublicUtility */ = {
isa = PBXGroup;
children = (
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
8BA05B060720754400365D66 /* CAAUParameter.h */,
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */,
8BA05AE10720742100365D66 /* CAMutex.cpp */,
8BA05AE20720742100365D66 /* CAMutex.h */,
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */,
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */,
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */,
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */,
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
);
name = PublicUtility;
path = Extras/CoreAudio/PublicUtility;
sourceTree = SYSTEM_DEVELOPER_DIR;
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
8D01CCC70486CAD60068D4B7 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05A6E0720730100365D66 /* C5RawBussVersion.h in Headers */,
8BA05AAF072073D300365D66 /* AUBase.h in Headers */,
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */,
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */,
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */,
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */,
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */,
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */,
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */,
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */,
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */,
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */,
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */,
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */,
8BA05AE80720742100365D66 /* CAMutex.h in Headers */,
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */,
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */,
8BC6025C073B072D006C4272 /* C5RawBuss.h in Headers */,
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */,
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */,
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
8D01CCC60486CAD60068D4B7 /* C5RawBuss */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "C5RawBuss" */;
buildPhases = (
8D01CCC70486CAD60068D4B7 /* Headers */,
8D01CCC90486CAD60068D4B7 /* Resources */,
8D01CCCB0486CAD60068D4B7 /* Sources */,
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
8D01CCCF0486CAD60068D4B7 /* Rez */,
);
buildRules = (
);
dependencies = (
);
name = C5RawBuss;
productInstallPath = "$(HOME)/Library/Bundles";
productName = C5RawBuss;
productReference = 8D01CCD20486CAD60068D4B7 /* C5RawBuss.component */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "C5RawBuss" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 089C166AFE841209C02AAC07 /* C5RawBuss */;
projectDirPath = "";
projectRoot = "";
targets = (
8D01CCC60486CAD60068D4B7 /* C5RawBuss */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D01CCC90486CAD60068D4B7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXRezBuildPhase section */
8D01CCCF0486CAD60068D4B7 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
8B4119B70749654200361ABE /* C5RawBuss.r in Rez */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05A6B0720730100365D66 /* C5RawBuss.cpp in Sources */,
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */,
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */,
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */,
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */,
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */,
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */,
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */,
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */,
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */,
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */,
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */,
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */,
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */,
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */,
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C167EFE841241C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
3E4BA244089833B7007656EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
EXPORTED_SYMBOLS_FILE = C5RawBuss.exp;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GENERATE_PKGINFO_FILE = YES;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
LIBRARY_STYLE = Bundle;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = C5RawBuss;
WRAPPER_EXTENSION = component;
};
name = Debug;
};
3E4BA245089833B7007656EC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
x86_64,
);
EXPORTED_SYMBOLS_FILE = C5RawBuss.exp;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GENERATE_PKGINFO_FILE = YES;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
LIBRARY_STYLE = Bundle;
MACOSX_DEPLOYMENT_TARGET = 10.4;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = C5RawBuss;
SDKROOT = macosx10.5;
STRIP_INSTALLED_PRODUCT = YES;
STRIP_STYLE = all;
WRAPPER_EXTENSION = component;
};
name = Release;
};
3E4BA248089833B7007656EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = c99;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
};
name = Debug;
};
3E4BA249089833B7007656EC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = c99;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "C5RawBuss" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3E4BA244089833B7007656EC /* Debug */,
3E4BA245089833B7007656EC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "C5RawBuss" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3E4BA248089833B7007656EC /* Debug */,
3E4BA249089833B7007656EC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
}

View file

@ -0,0 +1,58 @@
/*
* File: C5RawBussVersion.h
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __C5RawBussVersion_h__
#define __C5RawBussVersion_h__
#ifdef DEBUG
#define kC5RawBussVersion 0xFFFFFFFF
#else
#define kC5RawBussVersion 0x00010000
#endif
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
#define C5RawBuss_COMP_MANF 'Dthr'
#define C5RawBuss_COMP_SUBTYPE 'conm'
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#endif

Binary file not shown.

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
<key>CFBundleName</key>
<string>${PROJECTNAMEASIDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>DthX</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildVersion</key>
<string>3</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>ProjectName</key>
<string>${EXECUTABLE_NAME}</string>
<key>SourceVersion</key>
<string>590000</string>
</dict>
</plist>

View file

@ -0,0 +1,260 @@
/*
* File: C5RawChannel.cpp
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/*=============================================================================
C5RawChannel.cpp
=============================================================================*/
#include "C5RawChannel.h"
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
COMPONENT_ENTRY(C5RawChannel)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::C5RawChannel
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C5RawChannel::C5RawChannel(AudioUnit component)
: AUEffectBase(component)
{
CreateElements();
Globals()->UseIndexedParameters(kNumberOfParameters);
SetParameter(kParam_One, kDefaultValue_ParamOne );
#if AU_DEBUG_DISPATCHER
mDebugDispatcher = new AUDebugDispatcher (this);
#endif
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::GetParameterValueStrings
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawChannel::GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings)
{
return kAudioUnitErr_InvalidProperty;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::GetParameterInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawChannel::GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo &outParameterInfo )
{
ComponentResult result = noErr;
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
| kAudioUnitParameterFlag_IsReadable;
if (inScope == kAudioUnitScope_Global) {
switch(inParameterID)
{
case kParam_One:
AUBase::FillInParameterName (outParameterInfo, kParameterOneName, false);
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
outParameterInfo.minValue = 0.0;
outParameterInfo.maxValue = 1.0;
outParameterInfo.defaultValue = kDefaultValue_ParamOne;
break;
default:
result = kAudioUnitErr_InvalidParameter;
break;
}
} else {
result = kAudioUnitErr_InvalidParameter;
}
return result;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::GetPropertyInfo
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawChannel::GetPropertyInfo (AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable)
{
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::GetProperty
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawChannel::GetProperty( AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData )
{
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
}
// C5RawChannel::Initialize
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ComponentResult C5RawChannel::Initialize()
{
ComponentResult result = AUEffectBase::Initialize();
if (result == noErr)
Reset(kAudioUnitScope_Global, 0);
return result;
}
#pragma mark ____C5RawChannelEffectKernel
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::C5RawChannelKernel::Reset()
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void C5RawChannel::C5RawChannelKernel::Reset()
{
lastFXChannel = 0.0;
lastSampleChannel = 0.0;
fpNShapeA = 0.0;
fpNShapeB = 0.0;
fpFlip = true;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// C5RawChannel::C5RawChannelKernel::Process
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void C5RawChannel::C5RawChannelKernel::Process( const Float32 *inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence )
{
UInt32 nSampleFrames = inFramesToProcess;
const Float32 *sourceP = inSourceP;
Float32 *destP = inDestP;
Float32 fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = GetParameter( kParam_One ) * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
Float64 difference;
long double inputSample;
while (nSampleFrames-- > 0) {
inputSample = *sourceP;
if (inputSample<1.2e-38 && -inputSample<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSample = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
difference = lastSampleChannel - inputSample;
lastSampleChannel = inputSample;
//derive slew part off direct sample measurement + from last time
if (difference > 1.0) difference = 1.0;
if (difference < -1.0) difference = -1.0;
inputSample = lastFXChannel + asin(difference);
lastFXChannel = inputSample;
if (centering < 1.0) lastFXChannel *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannel > 1.0) lastFXChannel = 1.0;
if (lastFXChannel < -1.0) lastFXChannel = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSample > 1.57079633) inputSample = 1.57079633;
if (inputSample < -1.57079633) inputSample = -1.57079633;
inputSample = sin(inputSample);
//amplitude aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSample;
fpNShapeA = (fpNShapeA*fpOld)+((inputSample-fpTemp)*fpNew);
inputSample += fpNShapeA;
}
else {
fpTemp = inputSample;
fpNShapeB = (fpNShapeB*fpOld)+((inputSample-fpTemp)*fpNew);
inputSample += fpNShapeB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*destP = inputSample;
sourceP += inNumChannels; destP += inNumChannels;
}
}

View file

@ -0,0 +1 @@
_C5RawChannelEntry

View file

@ -0,0 +1,139 @@
/*
* File: C5RawChannel.h
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "AUEffectBase.h"
#include "C5RawChannelVersion.h"
#if AU_DEBUG_DISPATCHER
#include "AUDebugDispatcher.h"
#endif
#ifndef __C5RawChannel_h__
#define __C5RawChannel_h__
#pragma mark ____C5RawChannel Parameters
// parameters
static const float kDefaultValue_ParamOne = 0.0;
static CFStringRef kParameterOneName = CFSTR("Centering Force");
//Alter the name if desired, but using the plugin name is a start
enum {
kParam_One =0,
//Add your parameters here...
kNumberOfParameters=1
};
#pragma mark ____C5RawChannel
class C5RawChannel : public AUEffectBase
{
public:
C5RawChannel(AudioUnit component);
#if AU_DEBUG_DISPATCHER
virtual ~C5RawChannel () { delete mDebugDispatcher; }
#endif
virtual AUKernelBase * NewKernel() { return new C5RawChannelKernel(this); }
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
CFArrayRef * outStrings);
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo &outParameterInfo);
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
UInt32 & outDataSize,
Boolean & outWritable );
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
AudioUnitScope inScope,
AudioUnitElement inElement,
void * outData);
virtual ComponentResult Initialize();
virtual bool SupportsTail () { return true; }
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
/*! @method Version */
virtual ComponentResult Version() { return kC5RawChannelVersion; }
protected:
class C5RawChannelKernel : public AUKernelBase // most of the real work happens here
{
public:
C5RawChannelKernel(AUEffectBase *inAudioUnit )
: AUKernelBase(inAudioUnit)
{
}
// *Required* overides for the process method for this effect
// processes one channel of interleaved samples
virtual void Process( const Float32 *inSourceP,
Float32 *inDestP,
UInt32 inFramesToProcess,
UInt32 inNumChannels,
bool &ioSilence);
virtual void Reset();
private:
Float64 lastSampleChannel;
Float64 lastFXChannel;
long double fpNShapeA;
long double fpNShapeB;
bool fpFlip;
};
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#endif

View file

@ -0,0 +1,61 @@
/*
* File: C5RawChannel.r
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <AudioUnit/AudioUnit.r>
#include "C5RawChannelVersion.h"
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
#define kAudioUnitResID_C5RawChannel 1000
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C5RawChannel~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define RES_ID kAudioUnitResID_C5RawChannel
#define COMP_TYPE kAudioUnitType_Effect
#define COMP_SUBTYPE C5RawChannel_COMP_SUBTYPE
#define COMP_MANUF C5RawChannel_COMP_MANF
#define VERSION kC5RawChannelVersion
#define NAME "Airwindows: C5RawChannel"
#define DESCRIPTION "C5RawChannel AU"
#define ENTRY_POINT "C5RawChannelEntry"
#include "AUResources.r"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,131 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* C5RawChannel */;
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
145,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
252,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 542412635;
PBXWorkspaceStateSaveDate = 542412635;
};
perUserProjectItems = {
8B44C16D20548F6200B1360B /* PlistBookmark */ = 8B44C16D20548F6200B1360B /* PlistBookmark */;
8B44C16E20548F6200B1360B /* PBXBookmark */ = 8B44C16E20548F6200B1360B /* PBXBookmark */;
8B44C16F20548F6200B1360B /* PBXTextBookmark */ = 8B44C16F20548F6200B1360B /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
8B44C16D20548F6200B1360B /* PlistBookmark */ = {
isa = PlistBookmark;
fRef = 8D01CCD10486CAD60068D4B7 /* Info.plist */;
fallbackIsa = PBXBookmark;
isK = 0;
kPath = (
CFBundleName,
);
name = /Users/christopherjohnson/Desktop/MacAU/C5RawChannel/Info.plist;
rLen = 0;
rLoc = 9223372036854775807;
};
8B44C16E20548F6200B1360B /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = 8BA05A660720730100365D66 /* C5RawChannel.cpp */;
};
8B44C16F20548F6200B1360B /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A660720730100365D66 /* C5RawChannel.cpp */;
name = "C5RawChannel.cpp: 220";
rLen = 792;
rLoc = 10043;
rType = 0;
vrLen = 1;
vrLoc = 10043;
};
8BA05A660720730100365D66 /* C5RawChannel.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {677, 3601}}";
sepNavSelRange = "{10043, 792}";
sepNavVisRange = "{10043, 1}";
sepNavWindowFrame = "{{434, 50}, {923, 828}}";
};
};
8BA05A690720730100365D66 /* C5RawChannelVersion.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {876, 767}}";
sepNavSelRange = "{2915, 0}";
sepNavVisRange = "{52, 2926}";
sepNavWindowFrame = "{{15, 45}, {923, 828}}";
};
};
8BC6025B073B072D006C4272 /* C5RawChannel.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {894, 1638}}";
sepNavSelRange = "{2944, 0}";
sepNavVisRange = "{2680, 1548}";
sepNavWindowFrame = "{{15, 45}, {923, 828}}";
};
};
8BD3CCB8148830B20062E48C /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
8BD3CCB9148830B20062E48C /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
8D01CCC60486CAD60068D4B7 /* C5RawChannel */ = {
activeExec = 0;
};
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,490 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
8B4119B70749654200361ABE /* C5RawChannel.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* C5RawChannel.r */; };
8BA05A6B0720730100365D66 /* C5RawChannel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* C5RawChannel.cpp */; };
8BA05A6E0720730100365D66 /* C5RawChannelVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* C5RawChannelVersion.h */; };
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; };
8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; };
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; };
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; };
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; };
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; };
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; };
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; };
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; };
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; };
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; };
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; };
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; };
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; };
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; };
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; };
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; };
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; };
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; };
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; };
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; };
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; };
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; };
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; };
8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; };
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; };
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; };
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; };
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; };
8BC6025C073B072D006C4272 /* C5RawChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* C5RawChannel.h */; };
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; };
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
8BA05A660720730100365D66 /* C5RawChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = C5RawChannel.cpp; sourceTree = "<group>"; };
8BA05A670720730100365D66 /* C5RawChannel.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = C5RawChannel.exp; sourceTree = "<group>"; };
8BA05A680720730100365D66 /* C5RawChannel.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = C5RawChannel.r; sourceTree = "<group>"; };
8BA05A690720730100365D66 /* C5RawChannelVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = C5RawChannelVersion.h; sourceTree = "<group>"; };
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = "<group>"; };
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = "<group>"; };
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
8BC6025B073B072D006C4272 /* C5RawChannel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = C5RawChannel.h; sourceTree = "<group>"; };
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D01CCD20486CAD60068D4B7 /* C5RawChannel.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = C5RawChannel.component; sourceTree = BUILT_PRODUCTS_DIR; };
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* C5RawChannel */ = {
isa = PBXGroup;
children = (
08FB77ADFE841716C02AAC07 /* Source */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
19C28FB4FE9D528D11CA2CBB /* Products */,
);
name = C5RawChannel;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
8BA05B01072074F900365D66 /* CoreServices.framework */,
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
8D01CCD10486CAD60068D4B7 /* Info.plist */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77ADFE841716C02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
8BA05A56072072A900365D66 /* AU Source */,
8BA05AEB0720742700365D66 /* PublicUtility */,
8BA05A7D072073D200365D66 /* AUPublic */,
);
name = Source;
sourceTree = "<group>";
};
19C28FB4FE9D528D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D01CCD20486CAD60068D4B7 /* C5RawChannel.component */,
);
name = Products;
sourceTree = "<group>";
};
8BA05A56072072A900365D66 /* AU Source */ = {
isa = PBXGroup;
children = (
8BC6025B073B072D006C4272 /* C5RawChannel.h */,
8BA05A660720730100365D66 /* C5RawChannel.cpp */,
8BA05A670720730100365D66 /* C5RawChannel.exp */,
8BA05A680720730100365D66 /* C5RawChannel.r */,
8BA05A690720730100365D66 /* C5RawChannelVersion.h */,
);
name = "AU Source";
sourceTree = "<group>";
};
8BA05A7D072073D200365D66 /* AUPublic */ = {
isa = PBXGroup;
children = (
8BA05A7E072073D200365D66 /* AUBase */,
8BA05A99072073D200365D66 /* OtherBases */,
8BA05AA6072073D200365D66 /* Utility */,
);
name = AUPublic;
path = Extras/CoreAudio/AudioUnits/AUPublic;
sourceTree = SYSTEM_DEVELOPER_DIR;
};
8BA05A7E072073D200365D66 /* AUBase */ = {
isa = PBXGroup;
children = (
8BA05A7F072073D200365D66 /* AUBase.cpp */,
8BA05A80072073D200365D66 /* AUBase.h */,
8BA05A81072073D200365D66 /* AUDispatch.cpp */,
8BA05A82072073D200365D66 /* AUDispatch.h */,
8BA05A83072073D200365D66 /* AUInputElement.cpp */,
8BA05A84072073D200365D66 /* AUInputElement.h */,
8BA05A85072073D200365D66 /* AUOutputElement.cpp */,
8BA05A86072073D200365D66 /* AUOutputElement.h */,
8BA05A87072073D200365D66 /* AUResources.r */,
8BA05A88072073D200365D66 /* AUScopeElement.cpp */,
8BA05A89072073D200365D66 /* AUScopeElement.h */,
8BA05A8A072073D200365D66 /* ComponentBase.cpp */,
8BA05A8B072073D200365D66 /* ComponentBase.h */,
);
path = AUBase;
sourceTree = "<group>";
};
8BA05A99072073D200365D66 /* OtherBases */ = {
isa = PBXGroup;
children = (
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */,
8BA05A9B072073D200365D66 /* AUEffectBase.h */,
);
path = OtherBases;
sourceTree = "<group>";
};
8BA05AA6072073D200365D66 /* Utility */ = {
isa = PBXGroup;
children = (
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */,
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */,
8BA05AA7072073D200365D66 /* AUBuffer.cpp */,
8BA05AA8072073D200365D66 /* AUBuffer.h */,
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */,
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */,
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */,
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */,
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */,
);
path = Utility;
sourceTree = "<group>";
};
8BA05AEB0720742700365D66 /* PublicUtility */ = {
isa = PBXGroup;
children = (
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
8BA05B060720754400365D66 /* CAAUParameter.h */,
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */,
8BA05AE10720742100365D66 /* CAMutex.cpp */,
8BA05AE20720742100365D66 /* CAMutex.h */,
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */,
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */,
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */,
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */,
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
);
name = PublicUtility;
path = Extras/CoreAudio/PublicUtility;
sourceTree = SYSTEM_DEVELOPER_DIR;
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
8D01CCC70486CAD60068D4B7 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05A6E0720730100365D66 /* C5RawChannelVersion.h in Headers */,
8BA05AAF072073D300365D66 /* AUBase.h in Headers */,
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */,
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */,
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */,
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */,
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */,
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */,
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */,
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */,
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */,
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */,
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */,
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */,
8BA05AE80720742100365D66 /* CAMutex.h in Headers */,
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */,
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */,
8BC6025C073B072D006C4272 /* C5RawChannel.h in Headers */,
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */,
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */,
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
8D01CCC60486CAD60068D4B7 /* C5RawChannel */ = {
isa = PBXNativeTarget;
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "C5RawChannel" */;
buildPhases = (
8D01CCC70486CAD60068D4B7 /* Headers */,
8D01CCC90486CAD60068D4B7 /* Resources */,
8D01CCCB0486CAD60068D4B7 /* Sources */,
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
8D01CCCF0486CAD60068D4B7 /* Rez */,
);
buildRules = (
);
dependencies = (
);
name = C5RawChannel;
productInstallPath = "$(HOME)/Library/Bundles";
productName = C5RawChannel;
productReference = 8D01CCD20486CAD60068D4B7 /* C5RawChannel.component */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "C5RawChannel" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 089C166AFE841209C02AAC07 /* C5RawChannel */;
projectDirPath = "";
projectRoot = "";
targets = (
8D01CCC60486CAD60068D4B7 /* C5RawChannel */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D01CCC90486CAD60068D4B7 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXRezBuildPhase section */
8D01CCCF0486CAD60068D4B7 /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
8B4119B70749654200361ABE /* C5RawChannel.r in Rez */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8BA05A6B0720730100365D66 /* C5RawChannel.cpp in Sources */,
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */,
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */,
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */,
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */,
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */,
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */,
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */,
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */,
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */,
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */,
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */,
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */,
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */,
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */,
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C167EFE841241C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
3E4BA244089833B7007656EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
EXPORTED_SYMBOLS_FILE = C5RawChannel.exp;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GENERATE_PKGINFO_FILE = YES;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
LIBRARY_STYLE = Bundle;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = C5RawChannel;
WRAPPER_EXTENSION = component;
};
name = Debug;
};
3E4BA245089833B7007656EC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc,
i386,
x86_64,
);
EXPORTED_SYMBOLS_FILE = C5RawChannel.exp;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GENERATE_PKGINFO_FILE = YES;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
LIBRARY_STYLE = Bundle;
MACOSX_DEPLOYMENT_TARGET = 10.4;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = C5RawChannel;
SDKROOT = macosx10.5;
STRIP_INSTALLED_PRODUCT = YES;
STRIP_STYLE = all;
WRAPPER_EXTENSION = component;
};
name = Release;
};
3E4BA248089833B7007656EC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = c99;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
};
name = Debug;
};
3E4BA249089833B7007656EC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_C_LANGUAGE_STANDARD = c99;
SDKROOT = macosx10.6;
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "C5RawChannel" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3E4BA244089833B7007656EC /* Debug */,
3E4BA245089833B7007656EC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "C5RawChannel" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3E4BA248089833B7007656EC /* Debug */,
3E4BA249089833B7007656EC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
}

View file

@ -0,0 +1,58 @@
/*
* File: C5RawChannelVersion.h
*
* Version: 1.0
*
* Created: 1/26/18
*
* Copyright: Copyright © 2018 Airwindows, All Rights Reserved
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
* consideration of your agreement to the following terms, and your use, installation, modification
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
* not agree with these terms, please do not use, install, modify or redistribute this Apple
* software.
*
* In consideration of your agreement to abide by the following terms, and subject to these terms,
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
* redistribute the Apple Software in its entirety and without modifications, you must retain this
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
* endorse or promote products derived from the Apple Software without specific prior written
* permission from Apple. Except as expressly stated in this notice, no other rights or
* licenses, express or implied, are granted by Apple herein, including but not limited to any
* patent rights that may be infringed by your derivative works or by other works in which the
* Apple Software may be incorporated.
*
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
* OR IN COMBINATION WITH YOUR PRODUCTS.
*
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __C5RawChannelVersion_h__
#define __C5RawChannelVersion_h__
#ifdef DEBUG
#define kC5RawChannelVersion 0xFFFFFFFF
#else
#define kC5RawChannelVersion 0x00010000
#endif
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
#define C5RawChannel_COMP_MANF 'Dthr'
#define C5RawChannel_COMP_SUBTYPE 'conn'
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
#endif

Binary file not shown.

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
<key>CFBundleName</key>
<string>${PROJECTNAMEASIDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>DthX</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildVersion</key>
<string>3</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>ProjectName</key>
<string>${EXECUTABLE_NAME}</string>
<key>SourceVersion</key>
<string>590000</string>
</dict>
</plist>

View file

@ -0,0 +1,108 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* C5RawBuss */;
codeSenseManager = 8B02375F1D42B1C400E1E8C8 /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
242,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
324,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 538698967;
PBXWorkspaceStateSaveDate = 538698967;
};
sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */;
userBuildSettings = {
};
};
2407DEB6089929BA00EB68BF /* C5RawBuss.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {848, 1638}}";
sepNavSelRange = "{541, 0}";
sepNavVisRange = "{0, 2005}";
sepNavWindowFrame = "{{12, 47}, {895, 831}}";
};
};
245463B80991757100464AD3 /* C5RawBuss.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {866, 897}}";
sepNavSelRange = "{2520, 105}";
sepNavVisRange = "{333, 2303}";
sepNavWindowFrame = "{{20, 47}, {895, 831}}";
};
};
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {859, 20267}}";
sepNavSelRange = "{10616, 0}";
sepNavVisRange = "{9653, 2414}";
sepNavWindowFrame = "{{15, 42}, {895, 831}}";
};
};
24D8286F09A914000093AEF8 /* C5RawBussProc.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {848, 3744}}";
sepNavSelRange = "{9641, 0}";
sepNavVisRange = "{4872, 1806}";
sepNavWindowFrame = "{{9, 47}, {895, 831}}";
};
};
8B02375E1D42B1C400E1E8C8 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
8B02375F1D42B1C400E1E8C8 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
8D01CCC60486CAD60068D4B7 /* C5RawBuss */ = {
activeExec = 0;
};
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Sample.xcodeproj">
</FileRef>
</Workspace>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,143 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* Gain */;
codeSenseManager = 91857D95148EF55400AAA11B /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
829,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
789,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 345089498;
PBXWorkspaceStateSaveDate = 345089498;
};
perUserProjectItems = {
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = 911C2A9D1491A5F600A430AF /* PBXTextBookmark */;
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */;
};
sourceControlManager = 91857D94148EF55400AAA11B /* Source Control */;
userBuildSettings = {
};
};
2407DEB6089929BA00EB68BF /* Gain.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 1768}}";
sepNavSelRange = "{247, 0}";
sepNavVisRange = "{0, 1657}";
};
};
245463B80991757100464AD3 /* Gain.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 975}}";
sepNavSelRange = "{1552, 0}";
sepNavVisRange = "{796, 1857}";
sepNavWindowFrame = "{{15, 465}, {750, 558}}";
};
};
24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 488}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 798}";
};
};
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {859, 19825}}";
sepNavSelRange = "{10641, 0}";
sepNavVisRange = "{10076, 1095}";
};
};
24D8286F09A914000093AEF8 /* GainProc.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 482}}";
sepNavSelRange = "{239, 0}";
sepNavVisRange = "{0, 950}";
};
};
24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 493}}";
sepNavSelRange = "{249, 0}";
sepNavVisRange = "{0, 249}";
};
};
8D01CCC60486CAD60068D4B7 /* Gain */ = {
activeExec = 0;
};
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
name = "Gain.cpp: 10";
rLen = 0;
rLoc = 247;
rType = 0;
vrLen = 1657;
vrLoc = 0;
};
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
name = "Gain.cpp: 10";
rLen = 0;
rLoc = 247;
rType = 0;
vrLen = 1625;
vrLoc = 0;
};
91857D94148EF55400AAA11B /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
91857D95148EF55400AAA11B /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
}

View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Gain.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D01CCC60486CAD60068D4B7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>«PROJECTNAME».xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D01CCC60486CAD60068D4B7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "&#171;PROJECTNAME&#187;.vst"
BlueprintName = "&#171;PROJECTNAME&#187;"
ReferencedContainer = "container:Sample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>C5RawBuss</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.airwindows.C5RawBuss</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>Dthr</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1 @@
BNDL????

View file

@ -0,0 +1,17 @@
#define MAC 1
#define MACX 1
#define USE_NAMESPACE 0
#define TARGET_API_MAC_CARBON 1
#define USENAVSERVICES 1
#define __CF_USE_FRAMEWORK_INCLUDES__
#if __MWERKS__
#define __NOEXTENSIONS__
#endif
#define QUARTZ 1
#include <AvailabilityMacros.h>

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawBuss(audioMaster);}
C5RawBuss::C5RawBuss(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXBussL = 0.0;
lastSampleBussL = 0.0;
lastFXBussR = 0.0;
lastSampleBussR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawBuss::~C5RawBuss() {}
VstInt32 C5RawBuss::getVendorVersion () {return 1000;}
void C5RawBuss::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawBuss::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 C5RawBuss::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawBuss::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawBuss::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawBuss::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawBuss::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawBuss::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawBuss::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawBuss::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawBuss::getEffectName(char* name) {
vst_strncpy(name, "C5RawBuss", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawBuss::getPlugCategory() {return kPlugCategEffect;}
bool C5RawBuss::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawBuss", kVstMaxProductStrLen); return true;
}
bool C5RawBuss::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#define __C5RawBuss_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conm'; //Change this to what the AU identity is!
class C5RawBuss :
public AudioEffectX
{
public:
C5RawBuss(audioMasterCallback audioMaster);
~C5RawBuss();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXBussL;
double lastSampleBussL;
double lastFXBussR;
double lastSampleBussR;
float A;
};
#endif

View file

@ -0,0 +1,276 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
void C5RawBuss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawBuss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}

View file

@ -0,0 +1,108 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* C5RawChannel */;
codeSenseManager = 8B02375F1D42B1C400E1E8C8 /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
255,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
324,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 538698973;
PBXWorkspaceStateSaveDate = 538698973;
};
sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */;
userBuildSettings = {
};
};
2407DEB6089929BA00EB68BF /* C5RawChannel.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {848, 1651}}";
sepNavSelRange = "{574, 0}";
sepNavVisRange = "{2660, 1899}";
sepNavWindowFrame = "{{12, 47}, {895, 831}}";
};
};
245463B80991757100464AD3 /* C5RawChannel.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {866, 897}}";
sepNavSelRange = "{2642, 0}";
sepNavVisRange = "{345, 2324}";
sepNavWindowFrame = "{{20, 47}, {895, 831}}";
};
};
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {859, 20267}}";
sepNavSelRange = "{10616, 0}";
sepNavVisRange = "{9653, 2414}";
sepNavWindowFrame = "{{15, 42}, {895, 831}}";
};
};
24D8286F09A914000093AEF8 /* C5RawChannelProc.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {848, 3861}}";
sepNavSelRange = "{9642, 0}";
sepNavVisRange = "{8586, 1784}";
sepNavWindowFrame = "{{347, 47}, {895, 831}}";
};
};
8B02375E1D42B1C400E1E8C8 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
8B02375F1D42B1C400E1E8C8 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
8D01CCC60486CAD60068D4B7 /* C5RawChannel */ = {
activeExec = 0;
};
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Sample.xcodeproj">
</FileRef>
</Workspace>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,143 @@
// !$*UTF8*$!
{
089C1669FE841209C02AAC07 /* Project object */ = {
activeBuildConfigurationName = Release;
activeTarget = 8D01CCC60486CAD60068D4B7 /* Gain */;
codeSenseManager = 91857D95148EF55400AAA11B /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
829,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
789,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 345089498;
PBXWorkspaceStateSaveDate = 345089498;
};
perUserProjectItems = {
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = 911C2A9D1491A5F600A430AF /* PBXTextBookmark */;
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = 915DCCBB1491A5B8008574E6 /* PBXTextBookmark */;
};
sourceControlManager = 91857D94148EF55400AAA11B /* Source Control */;
userBuildSettings = {
};
};
2407DEB6089929BA00EB68BF /* Gain.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 1768}}";
sepNavSelRange = "{247, 0}";
sepNavVisRange = "{0, 1657}";
};
};
245463B80991757100464AD3 /* Gain.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 975}}";
sepNavSelRange = "{1552, 0}";
sepNavVisRange = "{796, 1857}";
sepNavWindowFrame = "{{15, 465}, {750, 558}}";
};
};
24A2FF9A0F90D1DD003BB5A7 /* adelaymain.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 488}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 798}";
};
};
24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {859, 19825}}";
sepNavSelRange = "{10641, 0}";
sepNavVisRange = "{10076, 1095}";
};
};
24D8286F09A914000093AEF8 /* GainProc.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 482}}";
sepNavSelRange = "{239, 0}";
sepNavVisRange = "{0, 950}";
};
};
24D8287E09A9164A0093AEF8 /* xcode_vst_prefix.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {992, 493}}";
sepNavSelRange = "{249, 0}";
sepNavVisRange = "{0, 249}";
};
};
8D01CCC60486CAD60068D4B7 /* Gain */ = {
activeExec = 0;
};
911C2A9D1491A5F600A430AF /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
name = "Gain.cpp: 10";
rLen = 0;
rLoc = 247;
rType = 0;
vrLen = 1657;
vrLoc = 0;
};
915DCCBB1491A5B8008574E6 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 2407DEB6089929BA00EB68BF /* Gain.cpp */;
name = "Gain.cpp: 10";
rLen = 0;
rLoc = 247;
rType = 0;
vrLen = 1625;
vrLoc = 0;
};
91857D94148EF55400AAA11B /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
91857D95148EF55400AAA11B /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
}

View file

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "Gain.vst"
BlueprintName = "Gain"
ReferencedContainer = "container:Gain.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Gain.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D01CCC60486CAD60068D4B7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>«PROJECTNAME».xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>8D01CCC60486CAD60068D4B7</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
BuildableName = "&#171;PROJECTNAME&#187;.vst"
BlueprintName = "&#171;PROJECTNAME&#187;"
ReferencedContainer = "container:Sample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>C5RawChannel</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.airwindows.C5RawChannel</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>Dthr</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View file

@ -0,0 +1 @@
BNDL????

View file

@ -0,0 +1,17 @@
#define MAC 1
#define MACX 1
#define USE_NAMESPACE 0
#define TARGET_API_MAC_CARBON 1
#define USENAVSERVICES 1
#define __CF_USE_FRAMEWORK_INCLUDES__
#if __MWERKS__
#define __NOEXTENSIONS__
#endif
#define QUARTZ 1
#include <AvailabilityMacros.h>

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawChannel(audioMaster);}
C5RawChannel::C5RawChannel(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXChannelL = 0.0;
lastSampleChannelL = 0.0;
lastFXChannelR = 0.0;
lastSampleChannelR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawChannel::~C5RawChannel() {}
VstInt32 C5RawChannel::getVendorVersion () {return 1000;}
void C5RawChannel::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawChannel::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 C5RawChannel::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawChannel::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawChannel::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawChannel::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawChannel::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawChannel::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawChannel::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawChannel::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawChannel::getEffectName(char* name) {
vst_strncpy(name, "C5RawChannel", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawChannel::getPlugCategory() {return kPlugCategEffect;}
bool C5RawChannel::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawChannel", kVstMaxProductStrLen); return true;
}
bool C5RawChannel::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#define __C5RawChannel_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conn'; //Change this to what the AU identity is!
class C5RawChannel :
public AudioEffectX
{
public:
C5RawChannel(audioMasterCallback audioMaster);
~C5RawChannel();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXChannelL;
double lastSampleChannelL;
double lastFXChannelR;
double lastSampleChannelR;
float A;
};
#endif

View file

@ -0,0 +1,274 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
void C5RawChannel::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawChannel::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawBuss(audioMaster);}
C5RawBuss::C5RawBuss(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXBussL = 0.0;
lastSampleBussL = 0.0;
lastFXBussR = 0.0;
lastSampleBussR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawBuss::~C5RawBuss() {}
VstInt32 C5RawBuss::getVendorVersion () {return 1000;}
void C5RawBuss::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawBuss::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 C5RawBuss::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawBuss::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawBuss::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawBuss::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawBuss::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawBuss::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawBuss::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawBuss::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawBuss::getEffectName(char* name) {
vst_strncpy(name, "C5RawBuss", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawBuss::getPlugCategory() {return kPlugCategEffect;}
bool C5RawBuss::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawBuss", kVstMaxProductStrLen); return true;
}
bool C5RawBuss::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#define __C5RawBuss_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conm'; //Change this to what the AU identity is!
class C5RawBuss :
public AudioEffectX
{
public:
C5RawBuss(audioMasterCallback audioMaster);
~C5RawBuss();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXBussL;
double lastSampleBussL;
double lastFXBussR;
double lastSampleBussR;
float A;
};
#endif

View file

@ -0,0 +1,276 @@
/* ========================================
* C5RawBuss - C5RawBuss.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawBuss_H
#include "C5RawBuss.h"
#endif
void C5RawBuss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawBuss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
if (inputSampleL > 1.0) inputSampleL = 1.0;
if (inputSampleL < -1.0) inputSampleL = -1.0;
inputSampleL = asin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.0) inputSampleR = 1.0;
if (inputSampleR < -1.0) inputSampleR = -1.0;
inputSampleR = asin(inputSampleR);
//amplitude aspect
differenceL = lastSampleBussL - inputSampleL;
lastSampleBussL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleBussR - inputSampleR;
lastSampleBussR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.57079633) differenceL = 1.57079633;
if (differenceL < -1.57079633) differenceL = -1.57079633;
if (differenceR > 1.57079633) differenceR = 1.57079633;
if (differenceR < -1.57079633) differenceR = -1.57079633;
inputSampleL = lastFXBussL + sin(differenceL);
lastFXBussL = inputSampleL;
if (centering < 1.0) lastFXBussL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXBussR + sin(differenceR);
lastFXBussR = inputSampleR;
if (centering < 1.0) lastFXBussR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXBussL > 1.0) lastFXBussL = 1.0;
if (lastFXBussL < -1.0) lastFXBussL = -1.0;
//build new signal off what was present in output last time
if (lastFXBussR > 1.0) lastFXBussR = 1.0;
if (lastFXBussR < -1.0) lastFXBussR = -1.0;
//build new signal off what was present in output last time
//slew aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*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="C5RawBuss.cpp" />
<ClCompile Include="C5RawBussProc.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="C5RawBuss.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
<RootNamespace>VSTProject</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>C5RawBuss64</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="C5RawBuss.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C5RawBussProc.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="C5RawBuss.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,61 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/01/12 09:05:31 $
//
// Category : VST 2.x Classes
// Filename : aeffeditor.h
// Created by : Steinberg Media Technologies
// Description : Editor Class for VST Plug-Ins
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#ifndef __aeffeditor__
#define __aeffeditor__
#include "audioeffectx.h"
//-------------------------------------------------------------------------------------------------------
/** VST Effect Editor class. */
//-------------------------------------------------------------------------------------------------------
class AEffEditor
{
public:
//-------------------------------------------------------------------------------------------------------
AEffEditor (AudioEffect* effect = 0) ///< Editor class constructor. Requires pointer to associated effect instance.
: effect (effect)
, systemWindow (0)
{}
virtual ~AEffEditor () ///< Editor class destructor.
{}
virtual AudioEffect* getEffect () { return effect; } ///< Returns associated effect instance
virtual bool getRect (ERect** rect) { *rect = 0; return false; } ///< Query editor size as #ERect
virtual bool open (void* ptr) { systemWindow = ptr; return 0; } ///< Open editor, pointer to parent windows is platform-dependent (HWND on Windows, WindowRef on Mac).
virtual void close () { systemWindow = 0; } ///< Close editor (detach from parent window)
virtual bool isOpen () { return systemWindow != 0; } ///< Returns true if editor is currently open
virtual void idle () {} ///< Idle call supplied by Host application
#if TARGET_API_MAC_CARBON
virtual void DECLARE_VST_DEPRECATED (draw) (ERect* rect) {}
virtual VstInt32 DECLARE_VST_DEPRECATED (mouse) (VstInt32 x, VstInt32 y) { return 0; }
virtual VstInt32 DECLARE_VST_DEPRECATED (key) (VstInt32 keyCode) { return 0; }
virtual void DECLARE_VST_DEPRECATED (top) () {}
virtual void DECLARE_VST_DEPRECATED (sleep) () {}
#endif
#if VST_2_1_EXTENSIONS
virtual bool onKeyDown (VstKeyCode& keyCode) { return false; } ///< Receive key down event. Return true only if key was really used!
virtual bool onKeyUp (VstKeyCode& keyCode) { return false; } ///< Receive key up event. Return true only if key was really used!
virtual bool onWheel (float distance) { return false; } ///< Handle mouse wheel event, distance is positive or negative to indicate wheel direction.
virtual bool setKnobMode (VstInt32 val) { return false; } ///< Set knob mode (if supported by Host). See CKnobMode in VSTGUI.
#endif
//-------------------------------------------------------------------------------------------------------
protected:
AudioEffect* effect; ///< associated effect instance
void* systemWindow; ///< platform-dependent parent window (HWND or WindowRef)
};
#endif // __aeffeditor__

View file

@ -0,0 +1,703 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/06/07 08:22:01 $
//
// Category : VST 2.x Classes
// Filename : audioeffect.cpp
// Created by : Steinberg Media Technologies
// Description : Class AudioEffect (VST 1.0)
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#include "audioeffect.h"
#include "aeffeditor.h"
#include <stddef.h>
#include <stdio.h>
#include <math.h>
//-------------------------------------------------------------------------------------------------------
VstIntPtr AudioEffect::dispatchEffectClass (AEffect* e, VstInt32 opCode, VstInt32 index, VstIntPtr value, void* ptr, float opt)
{
AudioEffect* ae = (AudioEffect*)(e->object);
if (opCode == effClose)
{
ae->dispatcher (opCode, index, value, ptr, opt);
delete ae;
return 1;
}
return ae->dispatcher (opCode, index, value, ptr, opt);
}
//-------------------------------------------------------------------------------------------------------
float AudioEffect::getParameterClass (AEffect* e, VstInt32 index)
{
AudioEffect* ae = (AudioEffect*)(e->object);
return ae->getParameter (index);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::setParameterClass (AEffect* e, VstInt32 index, float value)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->setParameter (index, value);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (processClass) (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->DECLARE_VST_DEPRECATED (process) (inputs, outputs, sampleFrames);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::processClassReplacing (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->processReplacing (inputs, outputs, sampleFrames);
}
//-------------------------------------------------------------------------------------------------------
#if VST_2_4_EXTENSIONS
void AudioEffect::processClassDoubleReplacing (AEffect* e, double** inputs, double** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->processDoubleReplacing (inputs, outputs, sampleFrames);
}
#endif
//-------------------------------------------------------------------------------------------------------
// Class AudioEffect Implementation
//-------------------------------------------------------------------------------------------------------
/*!
The constructor of your class is passed a parameter of the type \e audioMasterCallback. The actual
mechanism in which your class gets constructed is not important right now. Effectively your class is
constructed by the hosting application, which passes an object of type \e audioMasterCallback that
handles the interaction with the plug-in. You pass this on to the base class' constructor and then
can forget about it.
\param audioMaster Passed by the Host and handles interaction
\param numPrograms Pass the number of programs the plug-in provides
\param numParams Pass the number of parameters the plug-in provides
\code
MyPlug::MyPlug (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, 1) // 1 program, 1 parameter only
{
setNumInputs (2); // stereo in
setNumOutputs (2); // stereo out
setUniqueID ('MyPl'); // you must change this for other plug-ins!
canProcessReplacing (); // supports replacing mode
}
\endcode
\sa setNumInputs, setNumOutputs, setUniqueID, canProcessReplacing
*/
AudioEffect::AudioEffect (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams)
: audioMaster (audioMaster)
, editor (0)
, sampleRate (44100.f)
, blockSize (1024)
, numPrograms (numPrograms)
, numParams (numParams)
, curProgram (0)
{
memset (&cEffect, 0, sizeof (cEffect));
cEffect.magic = kEffectMagic;
cEffect.dispatcher = dispatchEffectClass;
cEffect.DECLARE_VST_DEPRECATED (process) = DECLARE_VST_DEPRECATED (processClass);
cEffect.setParameter = setParameterClass;
cEffect.getParameter = getParameterClass;
cEffect.numPrograms = numPrograms;
cEffect.numParams = numParams;
cEffect.numInputs = 1; // mono input
cEffect.numOutputs = 2; // stereo output
cEffect.DECLARE_VST_DEPRECATED (ioRatio) = 1.f;
cEffect.object = this;
cEffect.uniqueID = CCONST ('N', 'o', 'E', 'f');
cEffect.version = 1;
cEffect.processReplacing = processClassReplacing;
#if VST_2_4_EXTENSIONS
canProcessReplacing (); // mandatory in VST 2.4!
cEffect.processDoubleReplacing = processClassDoubleReplacing;
#endif
}
//-------------------------------------------------------------------------------------------------------
AudioEffect::~AudioEffect ()
{
if (editor)
delete editor;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::setEditor (AEffEditor* editor)
{
this->editor = editor;
if (editor)
cEffect.flags |= effFlagsHasEditor;
else
cEffect.flags &= ~effFlagsHasEditor;
}
//-------------------------------------------------------------------------------------------------------
VstIntPtr AudioEffect::dispatcher (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt)
{
VstIntPtr v = 0;
switch (opcode)
{
case effOpen: open (); break;
case effClose: close (); break;
case effSetProgram: if (value < numPrograms) setProgram ((VstInt32)value); break;
case effGetProgram: v = getProgram (); break;
case effSetProgramName: setProgramName ((char*)ptr); break;
case effGetProgramName: getProgramName ((char*)ptr); break;
case effGetParamLabel: getParameterLabel (index, (char*)ptr); break;
case effGetParamDisplay: getParameterDisplay (index, (char*)ptr); break;
case effGetParamName: getParameterName (index, (char*)ptr); break;
case effSetSampleRate: setSampleRate (opt); break;
case effSetBlockSize: setBlockSize ((VstInt32)value); break;
case effMainsChanged: if (!value) suspend (); else resume (); break;
#if !VST_FORCE_DEPRECATED
case effGetVu: v = (VstIntPtr)(getVu () * 32767.); break;
#endif
//---Editor------------
case effEditGetRect: if (editor) v = editor->getRect ((ERect**)ptr) ? 1 : 0; break;
case effEditOpen: if (editor) v = editor->open (ptr) ? 1 : 0; break;
case effEditClose: if (editor) editor->close (); break;
case effEditIdle: if (editor) editor->idle (); break;
#if (TARGET_API_MAC_CARBON && !VST_FORCE_DEPRECATED)
case effEditDraw: if (editor) editor->draw ((ERect*)ptr); break;
case effEditMouse: if (editor) v = editor->mouse (index, value); break;
case effEditKey: if (editor) v = editor->key (value); break;
case effEditTop: if (editor) editor->top (); break;
case effEditSleep: if (editor) editor->sleep (); break;
#endif
case DECLARE_VST_DEPRECATED (effIdentify): v = CCONST ('N', 'v', 'E', 'f'); break;
//---Persistence-------
case effGetChunk: v = getChunk ((void**)ptr, index ? true : false); break;
case effSetChunk: v = setChunk (ptr, (VstInt32)value, index ? true : false); break;
}
return v;
}
//-------------------------------------------------------------------------------------------------------
/*!
Use to ask for the Host's version
\return The Host's version
*/
VstInt32 AudioEffect::getMasterVersion ()
{
VstInt32 version = 1;
if (audioMaster)
{
version = (VstInt32)audioMaster (&cEffect, audioMasterVersion, 0, 0, 0, 0);
if (!version) // old
version = 1;
}
return version;
}
//-------------------------------------------------------------------------------------------------------
/*!
\sa AudioEffectX::getNextShellPlugin
*/
VstInt32 AudioEffect::getCurrentUniqueId ()
{
VstInt32 id = 0;
if (audioMaster)
id = (VstInt32)audioMaster (&cEffect, audioMasterCurrentId, 0, 0, 0, 0);
return id;
}
//-------------------------------------------------------------------------------------------------------
/*!
Give idle time to Host application, e.g. if plug-in editor is doing mouse tracking in a modal loop.
*/
void AudioEffect::masterIdle ()
{
if (audioMaster)
audioMaster (&cEffect, audioMasterIdle, 0, 0, 0, 0);
}
//-------------------------------------------------------------------------------------------------------
bool AudioEffect::DECLARE_VST_DEPRECATED (isInputConnected) (VstInt32 input)
{
VstInt32 ret = 0;
if (audioMaster)
ret = (VstInt32)audioMaster (&cEffect, DECLARE_VST_DEPRECATED (audioMasterPinConnected), input, 0, 0, 0);
return ret ? false : true; // return value is 0 for true
}
//-------------------------------------------------------------------------------------------------------
bool AudioEffect::DECLARE_VST_DEPRECATED (isOutputConnected) (VstInt32 output)
{
VstInt32 ret = 0;
if (audioMaster)
ret = (VstInt32)audioMaster (&cEffect, DECLARE_VST_DEPRECATED (audioMasterPinConnected), output, 1, 0, 0);
return ret ? false : true; // return value is 0 for true
}
//-------------------------------------------------------------------------------------------------------
/*!
\param index parameter index
\param float parameter value
\note An important thing to notice is that if the user changes a parameter in your editor, which is
out of the Host's control if you are not using the default string based interface, you should
call setParameterAutomated (). This ensures that the Host is notified of the parameter change, which
allows it to record these changes for automation.
\sa setParameter
*/
void AudioEffect::setParameterAutomated (VstInt32 index, float value)
{
setParameter (index, value);
if (audioMaster)
audioMaster (&cEffect, audioMasterAutomate, index, 0, 0, value); // value is in opt
}
//-------------------------------------------------------------------------------------------------------
// Flags
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (hasVu) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsHasVu);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsHasVu);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (hasClip) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsHasClip);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsHasClip);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (canMono) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsCanMono);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsCanMono);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param state Set to \e true if supported
\note Needs to be called in the plug-in's constructor
*/
void AudioEffect::canProcessReplacing (bool state)
{
if (state)
cEffect.flags |= effFlagsCanReplacing;
else
cEffect.flags &= ~effFlagsCanReplacing;
}
//-----------------------------------------------------------------------------------------------------------------
/*!
\param state Set to \e true if supported
\note Needs to be called in the plug-in's constructor
*/
#if VST_2_4_EXTENSIONS
void AudioEffect::canDoubleReplacing (bool state)
{
if (state)
cEffect.flags |= effFlagsCanDoubleReplacing;
else
cEffect.flags &= ~effFlagsCanDoubleReplacing;
}
#endif
//-------------------------------------------------------------------------------------------------------
/*!
\param state Set \e true if programs are chunks
\note Needs to be called in the plug-in's constructor
*/
void AudioEffect::programsAreChunks (bool state)
{
if (state)
cEffect.flags |= effFlagsProgramChunks;
else
cEffect.flags &= ~effFlagsProgramChunks;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (setRealtimeQualities) (VstInt32 qualities)
{
cEffect.DECLARE_VST_DEPRECATED (realQualities) = qualities;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (setOfflineQualities) (VstInt32 qualities)
{
cEffect.DECLARE_VST_DEPRECATED (offQualities) = qualities;
}
//-------------------------------------------------------------------------------------------------------
/*!
Use to report the Plug-in's latency (Group Delay)
\param delay Plug-ins delay in samples
*/
void AudioEffect::setInitialDelay (VstInt32 delay)
{
cEffect.initialDelay = delay;
}
//-------------------------------------------------------------------------------------------------------
// Strings Conversion
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::dB2string (float value, char* text, VstInt32 maxLen)
{
if (value <= 0)
vst_strncpy (text, "-oo", maxLen);
else
float2string ((float)(20. * log10 (value)), text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param samples Number of samples
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::Hz2string (float samples, char* text, VstInt32 maxLen)
{
float sampleRate = getSampleRate ();
if (!samples)
float2string (0, text, maxLen);
else
float2string (sampleRate / samples, text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param samples Number of samples
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::ms2string (float samples, char* text, VstInt32 maxLen)
{
float2string ((float)(samples * 1000. / getSampleRate ()), text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::float2string (float value, char* text, VstInt32 maxLen)
{
VstInt32 c = 0, neg = 0;
char string[32];
char* s;
double v, integ, i10, mantissa, m10, ten = 10.;
v = (double)value;
if (v < 0)
{
neg = 1;
value = -value;
v = -v;
c++;
if (v > 9999999.)
{
vst_strncpy (string, "Huge!", 31);
return;
}
}
else if (v > 99999999.)
{
vst_strncpy (string, "Huge!", 31);
return;
}
s = string + 31;
*s-- = 0;
*s-- = '.';
c++;
integ = floor (v);
i10 = fmod (integ, ten);
*s-- = (char)((VstInt32)i10 + '0');
integ /= ten;
c++;
while (integ >= 1. && c < 8)
{
i10 = fmod (integ, ten);
*s-- = (char)((VstInt32)i10 + '0');
integ /= ten;
c++;
}
if (neg)
*s-- = '-';
vst_strncpy (text, s + 1, maxLen);
if (c >= 8)
return;
s = string + 31;
*s-- = 0;
mantissa = fmod (v, 1.);
mantissa *= pow (ten, (double)(8 - c));
while (c < 8)
{
if (mantissa <= 0)
*s-- = '0';
else
{
m10 = fmod (mantissa, ten);
*s-- = (char)((VstInt32)m10 + '0');
mantissa /= 10.;
}
c++;
}
vst_strncat (text, s + 1, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::int2string (VstInt32 value, char* text, VstInt32 maxLen)
{
if (value >= 100000000)
{
vst_strncpy (text, "Huge!", maxLen);
return;
}
if (value < 0)
{
vst_strncpy (text, "-", maxLen);
value = -value;
}
else
vst_strncpy (text, "", maxLen);
bool state = false;
for (VstInt32 div = 100000000; div >= 1; div /= 10)
{
VstInt32 digit = value / div;
value -= digit * div;
if (state || digit > 0)
{
char temp[2] = {'0' + (char)digit, '\0'};
vst_strncat (text, temp, maxLen);
state = true;
}
}
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
This process method must be provided. It takes input data, applies its pocessing algorithm, and then puts the
result to the output by overwriting the output buffer.
\param inputs An array of pointers to the data
\param outputs An array of pointers to where the data can be written to
\param sampleFrames Number of sample frames to process
\warning Never call any Mac OS 9 functions (or other functions which call into the OS) inside your
audio process function! This will crash the system when your plug-in is run in MP (multiprocessor) mode.
If you must call into the OS, you must use MPRemoteCall () (see Apples' documentation), or
explicitly use functions which are documented by Apple to be MP safe. On Mac OS X read the system
header files to be sure that you only call thread safe functions.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setBlockSize (VstInt32 blockSize)
This is called by the Host, and tells the plug-in that the maximum block size passed to
processReplacing() will be \e blockSize.
\param blockSize Maximum number of sample frames
\warning You <b>must</b> process <b>exactly</b> \e sampleFrames number of samples in inside processReplacing, not more!
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setParameter (VstInt32 index, float value)
Parameters are the individual parameter settings the user can adjust. A VST Host can automate these
parameters. Set parameter \e index to \e value.
\param index Index of the parameter to change
\param value A float value between 0.0 and 1.0 inclusive
\note Parameter values, like all VST parameters, are declared as floats with an inclusive range of
0.0 to 1.0. How data is presented to the user is merely in the user-interface handling. This is a
convention, but still worth regarding. Maybe the VST-Host's automation system depends on this range.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn float AudioEffect::getParameter (VstInt32 index)
Return the \e value of parameter \e index
\param index Index of the parameter
\return A float value between 0.0 and 1.0 inclusive
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterLabel (VstInt32 index, char* label)
\param index Index of the parameter
\param label A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterDisplay (VstInt32 index, char* text)
\param index Index of the parameter
\param text A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::getProgram ()
\return Index of the current program
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setProgram (VstInt32 program)
\param Program of the current program
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterName (VstInt32 index, char* text)
\param index Index of the parameter
\param text A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setProgramName (char* name)
The program name is displayed in the rack, and can be edited by the user.
\param name A string up to 24 char
\warning Please be aware that the string lengths supported by the default VST interface are normally
limited to 24 characters. If you copy too much data into the buffers provided, you will break the
Host application.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getProgramName (char* name)
The program name is displayed in the rack, and can be edited by the user.
\param name A string up to 24 char
\warning Please be aware that the string lengths supported by the default VST interface are normally
limited to 24 characters. If you copy too much data into the buffers provided, you will break the
Host application.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::getChunk (void** data, bool isPreset)
\param data should point to the newly allocated memory block containg state data. You can savely release it in next suspend/resume call.
\param isPreset true when saving a single program, false for all programs
\note
If your plug-in is configured to use chunks (see AudioEffect::programsAreChunks), the Host
will ask for a block of memory describing the current plug-in state for saving.
To restore the state at a later stage, the same data is passed back to AudioEffect::setChunk.
Alternatively, when not using chunk, the Host will simply save all parameter values.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::setChunk (void* data, VstInt32 byteSize, bool isPreset)
\param data pointer to state data (owned by Host)
\param byteSize size of state data
\param isPreset true when restoring a single program, false for all programs
\sa getChunk
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setNumInputs (VstInt32 inputs)
This number is fixed at construction time and can't change until the plug-in is destroyed.
\param inputs The number of inputs
\sa isInputConnected()
\note Needs to be called in the plug-in's constructor
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setNumOutputs (VstInt32 outputs)
This number is fixed at construction time and can't change until the plug-in is destroyed.
\param outputs The number of outputs
\sa isOutputConnected()
\note Needs to be called in the plug-in's constructor
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setUniqueID (VstInt32 iD)
Must call this! Set the plug-in's unique identifier. The Host uses this to identify the plug-in, for
instance when it is loading effect programs and banks. On Steinberg Web Page you can find an UniqueID
Database where you can record your UniqueID, it will check if the ID is already used by an another
vendor. You can use CCONST('a','b','c','d') (defined in VST 2.0) to be platform independent to
initialize an UniqueID.
\param iD Plug-in's unique ID
\note Needs to be called in the plug-in's constructor
*/

View file

@ -0,0 +1,177 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/06/06 16:01:34 $
//
// Category : VST 2.x Classes
// Filename : audioeffect.h
// Created by : Steinberg Media Technologies
// Description : Class AudioEffect (VST 1.0)
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#ifndef __audioeffect__
#define __audioeffect__
#include "pluginterfaces/vst2.x/aeffect.h" // "c" interface
class AEffEditor;
//-------------------------------------------------------------------------------------------------------
/** VST Effect Base Class (VST 1.0). */
//-------------------------------------------------------------------------------------------------------
class AudioEffect
{
public:
//-------------------------------------------------------------------------------------------------------
AudioEffect (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams); ///< Create an \e AudioEffect object
virtual ~AudioEffect (); ///< Destroy an \e AudioEffect object
virtual VstIntPtr dispatcher (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt); ///< Opcodes dispatcher
//-------------------------------------------------------------------------------------------------------
/// \name State Transitions
//-------------------------------------------------------------------------------------------------------
//@{
virtual void open () {} ///< Called when plug-in is initialized
virtual void close () {} ///< Called when plug-in will be released
virtual void suspend () {} ///< Called when plug-in is switched to off
virtual void resume () {} ///< Called when plug-in is switched to on
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Processing
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setSampleRate (float sampleRate) { this->sampleRate = sampleRate; } ///< Called when the sample rate changes (always in a suspend state)
virtual void setBlockSize (VstInt32 blockSize) { this->blockSize = blockSize; } ///< Called when the Maximun block size changes (always in a suspend state). Note that the sampleFrames in Process Calls could be smaller than this block size, but NOT bigger.
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames) = 0; ///< Process 32 bit (single precision) floats (always in a resume state)
#if VST_2_4_EXTENSIONS
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames) {} ///< Process 64 bit (double precision) floats (always in a resume state) \sa processReplacing
#endif // VST_2_4_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Parameters
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setParameter (VstInt32 index, float value) {} ///< Called when a parameter changed
virtual float getParameter (VstInt32 index) { return 0; } ///< Return the value of the parameter with \e index
virtual void setParameterAutomated (VstInt32 index, float value);///< Called after a control has changed in the editor and when the associated parameter should be automated
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Programs and Persistence
//-------------------------------------------------------------------------------------------------------
//@{
virtual VstInt32 getProgram () { return curProgram; } ///< Return the index to the current program
virtual void setProgram (VstInt32 program) { curProgram = program; } ///< Set the current program to \e program
virtual void setProgramName (char* name) {} ///< Stuff the name field of the current program with \e name. Limited to #kVstMaxProgNameLen.
virtual void getProgramName (char* name) { *name = 0; } ///< Stuff \e name with the name of the current program. Limited to #kVstMaxProgNameLen.
virtual void getParameterLabel (VstInt32 index, char* label) { *label = 0; } ///< Stuff \e label with the units in which parameter \e index is displayed (i.e. "sec", "dB", "type", etc...). Limited to #kVstMaxParamStrLen.
virtual void getParameterDisplay (VstInt32 index, char* text) { *text = 0; } ///< Stuff \e text with a string representation ("0.5", "-3", "PLATE", etc...) of the value of parameter \e index. Limited to #kVstMaxParamStrLen.
virtual void getParameterName (VstInt32 index, char* text) { *text = 0; } ///< Stuff \e text with the name ("Time", "Gain", "RoomType", etc...) of parameter \e index. Limited to #kVstMaxParamStrLen.
virtual VstInt32 getChunk (void** data, bool isPreset = false) { return 0; } ///< Host stores plug-in state. Returns the size in bytes of the chunk (plug-in allocates the data array)
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset = false) { return 0; } ///< Host restores plug-in state
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Internal Setup
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setUniqueID (VstInt32 iD) { cEffect.uniqueID = iD; } ///< Must be called to set the plug-ins unique ID!
virtual void setNumInputs (VstInt32 inputs) { cEffect.numInputs = inputs; } ///< Set the number of inputs the plug-in will handle. For a plug-in which could change its IO configuration, this number is the maximun available inputs.
virtual void setNumOutputs (VstInt32 outputs) { cEffect.numOutputs = outputs; } ///< Set the number of outputs the plug-in will handle. For a plug-in which could change its IO configuration, this number is the maximun available ouputs.
virtual void canProcessReplacing (bool state = true); ///< Tells that processReplacing() could be used. Mandatory in VST 2.4!
#if VST_2_4_EXTENSIONS
virtual void canDoubleReplacing (bool state = true); ///< Tells that processDoubleReplacing() is implemented.
#endif // VST_2_4_EXTENSIONS
virtual void programsAreChunks (bool state = true); ///< Program data is handled in formatless chunks (using getChunk-setChunks)
virtual void setInitialDelay (VstInt32 delay); ///< Use to report the plug-in's latency (Group Delay)
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Editor
//-------------------------------------------------------------------------------------------------------
//@{
void setEditor (AEffEditor* editor); ///< Should be called if you want to define your own editor
virtual AEffEditor* getEditor () { return editor; } ///< Returns the attached editor
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Inquiry
//-------------------------------------------------------------------------------------------------------
//@{
virtual AEffect* getAeffect () { return &cEffect; } ///< Returns the #AEffect structure
virtual float getSampleRate () { return sampleRate; } ///< Returns the current sample rate
virtual VstInt32 getBlockSize () { return blockSize; } ///< Returns the current Maximum block size
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Host Communication
//-------------------------------------------------------------------------------------------------------
//@{
virtual VstInt32 getMasterVersion (); ///< Returns the Host's version (for example 2400 for VST 2.4)
virtual VstInt32 getCurrentUniqueId (); ///< Returns current unique identifier when loading shell plug-ins
virtual void masterIdle (); ///< Give idle time to Host application
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Tools (helpers)
//-------------------------------------------------------------------------------------------------------
//@{
virtual void dB2string (float value, char* text, VstInt32 maxLen); ///< Stuffs \e text with an amplitude on the [0.0, 1.0] scale converted to its value in decibels.
virtual void Hz2string (float samples, char* text, VstInt32 maxLen); ///< Stuffs \e text with the frequency in Hertz that has a period of \e samples.
virtual void ms2string (float samples, char* text, VstInt32 maxLen); ///< Stuffs \e text with the duration in milliseconds of \e samples frames.
virtual void float2string (float value, char* text, VstInt32 maxLen); ///< Stuffs \e text with a string representation on the floating point \e value.
virtual void int2string (VstInt32 value, char* text, VstInt32 maxLen); ///< Stuffs \e text with a string representation on the integer \e value.
//@}
//-------------------------------------------------------------------------------------------------------
// Deprecated methods
//-------------------------------------------------------------------------------------------------------
/// @cond ignore
virtual void DECLARE_VST_DEPRECATED (process) (float** inputs, float** outputs, VstInt32 sampleFrames) {}
virtual float DECLARE_VST_DEPRECATED (getVu) () { return 0; }
virtual void DECLARE_VST_DEPRECATED (hasVu) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (hasClip) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (canMono) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (setRealtimeQualities) (VstInt32 qualities);
virtual void DECLARE_VST_DEPRECATED (setOfflineQualities) (VstInt32 qualities);
virtual bool DECLARE_VST_DEPRECATED (isInputConnected) (VstInt32 input);
virtual bool DECLARE_VST_DEPRECATED (isOutputConnected) (VstInt32 output);
/// @endcond
//-------------------------------------------------------------------------------------------------------
protected:
audioMasterCallback audioMaster; ///< Host callback
AEffEditor* editor; ///< Pointer to the plug-in's editor
float sampleRate; ///< Current sample rate
VstInt32 blockSize; ///< Maximum block size
VstInt32 numPrograms; ///< Number of programs
VstInt32 numParams; ///< Number of parameters
VstInt32 curProgram; ///< Current program
AEffect cEffect; ///< #AEffect object
/// @cond ignore
static VstIntPtr dispatchEffectClass (AEffect* e, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
static float getParameterClass (AEffect* e, VstInt32 index);
static void setParameterClass (AEffect* e, VstInt32 index, float value);
static void DECLARE_VST_DEPRECATED (processClass) (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames);
static void processClassReplacing (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames);
#if VST_2_4_EXTENSIONS
static void processClassDoubleReplacing (AEffect* e, double** inputs, double** outputs, VstInt32 sampleFrames);
#endif // VST_2_4_EXTENSIONS
/// @endcond
};
#endif // __audioeffect__

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,252 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/06/20 12:42:46 $
//
// Category : VST 2.x Classes
// Filename : audioeffectx.h
// Created by : Steinberg Media Technologies
// Description : Class AudioEffectX extends AudioEffect with new features. You should derive
// your plug-in from AudioEffectX.
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#ifndef __audioeffectx__
#define __audioeffectx__
#include "audioeffect.h" // Version 1.0 base class AudioEffect
#include "pluginterfaces/vst2.x/aeffectx.h" // Version 2.x 'C' Extensions and Structures
//-------------------------------------------------------------------------------------------------------
/** Extended VST Effect Class (VST 2.x). */
//-------------------------------------------------------------------------------------------------------
class AudioEffectX : public AudioEffect
{
public:
AudioEffectX (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams); ///< Create an \e AudioEffectX object
//-------------------------------------------------------------------------------------------------------
/// \name Parameters
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool canParameterBeAutomated (VstInt32 index) { return true; } ///< Indicates if a parameter can be automated
virtual bool string2parameter (VstInt32 index, char* text) { return false; } ///< Convert a string representation to a parameter value
virtual bool getParameterProperties (VstInt32 index, VstParameterProperties* p) { return false; } ///< Return parameter properties
#if VST_2_1_EXTENSIONS
virtual bool beginEdit (VstInt32 index); ///< To be called before #setParameterAutomated (on Mouse Down). This will be used by the Host for specific Automation Recording.
virtual bool endEdit (VstInt32 index); ///< To be called after #setParameterAutomated (on Mouse Up)
#endif // VST_2_1_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Programs and Persistence
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool getProgramNameIndexed (VstInt32 category, VstInt32 index, char* text) { return false; } ///< Fill \e text with name of program \e index (\e category deprecated in VST 2.4)
#if VST_2_1_EXTENSIONS
virtual bool beginSetProgram () { return false; } ///< Called before a program is loaded
virtual bool endSetProgram () { return false; } ///< Called after a program was loaded
#endif // VST_2_1_EXTENSIONS
#if VST_2_3_EXTENSIONS
virtual VstInt32 beginLoadBank (VstPatchChunkInfo* ptr) { return 0; } ///< Called before a Bank is loaded.
virtual VstInt32 beginLoadProgram (VstPatchChunkInfo* ptr) { return 0; } ///< Called before a Program is loaded. (called before #beginSetProgram).
#endif // VST_2_3_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Connections and Configuration
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool ioChanged (); ///< Tell Host numInputs and/or numOutputs and/or initialDelay (and/or numParameters: to be avoid) have changed
virtual double updateSampleRate (); ///< Returns sample rate from Host (may issue setSampleRate())
virtual VstInt32 updateBlockSize (); ///< Returns block size from Host (may issue getBlockSize())
virtual VstInt32 getInputLatency (); ///< Returns the Audio (maybe ASIO) input latency values
virtual VstInt32 getOutputLatency (); ///< Returns the Audio (maybe ASIO) output latency values
virtual bool getInputProperties (VstInt32 index, VstPinProperties* properties) { return false; } ///< Return the \e properties of output \e index
virtual bool getOutputProperties (VstInt32 index, VstPinProperties* properties) { return false; }///< Return the \e properties of input \e index
virtual bool setSpeakerArrangement (VstSpeakerArrangement* pluginInput, VstSpeakerArrangement* pluginOutput) { return false; } ///< Set the plug-in's speaker arrangements
virtual bool getSpeakerArrangement (VstSpeakerArrangement** pluginInput, VstSpeakerArrangement** pluginOutput) { *pluginInput = 0; *pluginOutput = 0; return false; } ///< Return the plug-in's speaker arrangements
virtual bool setBypass (bool onOff) { return false; } ///< For 'soft-bypass' (this could be automated (in Audio Thread) that why you could NOT call iochanged (if needed) in this function, do it in fxidle).
#if VST_2_3_EXTENSIONS
virtual bool setPanLaw (VstInt32 type, float val) { return false; } ///< Set the Panning Law used by the Host @see VstPanLawType.
#endif // VST_2_3_EXTENSIONS
#if VST_2_4_EXTENSIONS
virtual bool setProcessPrecision (VstInt32 precision) { return false; } ///< Set floating-point precision used for processing (32 or 64 bit)
virtual VstInt32 getNumMidiInputChannels () { return 0; } ///< Returns number of MIDI input channels used [0, 16]
virtual VstInt32 getNumMidiOutputChannels () { return 0; } ///< Returns number of MIDI output channels used [0, 16]
#endif // VST_2_4_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Realtime
//-------------------------------------------------------------------------------------------------------
//@{
virtual VstTimeInfo* getTimeInfo (VstInt32 filter); ///< Get time information from Host
virtual VstInt32 getCurrentProcessLevel (); ///< Returns the Host's process level
virtual VstInt32 getAutomationState (); ///< Returns the Host's automation state
virtual VstInt32 processEvents (VstEvents* events) { return 0; } ///< Called when new MIDI events come in
bool sendVstEventsToHost (VstEvents* events); ///< Send MIDI events back to Host application
#if VST_2_3_EXTENSIONS
virtual VstInt32 startProcess () { return 0; } ///< Called one time before the start of process call. This indicates that the process call will be interrupted (due to Host reconfiguration or bypass state when the plug-in doesn't support softBypass)
virtual VstInt32 stopProcess () { return 0;} ///< Called after the stop of process call
#endif // VST_2_3_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Variable I/O (Offline)
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool processVariableIo (VstVariableIo* varIo) { return false; } ///< Used for variable I/O processing (offline processing like timestreching)
#if VST_2_3_EXTENSIONS
virtual VstInt32 setTotalSampleToProcess (VstInt32 value) { return value; } ///< Called in offline mode before process() or processVariableIo ()
#endif // VST_2_3_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Host Properties
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool getHostVendorString (char* text); ///< Fills \e text with a string identifying the vendor
virtual bool getHostProductString (char* text); ///< Fills \e text with a string with product name
virtual VstInt32 getHostVendorVersion (); ///< Returns vendor-specific version (for example 3200 for Nuendo 3.2)
virtual VstIntPtr hostVendorSpecific (VstInt32 lArg1, VstIntPtr lArg2, void* ptrArg, float floatArg); ///< No specific definition
virtual VstInt32 canHostDo (char* text); ///< Reports what the Host is able to do (#hostCanDos in audioeffectx.cpp)
virtual VstInt32 getHostLanguage (); ///< Returns the Host's language (#VstHostLanguage)
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Plug-in Properties
//-------------------------------------------------------------------------------------------------------
//@{
virtual void isSynth (bool state = true); ///< Set if plug-in is a synth
virtual void noTail (bool state = true); ///< Plug-in won't produce output signals while there is no input
virtual VstInt32 getGetTailSize () { return 0; }///< Returns tail size; 0 is default (return 1 for 'no tail'), used in offline processing too
virtual void* getDirectory (); ///< Returns the plug-in's directory
virtual bool getEffectName (char* name) { return false; } ///< Fill \e text with a string identifying the effect
virtual bool getVendorString (char* text) { return false; } ///< Fill \e text with a string identifying the vendor
virtual bool getProductString (char* text) { return false; }///< Fill \e text with a string identifying the product name
virtual VstInt32 getVendorVersion () { return 0; } ///< Return vendor-specific version
virtual VstIntPtr vendorSpecific (VstInt32 lArg, VstIntPtr lArg2, void* ptrArg, float floatArg) { return 0; } ///< No definition, vendor specific handling
virtual VstInt32 canDo (char* text) { return 0; } ///< Reports what the plug-in is able to do (#plugCanDos in audioeffectx.cpp)
virtual VstInt32 getVstVersion () { return kVstVersion; } ///< Returns the current VST Version (#kVstVersion)
virtual VstPlugCategory getPlugCategory (); ///< Specify a category that fits the plug (#VstPlugCategory)
//@}
//-------------------------------------------------------------------------------------------------------
/// \name MIDI Channel Programs
//-------------------------------------------------------------------------------------------------------
//@{
#if VST_2_1_EXTENSIONS
virtual VstInt32 getMidiProgramName (VstInt32 channel, MidiProgramName* midiProgramName) { return 0; } ///< Fill \e midiProgramName with information for 'thisProgramIndex'.
virtual VstInt32 getCurrentMidiProgram (VstInt32 channel, MidiProgramName* currentProgram) { return -1; } ///< Fill \e currentProgram with information for the current MIDI program.
virtual VstInt32 getMidiProgramCategory (VstInt32 channel, MidiProgramCategory* category) { return 0; } ///< Fill \e category with information for 'thisCategoryIndex'.
virtual bool hasMidiProgramsChanged (VstInt32 channel) { return false; } ///< Return true if the #MidiProgramNames, #MidiKeyNames or #MidiControllerNames had changed on this MIDI channel.
virtual bool getMidiKeyName (VstInt32 channel, MidiKeyName* keyName) { return false; } ///< Fill \e keyName with information for 'thisProgramIndex' and 'thisKeyNumber'
#endif // VST_2_1_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Others
//-------------------------------------------------------------------------------------------------------
//@{
virtual bool updateDisplay (); ///< Something has changed in plug-in, request an update display like program (MIDI too) and parameters list in Host
virtual bool sizeWindow (VstInt32 width, VstInt32 height); ///< Requests to resize the editor window
#if VST_2_1_EXTENSIONS
virtual bool openFileSelector (VstFileSelect* ptr); ///< Open a Host File selector (see aeffectx.h for #VstFileSelect definition)
#endif // VST_2_1_EXTENSIONS
#if VST_2_2_EXTENSIONS
virtual bool closeFileSelector (VstFileSelect* ptr); ///< Close the Host File selector which was opened by #openFileSelector
#endif // VST_2_2_EXTENSIONS
#if VST_2_3_EXTENSIONS
virtual VstInt32 getNextShellPlugin (char* name) { return 0; } ///< This opcode is only called, if the plug-in is of type #kPlugCategShell, in order to extract all included sub-plugin´s names.
#endif // VST_2_3_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Tools
//-------------------------------------------------------------------------------------------------------
//@{
#if VST_2_3_EXTENSIONS
virtual bool allocateArrangement (VstSpeakerArrangement** arrangement, VstInt32 nbChannels);///< Allocate memory for a #VstSpeakerArrangement
virtual bool deallocateArrangement (VstSpeakerArrangement** arrangement); ///< Delete/free memory for an allocated speaker arrangement
virtual bool copySpeaker (VstSpeakerProperties* to, VstSpeakerProperties* from); ///< Copy properties \e from to \e to
virtual bool matchArrangement (VstSpeakerArrangement** to, VstSpeakerArrangement* from); ///< "to" is deleted, then created and initialized with the same values as "from" ones ("from" must exist).
#endif // VST_2_3_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
// Offline
//-------------------------------------------------------------------------------------------------------
/// @cond ignore
virtual bool offlineRead (VstOfflineTask* offline, VstOfflineOption option, bool readSource = true);
virtual bool offlineWrite (VstOfflineTask* offline, VstOfflineOption option);
virtual bool offlineStart (VstAudioFile* ptr, VstInt32 numAudioFiles, VstInt32 numNewAudioFiles);
virtual VstInt32 offlineGetCurrentPass ();
virtual VstInt32 offlineGetCurrentMetaPass ();
virtual bool offlineNotify (VstAudioFile* ptr, VstInt32 numAudioFiles, bool start) { return false; }
virtual bool offlinePrepare (VstOfflineTask* offline, VstInt32 count) { return false; }
virtual bool offlineRun (VstOfflineTask* offline, VstInt32 count) { return false; }
virtual VstInt32 offlineGetNumPasses () { return 0; }
virtual VstInt32 offlineGetNumMetaPasses () { return 0; }
//-------------------------------------------------------------------------------------------------------
// AudioEffect overrides
//-------------------------------------------------------------------------------------------------------
virtual VstIntPtr dispatcher (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
virtual void resume ();
//-------------------------------------------------------------------------------------------------------
// Deprecated methods
//-------------------------------------------------------------------------------------------------------
virtual void DECLARE_VST_DEPRECATED (wantEvents) (VstInt32 filter = 1);
virtual VstInt32 DECLARE_VST_DEPRECATED (tempoAt) (VstInt32 pos);
virtual VstInt32 DECLARE_VST_DEPRECATED (getNumAutomatableParameters) ();
virtual VstInt32 DECLARE_VST_DEPRECATED (getParameterQuantization) ();
virtual VstInt32 DECLARE_VST_DEPRECATED (getNumCategories) () { return 1L; }
virtual bool DECLARE_VST_DEPRECATED (copyProgram) (VstInt32 destination) { return false; }
virtual bool DECLARE_VST_DEPRECATED (needIdle) ();
virtual AEffect* DECLARE_VST_DEPRECATED (getPreviousPlug) (VstInt32 input);
virtual AEffect* DECLARE_VST_DEPRECATED (getNextPlug) (VstInt32 output);
virtual void DECLARE_VST_DEPRECATED (inputConnected) (VstInt32 index, bool state) {}
virtual void DECLARE_VST_DEPRECATED (outputConnected) (VstInt32 index, bool state) {}
virtual VstInt32 DECLARE_VST_DEPRECATED (willProcessReplacing) ();
virtual void DECLARE_VST_DEPRECATED (wantAsyncOperation) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (hasExternalBuffer) (bool state = true);
virtual VstInt32 DECLARE_VST_DEPRECATED (reportCurrentPosition) () { return 0; }
virtual float* DECLARE_VST_DEPRECATED (reportDestinationBuffer) () { return 0; }
virtual void DECLARE_VST_DEPRECATED (setOutputSamplerate) (float samplerate);
virtual VstSpeakerArrangement* DECLARE_VST_DEPRECATED (getInputSpeakerArrangement) ();
virtual VstSpeakerArrangement* DECLARE_VST_DEPRECATED (getOutputSpeakerArrangement) ();
virtual void* DECLARE_VST_DEPRECATED (openWindow) (DECLARE_VST_DEPRECATED (VstWindow)*);
virtual bool DECLARE_VST_DEPRECATED (closeWindow) (DECLARE_VST_DEPRECATED (VstWindow)*);
virtual void DECLARE_VST_DEPRECATED (setBlockSizeAndSampleRate) (VstInt32 _blockSize, float _sampleRate) { blockSize = _blockSize; sampleRate = _sampleRate; }
virtual bool DECLARE_VST_DEPRECATED (getErrorText) (char* text) { return false; }
virtual void* DECLARE_VST_DEPRECATED (getIcon) () { return 0; }
virtual bool DECLARE_VST_DEPRECATED (setViewPosition) (VstInt32 x, VstInt32 y) { return false; }
virtual VstInt32 DECLARE_VST_DEPRECATED (fxIdle) () { return 0; }
virtual bool DECLARE_VST_DEPRECATED (keysRequired) () { return false; }
#if VST_2_2_EXTENSIONS
virtual bool DECLARE_VST_DEPRECATED (getChunkFile) (void* nativePath); ///< Returns in platform format the path of the current chunk (could be called in #setChunk ()) (FSSpec on MAC else char*)
#endif // VST_2_2_EXTENSIONS
/// @endcond
//-------------------------------------------------------------------------------------------------------
};
#endif //__audioeffectx__

View file

@ -0,0 +1,68 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/08/29 12:08:50 $
//
// Category : VST 2.x Classes
// Filename : vstplugmain.cpp
// Created by : Steinberg Media Technologies
// Description : VST Plug-In Main Entry
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#include "audioeffect.h"
//------------------------------------------------------------------------
/** Must be implemented externally. */
extern AudioEffect* createEffectInstance (audioMasterCallback audioMaster);
extern "C" {
#if defined (__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#define VST_EXPORT __attribute__ ((visibility ("default")))
#else
#define VST_EXPORT
#endif
//------------------------------------------------------------------------
/** Prototype of the export function main */
//------------------------------------------------------------------------
VST_EXPORT AEffect* VSTPluginMain (audioMasterCallback audioMaster)
{
// Get VST Version of the Host
if (!audioMaster (0, audioMasterVersion, 0, 0, 0, 0))
return 0; // old version
// Create the AudioEffect
AudioEffect* effect = createEffectInstance (audioMaster);
if (!effect)
return 0;
// Return the VST AEffect structur
return effect->getAeffect ();
}
// support for old hosts not looking for VSTPluginMain
#if (TARGET_API_MAC_CARBON && __ppc__)
VST_EXPORT AEffect* main_macho (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
#elif WIN32
VST_EXPORT AEffect* MAIN (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
#elif BEOS
VST_EXPORT AEffect* main_plugin (audioMasterCallback audioMaster) { return VSTPluginMain (audioMaster); }
#endif
} // extern "C"
//------------------------------------------------------------------------
#if WIN32
#include <windows.h>
void* hInstance;
extern "C" {
BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved)
{
hInstance = hInst;
return 1;
}
} // extern "C"
#endif

View file

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

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,126 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C5RawChannel(audioMaster);}
C5RawChannel::C5RawChannel(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.0;
lastFXChannelL = 0.0;
lastSampleChannelL = 0.0;
lastFXChannelR = 0.0;
lastSampleChannelR = 0.0;
fpNShapeLA = 0.0;
fpNShapeLB = 0.0;
fpNShapeRA = 0.0;
fpNShapeRB = 0.0;
fpFlip = true;
//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
}
C5RawChannel::~C5RawChannel() {}
VstInt32 C5RawChannel::getVendorVersion () {return 1000;}
void C5RawChannel::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
void C5RawChannel::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 C5RawChannel::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
/* 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 C5RawChannel::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
/* 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 C5RawChannel::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
float C5RawChannel::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; 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 C5RawChannel::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Center", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
void C5RawChannel::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
void C5RawChannel::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
VstInt32 C5RawChannel::canDo(char *text)
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
bool C5RawChannel::getEffectName(char* name) {
vst_strncpy(name, "C5RawChannel", kVstMaxProductStrLen); return true;
}
VstPlugCategory C5RawChannel::getPlugCategory() {return kPlugCategEffect;}
bool C5RawChannel::getProductString(char* text) {
vst_strncpy (text, "airwindows C5RawChannel", kVstMaxProductStrLen); return true;
}
bool C5RawChannel::getVendorString(char* text) {
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
}

View file

@ -0,0 +1,68 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Created 8/12/11 by SPIAdmin
* Copyright (c) 2011 __MyCompanyName__, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#define __C5RawChannel_H
#ifndef __audioeffect__
#include "audioeffectx.h"
#endif
#include <set>
#include <string>
#include <math.h>
enum {
kParamA = 0,
kNumParameters = 1
}; //
const int kNumPrograms = 0;
const int kNumInputs = 2;
const int kNumOutputs = 2;
const unsigned long kUniqueId = 'conn'; //Change this to what the AU identity is!
class C5RawChannel :
public AudioEffectX
{
public:
C5RawChannel(audioMasterCallback audioMaster);
~C5RawChannel();
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;
long double fpNShapeLA;
long double fpNShapeLB;
long double fpNShapeRA;
long double fpNShapeRB;
bool fpFlip;
//default stuff
double lastFXChannelL;
double lastSampleChannelL;
double lastFXChannelR;
double lastSampleChannelR;
float A;
};
#endif

View file

@ -0,0 +1,274 @@
/* ========================================
* C5RawChannel - C5RawChannel.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __C5RawChannel_H
#include "C5RawChannel.h"
#endif
void C5RawChannel::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
{
float* in1 = inputs[0];
float* in2 = inputs[1];
float* out1 = outputs[0];
float* out2 = outputs[1];
float fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 32-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 32 bit output
*out1 = inputSampleL;
*out2 = inputSampleR;
*in1++;
*in2++;
*out1++;
*out2++;
}
}
void C5RawChannel::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
{
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
double fpTemp;
long double fpOld = 0.618033988749894848204586; //golden ratio!
long double fpNew = 1.0 - fpOld;
long double centering = A * 0.5;
centering = 1.0 - pow(centering,5);
//we can set our centering force from zero to rather high, but
//there's a really intense taper on it forcing it to mostly be almost 1.0.
//If it's literally 1.0, we don't even apply it, and you get the original
//Xmas Morning bugged-out Console5, which is the default setting for Raw Console5.
double differenceL;
double differenceR;
long double inputSampleL;
long double inputSampleR;
while (--sampleFrames >= 0)
{
inputSampleL = *in1;
inputSampleR = *in2;
if (inputSampleL<1.2e-38 && -inputSampleL<1.2e-38) {
static int noisesource = 0;
//this declares a variable before anything else is compiled. It won't keep assigning
//it to 0 for every sample, it's as if the declaration doesn't exist in this context,
//but it lets me add this denormalization fix in a single place rather than updating
//it in three different locations. The variable isn't thread-safe but this is only
//a random seed and we can share it with whatever.
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleL = applyresidue;
}
if (inputSampleR<1.2e-38 && -inputSampleR<1.2e-38) {
static int noisesource = 0;
noisesource = noisesource % 1700021; noisesource++;
int residue = noisesource * noisesource;
residue = residue % 170003; residue *= residue;
residue = residue % 17011; residue *= residue;
residue = residue % 1709; residue *= residue;
residue = residue % 173; residue *= residue;
residue = residue % 17;
double applyresidue = residue;
applyresidue *= 0.00000001;
applyresidue *= 0.00000001;
inputSampleR = applyresidue;
//this denormalization routine produces a white noise at -300 dB which the noise
//shaping will interact with to produce a bipolar output, but the noise is actually
//all positive. That should stop any variables from going denormal, and the routine
//only kicks in if digital black is input. As a final touch, if you save to 24-bit
//the silence will return to being digital black again.
}
differenceL = lastSampleChannelL - inputSampleL;
lastSampleChannelL = inputSampleL;
//derive slew part off direct sample measurement + from last time
differenceR = lastSampleChannelR - inputSampleR;
lastSampleChannelR = inputSampleR;
//derive slew part off direct sample measurement + from last time
if (differenceL > 1.0) differenceL = 1.0;
if (differenceL < -1.0) differenceL = -1.0;
if (differenceR > 1.0) differenceR = 1.0;
if (differenceR < -1.0) differenceR = -1.0;
inputSampleL = lastFXChannelL + asin(differenceL);
lastFXChannelL = inputSampleL;
if (centering < 1.0) lastFXChannelL *= centering;
//if we're using the crude centering force, it's applied here
inputSampleR = lastFXChannelR + asin(differenceR);
lastFXChannelR = inputSampleR;
if (centering < 1.0) lastFXChannelR *= centering;
//if we're using the crude centering force, it's applied here
if (lastFXChannelL > 1.0) lastFXChannelL = 1.0;
if (lastFXChannelL < -1.0) lastFXChannelL = -1.0;
if (lastFXChannelR > 1.0) lastFXChannelR = 1.0;
if (lastFXChannelR < -1.0) lastFXChannelR = -1.0;
//build new signal off what was present in output last time
//slew aspect
if (inputSampleL > 1.57079633) inputSampleL = 1.57079633;
if (inputSampleL < -1.57079633) inputSampleL = -1.57079633;
inputSampleL = sin(inputSampleL);
//amplitude aspect
if (inputSampleR > 1.57079633) inputSampleR = 1.57079633;
if (inputSampleR < -1.57079633) inputSampleR = -1.57079633;
inputSampleR = sin(inputSampleR);
//amplitude aspect
//noise shaping to 64-bit floating point
if (fpFlip) {
fpTemp = inputSampleL;
fpNShapeLA = (fpNShapeLA*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLA;
fpTemp = inputSampleR;
fpNShapeRA = (fpNShapeRA*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRA;
}
else {
fpTemp = inputSampleL;
fpNShapeLB = (fpNShapeLB*fpOld)+((inputSampleL-fpTemp)*fpNew);
inputSampleL += fpNShapeLB;
fpTemp = inputSampleR;
fpNShapeRB = (fpNShapeRB*fpOld)+((inputSampleR-fpTemp)*fpNew);
inputSampleR += fpNShapeRB;
}
fpFlip = !fpFlip;
//end noise shaping on 64 bit output
*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="C5RawChannel.cpp" />
<ClCompile Include="C5RawChannelProc.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="C5RawChannel.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{16F7AB3C-1AE0-4574-B60C-7B4DED82938C}</ProjectGuid>
<RootNamespace>VSTProject</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>C5RawChannel64</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="C5RawChannel.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="C5RawChannelProc.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="C5RawChannel.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,61 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/01/12 09:05:31 $
//
// Category : VST 2.x Classes
// Filename : aeffeditor.h
// Created by : Steinberg Media Technologies
// Description : Editor Class for VST Plug-Ins
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#ifndef __aeffeditor__
#define __aeffeditor__
#include "audioeffectx.h"
//-------------------------------------------------------------------------------------------------------
/** VST Effect Editor class. */
//-------------------------------------------------------------------------------------------------------
class AEffEditor
{
public:
//-------------------------------------------------------------------------------------------------------
AEffEditor (AudioEffect* effect = 0) ///< Editor class constructor. Requires pointer to associated effect instance.
: effect (effect)
, systemWindow (0)
{}
virtual ~AEffEditor () ///< Editor class destructor.
{}
virtual AudioEffect* getEffect () { return effect; } ///< Returns associated effect instance
virtual bool getRect (ERect** rect) { *rect = 0; return false; } ///< Query editor size as #ERect
virtual bool open (void* ptr) { systemWindow = ptr; return 0; } ///< Open editor, pointer to parent windows is platform-dependent (HWND on Windows, WindowRef on Mac).
virtual void close () { systemWindow = 0; } ///< Close editor (detach from parent window)
virtual bool isOpen () { return systemWindow != 0; } ///< Returns true if editor is currently open
virtual void idle () {} ///< Idle call supplied by Host application
#if TARGET_API_MAC_CARBON
virtual void DECLARE_VST_DEPRECATED (draw) (ERect* rect) {}
virtual VstInt32 DECLARE_VST_DEPRECATED (mouse) (VstInt32 x, VstInt32 y) { return 0; }
virtual VstInt32 DECLARE_VST_DEPRECATED (key) (VstInt32 keyCode) { return 0; }
virtual void DECLARE_VST_DEPRECATED (top) () {}
virtual void DECLARE_VST_DEPRECATED (sleep) () {}
#endif
#if VST_2_1_EXTENSIONS
virtual bool onKeyDown (VstKeyCode& keyCode) { return false; } ///< Receive key down event. Return true only if key was really used!
virtual bool onKeyUp (VstKeyCode& keyCode) { return false; } ///< Receive key up event. Return true only if key was really used!
virtual bool onWheel (float distance) { return false; } ///< Handle mouse wheel event, distance is positive or negative to indicate wheel direction.
virtual bool setKnobMode (VstInt32 val) { return false; } ///< Set knob mode (if supported by Host). See CKnobMode in VSTGUI.
#endif
//-------------------------------------------------------------------------------------------------------
protected:
AudioEffect* effect; ///< associated effect instance
void* systemWindow; ///< platform-dependent parent window (HWND or WindowRef)
};
#endif // __aeffeditor__

View file

@ -0,0 +1,703 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/06/07 08:22:01 $
//
// Category : VST 2.x Classes
// Filename : audioeffect.cpp
// Created by : Steinberg Media Technologies
// Description : Class AudioEffect (VST 1.0)
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#include "audioeffect.h"
#include "aeffeditor.h"
#include <stddef.h>
#include <stdio.h>
#include <math.h>
//-------------------------------------------------------------------------------------------------------
VstIntPtr AudioEffect::dispatchEffectClass (AEffect* e, VstInt32 opCode, VstInt32 index, VstIntPtr value, void* ptr, float opt)
{
AudioEffect* ae = (AudioEffect*)(e->object);
if (opCode == effClose)
{
ae->dispatcher (opCode, index, value, ptr, opt);
delete ae;
return 1;
}
return ae->dispatcher (opCode, index, value, ptr, opt);
}
//-------------------------------------------------------------------------------------------------------
float AudioEffect::getParameterClass (AEffect* e, VstInt32 index)
{
AudioEffect* ae = (AudioEffect*)(e->object);
return ae->getParameter (index);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::setParameterClass (AEffect* e, VstInt32 index, float value)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->setParameter (index, value);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (processClass) (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->DECLARE_VST_DEPRECATED (process) (inputs, outputs, sampleFrames);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::processClassReplacing (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->processReplacing (inputs, outputs, sampleFrames);
}
//-------------------------------------------------------------------------------------------------------
#if VST_2_4_EXTENSIONS
void AudioEffect::processClassDoubleReplacing (AEffect* e, double** inputs, double** outputs, VstInt32 sampleFrames)
{
AudioEffect* ae = (AudioEffect*)(e->object);
ae->processDoubleReplacing (inputs, outputs, sampleFrames);
}
#endif
//-------------------------------------------------------------------------------------------------------
// Class AudioEffect Implementation
//-------------------------------------------------------------------------------------------------------
/*!
The constructor of your class is passed a parameter of the type \e audioMasterCallback. The actual
mechanism in which your class gets constructed is not important right now. Effectively your class is
constructed by the hosting application, which passes an object of type \e audioMasterCallback that
handles the interaction with the plug-in. You pass this on to the base class' constructor and then
can forget about it.
\param audioMaster Passed by the Host and handles interaction
\param numPrograms Pass the number of programs the plug-in provides
\param numParams Pass the number of parameters the plug-in provides
\code
MyPlug::MyPlug (audioMasterCallback audioMaster)
: AudioEffectX (audioMaster, 1, 1) // 1 program, 1 parameter only
{
setNumInputs (2); // stereo in
setNumOutputs (2); // stereo out
setUniqueID ('MyPl'); // you must change this for other plug-ins!
canProcessReplacing (); // supports replacing mode
}
\endcode
\sa setNumInputs, setNumOutputs, setUniqueID, canProcessReplacing
*/
AudioEffect::AudioEffect (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams)
: audioMaster (audioMaster)
, editor (0)
, sampleRate (44100.f)
, blockSize (1024)
, numPrograms (numPrograms)
, numParams (numParams)
, curProgram (0)
{
memset (&cEffect, 0, sizeof (cEffect));
cEffect.magic = kEffectMagic;
cEffect.dispatcher = dispatchEffectClass;
cEffect.DECLARE_VST_DEPRECATED (process) = DECLARE_VST_DEPRECATED (processClass);
cEffect.setParameter = setParameterClass;
cEffect.getParameter = getParameterClass;
cEffect.numPrograms = numPrograms;
cEffect.numParams = numParams;
cEffect.numInputs = 1; // mono input
cEffect.numOutputs = 2; // stereo output
cEffect.DECLARE_VST_DEPRECATED (ioRatio) = 1.f;
cEffect.object = this;
cEffect.uniqueID = CCONST ('N', 'o', 'E', 'f');
cEffect.version = 1;
cEffect.processReplacing = processClassReplacing;
#if VST_2_4_EXTENSIONS
canProcessReplacing (); // mandatory in VST 2.4!
cEffect.processDoubleReplacing = processClassDoubleReplacing;
#endif
}
//-------------------------------------------------------------------------------------------------------
AudioEffect::~AudioEffect ()
{
if (editor)
delete editor;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::setEditor (AEffEditor* editor)
{
this->editor = editor;
if (editor)
cEffect.flags |= effFlagsHasEditor;
else
cEffect.flags &= ~effFlagsHasEditor;
}
//-------------------------------------------------------------------------------------------------------
VstIntPtr AudioEffect::dispatcher (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt)
{
VstIntPtr v = 0;
switch (opcode)
{
case effOpen: open (); break;
case effClose: close (); break;
case effSetProgram: if (value < numPrograms) setProgram ((VstInt32)value); break;
case effGetProgram: v = getProgram (); break;
case effSetProgramName: setProgramName ((char*)ptr); break;
case effGetProgramName: getProgramName ((char*)ptr); break;
case effGetParamLabel: getParameterLabel (index, (char*)ptr); break;
case effGetParamDisplay: getParameterDisplay (index, (char*)ptr); break;
case effGetParamName: getParameterName (index, (char*)ptr); break;
case effSetSampleRate: setSampleRate (opt); break;
case effSetBlockSize: setBlockSize ((VstInt32)value); break;
case effMainsChanged: if (!value) suspend (); else resume (); break;
#if !VST_FORCE_DEPRECATED
case effGetVu: v = (VstIntPtr)(getVu () * 32767.); break;
#endif
//---Editor------------
case effEditGetRect: if (editor) v = editor->getRect ((ERect**)ptr) ? 1 : 0; break;
case effEditOpen: if (editor) v = editor->open (ptr) ? 1 : 0; break;
case effEditClose: if (editor) editor->close (); break;
case effEditIdle: if (editor) editor->idle (); break;
#if (TARGET_API_MAC_CARBON && !VST_FORCE_DEPRECATED)
case effEditDraw: if (editor) editor->draw ((ERect*)ptr); break;
case effEditMouse: if (editor) v = editor->mouse (index, value); break;
case effEditKey: if (editor) v = editor->key (value); break;
case effEditTop: if (editor) editor->top (); break;
case effEditSleep: if (editor) editor->sleep (); break;
#endif
case DECLARE_VST_DEPRECATED (effIdentify): v = CCONST ('N', 'v', 'E', 'f'); break;
//---Persistence-------
case effGetChunk: v = getChunk ((void**)ptr, index ? true : false); break;
case effSetChunk: v = setChunk (ptr, (VstInt32)value, index ? true : false); break;
}
return v;
}
//-------------------------------------------------------------------------------------------------------
/*!
Use to ask for the Host's version
\return The Host's version
*/
VstInt32 AudioEffect::getMasterVersion ()
{
VstInt32 version = 1;
if (audioMaster)
{
version = (VstInt32)audioMaster (&cEffect, audioMasterVersion, 0, 0, 0, 0);
if (!version) // old
version = 1;
}
return version;
}
//-------------------------------------------------------------------------------------------------------
/*!
\sa AudioEffectX::getNextShellPlugin
*/
VstInt32 AudioEffect::getCurrentUniqueId ()
{
VstInt32 id = 0;
if (audioMaster)
id = (VstInt32)audioMaster (&cEffect, audioMasterCurrentId, 0, 0, 0, 0);
return id;
}
//-------------------------------------------------------------------------------------------------------
/*!
Give idle time to Host application, e.g. if plug-in editor is doing mouse tracking in a modal loop.
*/
void AudioEffect::masterIdle ()
{
if (audioMaster)
audioMaster (&cEffect, audioMasterIdle, 0, 0, 0, 0);
}
//-------------------------------------------------------------------------------------------------------
bool AudioEffect::DECLARE_VST_DEPRECATED (isInputConnected) (VstInt32 input)
{
VstInt32 ret = 0;
if (audioMaster)
ret = (VstInt32)audioMaster (&cEffect, DECLARE_VST_DEPRECATED (audioMasterPinConnected), input, 0, 0, 0);
return ret ? false : true; // return value is 0 for true
}
//-------------------------------------------------------------------------------------------------------
bool AudioEffect::DECLARE_VST_DEPRECATED (isOutputConnected) (VstInt32 output)
{
VstInt32 ret = 0;
if (audioMaster)
ret = (VstInt32)audioMaster (&cEffect, DECLARE_VST_DEPRECATED (audioMasterPinConnected), output, 1, 0, 0);
return ret ? false : true; // return value is 0 for true
}
//-------------------------------------------------------------------------------------------------------
/*!
\param index parameter index
\param float parameter value
\note An important thing to notice is that if the user changes a parameter in your editor, which is
out of the Host's control if you are not using the default string based interface, you should
call setParameterAutomated (). This ensures that the Host is notified of the parameter change, which
allows it to record these changes for automation.
\sa setParameter
*/
void AudioEffect::setParameterAutomated (VstInt32 index, float value)
{
setParameter (index, value);
if (audioMaster)
audioMaster (&cEffect, audioMasterAutomate, index, 0, 0, value); // value is in opt
}
//-------------------------------------------------------------------------------------------------------
// Flags
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (hasVu) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsHasVu);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsHasVu);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (hasClip) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsHasClip);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsHasClip);
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (canMono) (bool state)
{
if (state)
cEffect.flags |= DECLARE_VST_DEPRECATED (effFlagsCanMono);
else
cEffect.flags &= ~DECLARE_VST_DEPRECATED (effFlagsCanMono);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param state Set to \e true if supported
\note Needs to be called in the plug-in's constructor
*/
void AudioEffect::canProcessReplacing (bool state)
{
if (state)
cEffect.flags |= effFlagsCanReplacing;
else
cEffect.flags &= ~effFlagsCanReplacing;
}
//-----------------------------------------------------------------------------------------------------------------
/*!
\param state Set to \e true if supported
\note Needs to be called in the plug-in's constructor
*/
#if VST_2_4_EXTENSIONS
void AudioEffect::canDoubleReplacing (bool state)
{
if (state)
cEffect.flags |= effFlagsCanDoubleReplacing;
else
cEffect.flags &= ~effFlagsCanDoubleReplacing;
}
#endif
//-------------------------------------------------------------------------------------------------------
/*!
\param state Set \e true if programs are chunks
\note Needs to be called in the plug-in's constructor
*/
void AudioEffect::programsAreChunks (bool state)
{
if (state)
cEffect.flags |= effFlagsProgramChunks;
else
cEffect.flags &= ~effFlagsProgramChunks;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (setRealtimeQualities) (VstInt32 qualities)
{
cEffect.DECLARE_VST_DEPRECATED (realQualities) = qualities;
}
//-------------------------------------------------------------------------------------------------------
void AudioEffect::DECLARE_VST_DEPRECATED (setOfflineQualities) (VstInt32 qualities)
{
cEffect.DECLARE_VST_DEPRECATED (offQualities) = qualities;
}
//-------------------------------------------------------------------------------------------------------
/*!
Use to report the Plug-in's latency (Group Delay)
\param delay Plug-ins delay in samples
*/
void AudioEffect::setInitialDelay (VstInt32 delay)
{
cEffect.initialDelay = delay;
}
//-------------------------------------------------------------------------------------------------------
// Strings Conversion
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::dB2string (float value, char* text, VstInt32 maxLen)
{
if (value <= 0)
vst_strncpy (text, "-oo", maxLen);
else
float2string ((float)(20. * log10 (value)), text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param samples Number of samples
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::Hz2string (float samples, char* text, VstInt32 maxLen)
{
float sampleRate = getSampleRate ();
if (!samples)
float2string (0, text, maxLen);
else
float2string (sampleRate / samples, text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param samples Number of samples
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::ms2string (float samples, char* text, VstInt32 maxLen)
{
float2string ((float)(samples * 1000. / getSampleRate ()), text, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::float2string (float value, char* text, VstInt32 maxLen)
{
VstInt32 c = 0, neg = 0;
char string[32];
char* s;
double v, integ, i10, mantissa, m10, ten = 10.;
v = (double)value;
if (v < 0)
{
neg = 1;
value = -value;
v = -v;
c++;
if (v > 9999999.)
{
vst_strncpy (string, "Huge!", 31);
return;
}
}
else if (v > 99999999.)
{
vst_strncpy (string, "Huge!", 31);
return;
}
s = string + 31;
*s-- = 0;
*s-- = '.';
c++;
integ = floor (v);
i10 = fmod (integ, ten);
*s-- = (char)((VstInt32)i10 + '0');
integ /= ten;
c++;
while (integ >= 1. && c < 8)
{
i10 = fmod (integ, ten);
*s-- = (char)((VstInt32)i10 + '0');
integ /= ten;
c++;
}
if (neg)
*s-- = '-';
vst_strncpy (text, s + 1, maxLen);
if (c >= 8)
return;
s = string + 31;
*s-- = 0;
mantissa = fmod (v, 1.);
mantissa *= pow (ten, (double)(8 - c));
while (c < 8)
{
if (mantissa <= 0)
*s-- = '0';
else
{
m10 = fmod (mantissa, ten);
*s-- = (char)((VstInt32)m10 + '0');
mantissa /= 10.;
}
c++;
}
vst_strncat (text, s + 1, maxLen);
}
//-------------------------------------------------------------------------------------------------------
/*!
\param value Value to convert
\param text String up to length char
\param maxLen Maximal length of the string
*/
void AudioEffect::int2string (VstInt32 value, char* text, VstInt32 maxLen)
{
if (value >= 100000000)
{
vst_strncpy (text, "Huge!", maxLen);
return;
}
if (value < 0)
{
vst_strncpy (text, "-", maxLen);
value = -value;
}
else
vst_strncpy (text, "", maxLen);
bool state = false;
for (VstInt32 div = 100000000; div >= 1; div /= 10)
{
VstInt32 digit = value / div;
value -= digit * div;
if (state || digit > 0)
{
char temp[2] = {'0' + (char)digit, '\0'};
vst_strncat (text, temp, maxLen);
state = true;
}
}
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames)
This process method must be provided. It takes input data, applies its pocessing algorithm, and then puts the
result to the output by overwriting the output buffer.
\param inputs An array of pointers to the data
\param outputs An array of pointers to where the data can be written to
\param sampleFrames Number of sample frames to process
\warning Never call any Mac OS 9 functions (or other functions which call into the OS) inside your
audio process function! This will crash the system when your plug-in is run in MP (multiprocessor) mode.
If you must call into the OS, you must use MPRemoteCall () (see Apples' documentation), or
explicitly use functions which are documented by Apple to be MP safe. On Mac OS X read the system
header files to be sure that you only call thread safe functions.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setBlockSize (VstInt32 blockSize)
This is called by the Host, and tells the plug-in that the maximum block size passed to
processReplacing() will be \e blockSize.
\param blockSize Maximum number of sample frames
\warning You <b>must</b> process <b>exactly</b> \e sampleFrames number of samples in inside processReplacing, not more!
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setParameter (VstInt32 index, float value)
Parameters are the individual parameter settings the user can adjust. A VST Host can automate these
parameters. Set parameter \e index to \e value.
\param index Index of the parameter to change
\param value A float value between 0.0 and 1.0 inclusive
\note Parameter values, like all VST parameters, are declared as floats with an inclusive range of
0.0 to 1.0. How data is presented to the user is merely in the user-interface handling. This is a
convention, but still worth regarding. Maybe the VST-Host's automation system depends on this range.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn float AudioEffect::getParameter (VstInt32 index)
Return the \e value of parameter \e index
\param index Index of the parameter
\return A float value between 0.0 and 1.0 inclusive
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterLabel (VstInt32 index, char* label)
\param index Index of the parameter
\param label A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterDisplay (VstInt32 index, char* text)
\param index Index of the parameter
\param text A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::getProgram ()
\return Index of the current program
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setProgram (VstInt32 program)
\param Program of the current program
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getParameterName (VstInt32 index, char* text)
\param index Index of the parameter
\param text A string up to 8 char
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setProgramName (char* name)
The program name is displayed in the rack, and can be edited by the user.
\param name A string up to 24 char
\warning Please be aware that the string lengths supported by the default VST interface are normally
limited to 24 characters. If you copy too much data into the buffers provided, you will break the
Host application.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::getProgramName (char* name)
The program name is displayed in the rack, and can be edited by the user.
\param name A string up to 24 char
\warning Please be aware that the string lengths supported by the default VST interface are normally
limited to 24 characters. If you copy too much data into the buffers provided, you will break the
Host application.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::getChunk (void** data, bool isPreset)
\param data should point to the newly allocated memory block containg state data. You can savely release it in next suspend/resume call.
\param isPreset true when saving a single program, false for all programs
\note
If your plug-in is configured to use chunks (see AudioEffect::programsAreChunks), the Host
will ask for a block of memory describing the current plug-in state for saving.
To restore the state at a later stage, the same data is passed back to AudioEffect::setChunk.
Alternatively, when not using chunk, the Host will simply save all parameter values.
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn VstInt32 AudioEffect::setChunk (void* data, VstInt32 byteSize, bool isPreset)
\param data pointer to state data (owned by Host)
\param byteSize size of state data
\param isPreset true when restoring a single program, false for all programs
\sa getChunk
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setNumInputs (VstInt32 inputs)
This number is fixed at construction time and can't change until the plug-in is destroyed.
\param inputs The number of inputs
\sa isInputConnected()
\note Needs to be called in the plug-in's constructor
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setNumOutputs (VstInt32 outputs)
This number is fixed at construction time and can't change until the plug-in is destroyed.
\param outputs The number of outputs
\sa isOutputConnected()
\note Needs to be called in the plug-in's constructor
*/
//-------------------------------------------------------------------------------------------------------
/*!
\fn void AudioEffect::setUniqueID (VstInt32 iD)
Must call this! Set the plug-in's unique identifier. The Host uses this to identify the plug-in, for
instance when it is loading effect programs and banks. On Steinberg Web Page you can find an UniqueID
Database where you can record your UniqueID, it will check if the ID is already used by an another
vendor. You can use CCONST('a','b','c','d') (defined in VST 2.0) to be platform independent to
initialize an UniqueID.
\param iD Plug-in's unique ID
\note Needs to be called in the plug-in's constructor
*/

View file

@ -0,0 +1,177 @@
//-------------------------------------------------------------------------------------------------------
// VST Plug-Ins SDK
// Version 2.4 $Date: 2006/06/06 16:01:34 $
//
// Category : VST 2.x Classes
// Filename : audioeffect.h
// Created by : Steinberg Media Technologies
// Description : Class AudioEffect (VST 1.0)
//
// © 2006, Steinberg Media Technologies, All Rights Reserved
//-------------------------------------------------------------------------------------------------------
#ifndef __audioeffect__
#define __audioeffect__
#include "pluginterfaces/vst2.x/aeffect.h" // "c" interface
class AEffEditor;
//-------------------------------------------------------------------------------------------------------
/** VST Effect Base Class (VST 1.0). */
//-------------------------------------------------------------------------------------------------------
class AudioEffect
{
public:
//-------------------------------------------------------------------------------------------------------
AudioEffect (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams); ///< Create an \e AudioEffect object
virtual ~AudioEffect (); ///< Destroy an \e AudioEffect object
virtual VstIntPtr dispatcher (VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt); ///< Opcodes dispatcher
//-------------------------------------------------------------------------------------------------------
/// \name State Transitions
//-------------------------------------------------------------------------------------------------------
//@{
virtual void open () {} ///< Called when plug-in is initialized
virtual void close () {} ///< Called when plug-in will be released
virtual void suspend () {} ///< Called when plug-in is switched to off
virtual void resume () {} ///< Called when plug-in is switched to on
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Processing
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setSampleRate (float sampleRate) { this->sampleRate = sampleRate; } ///< Called when the sample rate changes (always in a suspend state)
virtual void setBlockSize (VstInt32 blockSize) { this->blockSize = blockSize; } ///< Called when the Maximun block size changes (always in a suspend state). Note that the sampleFrames in Process Calls could be smaller than this block size, but NOT bigger.
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames) = 0; ///< Process 32 bit (single precision) floats (always in a resume state)
#if VST_2_4_EXTENSIONS
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames) {} ///< Process 64 bit (double precision) floats (always in a resume state) \sa processReplacing
#endif // VST_2_4_EXTENSIONS
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Parameters
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setParameter (VstInt32 index, float value) {} ///< Called when a parameter changed
virtual float getParameter (VstInt32 index) { return 0; } ///< Return the value of the parameter with \e index
virtual void setParameterAutomated (VstInt32 index, float value);///< Called after a control has changed in the editor and when the associated parameter should be automated
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Programs and Persistence
//-------------------------------------------------------------------------------------------------------
//@{
virtual VstInt32 getProgram () { return curProgram; } ///< Return the index to the current program
virtual void setProgram (VstInt32 program) { curProgram = program; } ///< Set the current program to \e program
virtual void setProgramName (char* name) {} ///< Stuff the name field of the current program with \e name. Limited to #kVstMaxProgNameLen.
virtual void getProgramName (char* name) { *name = 0; } ///< Stuff \e name with the name of the current program. Limited to #kVstMaxProgNameLen.
virtual void getParameterLabel (VstInt32 index, char* label) { *label = 0; } ///< Stuff \e label with the units in which parameter \e index is displayed (i.e. "sec", "dB", "type", etc...). Limited to #kVstMaxParamStrLen.
virtual void getParameterDisplay (VstInt32 index, char* text) { *text = 0; } ///< Stuff \e text with a string representation ("0.5", "-3", "PLATE", etc...) of the value of parameter \e index. Limited to #kVstMaxParamStrLen.
virtual void getParameterName (VstInt32 index, char* text) { *text = 0; } ///< Stuff \e text with the name ("Time", "Gain", "RoomType", etc...) of parameter \e index. Limited to #kVstMaxParamStrLen.
virtual VstInt32 getChunk (void** data, bool isPreset = false) { return 0; } ///< Host stores plug-in state. Returns the size in bytes of the chunk (plug-in allocates the data array)
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset = false) { return 0; } ///< Host restores plug-in state
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Internal Setup
//-------------------------------------------------------------------------------------------------------
//@{
virtual void setUniqueID (VstInt32 iD) { cEffect.uniqueID = iD; } ///< Must be called to set the plug-ins unique ID!
virtual void setNumInputs (VstInt32 inputs) { cEffect.numInputs = inputs; } ///< Set the number of inputs the plug-in will handle. For a plug-in which could change its IO configuration, this number is the maximun available inputs.
virtual void setNumOutputs (VstInt32 outputs) { cEffect.numOutputs = outputs; } ///< Set the number of outputs the plug-in will handle. For a plug-in which could change its IO configuration, this number is the maximun available ouputs.
virtual void canProcessReplacing (bool state = true); ///< Tells that processReplacing() could be used. Mandatory in VST 2.4!
#if VST_2_4_EXTENSIONS
virtual void canDoubleReplacing (bool state = true); ///< Tells that processDoubleReplacing() is implemented.
#endif // VST_2_4_EXTENSIONS
virtual void programsAreChunks (bool state = true); ///< Program data is handled in formatless chunks (using getChunk-setChunks)
virtual void setInitialDelay (VstInt32 delay); ///< Use to report the plug-in's latency (Group Delay)
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Editor
//-------------------------------------------------------------------------------------------------------
//@{
void setEditor (AEffEditor* editor); ///< Should be called if you want to define your own editor
virtual AEffEditor* getEditor () { return editor; } ///< Returns the attached editor
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Inquiry
//-------------------------------------------------------------------------------------------------------
//@{
virtual AEffect* getAeffect () { return &cEffect; } ///< Returns the #AEffect structure
virtual float getSampleRate () { return sampleRate; } ///< Returns the current sample rate
virtual VstInt32 getBlockSize () { return blockSize; } ///< Returns the current Maximum block size
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Host Communication
//-------------------------------------------------------------------------------------------------------
//@{
virtual VstInt32 getMasterVersion (); ///< Returns the Host's version (for example 2400 for VST 2.4)
virtual VstInt32 getCurrentUniqueId (); ///< Returns current unique identifier when loading shell plug-ins
virtual void masterIdle (); ///< Give idle time to Host application
//@}
//-------------------------------------------------------------------------------------------------------
/// \name Tools (helpers)
//-------------------------------------------------------------------------------------------------------
//@{
virtual void dB2string (float value, char* text, VstInt32 maxLen); ///< Stuffs \e text with an amplitude on the [0.0, 1.0] scale converted to its value in decibels.
virtual void Hz2string (float samples, char* text, VstInt32 maxLen); ///< Stuffs \e text with the frequency in Hertz that has a period of \e samples.
virtual void ms2string (float samples, char* text, VstInt32 maxLen); ///< Stuffs \e text with the duration in milliseconds of \e samples frames.
virtual void float2string (float value, char* text, VstInt32 maxLen); ///< Stuffs \e text with a string representation on the floating point \e value.
virtual void int2string (VstInt32 value, char* text, VstInt32 maxLen); ///< Stuffs \e text with a string representation on the integer \e value.
//@}
//-------------------------------------------------------------------------------------------------------
// Deprecated methods
//-------------------------------------------------------------------------------------------------------
/// @cond ignore
virtual void DECLARE_VST_DEPRECATED (process) (float** inputs, float** outputs, VstInt32 sampleFrames) {}
virtual float DECLARE_VST_DEPRECATED (getVu) () { return 0; }
virtual void DECLARE_VST_DEPRECATED (hasVu) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (hasClip) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (canMono) (bool state = true);
virtual void DECLARE_VST_DEPRECATED (setRealtimeQualities) (VstInt32 qualities);
virtual void DECLARE_VST_DEPRECATED (setOfflineQualities) (VstInt32 qualities);
virtual bool DECLARE_VST_DEPRECATED (isInputConnected) (VstInt32 input);
virtual bool DECLARE_VST_DEPRECATED (isOutputConnected) (VstInt32 output);
/// @endcond
//-------------------------------------------------------------------------------------------------------
protected:
audioMasterCallback audioMaster; ///< Host callback
AEffEditor* editor; ///< Pointer to the plug-in's editor
float sampleRate; ///< Current sample rate
VstInt32 blockSize; ///< Maximum block size
VstInt32 numPrograms; ///< Number of programs
VstInt32 numParams; ///< Number of parameters
VstInt32 curProgram; ///< Current program
AEffect cEffect; ///< #AEffect object
/// @cond ignore
static VstIntPtr dispatchEffectClass (AEffect* e, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
static float getParameterClass (AEffect* e, VstInt32 index);
static void setParameterClass (AEffect* e, VstInt32 index, float value);
static void DECLARE_VST_DEPRECATED (processClass) (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames);
static void processClassReplacing (AEffect* e, float** inputs, float** outputs, VstInt32 sampleFrames);
#if VST_2_4_EXTENSIONS
static void processClassDoubleReplacing (AEffect* e, double** inputs, double** outputs, VstInt32 sampleFrames);
#endif // VST_2_4_EXTENSIONS
/// @endcond
};
#endif // __audioeffect__

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more