Browse Source

dpf max changes

tags/v1.0
ninodewit 9 years ago
parent
commit
27a9dcfe1e
5 changed files with 205 additions and 201 deletions
  1. +1
    -1
      plugins/larynx/DistrhoPluginInfo.h
  2. +46
    -46
      plugins/larynx/gen_exported.cpp
  3. +18
    -14
      plugins/larynx/larynx.maxpat
  4. +126
    -126
      plugins/modulay/gen_exported.cpp
  5. +14
    -14
      plugins/modulay/modulay.maxpat

+ 1
- 1
plugins/larynx/DistrhoPluginInfo.h View File

@@ -28,7 +28,7 @@


#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ModulatorPlugin" #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ModulatorPlugin"


#define DISTRHO_PLUGIN_DESCRIPTION "Vibrato with tone control"
#define DISTRHO_PLUGIN_DESCRIPTION "Larynx is a simple vibrato with a tone control."
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'V', 'b', 'r') #define DISTRHO_PLUGIN_VERSION d_cconst('D', 'V', 'b', 'r')


#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED

+ 46
- 46
plugins/larynx/gen_exported.cpp View File

@@ -35,9 +35,9 @@ typedef struct State {
SineCycle m_cycle_7; SineCycle m_cycle_7;
SineData __sinedata; SineData __sinedata;
double m_depth_5; double m_depth_5;
double m_tone_6;
double m_rate_6;
double samplerate; double samplerate;
double m_rate_4;
double m_tone_4;
double m_y_2; double m_y_2;
double m_smth_1; double m_smth_1;
int vectorsize; int vectorsize;
@@ -49,10 +49,10 @@ typedef struct State {
samplerate = __sr; samplerate = __sr;
m_smth_1 = 0; m_smth_1 = 0;
m_y_2 = 0; m_y_2 = 0;
m_delay_3.reset("m_delay_3", 48000);
m_rate_4 = 5;
m_delay_3.reset("m_delay_3", 44100);
m_tone_4 = 6000;
m_depth_5 = 1; m_depth_5 = 1;
m_tone_6 = 6000;
m_rate_6 = 5;
m_cycle_7.reset(samplerate, 0); m_cycle_7.reset(samplerate, 0);
genlib_reset_complete(this); genlib_reset_complete(this);
@@ -70,30 +70,30 @@ typedef struct State {
return __exception; return __exception;
}; };
double expr_12601 = safediv(((m_tone_6 * 2) * 3.1415926535898), 48000);
double sin_12592 = sin(expr_12601);
double clamp_12593 = ((sin_12592 <= 1e-05) ? 1e-05 : ((sin_12592 >= 0.99999) ? 0.99999 : sin_12592));
double expr_226 = safediv(((m_tone_4 * 2) * 3.1415926535898), 48000);
double sin_217 = sin(expr_226);
double clamp_218 = ((sin_217 <= 1e-05) ? 1e-05 : ((sin_217 >= 0.99999) ? 0.99999 : sin_217));
// the main sample loop; // the main sample loop;
while ((__n--)) { while ((__n--)) {
const double in1 = (*(__in1++)); const double in1 = (*(__in1++));
double mix_12606 = (m_y_2 + (clamp_12593 * (in1 - m_y_2)));
double mix_12590 = mix_12606;
m_cycle_7.freq(m_rate_4);
double cycle_12596 = m_cycle_7(__sinedata);
double cycleindex_12597 = m_cycle_7.phase();
double add_12595 = (cycle_12596 + 1);
double mul_12594 = (add_12595 * 0.5);
double mul_12598 = (m_depth_5 * mul_12594);
double mstosamps_12589 = (mul_12598 * (samplerate * 0.001));
double mix_12607 = (mstosamps_12589 + (0.999 * (m_smth_1 - mstosamps_12589)));
double mix_12588 = mix_12607;
double tap_12600 = m_delay_3.read_linear(mix_12588);
double out1 = tap_12600;
double y0_next_12602 = mix_12590;
double smth_next_12603 = mix_12588;
m_delay_3.write(mix_12590);
m_y_2 = y0_next_12602;
m_smth_1 = smth_next_12603;
double mix_229 = (m_y_2 + (clamp_218 * (in1 - m_y_2)));
double mix_215 = mix_229;
m_cycle_7.freq(m_rate_6);
double cycle_221 = m_cycle_7(__sinedata);
double cycleindex_222 = m_cycle_7.phase();
double add_220 = (cycle_221 + 1);
double mul_219 = (add_220 * 0.5);
double mul_223 = (m_depth_5 * mul_219);
double mstosamps_214 = (mul_223 * (samplerate * 0.001));
double mix_230 = (mstosamps_214 + (0.999 * (m_smth_1 - mstosamps_214)));
double mix_213 = mix_230;
double tap_225 = m_delay_3.read_linear(mix_213);
double out1 = tap_225;
double y0_next_227 = mix_215;
double smth_next_228 = mix_213;
m_delay_3.write(mix_215);
m_y_2 = y0_next_227;
m_smth_1 = smth_next_228;
m_delay_3.step(); m_delay_3.step();
// assign results to output buffer; // assign results to output buffer;
(*(__out1++)) = out1; (*(__out1++)) = out1;
@@ -102,14 +102,14 @@ typedef struct State {
return __exception; return __exception;
}; };
inline void set_rate(double _value) {
m_rate_4 = (_value < 0.1 ? 0.1 : (_value > 10 ? 10 : _value));
inline void set_tone(double _value) {
m_tone_4 = (_value < 500 ? 500 : (_value > 12000 ? 12000 : _value));
}; };
inline void set_depth(double _value) { inline void set_depth(double _value) {
m_depth_5 = (_value < 0 ? 0 : (_value > 5 ? 5 : _value));
m_depth_5 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value));
}; };
inline void set_tone(double _value) {
m_tone_6 = (_value < 500 ? 500 : (_value > 12000 ? 12000 : _value));
inline void set_rate(double _value) {
m_rate_6 = (_value < 0.1 ? 0.1 : (_value > 10 ? 10 : _value));
}; };
} State; } State;
@@ -152,9 +152,9 @@ void reset(CommonState *cself) {
void setparameter(CommonState *cself, long index, double value, void *ref) { void setparameter(CommonState *cself, long index, double value, void *ref) {
State * self = (State *)cself; State * self = (State *)cself;
switch (index) { switch (index) {
case 0: self->set_rate(value); break;
case 0: self->set_tone(value); break;
case 1: self->set_depth(value); break; case 1: self->set_depth(value); break;
case 2: self->set_tone(value); break;
case 2: self->set_rate(value); break;
default: break; default: break;
} }
@@ -165,9 +165,9 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
void getparameter(CommonState *cself, long index, double *value) { void getparameter(CommonState *cself, long index, double *value) {
State *self = (State *)cself; State *self = (State *)cself;
switch (index) { switch (index) {
case 0: *value = self->m_rate_4; break;
case 0: *value = self->m_tone_4; break;
case 1: *value = self->m_depth_5; break; case 1: *value = self->m_depth_5; break;
case 2: *value = self->m_tone_6; break;
case 2: *value = self->m_rate_6; break;
default: break; default: break;
} }
@@ -187,18 +187,18 @@ void * create(double sr, long vs) {
self->__commonstate.vs = vs; self->__commonstate.vs = vs;
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(3 * sizeof(ParamInfo)); self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(3 * sizeof(ParamInfo));
self->__commonstate.numparams = 3; self->__commonstate.numparams = 3;
// initialize parameter 0 ("m_rate_4")
// initialize parameter 0 ("m_tone_4")
pi = self->__commonstate.params + 0; pi = self->__commonstate.params + 0;
pi->name = "rate";
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_rate_4;
pi->defaultvalue = self->m_tone_4;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0.1;
pi->outputmax = 10;
pi->outputmin = 500;
pi->outputmax = 12000;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 1 ("m_depth_5") // initialize parameter 1 ("m_depth_5")
@@ -211,22 +211,22 @@ void * create(double sr, long vs) {
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmin = 0.1;
pi->outputmax = 5; pi->outputmax = 5;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 2 ("m_tone_6")
// initialize parameter 2 ("m_rate_6")
pi = self->__commonstate.params + 2; pi = self->__commonstate.params + 2;
pi->name = "tone";
pi->name = "rate";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_6;
pi->defaultvalue = self->m_rate_6;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 12000;
pi->outputmin = 0.1;
pi->outputmax = 10;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined


+ 18
- 14
plugins/larynx/larynx.maxpat View File

@@ -629,8 +629,8 @@
"numinlets" : 0, "numinlets" : 0,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 51.0, 191.0, 181.0, 20.0 ],
"text" : "param depth 1 @min 0 @max 5"
"patching_rect" : [ 51.0, 191.0, 191.0, 20.0 ],
"text" : "param depth 1 @min 0.1 @max 5"
} }


} }
@@ -853,6 +853,10 @@
} }
, ,
"patching_rect" : [ 357.0, 174.0, 510.0, 20.0 ], "patching_rect" : [ 357.0, 174.0, 510.0, 20.0 ],
"saved_object_attributes" : {
"exportfolder" : "Macintosh HD:/Users/Nino/Documents/Git/DPF-Max-Gen/plugins/larynx/"
}
,
"text" : "gen~ @exportfolder \"Macintosh HD:/Users/Nino/Documents/Git/DPF-Max-Gen/plugins/larynx\"" "text" : "gen~ @exportfolder \"Macintosh HD:/Users/Nino/Documents/Git/DPF-Max-Gen/plugins/larynx\""
} }


