aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/WinVST/TransDesk/TransDesk.cpp
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2018-10-22 18:04:06 -0400
committerChris Johnson <jinx6568@sover.net>2018-10-22 18:04:06 -0400
commit633be2e22c6648c901f08f3b4cd4e8e14ea86443 (patch)
tree1e272c3d2b5bd29636b9f9f521af62734e4df012 /plugins/WinVST/TransDesk/TransDesk.cpp
parent057757aa8eb0a463caf0cdfdb5894ac5f723ff3f (diff)
downloadairwindows-lv2-port-633be2e22c6648c901f08f3b4cd4e8e14ea86443.tar.gz
airwindows-lv2-port-633be2e22c6648c901f08f3b4cd4e8e14ea86443.tar.bz2
airwindows-lv2-port-633be2e22c6648c901f08f3b4cd4e8e14ea86443.zip
Updates (in case my plane crashes)
Diffstat (limited to 'plugins/WinVST/TransDesk/TransDesk.cpp')
-rwxr-xr-xplugins/WinVST/TransDesk/TransDesk.cpp95
1 files changed, 95 insertions, 0 deletions
diff --git a/plugins/WinVST/TransDesk/TransDesk.cpp b/plugins/WinVST/TransDesk/TransDesk.cpp
new file mode 100755
index 0000000..24443bd
--- /dev/null
+++ b/plugins/WinVST/TransDesk/TransDesk.cpp
@@ -0,0 +1,95 @@
+/* ========================================
+ * TransDesk - TransDesk.h
+ * Copyright (c) 2016 airwindows, All rights reserved
+ * ======================================== */
+
+#ifndef __TransDesk_H
+#include "TransDesk.h"
+#endif
+
+AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new TransDesk(audioMaster);}
+
+TransDesk::TransDesk(audioMasterCallback audioMaster) :
+ AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
+{
+ for(int count = 0; count < 19; count++) {dL[count] = 0; dR[count] = 0;}
+ gcount = 0;
+
+ controlL = 0;
+ lastSampleL = 0.0;
+ lastOutSampleL = 0.0;
+ lastSlewL = 0.0;
+
+ controlR = 0;
+ lastSampleR = 0.0;
+ lastOutSampleR = 0.0;
+ lastSlewR = 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
+}
+
+TransDesk::~TransDesk() {}
+VstInt32 TransDesk::getVendorVersion () {return 1000;}
+void TransDesk::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
+void TransDesk::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!
+
+VstInt32 TransDesk::getChunk (void** data, bool isPreset)
+{
+ return kNumParameters * sizeof(float);
+}
+
+VstInt32 TransDesk::setChunk (void* data, VstInt32 byteSize, bool isPreset)
+{
+ return 0;
+}
+
+void TransDesk::setParameter(VstInt32 index, float value) {
+}
+
+float TransDesk::getParameter(VstInt32 index) {
+ return 0.0; //we only need to update the relevant name, this is simple to manage
+}
+
+void TransDesk::getParameterName(VstInt32 index, char *text) {
+}
+
+void TransDesk::getParameterDisplay(VstInt32 index, char *text) {
+}
+
+void TransDesk::getParameterLabel(VstInt32 index, char *text) {
+}
+
+VstInt32 TransDesk::canDo(char *text)
+{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
+
+bool TransDesk::getEffectName(char* name) {
+ vst_strncpy(name, "TransDesk", kVstMaxProductStrLen); return true;
+}
+
+VstPlugCategory TransDesk::getPlugCategory() {return kPlugCategEffect;}
+
+bool TransDesk::getProductString(char* text) {
+ vst_strncpy (text, "airwindows TransDesk", kVstMaxProductStrLen); return true;
+}
+
+bool TransDesk::getVendorString(char* text) {
+ vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
+}