commit 9d3d7f497d3d115803578326df408df7c5c9dd9f
parent 991ec478bb9f72298901b4efbb96348fa22b998c
Author: fundamental <[email protected]>
Date: Mon, 27 Jun 2016 12:27:06 -0400
Add Some Initial Per-Effect OSC Ports
Diffstat:
8 files changed, 216 insertions(+), 0 deletions(-)
diff --git a/src/Effects/Alienwah.cpp b/src/Effects/Alienwah.cpp
@@ -12,11 +12,64 @@
*/
#include <cmath>
+#include <rtosc/port-sugar.h>
+#include <rtosc/ports.h>
#include "../Misc/Allocator.h"
#include "Alienwah.h"
using std::complex;
+#define rObject Alienwah
+#define rBegin [](const char *, rtosc::RtData &) {
+#define rEnd }
+
+rtosc::Ports Alienwah::ports = {
+ {"preset::i", rOptions(Alienwah 1, Alienwah 2, Alienwah 3, Alienwah 4)
+ rDoc("Instrument Presets"), 0,
+ rBegin;
+ rEnd},
+ //Pvolume/Ppanning are common
+ {"Pfreq::i", rShort("freq")
+ rDoc("Effect Frequency"), 0,
+ rBegin;
+ rEnd},
+ {"Pfreqrnd::i", rShort("rand")
+ rDoc("Frequency Randomness"), 0,
+ rBegin;
+ rEnd},
+ {"PLFOtype::i", rShort("shape")
+ rDoc("LFO Shape"), 0,
+ rBegin;
+ rEnd},
+ {"PStereo::T:F", rShort("stereo")
+ rDoc("Stereo/Mono Mode"), 0,
+ rBegin;
+ rEnd},
+ {"Pdepth::i", rShort("depth")
+ rDoc("LFO Depth"), 0,
+ rBegin;
+ rEnd},
+ {"Pfeedback::i", rShort("fb")
+ rDoc("Feedback"), 0,
+ rBegin;
+ rEnd},
+ {"Pdelay::i", rShort("delay")
+ rDoc("Delay"), 0,
+ rBegin;
+ rEnd},
+ {"Plrcross::i", rShort("l/r")
+ rDoc("Left/Right Crossover"), 0,
+ rBegin;
+ rEnd},
+ {"Pphase::i", rShort("phase")
+ rDoc("Phase"), 0,
+ rBegin;
+ rEnd},
+};
+#undef rBegin
+#undef rEnd
+#undef rObject
+
Alienwah::Alienwah(EffectParams pars)
:Effect(pars),
lfo(pars.srate, pars.bufsize),
diff --git a/src/Effects/Alienwah.h b/src/Effects/Alienwah.h
@@ -33,6 +33,7 @@ class Alienwah:public Effect
unsigned char getpar(int npar) const;
void cleanup(void);
+ static rtosc::Ports ports;
private:
//Alienwah Parameters
EffectLFO lfo; //lfo-ul Alienwah
diff --git a/src/Effects/Chorus.cpp b/src/Effects/Chorus.cpp
@@ -12,12 +12,69 @@
*/
#include <cmath>
+#include <rtosc/ports.h>
+#include <rtosc/port-sugar.h>
#include "../Misc/Allocator.h"
#include "Chorus.h"
#include <iostream>
using namespace std;
+#define rObject Chorus
+#define rBegin [](const char *, rtosc::RtData &) {
+#define rEnd }
+
+rtosc::Ports Chorus::ports = {
+ {"preset::i", rOptions(Alienwah 1, Alienwah 2, Alienwah 3, Alienwah 4)
+ rDoc("Instrument Presets"), 0,
+ rBegin;
+ rEnd},
+ //Pvolume/Ppanning are common
+ {"Pfreq::i", rShort("freq")
+ rDoc("Effect Frequency"), 0,
+ rBegin;
+ rEnd},
+ {"Pfreqrnd::i", rShort("rand")
+ rDoc("Frequency Randomness"), 0,
+ rBegin;
+ rEnd},
+ {"PLFOtype::i", rShort("shape")
+ rDoc("LFO Shape"), 0,
+ rBegin;
+ rEnd},
+ {"PStereo::T:F", rShort("stereo")
+ rDoc("Stereo/Mono Mode"), 0,
+ rBegin;
+ rEnd},
+ {"Pdepth::i", rShort("depth")
+ rDoc("LFO Depth"), 0,
+ rBegin;
+ rEnd},
+ {"Pdelay::i", rShort("delay")
+ rDoc("Delay"), 0,
+ rBegin;
+ rEnd},
+ {"Pfeedback::i", rShort("fb")
+ rDoc("Feedback"), 0,
+ rBegin;
+ rEnd},
+ {"Plrcross::i", rShort("l/r")
+ rDoc("Left/Right Crossover"), 0,
+ rBegin;
+ rEnd},
+ {"Pflangemode::T:F", rShort("flange")
+ rDoc("Flange Mode"), 0,
+ rBegin;
+ rEnd},
+ {"Poutsub::T:F", rShort("sub")
+ rDoc("Output Subtraction"), 0,
+ rBegin;
+ rEnd},
+};
+#undef rBegin
+#undef rEnd
+#undef rObject
+
Chorus::Chorus(EffectParams pars)
:Effect(pars),
lfo(pars.srate, pars.bufsize),
diff --git a/src/Effects/Chorus.h b/src/Effects/Chorus.h
@@ -68,6 +68,7 @@ class Chorus:public Effect
unsigned char getpar(int npar) const;
void cleanup(void);
+ static rtosc::Ports ports;
private:
//Chorus Parameters
unsigned char Pvolume;
diff --git a/src/Effects/Distorsion.cpp b/src/Effects/Distorsion.cpp
@@ -16,6 +16,59 @@
#include "../Misc/WaveShapeSmps.h"
#include "../Misc/Allocator.h"
#include <cmath>
+#include <rtosc/ports.h>
+#include <rtosc/port-sugar.h>
+
+#define rObject Distorsion
+#define rBegin [](const char *, rtosc::RtData &) {
+#define rEnd }
+
+rtosc::Ports Distorsion::ports = {
+ {"preset::i", rOptions(Alienwah 1, Alienwah 2, Alienwah 3, Alienwah 4)
+ rDoc("Instrument Presets"), 0,
+ rBegin;
+ rEnd},
+ //Pvolume/Ppanning are common
+ {"Plrcross::i", rShort("l/r")
+ rDoc("Left/Right Crossover"), 0,
+ rBegin;
+ rEnd},
+ {"Pdrive::i", rShort("drive")
+ rDoc("Input amplification"), 0,
+ rBegin;
+ rEnd},
+ {"Plevel::i", rShort("output")
+ rDoc("Output amplification"), 0,
+ rBegin;
+ rEnd},
+ {"Ptype::i", rShort("type")
+ rDoc("Distortion Shape"), 0,
+ rBegin;
+ rEnd},
+ {"Pnegate::T:F", rShort("neg")
+ rDoc("Negate Signal"), 0,
+ rBegin;
+ rEnd},
+ {"Plpf::i", rShort("lpf")
+ rDoc("Low Pass Cutoff"), 0,
+ rBegin;
+ rEnd},
+ {"Phpf::i", rShort("hpf")
+ rDoc("High Pass Cutoff"), 0,
+ rBegin;
+ rEnd},
+ {"Pstereo::T:F", rShort("stereo")
+ rDoc("Stereo"), 0,
+ rBegin;
+ rEnd},
+ {"Pprefiltering::T:F", rShort("p.filt")
+ rDoc("Filtering before/after non-linearity"), 0,
+ rBegin;
+ rEnd},
+};
+#undef rBegin
+#undef rEnd
+#undef rObject
Distorsion::Distorsion(EffectParams pars)
:Effect(pars),
diff --git a/src/Effects/Distorsion.h b/src/Effects/Distorsion.h
@@ -29,6 +29,7 @@ class Distorsion:public Effect
void cleanup(void);
void applyfilters(float *efxoutl, float *efxoutr);
+ static rtosc::Ports ports;
private:
//Parameters
unsigned char Pvolume; //Volume or E/R
diff --git a/src/Effects/DynamicFilter.cpp b/src/Effects/DynamicFilter.cpp
@@ -16,6 +16,55 @@
#include "DynamicFilter.h"
#include "../DSP/Filter.h"
#include "../Misc/Allocator.h"
+#include <rtosc/ports.h>
+#include <rtosc/port-sugar.h>
+
+#define rObject DynamicFilter
+#define rBegin [](const char *, rtosc::RtData &) {
+#define rEnd }
+
+rtosc::Ports DynamicFilter::ports = {
+ {"preset::i", rOptions(WahWah, AutoWah, Sweep, VocalMorph1, VocalMorph1)
+ rDoc("Instrument Presets"), 0,
+ rBegin;
+ rEnd},
+ //Pvolume/Ppanning are common
+ {"Pfreq::i", rShort("freq")
+ rDoc("Effect Frequency"), 0,
+ rBegin;
+ rEnd},
+ {"Pfreqrnd::i", rShort("rand")
+ rDoc("Frequency Randomness"), 0,
+ rBegin;
+ rEnd},
+ {"PLFOtype::i", rShort("shape")
+ rDoc("LFO Shape"), 0,
+ rBegin;
+ rEnd},
+ {"PStereo::T:F", rShort("stereo")
+ rDoc("Stereo/Mono Mode"), 0,
+ rBegin;
+ rEnd},
+ {"Pdepth::i", rShort("depth")
+ rDoc("LFO Depth"), 0,
+ rBegin;
+ rEnd},
+ {"Pampsns::i", rShort("sense")
+ rDoc("how the filter varies according to the input amplitude"), 0,
+ rBegin;
+ rEnd},
+ {"Pampsnsinv::T:F", rShort("sns.inv")
+ rDoc("Sense Inversion"), 0,
+ rBegin;
+ rEnd},
+ {"Pampsmooth::i", rShort("smooth")
+ rDoc("how smooth the input amplitude changes the filter"), 0,
+ rBegin;
+ rEnd},
+};
+#undef rBegin
+#undef rEnd
+#undef rObject
DynamicFilter::DynamicFilter(EffectParams pars, const AbsTime *time)
:Effect(pars),
diff --git a/src/Effects/DynamicFilter.h b/src/Effects/DynamicFilter.h
@@ -30,6 +30,7 @@ class DynamicFilter:public Effect
unsigned char getpar(int npar) const;
void cleanup(void);
+ static rtosc::Ports ports;
private:
//Parametrii DynamicFilter
EffectLFO lfo; //lfo-ul DynamicFilter