@@ -1043,49 +1047,49 @@
} }
], ],
"parameters" : { "parameters" : {
"obj-30" : [ "flonum[6]", "flonum[6]", 0 ],
"obj-8::obj-35" : [ "[5]", "Level", 0 ],
"obj-8::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-8::obj-32" : [ "[8]", "[2]", 0 ],
"obj-12" : [ "flonum[5]", "flonum", 0 ],
"obj-13" : [ "flonum[2]", "flonum[2]", 0 ],
"obj-5" : [ "flonum[4]", "flonum", 0 ], "obj-5" : [ "flonum[4]", "flonum", 0 ],
"obj-41" : [ "flonum[3]", "flonum", 0 ],
"obj-13" : [ "flonum[2]", "flonum[2]", 0 ],
"obj-12" : [ "flonum[5]", "flonum", 0 ],
"obj-8::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-8::obj-35" : [ "[5]", "Level", 0 ],
"obj-30" : [ "flonum[6]", "flonum[6]", 0 ],
"obj-11" : [ "flonum", "flonum", 0 ], "obj-11" : [ "flonum", "flonum", 0 ],
"obj-41" : [ "flonum[3]", "flonum", 0 ]
"obj-8::obj-32" : [ "[8]", "[2]", 0 ]
} }
, ,
"dependency_cache" : [ { "dependency_cache" : [ {
"name" : "demosound.maxpat", "name" : "demosound.maxpat",
"bootpath" : "/Applications/Max 6.1/Cycling '74/msp-help", "bootpath" : "/Applications/Max 6.1/Cycling '74/msp-help",
"patcherrelativepath" : "../../../Applications/Max 6.1/Cycling '74/msp-help",
"patcherrelativepath" : "../../../../../../../Applications/Max 6.1/Cycling '74/msp-help",
"type" : "JSON", "type" : "JSON",
"implicit" : 1 "implicit" : 1
} }
, { , {
"name" : "sine.svg", "name" : "sine.svg",
"bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts", "bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../../../../../Applications/Max 6.1/patches/picts/m4l-picts",
"type" : "svg ", "type" : "svg ",
"implicit" : 1 "implicit" : 1
} }
, { , {
"name" : "saw.svg", "name" : "saw.svg",
"bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts", "bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../../../../../Applications/Max 6.1/patches/picts/m4l-picts",
"type" : "svg ", "type" : "svg ",
"implicit" : 1 "implicit" : 1
} }
, { , {
"name" : "square.svg", "name" : "square.svg",
"bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts", "bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../../../../../Applications/Max 6.1/patches/picts/m4l-picts",
"type" : "svg ", "type" : "svg ",
"implicit" : 1 "implicit" : 1
} }
, { , {
"name" : "random.svg", "name" : "random.svg",
"bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts", "bootpath" : "/Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../Applications/Max 6.1/patches/picts/m4l-picts",
"patcherrelativepath" : "../../../../../../../Applications/Max 6.1/patches/picts/m4l-picts",
"type" : "svg ", "type" : "svg ",
"implicit" : 1 "implicit" : 1
} }


+ 126
- 126
plugins/modulay/gen_exported.cpp View File

@@ -36,14 +36,14 @@ typedef struct State {
Delay m_delay_4; Delay m_delay_4;
SineCycle m_cycle_14; SineCycle m_cycle_14;
SineData __sinedata; SineData __sinedata;
double m_morph_9;
double m_tone_10;
double m_mix_12;
double m_repeats_11;
double m_depth_9;
double m_time_10;
double m_tone_12;
double m_morph_11;
double m_rate_8; double m_rate_8;
double m_time_6;
double m_repeats_6;
double m_smth_3; double m_smth_3;
double m_depth_7;
double m_mix_7;
double m_smth_1; double m_smth_1;
double samplerate; double samplerate;
double m_y_2; double m_y_2;
@@ -57,15 +57,15 @@ typedef struct State {
m_smth_1 = 0; m_smth_1 = 0;
m_y_2 = 0; m_y_2 = 0;
m_smth_3 = 0; m_smth_3 = 0;
m_delay_4.reset("m_delay_4", 48000);
m_delay_5.reset("m_delay_5", 48000);
m_time_6 = 500;
m_depth_7 = 1;
m_delay_4.reset("m_delay_4", 44100);
m_delay_5.reset("m_delay_5", 44100);
m_repeats_6 = 75;
m_mix_7 = 75;
m_rate_8 = 2; m_rate_8 = 2;
m_morph_9 = 50;
m_tone_10 = 3000;
m_repeats_11 = 75;
m_mix_12 = 100;
m_depth_9 = 1;
m_time_10 = 500;
m_morph_11 = 50;
m_tone_12 = 3000;
m_dcblock_13.reset(); m_dcblock_13.reset();
m_cycle_14.reset(samplerate, 0); m_cycle_14.reset(samplerate, 0);
genlib_reset_complete(this); genlib_reset_complete(this);
@@ -84,70 +84,70 @@ typedef struct State {
return __exception; return __exception;
}; };
double mul_12532 = (m_mix_12 * 0.01);
double mstosamps_12544 = (m_time_6 * (samplerate * 0.001));
double expr_12576 = safediv(((m_tone_10 * 2) * 3.1415926535898), 48000);
double sin_12539 = sin(expr_12576);
double clamp_12540 = ((sin_12539 <= 1e-05) ? 1e-05 : ((sin_12539 >= 0.99999) ? 0.99999 : sin_12539));
double mul_12536 = (m_repeats_11 * 0.01);
double mul_12557 = (m_morph_9 * -0.8);
double add_12555 = (mul_12557 + 40);
double abs_12556 = fabs(add_12555);
double mul_12560 = (abs_12556 * 0.01);
int lt_12547 = (m_morph_9 < 50);
double mul_12529 = (m_morph_9 * -0.8);
double add_12527 = (mul_12529 + 40);
double abs_12528 = fabs(add_12527);
double rsub_12526 = (80 - abs_12528);
double mul_12530 = (rsub_12526 * 0.01);
double mul_12546 = (m_morph_9 * -0.4);
double add_12545 = (mul_12546 + 20);
double mul_12548 = (lt_12547 * add_12545);
double mul_12559 = (m_morph_9 * 0.8);
double sub_12558 = (mul_12559 - 40);
double mul_12561 = (sub_12558 * 0.01);
int gt_12553 = (m_morph_9 > 50);
double mul_12552 = (gt_12553 * m_morph_9);
double sub_12551 = (mul_12552 - 50);
double clamp_12550 = ((sub_12551 <= 0) ? 0 : ((sub_12551 >= 50) ? 50 : sub_12551));
double mul_12554 = (clamp_12550 * 0.04);
double add_12549 = (mul_12548 + mul_12554);
double mul_141 = (m_mix_7 * 0.01);
double mstosamps_153 = (m_time_10 * (samplerate * 0.001));
double expr_185 = safediv(((m_tone_12 * 2) * 3.1415926535898), 48000);
double sin_148 = sin(expr_185);
double clamp_149 = ((sin_148 <= 1e-05) ? 1e-05 : ((sin_148 >= 0.99999) ? 0.99999 : sin_148));
int lt_156 = (m_morph_11 < 50);
double mul_166 = (m_morph_11 * -0.8);
double add_164 = (mul_166 + 40);
double abs_165 = fabs(add_164);
double mul_169 = (abs_165 * 0.01);
double mul_145 = (m_repeats_6 * 0.01);
double mul_155 = (m_morph_11 * -0.4);
double add_154 = (mul_155 + 20);
double mul_157 = (lt_156 * add_154);
double mul_138 = (m_morph_11 * -0.8);
double add_136 = (mul_138 + 40);
double abs_137 = fabs(add_136);
double rsub_135 = (80 - abs_137);
double mul_139 = (rsub_135 * 0.01);
double mul_168 = (m_morph_11 * 0.8);
double sub_167 = (mul_168 - 40);
double mul_170 = (sub_167 * 0.01);
int gt_162 = (m_morph_11 > 50);
double mul_161 = (gt_162 * m_morph_11);
double sub_160 = (mul_161 - 50);
double clamp_159 = ((sub_160 <= 0) ? 0 : ((sub_160 >= 50) ? 50 : sub_160));
double mul_163 = (clamp_159 * 0.04);
double add_158 = (mul_157 + mul_163);
// the main sample loop; // the main sample loop;
while ((__n--)) { while ((__n--)) {
const double in1 = (*(__in1++)); const double in1 = (*(__in1++));
double mix_12584 = (mstosamps_12544 + (0.999 * (m_smth_3 - mstosamps_12544)));
double mix_12533 = mix_12584;
double tap_12543 = m_delay_5.read_linear(mix_12533);
double mix_12585 = (m_y_2 + (clamp_12540 * (tap_12543 - m_y_2)));
double mix_12537 = mix_12585;
double mul_12541 = (mix_12537 * mul_12536);
double dcblock_12534 = m_dcblock_13(mul_12541);
double clamp_12535 = ((dcblock_12534 <= -1) ? -1 : ((dcblock_12534 >= 1) ? 1 : dcblock_12534));
double mul_12566 = (mix_12537 * mul_12560);
double mix_189 = (mstosamps_153 + (0.999 * (m_smth_3 - mstosamps_153)));
double mix_142 = mix_189;
double tap_152 = m_delay_5.read_linear(mix_142);
double mix_190 = (m_y_2 + (clamp_149 * (tap_152 - m_y_2)));
double mix_146 = mix_190;
double mul_175 = (mix_146 * mul_169);
double mul_150 = (mix_146 * mul_145);
double dcblock_143 = m_dcblock_13(mul_150);
double clamp_144 = ((dcblock_143 <= -1) ? -1 : ((dcblock_143 >= 1) ? 1 : dcblock_143));
m_cycle_14.freq(m_rate_8); m_cycle_14.freq(m_rate_8);
double cycle_12571 = m_cycle_14(__sinedata);
double cycleindex_12572 = m_cycle_14.phase();
double add_12570 = (cycle_12571 + 1);
double mul_12569 = (add_12570 * 0.5);
double mul_12573 = (m_depth_7 * mul_12569);
double add_12562 = (mul_12573 + add_12549);
double mstosamps_12568 = (add_12562 * (samplerate * 0.001));
double mix_12586 = (mstosamps_12568 + (0.999 * (m_smth_1 - mstosamps_12568)));
double mix_12567 = mix_12586;
double tap_12575 = m_delay_4.read_linear(mix_12567);
double mul_12563 = (tap_12575 * mul_12530);
double mul_12531 = ((mul_12563 + mul_12566) * mul_12532);
double out1 = (mul_12531 + in1);
double mul_12564 = (tap_12575 * mul_12561);
double add_12565 = (mix_12537 + mul_12564);
double smth1_next_12577 = mix_12533;
double y0_next_12578 = mix_12537;
double smth2_next_12579 = mix_12567;
m_delay_5.write((clamp_12535 + in1));
m_delay_4.write(add_12565);
m_smth_3 = smth1_next_12577;
m_y_2 = y0_next_12578;
m_smth_1 = smth2_next_12579;
double cycle_180 = m_cycle_14(__sinedata);
double cycleindex_181 = m_cycle_14.phase();
double add_179 = (cycle_180 + 1);
double mul_178 = (add_179 * 0.5);
double mul_182 = (m_depth_9 * mul_178);
double add_171 = (mul_182 + add_158);
double mstosamps_177 = (add_171 * (samplerate * 0.001));
double mix_191 = (mstosamps_177 + (0.999 * (m_smth_1 - mstosamps_177)));
double mix_176 = mix_191;
double tap_184 = m_delay_4.read_linear(mix_176);
double mul_172 = (tap_184 * mul_139);
double mul_140 = ((mul_172 + mul_175) * mul_141);
double out1 = (mul_140 + in1);
double mul_173 = (tap_184 * mul_170);
double add_174 = (mix_146 + mul_173);
double smth1_next_186 = mix_142;
double y0_next_187 = mix_146;
double smth2_next_188 = mix_176;
m_delay_5.write((clamp_144 + in1));
m_delay_4.write(add_174);
m_smth_3 = smth1_next_186;
m_y_2 = y0_next_187;
m_smth_1 = smth2_next_188;
m_delay_4.step(); m_delay_4.step();
m_delay_5.step(); m_delay_5.step();
// assign results to output buffer; // assign results to output buffer;
@@ -157,26 +157,26 @@ typedef struct State {
return __exception; return __exception;
}; };
inline void set_time(double _value) {
m_time_6 = (_value < 20 ? 20 : (_value > 1000 ? 1000 : _value));
inline void set_repeats(double _value) {
m_repeats_6 = (_value < 0 ? 0 : (_value > 110 ? 110 : _value));
}; };
inline void set_depth(double _value) {
m_depth_7 = (_value < 0 ? 0 : (_value > 3 ? 3 : _value));
inline void set_mix(double _value) {
m_mix_7 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
}; };
inline void set_rate(double _value) { inline void set_rate(double _value) {
m_rate_8 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value)); m_rate_8 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value));
}; };
inline void set_morph(double _value) {
m_morph_9 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_depth(double _value) {
m_depth_9 = (_value < 0.1 ? 0.1 : (_value > 3 ? 3 : _value));
}; };
inline void set_tone(double _value) {
m_tone_10 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
inline void set_time(double _value) {
m_time_10 = (_value < 20 ? 20 : (_value > 1000 ? 1000 : _value));
}; };
inline void set_repeats(double _value) {
m_repeats_11 = (_value < 0 ? 0 : (_value > 110 ? 110 : _value));
inline void set_morph(double _value) {
m_morph_11 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
}; };
inline void set_mix(double _value) {
m_mix_12 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value));
inline void set_tone(double _value) {
m_tone_12 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value));
}; };
} State; } State;
@@ -219,13 +219,13 @@ void reset(CommonState *cself) {
void setparameter(CommonState *cself, long index, double value, void *ref) { void setparameter(CommonState *cself, long index, double value, void *ref) {
State * self = (State *)cself; State * self = (State *)cself;
switch (index) { switch (index) {
case 0: self->set_time(value); break;
case 1: self->set_depth(value); break;
case 0: self->set_repeats(value); break;
case 1: self->set_mix(value); break;
case 2: self->set_rate(value); break; case 2: self->set_rate(value); break;
case 3: self->set_morph(value); break;
case 4: self->set_tone(value); break;
case 5: self->set_repeats(value); break;
case 6: self->set_mix(value); break;
case 3: self->set_depth(value); break;
case 4: self->set_time(value); break;
case 5: self->set_morph(value); break;
case 6: self->set_tone(value); break;
default: break; default: break;
} }
@@ -236,13 +236,13 @@ void setparameter(CommonState *cself, long index, double value, void *ref) {
void getparameter(CommonState *cself, long index, double *value) { void getparameter(CommonState *cself, long index, double *value) {
State *self = (State *)cself; State *self = (State *)cself;
switch (index) { switch (index) {
case 0: *value = self->m_time_6; break;
case 1: *value = self->m_depth_7; break;
case 0: *value = self->m_repeats_6; break;
case 1: *value = self->m_mix_7; break;
case 2: *value = self->m_rate_8; break; case 2: *value = self->m_rate_8; break;
case 3: *value = self->m_morph_9; break;
case 4: *value = self->m_tone_10; break;
case 5: *value = self->m_repeats_11; break;
case 6: *value = self->m_mix_12; break;
case 3: *value = self->m_depth_9; break;
case 4: *value = self->m_time_10; break;
case 5: *value = self->m_morph_11; break;
case 6: *value = self->m_tone_12; break;
default: break; default: break;
} }
@@ -262,32 +262,32 @@ void * create(double sr, long vs) {
self->__commonstate.vs = vs; self->__commonstate.vs = vs;
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo)); self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo));
self->__commonstate.numparams = 7; self->__commonstate.numparams = 7;
// initialize parameter 0 ("m_time_6")
// initialize parameter 0 ("m_repeats_6")
pi = self->__commonstate.params + 0; pi = self->__commonstate.params + 0;
pi->name = "time";
pi->name = "repeats";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_time_6;
pi->defaultvalue = self->m_repeats_6;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 20;
pi->outputmax = 1000;
pi->outputmin = 0;
pi->outputmax = 110;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 1 ("m_depth_7")
// initialize parameter 1 ("m_mix_7")
pi = self->__commonstate.params + 1; pi = self->__commonstate.params + 1;
pi->name = "depth";
pi->name = "mix";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_depth_7;
pi->defaultvalue = self->m_mix_7;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0; pi->outputmin = 0;
pi->outputmax = 3;
pi->outputmax = 100;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 2 ("m_rate_8") // initialize parameter 2 ("m_rate_8")
@@ -304,60 +304,60 @@ void * create(double sr, long vs) {
pi->outputmax = 5; pi->outputmax = 5;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 3 ("m_morph_9")
// initialize parameter 3 ("m_depth_9")
pi = self->__commonstate.params + 3; pi = self->__commonstate.params + 3;
pi->name = "morph";
pi->name = "depth";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_morph_9;
pi->defaultvalue = self->m_depth_9;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->outputmin = 0.1;
pi->outputmax = 3;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 4 ("m_tone_10")
// initialize parameter 4 ("m_time_10")
pi = self->__commonstate.params + 4; pi = self->__commonstate.params + 4;
pi->name = "tone";
pi->name = "time";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_tone_10;
pi->defaultvalue = self->m_time_10;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->outputmin = 20;
pi->outputmax = 1000;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 5 ("m_repeats_11")
// initialize parameter 5 ("m_morph_11")
pi = self->__commonstate.params + 5; pi = self->__commonstate.params + 5;
pi->name = "repeats";
pi->name = "morph";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_repeats_11;
pi->defaultvalue = self->m_morph_11;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0; pi->outputmin = 0;
pi->outputmax = 110;
pi->outputmax = 100;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined
// initialize parameter 6 ("m_mix_12")
// initialize parameter 6 ("m_tone_12")
pi = self->__commonstate.params + 6; pi = self->__commonstate.params + 6;
pi->name = "mix";
pi->name = "tone";
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; pi->paramtype = GENLIB_PARAMTYPE_FLOAT;
pi->defaultvalue = self->m_mix_12;
pi->defaultvalue = self->m_tone_12;
pi->defaultref = 0; pi->defaultref = 0;
pi->hasinputminmax = false; pi->hasinputminmax = false;
pi->inputmin = 0; pi->inputmin = 0;
pi->inputmax = 1; pi->inputmax = 1;
pi->hasminmax = true; pi->hasminmax = true;
pi->outputmin = 0;
pi->outputmax = 100;
pi->outputmin = 500;
pi->outputmax = 6000;
pi->exp = 0; pi->exp = 0;
pi->units = ""; // no units defined pi->units = ""; // no units defined


+ 14
- 14
plugins/modulay/modulay.maxpat View File

@@ -192,7 +192,7 @@
"parameter_shortname" : "flonum[7]", "parameter_shortname" : "flonum[7]",
"parameter_type" : 3, "parameter_type" : 3,
"parameter_initial_enable" : 1, "parameter_initial_enable" : 1,
"parameter_initial" : [ 100.0 ],
"parameter_initial" : [ 75 ],
"parameter_invisible" : 1 "parameter_invisible" : 1
} }


@@ -754,8 +754,8 @@
"numinlets" : 0, "numinlets" : 0,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 159.75, 698.5, 196.0, 20.0 ],
"text" : "param mix 100 @min 0 @max 100"
"patching_rect" : [ 159.75, 698.5, 190.0, 20.0 ],
"text" : "param mix 75 @min 0 @max 100"
} }


} }
@@ -1426,8 +1426,8 @@
"numinlets" : 0, "numinlets" : 0,
"numoutlets" : 1, "numoutlets" : 1,
"outlettype" : [ "" ], "outlettype" : [ "" ],
"patching_rect" : [ 144.5, 220.0, 181.0, 20.0 ],
"text" : "param depth 1 @min 0 @max 3"
"patching_rect" : [ 144.5, 220.0, 191.0, 20.0 ],
"text" : "param depth 1 @min 0.1 @max 3"
} }


} }
@@ -2409,19 +2409,19 @@
} }
], ],
"parameters" : { "parameters" : {
"obj-101" : [ "flonum[1]", "flonum[1]", 0 ],
"obj-19" : [ "flonum[16]", "flonum[7]", 0 ],
"obj-8::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-5" : [ "flonum[4]", "flonum", 0 ], "obj-5" : [ "flonum[4]", "flonum", 0 ],
"obj-12" : [ "flonum[5]", "flonum", 0 ],
"obj-20" : [ "flonum[15]", "flonum[4]", 0 ],
"obj-41" : [ "flonum[3]", "flonum", 0 ], "obj-41" : [ "flonum[3]", "flonum", 0 ],
"obj-30" : [ "flonum[6]", "flonum[6]", 0 ],
"obj-25" : [ "flonum[14]", "flonum[5]", 0 ],
"obj-11" : [ "flonum", "flonum", 0 ],
"obj-13" : [ "flonum[2]", "flonum[2]", 0 ], "obj-13" : [ "flonum[2]", "flonum[2]", 0 ],
"obj-12" : [ "flonum[5]", "flonum", 0 ],
"obj-8::obj-21::obj-6" : [ "live.tab[3]", "live.tab[1]", 0 ],
"obj-8::obj-35" : [ "[5]", "Level", 0 ], "obj-8::obj-35" : [ "[5]", "Level", 0 ],
"obj-8::obj-32" : [ "[8]", "[2]", 0 ]
"obj-30" : [ "flonum[6]", "flonum[6]", 0 ],
"obj-11" : [ "flonum", "flonum", 0 ],
"obj-19" : [ "flonum[16]", "flonum[7]", 0 ],
"obj-25" : [ "flonum[14]", "flonum[5]", 0 ],
"obj-20" : [ "flonum[15]", "flonum[4]", 0 ],
"obj-8::obj-32" : [ "[8]", "[2]", 0 ],
"obj-101" : [ "flonum[1]", "flonum[1]", 0 ]
} }
, ,
"dependency_cache" : [ { "dependency_cache" : [ {


Loading…
Cancel
Save