@@ -1,34 +0,0 @@ | |||||
/* | |||||
* Copyright (C) 2015 Nino de Wit <ninodig@hotmail.com> | |||||
* | |||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | |||||
* or without fee is hereby granted, provided that the above copyright notice and this | |||||
* permission notice appear in all copies. | |||||
* | |||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||||
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||||
*/ | |||||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_BRAND "SHIRO" | |||||
#define DISTRHO_PLUGIN_NAME "Larynx" | |||||
#define DISTRHO_PLUGIN_URI "https://github.com/ninodewit/SHIRO-Plugins" | |||||
#define DISTRHO_PLUGIN_HAS_UI 0 | |||||
#define DISTRHO_PLUGIN_IS_RT_SAFE 0 | |||||
#define DISTRHO_PLUGIN_NUM_INPUTS 1 | |||||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1 | |||||
#define DISTRHO_PLUGIN_USES_MODGUI 1 | |||||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ModulatorPlugin" | |||||
#define DISTRHO_PLUGIN_DESCRIPTION "Larynx is a simple vibrato with a tone control." | |||||
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'V', 'b', 'r') | |||||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -1 +0,0 @@ | |||||
../common/DistrhoPluginMaxGen.cpp |
@@ -1,40 +0,0 @@ | |||||
#!/usr/bin/make -f | |||||
# Makefile for DISTRHO Plugins # | |||||
# ---------------------------- # | |||||
# Created by falkTX | |||||
# | |||||
# -------------------------------------------------------------- | |||||
# Project name, used for binaries | |||||
NAME = Larynx | |||||
# -------------------------------------------------------------- | |||||
# Files to build | |||||
OBJS_DSP = \ | |||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
# -------------------------------------------------------------- | |||||
# Do some magic | |||||
include ../Makefile.mk | |||||
# -------------------------------------------------------------- | |||||
# Enable all possible plugin types | |||||
ifeq ($(HAVE_JACK),true) | |||||
TARGETS += jack | |||||
endif | |||||
ifeq ($(LINUX),true) | |||||
TARGETS += ladspa | |||||
endif | |||||
TARGETS += lv2_dsp | |||||
TARGETS += vst | |||||
all: $(TARGETS) | |||||
# -------------------------------------------------------------- |
@@ -1,246 +0,0 @@ | |||||
#include "gen_exported.h" | |||||
namespace gen_exported { | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
// global noise generator | |||||
Noise noise; | |||||
static const int GENLIB_LOOPCOUNT_BAIL = 100000; | |||||
// The State struct contains all the state and procedures for the gendsp kernel | |||||
typedef struct State { | |||||
CommonState __commonstate; | |||||
Delay m_delay_3; | |||||
SineCycle m_cycle_7; | |||||
SineData __sinedata; | |||||
double m_depth_5; | |||||
double m_rate_6; | |||||
double samplerate; | |||||
double m_tone_4; | |||||
double m_y_2; | |||||
double m_smth_1; | |||||
int vectorsize; | |||||
int __exception; | |||||
// re-initialize all member variables; | |||||
inline void reset(double __sr, int __vs) { | |||||
__exception = 0; | |||||
vectorsize = __vs; | |||||
samplerate = __sr; | |||||
m_smth_1 = 0; | |||||
m_y_2 = 0; | |||||
m_delay_3.reset("m_delay_3", 44100); | |||||
m_tone_4 = 6000; | |||||
m_depth_5 = 1; | |||||
m_rate_6 = 5; | |||||
m_cycle_7.reset(samplerate, 0); | |||||
genlib_reset_complete(this); | |||||
}; | |||||
// the signal processing routine; | |||||
inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { | |||||
vectorsize = __n; | |||||
const t_sample * __in1 = __ins[0]; | |||||
t_sample * __out1 = __outs[0]; | |||||
if (__exception) { | |||||
return __exception; | |||||
} else if (( (__in1 == 0) || (__out1 == 0) )) { | |||||
__exception = GENLIB_ERR_NULL_BUFFER; | |||||
return __exception; | |||||
}; | |||||
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; | |||||
while ((__n--)) { | |||||
const double in1 = (*(__in1++)); | |||||
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(); | |||||
// assign results to output buffer; | |||||
(*(__out1++)) = out1; | |||||
}; | |||||
return __exception; | |||||
}; | |||||
inline void set_tone(double _value) { | |||||
m_tone_4 = (_value < 500 ? 500 : (_value > 12000 ? 12000 : _value)); | |||||
}; | |||||
inline void set_depth(double _value) { | |||||
m_depth_5 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value)); | |||||
}; | |||||
inline void set_rate(double _value) { | |||||
m_rate_6 = (_value < 0.1 ? 0.1 : (_value > 10 ? 10 : _value)); | |||||
}; | |||||
} State; | |||||
/// | |||||
/// Configuration for the genlib API | |||||
/// | |||||
/// Number of signal inputs and outputs | |||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 1; | |||||
int num_inputs() { return gen_kernel_numins; } | |||||
int num_outputs() { return gen_kernel_numouts; } | |||||
int num_params() { return 3; } | |||||
/// Assistive lables for the signal inputs and outputs | |||||
const char * gen_kernel_innames[] = { "in1" }; | |||||
const char * gen_kernel_outnames[] = { "out1" }; | |||||
/// Invoke the signal process of a State object | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n) { | |||||
State * self = (State *)cself; | |||||
return self->perform(ins, outs, n); | |||||
} | |||||
/// Reset all parameters and stateful operators of a State object | |||||
void reset(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
self->reset(cself->sr, cself->vs); | |||||
} | |||||
/// Set a parameter of a State object | |||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
State * self = (State *)cself; | |||||
switch (index) { | |||||
case 0: self->set_tone(value); break; | |||||
case 1: self->set_depth(value); break; | |||||
case 2: self->set_rate(value); break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Get the value of a parameter of a State object | |||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
State *self = (State *)cself; | |||||
switch (index) { | |||||
case 0: *value = self->m_tone_4; break; | |||||
case 1: *value = self->m_depth_5; break; | |||||
case 2: *value = self->m_rate_6; break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Allocate and configure a new State object and it's internal CommonState: | |||||
void * create(double sr, long vs) { | |||||
State *self = new State; | |||||
self->reset(sr, vs); | |||||
ParamInfo *pi; | |||||
self->__commonstate.inputnames = gen_kernel_innames; | |||||
self->__commonstate.outputnames = gen_kernel_outnames; | |||||
self->__commonstate.numins = gen_kernel_numins; | |||||
self->__commonstate.numouts = gen_kernel_numouts; | |||||
self->__commonstate.sr = sr; | |||||
self->__commonstate.vs = vs; | |||||
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(3 * sizeof(ParamInfo)); | |||||
self->__commonstate.numparams = 3; | |||||
// initialize parameter 0 ("m_tone_4") | |||||
pi = self->__commonstate.params + 0; | |||||
pi->name = "tone"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_tone_4; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 500; | |||||
pi->outputmax = 12000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 1 ("m_depth_5") | |||||
pi = self->__commonstate.params + 1; | |||||
pi->name = "depth"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_depth_5; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 5; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 2 ("m_rate_6") | |||||
pi = self->__commonstate.params + 2; | |||||
pi->name = "rate"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_rate_6; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 10; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
return self; | |||||
} | |||||
/// Release all resources and memory used by a State object: | |||||
void destroy(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
genlib_sysmem_freeptr(cself->params); | |||||
delete self; | |||||
} | |||||
} // gen_exported:: |
@@ -1,37 +0,0 @@ | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
#include "genlib.h" | |||||
#include "genlib_exportfunctions.h" | |||||
#include "genlib_ops.h" | |||||
namespace gen_exported { | |||||
int num_inputs(); | |||||
int num_outputs(); | |||||
int num_params(); | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | |||||
void reset(CommonState *cself); | |||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void destroy(CommonState *cself); | |||||
} // gen_exported:: |
@@ -1,459 +0,0 @@ | |||||
{ | |||||
"patcher" : { | |||||
"fileversion" : 1, | |||||
"appversion" : { | |||||
"major" : 6, | |||||
"minor" : 1, | |||||
"revision" : 9, | |||||
"architecture" : "x86" | |||||
} | |||||
, | |||||
"rect" : [ 0.0, 48.0, 960.0, 705.0 ], | |||||
"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ], | |||||
"bglocked" : 0, | |||||
"openinpresentation" : 0, | |||||
"default_fontsize" : 12.0, | |||||
"default_fontface" : 0, | |||||
"default_fontname" : "Arial", | |||||
"gridonopen" : 0, | |||||
"gridsize" : [ 15.0, 15.0 ], | |||||
"gridsnaponopen" : 0, | |||||
"statusbarvisible" : 2, | |||||
"toolbarvisible" : 1, | |||||
"boxanimatetime" : 200, | |||||
"imprint" : 0, | |||||
"enablehscroll" : 1, | |||||
"enablevscroll" : 1, | |||||
"devicewidth" : 0.0, | |||||
"description" : "", | |||||
"digest" : "", | |||||
"tags" : "", | |||||
"boxes" : [ { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-80", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 114.0, 372.0, 75.0, 20.0 ], | |||||
"text" : "history smth" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-81", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 51.0, 372.0, 63.0, 20.0 ], | |||||
"text" : "mix 0.999" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-40", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 51.0, 342.0, 72.0, 20.0 ], | |||||
"text" : "mstosamps" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-15", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 3, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 30.5, 166.0, 46.0, 20.0 ], | |||||
"text" : "mix" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-16", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 57.5, 66.0, 144.0, 20.0 ], | |||||
"text" : "expr out=in1*2*PI/48000\\;" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-24", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 30.5, 141.0, 72.0, 20.0 ], | |||||
"text" : "history y0 0" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-31", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 57.5, 91.0, 26.0, 20.0 ], | |||||
"text" : "sin" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-35", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 57.5, 116.0, 125.0, 20.0 ], | |||||
"text" : "clip 0.00001 0.99999" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-38", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 57.5, 41.0, 234.0, 20.0 ], | |||||
"text" : "param tone 6000 @min 500 @max 12000" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-62", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 64.5, 292.0, 35.0, 20.0 ], | |||||
"text" : "* 0.5" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-61", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 64.5, 267.0, 28.0, 20.0 ], | |||||
"text" : "+ 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-11", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 64.5, 216.0, 188.0, 20.0 ], | |||||
"text" : "param rate 5 @min 0.1 @max 10" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-58", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 2, | |||||
"outlettype" : [ "", "" ], | |||||
"patching_rect" : [ 64.5, 241.5, 38.0, 20.0 ], | |||||
"text" : "cycle" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-52", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 51.0, 317.0, 32.5, 20.0 ], | |||||
"text" : "*" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-49", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 51.0, 191.0, 181.0, 20.0 ], | |||||
"text" : "param depth 1 @min 0 @max 5" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-29", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 31.0, 402.0, 39.0, 20.0 ], | |||||
"text" : "delay" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-1", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 44.0, 16.0, 30.0, 20.0 ], | |||||
"text" : "in 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-4", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 0, | |||||
"patching_rect" : [ 31.0, 427.0, 37.0, 20.0 ], | |||||
"text" : "out 1" | |||||
} | |||||
} | |||||
], | |||||
"lines" : [ { | |||||
"patchline" : { | |||||
"destination" : [ "obj-15", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-1", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-58", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-11", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-24", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"midpoints" : [ 40.0, 193.0, 13.0, 193.0, 13.0, 133.0, 40.0, 133.0 ], | |||||
"source" : [ "obj-15", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-29", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-15", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-31", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-16", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-15", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-24", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-4", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-29", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-35", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-31", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-15", 2 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-35", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-16", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-38", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-81", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"midpoints" : [ 60.5, 365.0, 60.5, 365.0 ], | |||||
"source" : [ "obj-40", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-52", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-49", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-40", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-52", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-61", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-58", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-62", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-61", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-52", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-62", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-81", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-80", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-29", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-81", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-80", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-81", 0 ] | |||||
} | |||||
} | |||||
] | |||||
} | |||||
} |
@@ -1,34 +0,0 @@ | |||||
/* | |||||
* Copyright (C) 2015 Nino de Wit <ninodig@hotmail.com> | |||||
* | |||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | |||||
* or without fee is hereby granted, provided that the above copyright notice and this | |||||
* permission notice appear in all copies. | |||||
* | |||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||||
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||||
*/ | |||||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_BRAND "SHIRO" | |||||
#define DISTRHO_PLUGIN_NAME "Modulay" | |||||
#define DISTRHO_PLUGIN_URI "https://github.com/ninodewit/SHIRO-Plugins" | |||||
#define DISTRHO_PLUGIN_HAS_UI 0 | |||||
#define DISTRHO_PLUGIN_IS_RT_SAFE 0 | |||||
#define DISTRHO_PLUGIN_NUM_INPUTS 1 | |||||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1 | |||||
#define DISTRHO_PLUGIN_USES_MODGUI 1 | |||||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:DelayPlugin" | |||||
#define DISTRHO_PLUGIN_DESCRIPTION "Modulay is a delay with variable types of modulation based on the setting of the Morph-knob." | |||||
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'd', 'y') | |||||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -1 +0,0 @@ | |||||
../common/DistrhoPluginMaxGen.cpp |
@@ -1,40 +0,0 @@ | |||||
#!/usr/bin/make -f | |||||
# Makefile for DISTRHO Plugins # | |||||
# ---------------------------- # | |||||
# Created by falkTX | |||||
# | |||||
# -------------------------------------------------------------- | |||||
# Project name, used for binaries | |||||
NAME = Modulay | |||||
# -------------------------------------------------------------- | |||||
# Files to build | |||||
OBJS_DSP = \ | |||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
# -------------------------------------------------------------- | |||||
# Do some magic | |||||
include ../Makefile.mk | |||||
# -------------------------------------------------------------- | |||||
# Enable all possible plugin types | |||||
ifeq ($(HAVE_JACK),true) | |||||
TARGETS += jack | |||||
endif | |||||
ifeq ($(LINUX),true) | |||||
TARGETS += ladspa | |||||
endif | |||||
TARGETS += lv2_dsp | |||||
TARGETS += vst | |||||
all: $(TARGETS) | |||||
# -------------------------------------------------------------- |
@@ -1,377 +0,0 @@ | |||||
#include "gen_exported.h" | |||||
namespace gen_exported { | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
// global noise generator | |||||
Noise noise; | |||||
static const int GENLIB_LOOPCOUNT_BAIL = 100000; | |||||
// The State struct contains all the state and procedures for the gendsp kernel | |||||
typedef struct State { | |||||
CommonState __commonstate; | |||||
DCBlock m_dcblock_13; | |||||
Delay m_delay_5; | |||||
Delay m_delay_4; | |||||
SineCycle m_cycle_14; | |||||
SineData __sinedata; | |||||
double m_depth_9; | |||||
double m_time_10; | |||||
double m_tone_12; | |||||
double m_morph_11; | |||||
double m_rate_8; | |||||
double m_repeats_6; | |||||
double m_smth_3; | |||||
double m_mix_7; | |||||
double m_smth_1; | |||||
double samplerate; | |||||
double m_y_2; | |||||
int vectorsize; | |||||
int __exception; | |||||
// re-initialize all member variables; | |||||
inline void reset(double __sr, int __vs) { | |||||
__exception = 0; | |||||
vectorsize = __vs; | |||||
samplerate = __sr; | |||||
m_smth_1 = 0; | |||||
m_y_2 = 0; | |||||
m_smth_3 = 0; | |||||
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_depth_9 = 1; | |||||
m_time_10 = 500; | |||||
m_morph_11 = 50; | |||||
m_tone_12 = 3000; | |||||
m_dcblock_13.reset(); | |||||
m_cycle_14.reset(samplerate, 0); | |||||
genlib_reset_complete(this); | |||||
}; | |||||
// the signal processing routine; | |||||
inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { | |||||
vectorsize = __n; | |||||
const t_sample * __in1 = __ins[0]; | |||||
t_sample * __out1 = __outs[0]; | |||||
if (__exception) { | |||||
return __exception; | |||||
} else if (( (__in1 == 0) || (__out1 == 0) )) { | |||||
__exception = GENLIB_ERR_NULL_BUFFER; | |||||
return __exception; | |||||
}; | |||||
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; | |||||
while ((__n--)) { | |||||
const double in1 = (*(__in1++)); | |||||
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); | |||||
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_5.step(); | |||||
// assign results to output buffer; | |||||
(*(__out1++)) = out1; | |||||
}; | |||||
return __exception; | |||||
}; | |||||
inline void set_repeats(double _value) { | |||||
m_repeats_6 = (_value < 0 ? 0 : (_value > 110 ? 110 : _value)); | |||||
}; | |||||
inline void set_mix(double _value) { | |||||
m_mix_7 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_rate(double _value) { | |||||
m_rate_8 = (_value < 0.1 ? 0.1 : (_value > 5 ? 5 : _value)); | |||||
}; | |||||
inline void set_depth(double _value) { | |||||
m_depth_9 = (_value < 0.1 ? 0.1 : (_value > 3 ? 3 : _value)); | |||||
}; | |||||
inline void set_time(double _value) { | |||||
m_time_10 = (_value < 20 ? 20 : (_value > 1000 ? 1000 : _value)); | |||||
}; | |||||
inline void set_morph(double _value) { | |||||
m_morph_11 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_tone(double _value) { | |||||
m_tone_12 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value)); | |||||
}; | |||||
} State; | |||||
/// | |||||
/// Configuration for the genlib API | |||||
/// | |||||
/// Number of signal inputs and outputs | |||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 1; | |||||
int num_inputs() { return gen_kernel_numins; } | |||||
int num_outputs() { return gen_kernel_numouts; } | |||||
int num_params() { return 7; } | |||||
/// Assistive lables for the signal inputs and outputs | |||||
const char * gen_kernel_innames[] = { "in1" }; | |||||
const char * gen_kernel_outnames[] = { "out1" }; | |||||
/// Invoke the signal process of a State object | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n) { | |||||
State * self = (State *)cself; | |||||
return self->perform(ins, outs, n); | |||||
} | |||||
/// Reset all parameters and stateful operators of a State object | |||||
void reset(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
self->reset(cself->sr, cself->vs); | |||||
} | |||||
/// Set a parameter of a State object | |||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
State * self = (State *)cself; | |||||
switch (index) { | |||||
case 0: self->set_repeats(value); break; | |||||
case 1: self->set_mix(value); break; | |||||
case 2: self->set_rate(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; | |||||
} | |||||
} | |||||
/// Get the value of a parameter of a State object | |||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
State *self = (State *)cself; | |||||
switch (index) { | |||||
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 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; | |||||
} | |||||
} | |||||
/// Allocate and configure a new State object and it's internal CommonState: | |||||
void * create(double sr, long vs) { | |||||
State *self = new State; | |||||
self->reset(sr, vs); | |||||
ParamInfo *pi; | |||||
self->__commonstate.inputnames = gen_kernel_innames; | |||||
self->__commonstate.outputnames = gen_kernel_outnames; | |||||
self->__commonstate.numins = gen_kernel_numins; | |||||
self->__commonstate.numouts = gen_kernel_numouts; | |||||
self->__commonstate.sr = sr; | |||||
self->__commonstate.vs = vs; | |||||
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo)); | |||||
self->__commonstate.numparams = 7; | |||||
// initialize parameter 0 ("m_repeats_6") | |||||
pi = self->__commonstate.params + 0; | |||||
pi->name = "repeats"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_repeats_6; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 110; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 1 ("m_mix_7") | |||||
pi = self->__commonstate.params + 1; | |||||
pi->name = "mix"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_mix_7; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 2 ("m_rate_8") | |||||
pi = self->__commonstate.params + 2; | |||||
pi->name = "rate"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_rate_8; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 5; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 3 ("m_depth_9") | |||||
pi = self->__commonstate.params + 3; | |||||
pi->name = "depth"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_depth_9; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 3; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 4 ("m_time_10") | |||||
pi = self->__commonstate.params + 4; | |||||
pi->name = "time"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_time_10; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 20; | |||||
pi->outputmax = 1000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 5 ("m_morph_11") | |||||
pi = self->__commonstate.params + 5; | |||||
pi->name = "morph"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_morph_11; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 6 ("m_tone_12") | |||||
pi = self->__commonstate.params + 6; | |||||
pi->name = "tone"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_tone_12; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 500; | |||||
pi->outputmax = 6000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
return self; | |||||
} | |||||
/// Release all resources and memory used by a State object: | |||||
void destroy(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
genlib_sysmem_freeptr(cself->params); | |||||
delete self; | |||||
} | |||||
} // gen_exported:: |
@@ -1,37 +0,0 @@ | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
#include "genlib.h" | |||||
#include "genlib_exportfunctions.h" | |||||
#include "genlib_ops.h" | |||||
namespace gen_exported { | |||||
int num_inputs(); | |||||
int num_outputs(); | |||||
int num_params(); | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | |||||
void reset(CommonState *cself); | |||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void destroy(CommonState *cself); | |||||
} // gen_exported:: |
@@ -1,35 +0,0 @@ | |||||
/* | |||||
* Copyright (C) 2015 Nino de Wit <ninodig@hotmail.com> | |||||
* | |||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | |||||
* or without fee is hereby granted, provided that the above copyright notice and this | |||||
* permission notice appear in all copies. | |||||
* | |||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||||
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||||
*/ | |||||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_BRAND "SHIRO" | |||||
#define DISTRHO_PLUGIN_NAME "Pitchotto" | |||||
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Pitchotto" | |||||
#define DISTRHO_PLUGIN_HAS_UI 0 | |||||
#define DISTRHO_PLUGIN_IS_RT_SAFE 0 | |||||
#define DISTRHO_PLUGIN_NUM_INPUTS 1 | |||||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1 | |||||
#define DISTRHO_PLUGIN_USES_MODGUI 1 | |||||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:PitchPlugin" | |||||
#define DISTRHO_PLUGIN_DESCRIPTION "Pitchotto is a pitch-shifter based on the \"Pitch-Shift\"-genpatch in Max, where Phase-shifting is used to achieve different intervals.\n\ | |||||
There are two shifted signals available, both with variable delay-lengths for arpeggio-like sounds." | |||||
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 'p', 'c') | |||||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -1 +0,0 @@ | |||||
../common/DistrhoPluginMaxGen.cpp |
@@ -1,40 +0,0 @@ | |||||
#!/usr/bin/make -f | |||||
# Makefile for DISTRHO Plugins # | |||||
# ---------------------------- # | |||||
# Created by falkTX | |||||
# | |||||
# -------------------------------------------------------------- | |||||
# Project name, used for binaries | |||||
NAME = Pitchotto | |||||
# -------------------------------------------------------------- | |||||
# Files to build | |||||
OBJS_DSP = \ | |||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
# -------------------------------------------------------------- | |||||
# Do some magic | |||||
include ../Makefile.mk | |||||
# -------------------------------------------------------------- | |||||
# Enable all possible plugin types | |||||
ifeq ($(HAVE_JACK),true) | |||||
TARGETS += jack | |||||
endif | |||||
ifeq ($(LINUX),true) | |||||
TARGETS += ladspa | |||||
endif | |||||
TARGETS += lv2_dsp | |||||
TARGETS += vst | |||||
all: $(TARGETS) | |||||
# -------------------------------------------------------------- |
@@ -1,536 +0,0 @@ | |||||
#include "gen_exported.h" | |||||
namespace gen_exported { | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
// global noise generator | |||||
Noise noise; | |||||
static const int GENLIB_LOOPCOUNT_BAIL = 100000; | |||||
// The State struct contains all the state and procedures for the gendsp kernel | |||||
typedef struct State { | |||||
CommonState __commonstate; | |||||
Delay m_delay_10; | |||||
Delay m_delay_11; | |||||
Delta m_delta_29; | |||||
Delta m_delta_26; | |||||
Delta m_delta_23; | |||||
Delta m_delta_33; | |||||
Delta m_delta_36; | |||||
Delta m_delta_20; | |||||
Delta m_delta_39; | |||||
Delta m_delta_42; | |||||
Phasor m_phasor_32; | |||||
Phasor m_phasor_19; | |||||
Sah m_sah_25; | |||||
Sah m_sah_35; | |||||
Sah m_sah_24; | |||||
Sah m_sah_27; | |||||
Sah m_sah_28; | |||||
Sah m_sah_41; | |||||
Sah m_sah_30; | |||||
Sah m_sah_34; | |||||
Sah m_sah_37; | |||||
Sah m_sah_38; | |||||
Sah m_sah_31; | |||||
Sah m_sah_40; | |||||
Sah m_sah_22; | |||||
Sah m_sah_44; | |||||
Sah m_sah_43; | |||||
Sah m_sah_21; | |||||
double m_y_1; | |||||
double m_history_5; | |||||
double m_history_6; | |||||
double samplerate; | |||||
double m_history_4; | |||||
double m_history_2; | |||||
double m_history_7; | |||||
double m_history_3; | |||||
double m_history_8; | |||||
double m_ratio_12; | |||||
double m_history_9; | |||||
double m_delay_18; | |||||
double samples_to_seconds; | |||||
double m_cutoff_16; | |||||
double m_blur_17; | |||||
double m_delay_14; | |||||
double m_mix_13; | |||||
double m_ratio_15; | |||||
int vectorsize; | |||||
int __exception; | |||||
// re-initialize all member variables; | |||||
inline void reset(double __sr, int __vs) { | |||||
__exception = 0; | |||||
vectorsize = __vs; | |||||
samplerate = __sr; | |||||
m_y_1 = 0; | |||||
m_history_2 = 0; | |||||
m_history_3 = 0; | |||||
m_history_4 = 0; | |||||
m_history_5 = 0; | |||||
m_history_6 = 0; | |||||
m_history_7 = 0; | |||||
m_history_8 = 0; | |||||
m_history_9 = 0; | |||||
m_delay_10.reset("m_delay_10", 96000); | |||||
m_delay_11.reset("m_delay_11", 96000); | |||||
m_ratio_12 = 2; | |||||
m_mix_13 = 0.5; | |||||
m_delay_14 = 100; | |||||
m_ratio_15 = 0.5; | |||||
m_cutoff_16 = 2250; | |||||
m_blur_17 = 0.25; | |||||
m_delay_18 = 100; | |||||
samples_to_seconds = (1 / samplerate); | |||||
m_phasor_19.reset(0); | |||||
m_delta_20.reset(0); | |||||
m_sah_21.reset(0); | |||||
m_sah_22.reset(0); | |||||
m_delta_23.reset(0); | |||||
m_sah_24.reset(0); | |||||
m_sah_25.reset(0); | |||||
m_delta_26.reset(0); | |||||
m_sah_27.reset(0); | |||||
m_sah_28.reset(0); | |||||
m_delta_29.reset(0); | |||||
m_sah_30.reset(0); | |||||
m_sah_31.reset(0); | |||||
m_phasor_32.reset(0); | |||||
m_delta_33.reset(0); | |||||
m_sah_34.reset(0); | |||||
m_sah_35.reset(0); | |||||
m_delta_36.reset(0); | |||||
m_sah_37.reset(0); | |||||
m_sah_38.reset(0); | |||||
m_delta_39.reset(0); | |||||
m_sah_40.reset(0); | |||||
m_sah_41.reset(0); | |||||
m_delta_42.reset(0); | |||||
m_sah_43.reset(0); | |||||
m_sah_44.reset(0); | |||||
genlib_reset_complete(this); | |||||
}; | |||||
// the signal processing routine; | |||||
inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { | |||||
vectorsize = __n; | |||||
const t_sample * __in1 = __ins[0]; | |||||
t_sample * __out1 = __outs[0]; | |||||
if (__exception) { | |||||
return __exception; | |||||
} else if (( (__in1 == 0) || (__out1 == 0) )) { | |||||
__exception = GENLIB_ERR_NULL_BUFFER; | |||||
return __exception; | |||||
}; | |||||
double expr_5155 = safediv(((m_cutoff_16 * 2) * 3.1415926535898), 44100); | |||||
double sin_5012 = sin(expr_5155); | |||||
double clamp_5013 = ((sin_5012 <= 1e-05) ? 1e-05 : ((sin_5012 >= 0.99999) ? 0.99999 : sin_5012)); | |||||
double mstosamps_5148 = (m_delay_14 * (samplerate * 0.001)); | |||||
double mstosamps_5077 = (m_delay_18 * (samplerate * 0.001)); | |||||
double rsub_5064 = (1 - m_ratio_12); | |||||
double mul_5063 = (rsub_5064 * 1000); | |||||
double div_5062 = safediv(mul_5063, m_delay_18); | |||||
samples_to_seconds = (1 / samplerate); | |||||
double rsub_5135 = (1 - m_ratio_15); | |||||
double mul_5134 = (rsub_5135 * 1000); | |||||
double div_5133 = safediv(mul_5134, m_delay_14); | |||||
// the main sample loop; | |||||
while ((__n--)) { | |||||
const double in1 = (*(__in1++)); | |||||
double noise_5014 = noise(); | |||||
double abs_5031 = fabs(noise_5014); | |||||
double mul_5035 = (abs_5031 * m_blur_17); | |||||
double noise_5086 = noise(); | |||||
double abs_5104 = fabs(noise_5086); | |||||
double mul_5112 = (abs_5104 * m_blur_17); | |||||
double noise_5015 = noise(); | |||||
double abs_5032 = fabs(noise_5015); | |||||
double mul_5038 = (abs_5032 * m_blur_17); | |||||
double noise_5084 = noise(); | |||||
double abs_5102 = fabs(noise_5084); | |||||
double mul_5106 = (abs_5102 * m_blur_17); | |||||
double noise_5017 = noise(); | |||||
double abs_5034 = fabs(noise_5017); | |||||
double mul_5044 = (abs_5034 * m_blur_17); | |||||
double noise_5087 = noise(); | |||||
double abs_5105 = fabs(noise_5087); | |||||
double mul_5115 = (abs_5105 * m_blur_17); | |||||
double noise_5016 = noise(); | |||||
double abs_5033 = fabs(noise_5016); | |||||
double mul_5041 = (abs_5033 * m_blur_17); | |||||
double noise_5085 = noise(); | |||||
double abs_5103 = fabs(noise_5085); | |||||
double mul_5109 = (abs_5103 * m_blur_17); | |||||
double phasor_5083 = m_phasor_19(div_5062, samples_to_seconds); | |||||
double add_5055 = ((phasor_5083 + m_history_9) + 0.75); | |||||
double mod_5054 = safemod(add_5055, 1); | |||||
double delta_5037 = m_delta_20(mod_5054); | |||||
double sah_5018 = m_sah_21(mul_5035, delta_5037, 0); | |||||
double sah_5036 = m_sah_22(mstosamps_5077, delta_5037, 0); | |||||
double mul_5027 = (sah_5036 * mod_5054); | |||||
double sub_5053 = (mod_5054 - 0.5); | |||||
double mul_5052 = (sub_5053 * 3.1415926535898); | |||||
double cos_5051 = cos(mul_5052); | |||||
double mul_5046 = (cos_5051 * cos_5051); | |||||
double add_5061 = ((phasor_5083 + m_history_8) + 0.5); | |||||
double mod_5060 = safemod(add_5061, 1); | |||||
double delta_5040 = m_delta_23(mod_5060); | |||||
double sah_5020 = m_sah_24(mul_5038, delta_5040, 0); | |||||
double sah_5039 = m_sah_25(mstosamps_5077, delta_5040, 0); | |||||
double mul_5028 = (sah_5039 * mod_5060); | |||||
double sub_5059 = (mod_5060 - 0.5); | |||||
double mul_5058 = (sub_5059 * 3.1415926535898); | |||||
double cos_5057 = cos(mul_5058); | |||||
double mul_5047 = (cos_5057 * cos_5057); | |||||
double add_5082 = ((phasor_5083 + m_history_7) + 0); | |||||
double mod_5081 = safemod(add_5082, 1); | |||||
double delta_5025 = m_delta_26(mod_5081); | |||||
double sah_5024 = m_sah_27(mul_5044, delta_5025, 0); | |||||
double sah_5045 = m_sah_28(mstosamps_5077, delta_5025, 0); | |||||
double mul_5030 = (sah_5045 * mod_5081); | |||||
double sub_5080 = (mod_5081 - 0.5); | |||||
double mul_5079 = (sub_5080 * 3.1415926535898); | |||||
double cos_5078 = cos(mul_5079); | |||||
double mul_5049 = (cos_5078 * cos_5078); | |||||
double add_5076 = ((phasor_5083 + m_history_6) + 0.25); | |||||
double mod_5075 = safemod(add_5076, 1); | |||||
double delta_5043 = m_delta_29(mod_5075); | |||||
double sah_5022 = m_sah_30(mul_5041, delta_5043, 0); | |||||
double sah_5042 = m_sah_31(mstosamps_5077, delta_5043, 0); | |||||
double mul_5029 = (sah_5042 * mod_5075); | |||||
double tap_5068 = m_delay_11.read_linear(mul_5030); | |||||
double tap_5069 = m_delay_11.read_linear(mul_5029); | |||||
double tap_5070 = m_delay_11.read_linear(mul_5028); | |||||
double tap_5071 = m_delay_11.read_linear(mul_5027); | |||||
double mul_5050 = (tap_5071 * mul_5046); | |||||
double mul_5056 = (tap_5070 * mul_5047); | |||||
double mul_5066 = (tap_5068 * mul_5049); | |||||
double sub_5074 = (mod_5075 - 0.5); | |||||
double mul_5073 = (sub_5074 * 3.1415926535898); | |||||
double cos_5072 = cos(mul_5073); | |||||
double mul_5048 = (cos_5072 * cos_5072); | |||||
double mul_5065 = (tap_5069 * mul_5048); | |||||
double phasor_5154 = m_phasor_32(div_5133, samples_to_seconds); | |||||
double add_5147 = ((m_history_5 + phasor_5154) + 0.25); | |||||
double mod_5146 = safemod(add_5147, 1); | |||||
double delta_5114 = m_delta_33(mod_5146); | |||||
double sah_5092 = m_sah_34(mul_5112, delta_5114, 0); | |||||
double sah_5113 = m_sah_35(mstosamps_5148, delta_5114, 0); | |||||
double mul_5100 = (sah_5113 * mod_5146); | |||||
double sub_5145 = (mod_5146 - 0.5); | |||||
double mul_5144 = (sub_5145 * 3.1415926535898); | |||||
double cos_5143 = cos(mul_5144); | |||||
double mul_5119 = (cos_5143 * cos_5143); | |||||
double add_5126 = ((m_history_4 + phasor_5154) + 0.75); | |||||
double mod_5125 = safemod(add_5126, 1); | |||||
double delta_5108 = m_delta_36(mod_5125); | |||||
double sah_5088 = m_sah_37(mul_5106, delta_5108, 0); | |||||
double sah_5107 = m_sah_38(mstosamps_5148, delta_5108, 0); | |||||
double mul_5098 = (sah_5107 * mod_5125); | |||||
double sub_5124 = (mod_5125 - 0.5); | |||||
double mul_5123 = (sub_5124 * 3.1415926535898); | |||||
double cos_5122 = cos(mul_5123); | |||||
double mul_5117 = (cos_5122 * cos_5122); | |||||
double add_5153 = ((m_history_3 + phasor_5154) + 0); | |||||
double mod_5152 = safemod(add_5153, 1); | |||||
double delta_5095 = m_delta_39(mod_5152); | |||||
double sah_5094 = m_sah_40(mul_5115, delta_5095, 0); | |||||
double sah_5116 = m_sah_41(mstosamps_5148, delta_5095, 0); | |||||
double mul_5101 = (sah_5116 * mod_5152); | |||||
double sub_5151 = (mod_5152 - 0.5); | |||||
double mul_5150 = (sub_5151 * 3.1415926535898); | |||||
double cos_5149 = cos(mul_5150); | |||||
double mul_5120 = (cos_5149 * cos_5149); | |||||
double add_5132 = ((m_history_2 + phasor_5154) + 0.5); | |||||
double mod_5131 = safemod(add_5132, 1); | |||||
double delta_5111 = m_delta_42(mod_5131); | |||||
double sah_5090 = m_sah_43(mul_5109, delta_5111, 0); | |||||
double sah_5110 = m_sah_44(mstosamps_5148, delta_5111, 0); | |||||
double mul_5099 = (sah_5110 * mod_5131); | |||||
double tap_5139 = m_delay_10.read_linear(mul_5101); | |||||
double tap_5140 = m_delay_10.read_linear(mul_5100); | |||||
double tap_5141 = m_delay_10.read_linear(mul_5099); | |||||
double tap_5142 = m_delay_10.read_linear(mul_5098); | |||||
double mul_5137 = (tap_5139 * mul_5120); | |||||
double mul_5136 = (tap_5140 * mul_5119); | |||||
double mul_5121 = (tap_5142 * mul_5117); | |||||
double sub_5130 = (mod_5131 - 0.5); | |||||
double mul_5129 = (sub_5130 * 3.1415926535898); | |||||
double cos_5128 = cos(mul_5129); | |||||
double mul_5118 = (cos_5128 * cos_5128); | |||||
double mul_5127 = (tap_5141 * mul_5118); | |||||
double add_5174 = (((((((mul_5066 + mul_5065) + mul_5056) + mul_5050) + mul_5121) + mul_5127) + mul_5136) + mul_5137); | |||||
double mix_5173 = (m_y_1 + (clamp_5013 * (add_5174 - m_y_1))); | |||||
double mix_5010 = mix_5173; | |||||
double mix_5175 = (in1 + (m_mix_13 * (mix_5010 - in1))); | |||||
double out1 = mix_5175; | |||||
double history_5019_next_5156 = sah_5018; | |||||
double history_5021_next_5157 = sah_5020; | |||||
double history_5026_next_5158 = sah_5024; | |||||
double history_5023_next_5159 = sah_5022; | |||||
double history_5093_next_5160 = sah_5092; | |||||
double history_5089_next_5161 = sah_5088; | |||||
double history_5096_next_5162 = sah_5094; | |||||
double history_5091_next_5163 = sah_5090; | |||||
double y0_next_5164 = mix_5010; | |||||
m_delay_11.write(in1); | |||||
m_delay_10.write(in1); | |||||
m_history_9 = history_5019_next_5156; | |||||
m_history_8 = history_5021_next_5157; | |||||
m_history_7 = history_5026_next_5158; | |||||
m_history_6 = history_5023_next_5159; | |||||
m_history_5 = history_5093_next_5160; | |||||
m_history_4 = history_5089_next_5161; | |||||
m_history_3 = history_5096_next_5162; | |||||
m_history_2 = history_5091_next_5163; | |||||
m_y_1 = y0_next_5164; | |||||
m_delay_10.step(); | |||||
m_delay_11.step(); | |||||
// assign results to output buffer; | |||||
(*(__out1++)) = out1; | |||||
}; | |||||
return __exception; | |||||
}; | |||||
inline void set_ratio2(double _value) { | |||||
m_ratio_12 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value)); | |||||
}; | |||||
inline void set_mix(double _value) { | |||||
m_mix_13 = (_value < 0 ? 0 : (_value > 1 ? 1 : _value)); | |||||
}; | |||||
inline void set_delay1(double _value) { | |||||
m_delay_14 = (_value < 0.1 ? 0.1 : (_value > 1000 ? 1000 : _value)); | |||||
}; | |||||
inline void set_ratio1(double _value) { | |||||
m_ratio_15 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value)); | |||||
}; | |||||
inline void set_cutoff(double _value) { | |||||
m_cutoff_16 = (_value < 0 ? 0 : (_value > 3000 ? 3000 : _value)); | |||||
}; | |||||
inline void set_blur(double _value) { | |||||
m_blur_17 = (_value < 0.01 ? 0.01 : (_value > 0.25 ? 0.25 : _value)); | |||||
}; | |||||
inline void set_delay2(double _value) { | |||||
m_delay_18 = (_value < 0.1 ? 0.1 : (_value > 1000 ? 1000 : _value)); | |||||
}; | |||||
} State; | |||||
/// | |||||
/// Configuration for the genlib API | |||||
/// | |||||
/// Number of signal inputs and outputs | |||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 1; | |||||
int num_inputs() { return gen_kernel_numins; } | |||||
int num_outputs() { return gen_kernel_numouts; } | |||||
int num_params() { return 7; } | |||||
/// Assistive lables for the signal inputs and outputs | |||||
const char * gen_kernel_innames[] = { "in1" }; | |||||
const char * gen_kernel_outnames[] = { "out1" }; | |||||
/// Invoke the signal process of a State object | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n) { | |||||
State * self = (State *)cself; | |||||
return self->perform(ins, outs, n); | |||||
} | |||||
/// Reset all parameters and stateful operators of a State object | |||||
void reset(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
self->reset(cself->sr, cself->vs); | |||||
} | |||||
/// Set a parameter of a State object | |||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
State * self = (State *)cself; | |||||
switch (index) { | |||||
case 0: self->set_ratio2(value); break; | |||||
case 1: self->set_mix(value); break; | |||||
case 2: self->set_delay1(value); break; | |||||
case 3: self->set_ratio1(value); break; | |||||
case 4: self->set_cutoff(value); break; | |||||
case 5: self->set_blur(value); break; | |||||
case 6: self->set_delay2(value); break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Get the value of a parameter of a State object | |||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
State *self = (State *)cself; | |||||
switch (index) { | |||||
case 0: *value = self->m_ratio_12; break; | |||||
case 1: *value = self->m_mix_13; break; | |||||
case 2: *value = self->m_delay_14; break; | |||||
case 3: *value = self->m_ratio_15; break; | |||||
case 4: *value = self->m_cutoff_16; break; | |||||
case 5: *value = self->m_blur_17; break; | |||||
case 6: *value = self->m_delay_18; break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Allocate and configure a new State object and it's internal CommonState: | |||||
void * create(double sr, long vs) { | |||||
State *self = new State; | |||||
self->reset(sr, vs); | |||||
ParamInfo *pi; | |||||
self->__commonstate.inputnames = gen_kernel_innames; | |||||
self->__commonstate.outputnames = gen_kernel_outnames; | |||||
self->__commonstate.numins = gen_kernel_numins; | |||||
self->__commonstate.numouts = gen_kernel_numouts; | |||||
self->__commonstate.sr = sr; | |||||
self->__commonstate.vs = vs; | |||||
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(7 * sizeof(ParamInfo)); | |||||
self->__commonstate.numparams = 7; | |||||
// initialize parameter 0 ("m_ratio_12") | |||||
pi = self->__commonstate.params + 0; | |||||
pi->name = "ratio2"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_ratio_12; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.5; | |||||
pi->outputmax = 2; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 1 ("m_mix_13") | |||||
pi = self->__commonstate.params + 1; | |||||
pi->name = "mix"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_mix_13; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 1; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 2 ("m_delay_14") | |||||
pi = self->__commonstate.params + 2; | |||||
pi->name = "delay1"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_delay_14; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 1000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 3 ("m_ratio_15") | |||||
pi = self->__commonstate.params + 3; | |||||
pi->name = "ratio1"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_ratio_15; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.5; | |||||
pi->outputmax = 2; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 4 ("m_cutoff_16") | |||||
pi = self->__commonstate.params + 4; | |||||
pi->name = "cutoff"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_cutoff_16; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 3000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 5 ("m_blur_17") | |||||
pi = self->__commonstate.params + 5; | |||||
pi->name = "blur"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_blur_17; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.01; | |||||
pi->outputmax = 0.25; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 6 ("m_delay_18") | |||||
pi = self->__commonstate.params + 6; | |||||
pi->name = "delay2"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_delay_18; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.1; | |||||
pi->outputmax = 1000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
return self; | |||||
} | |||||
/// Release all resources and memory used by a State object: | |||||
void destroy(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
genlib_sysmem_freeptr(cself->params); | |||||
delete self; | |||||
} | |||||
} // gen_exported:: |
@@ -1,37 +0,0 @@ | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
#include "genlib.h" | |||||
#include "genlib_exportfunctions.h" | |||||
#include "genlib_ops.h" | |||||
namespace gen_exported { | |||||
int num_inputs(); | |||||
int num_outputs(); | |||||
int num_params(); | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | |||||
void reset(CommonState *cself); | |||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void destroy(CommonState *cself); | |||||
} // gen_exported:: |
@@ -1,34 +0,0 @@ | |||||
/* | |||||
* Copyright (C) 2015 Nino de Wit <ninodig@hotmail.com> | |||||
* | |||||
* Permission to use, copy, modify, and/or distribute this software for any purpose with | |||||
* or without fee is hereby granted, provided that the above copyright notice and this | |||||
* permission notice appear in all copies. | |||||
* | |||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD | |||||
* TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN | |||||
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL | |||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | |||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |||||
*/ | |||||
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_INFO_H_INCLUDED | |||||
#define DISTRHO_PLUGIN_BRAND "SHIRO" | |||||
#define DISTRHO_PLUGIN_NAME "Shiroverb" | |||||
#define DISTRHO_PLUGIN_URI "https://github.com/ninodewit/SHIRO-Plugins" | |||||
#define DISTRHO_PLUGIN_HAS_UI 0 | |||||
#define DISTRHO_PLUGIN_IS_RT_SAFE 0 | |||||
#define DISTRHO_PLUGIN_NUM_INPUTS 1 | |||||
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2 | |||||
#define DISTRHO_PLUGIN_USES_MODGUI 1 | |||||
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin" | |||||
#define DISTRHO_PLUGIN_DESCRIPTION "Shiroverb is a shimmer-reverb based on the \"Gigaverb\"-genpatch, ported from the implementation by Juhana Sadeharju, and the \"Pitch-Shift\"-genpatch, both in Max MSP." | |||||
#define DISTRHO_PLUGIN_VERSION d_cconst('D', 'M', 's', 'v') | |||||
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED |
@@ -1 +0,0 @@ | |||||
../common/DistrhoPluginMaxGen.cpp |
@@ -1,40 +0,0 @@ | |||||
#!/usr/bin/make -f | |||||
# Makefile for DISTRHO Plugins # | |||||
# ---------------------------- # | |||||
# Created by falkTX | |||||
# | |||||
# -------------------------------------------------------------- | |||||
# Project name, used for binaries | |||||
NAME = Shiroverb | |||||
# -------------------------------------------------------------- | |||||
# Files to build | |||||
OBJS_DSP = \ | |||||
DistrhoPluginMaxGen.cpp.o \ | |||||
gen_exported.cpp.o | |||||
# -------------------------------------------------------------- | |||||
# Do some magic | |||||
include ../Makefile.mk | |||||
# -------------------------------------------------------------- | |||||
# Enable all possible plugin types | |||||
ifeq ($(HAVE_JACK),true) | |||||
TARGETS += jack | |||||
endif | |||||
ifeq ($(LINUX),true) | |||||
TARGETS += ladspa | |||||
endif | |||||
TARGETS += lv2_dsp | |||||
TARGETS += vst | |||||
all: $(TARGETS) | |||||
# -------------------------------------------------------------- |
@@ -1,656 +0,0 @@ | |||||
#include "gen_exported.h" | |||||
namespace gen_exported { | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
// global noise generator | |||||
Noise noise; | |||||
static const int GENLIB_LOOPCOUNT_BAIL = 100000; | |||||
// The State struct contains all the state and procedures for the gendsp kernel | |||||
typedef struct State { | |||||
CommonState __commonstate; | |||||
Delay m_delay_21; | |||||
Delay m_delay_13; | |||||
Delay m_delay_14; | |||||
Delay m_delay_12; | |||||
Delay m_delay_11; | |||||
Delay m_delay_23; | |||||
Delay m_delay_15; | |||||
Delay m_delay_17; | |||||
Delay m_delay_16; | |||||
Delay m_delay_19; | |||||
Delay m_delay_18; | |||||
Delay m_delay_20; | |||||
Delay m_delay_22; | |||||
Delta m_delta_39; | |||||
Delta m_delta_36; | |||||
Delta m_delta_42; | |||||
Delta m_delta_33; | |||||
Phasor m_phasor_32; | |||||
Sah m_sah_37; | |||||
Sah m_sah_35; | |||||
Sah m_sah_38; | |||||
Sah m_sah_41; | |||||
Sah m_sah_40; | |||||
Sah m_sah_34; | |||||
Sah m_sah_44; | |||||
Sah m_sah_43; | |||||
double m_history_5; | |||||
double m_history_6; | |||||
double m_history_7; | |||||
double m_history_10; | |||||
double m_history_4; | |||||
double m_y_2; | |||||
double m_history_3; | |||||
double samplerate; | |||||
double m_history_1; | |||||
double m_history_9; | |||||
double m_history_8; | |||||
double m_tone_31; | |||||
double samples_to_seconds; | |||||
double m_decay_25; | |||||
double m_shimmer_24; | |||||
double m_mix_27; | |||||
double m_damping_26; | |||||
double m_roomsize_29; | |||||
double m_bandwidth_30; | |||||
double m_ratio_28; | |||||
int vectorsize; | |||||
int __exception; | |||||
// re-initialize all member variables; | |||||
inline void reset(double __sr, int __vs) { | |||||
__exception = 0; | |||||
vectorsize = __vs; | |||||
samplerate = __sr; | |||||
m_history_1 = 0; | |||||
m_y_2 = 0; | |||||
m_history_3 = 0; | |||||
m_history_4 = 0; | |||||
m_history_5 = 0; | |||||
m_history_6 = 0; | |||||
m_history_7 = 0; | |||||
m_history_8 = 0; | |||||
m_history_9 = 0; | |||||
m_history_10 = 0; | |||||
m_delay_11.reset("m_delay_11", 5000); | |||||
m_delay_12.reset("m_delay_12", 7000); | |||||
m_delay_13.reset("m_delay_13", 6000); | |||||
m_delay_14.reset("m_delay_14", 48000); | |||||
m_delay_15.reset("m_delay_15", 15000); | |||||
m_delay_16.reset("m_delay_16", 16000); | |||||
m_delay_17.reset("m_delay_17", 96000); | |||||
m_delay_18.reset("m_delay_18", 10000); | |||||
m_delay_19.reset("m_delay_19", 12000); | |||||
m_delay_20.reset("m_delay_20", 48000); | |||||
m_delay_21.reset("m_delay_21", 48000); | |||||
m_delay_22.reset("m_delay_22", 48000); | |||||
m_delay_23.reset("m_delay_23", 48000); | |||||
m_shimmer_24 = 50; | |||||
m_decay_25 = 50; | |||||
m_damping_26 = 50; | |||||
m_mix_27 = 50; | |||||
m_ratio_28 = 2; | |||||
m_roomsize_29 = 150; | |||||
m_bandwidth_30 = 75; | |||||
m_tone_31 = 1500; | |||||
samples_to_seconds = (1 / samplerate); | |||||
m_phasor_32.reset(0); | |||||
m_delta_33.reset(0); | |||||
m_sah_34.reset(0); | |||||
m_sah_35.reset(0); | |||||
m_delta_36.reset(0); | |||||
m_sah_37.reset(0); | |||||
m_sah_38.reset(0); | |||||
m_delta_39.reset(0); | |||||
m_sah_40.reset(0); | |||||
m_sah_41.reset(0); | |||||
m_delta_42.reset(0); | |||||
m_sah_43.reset(0); | |||||
m_sah_44.reset(0); | |||||
genlib_reset_complete(this); | |||||
}; | |||||
// the signal processing routine; | |||||
inline int perform(t_sample ** __ins, t_sample ** __outs, int __n) { | |||||
vectorsize = __n; | |||||
const t_sample * __in1 = __ins[0]; | |||||
t_sample * __out1 = __outs[0]; | |||||
t_sample * __out2 = __outs[1]; | |||||
if (__exception) { | |||||
return __exception; | |||||
} else if (( (__in1 == 0) || (__out1 == 0) || (__out2 == 0) )) { | |||||
__exception = GENLIB_ERR_NULL_BUFFER; | |||||
return __exception; | |||||
}; | |||||
double mul_10 = (m_damping_26 * 0.01); | |||||
double mul_11 = (m_mix_27 * 0.01); | |||||
double mul_9 = (m_bandwidth_30 * 0.01); | |||||
double rsub_8 = (1 - mul_9); | |||||
double expr_228 = safediv(((m_tone_31 * 2) * 3.1415926535898), 48000); | |||||
double sin_16 = sin(expr_228); | |||||
double clamp_17 = ((sin_16 <= 1e-05) ? 1e-05 : ((sin_16 >= 0.99999) ? 0.99999 : sin_16)); | |||||
double mul_12 = (m_shimmer_24 * 0.01); | |||||
double expr_238 = safediv((m_roomsize_29 * 48000), 340); | |||||
double mul_215 = (expr_238 * 0.63245); | |||||
double mul_216 = (expr_238 * 0.7071); | |||||
double mul_218 = (expr_238 * 1); | |||||
double mul_217 = (expr_238 * 0.81649); | |||||
double expr_227 = safepow(1.0418, m_decay_25); | |||||
double expr_237 = safepow(0.001, safediv(1, (expr_227 * 48000))); | |||||
double expr_229 = (-safepow(expr_237, mul_215)); | |||||
double expr_230 = (-safepow(expr_237, mul_216)); | |||||
double expr_236 = (-safepow(expr_237, mul_218)); | |||||
double expr_231 = (-safepow(expr_237, mul_217)); | |||||
double mul_212 = (expr_238 * 0.000527); | |||||
int int_211 = int(mul_212); | |||||
double mul_168 = (int_211 * 419.5); | |||||
double mul_189 = (int_211 * 400.600006); | |||||
double rsub_67 = (1 - m_ratio_28); | |||||
double mul_66 = (rsub_67 * 10); | |||||
samples_to_seconds = (1 / samplerate); | |||||
double add_155 = (expr_238 + 5); | |||||
double expr_232 = safepow(expr_237, add_155); | |||||
double mul_175 = (int_211 * 566.700012); | |||||
double mul_196 = (int_211 * 568.299988); | |||||
double mul_161 = (expr_238 * 0.41); | |||||
double add_158 = (mul_161 + 5); | |||||
double expr_235 = safepow(expr_237, add_158); | |||||
double mul_160 = (expr_238 * 0.3); | |||||
double add_157 = (mul_160 + 5); | |||||
double expr_234 = safepow(expr_237, add_157); | |||||
double mul_159 = (expr_238 * 0.155); | |||||
double add_156 = (mul_159 + 5); | |||||
double expr_233 = safepow(expr_237, add_156); | |||||
double mul_210 = (expr_238 * 0.110732); | |||||
double mul_182 = (int_211 * 144.800003); | |||||
double mul_203 = (int_211 * 162.100006); | |||||
double mul_6 = (m_decay_25 * 2); | |||||
double clamp_1 = ((mul_6 <= 0) ? 0 : ((mul_6 >= 100) ? 100 : mul_6)); | |||||
double mul_5 = (clamp_1 * 0.01); | |||||
double atodb_4 = atodb(mul_5); | |||||
double sub_3 = (atodb_4 - 9); | |||||
double dbtoa_2 = dbtoa(sub_3); | |||||
// the main sample loop; | |||||
while ((__n--)) { | |||||
const double in1 = (*(__in1++)); | |||||
double noise_20 = noise(); | |||||
double abs_37 = fabs(noise_20); | |||||
double mul_45 = (abs_37 * 0.25); | |||||
double noise_19 = noise(); | |||||
double abs_36 = fabs(noise_19); | |||||
double mul_42 = (abs_36 * 0.25); | |||||
double noise_21 = noise(); | |||||
double abs_38 = fabs(noise_21); | |||||
double mul_48 = (abs_38 * 0.25); | |||||
double noise_18 = noise(); | |||||
double abs_35 = fabs(noise_18); | |||||
double mul_39 = (abs_35 * 0.25); | |||||
double tap_129 = m_delay_23.read_linear(mul_215); | |||||
double tap_135 = m_delay_22.read_linear(mul_216); | |||||
double tap_223 = m_delay_21.read_linear(mul_218); | |||||
double tap_141 = m_delay_20.read_linear(mul_217); | |||||
double mul_125 = (tap_129 * expr_229); | |||||
double mix_249 = (mul_125 + (mul_10 * (m_history_10 - mul_125))); | |||||
double mix_127 = mix_249; | |||||
double mul_131 = (tap_135 * expr_230); | |||||
double mix_250 = (mul_131 + (mul_10 * (m_history_9 - mul_131))); | |||||
double mix_133 = mix_250; | |||||
double mul_214 = (tap_223 * expr_236); | |||||
double mix_251 = (mul_214 + (mul_10 * (m_history_8 - mul_214))); | |||||
double mix_221 = mix_251; | |||||
double mul_137 = (tap_141 * expr_231); | |||||
double mix_252 = (mul_137 + (mul_10 * (m_history_7 - mul_137))); | |||||
double mix_139 = mix_252; | |||||
double tap_167 = m_delay_19.read_linear(mul_168); | |||||
double mul_165 = (tap_167 * 0.625); | |||||
double tap_188 = m_delay_18.read_linear(mul_189); | |||||
double mul_186 = (tap_188 * 0.625); | |||||
double phasor_85 = m_phasor_32(mul_66, samples_to_seconds); | |||||
double add_79 = ((m_history_6 + phasor_85) + 0.25); | |||||
double mod_78 = safemod(add_79, 1); | |||||
double delta_47 = m_delta_33(mod_78); | |||||
double sah_26 = m_sah_34(mul_45, delta_47, 0); | |||||
int sah_46 = m_sah_35(4800, delta_47, 0); | |||||
double mul_33 = (sah_46 * mod_78); | |||||
double sub_77 = (mod_78 - 0.5); | |||||
double mul_76 = (sub_77 * 3.1415926535898); | |||||
double cos_75 = cos(mul_76); | |||||
double mul_52 = (cos_75 * cos_75); | |||||
double add_65 = ((m_history_5 + phasor_85) + 0.5); | |||||
double mod_64 = safemod(add_65, 1); | |||||
double delta_44 = m_delta_36(mod_64); | |||||
double sah_24 = m_sah_37(mul_42, delta_44, 0); | |||||
int sah_43 = m_sah_38(4800, delta_44, 0); | |||||
double mul_32 = (sah_43 * mod_64); | |||||
double sub_63 = (mod_64 - 0.5); | |||||
double mul_62 = (sub_63 * 3.1415926535898); | |||||
double cos_61 = cos(mul_62); | |||||
double mul_51 = (cos_61 * cos_61); | |||||
double add_84 = ((m_history_4 + phasor_85) + 0); | |||||
double mod_83 = safemod(add_84, 1); | |||||
double delta_29 = m_delta_39(mod_83); | |||||
double sah_28 = m_sah_40(mul_48, delta_29, 0); | |||||
int sah_49 = m_sah_41(4800, delta_29, 0); | |||||
double mul_34 = (sah_49 * mod_83); | |||||
double sub_82 = (mod_83 - 0.5); | |||||
double mul_81 = (sub_82 * 3.1415926535898); | |||||
double cos_80 = cos(mul_81); | |||||
double mul_53 = (cos_80 * cos_80); | |||||
double add_59 = ((m_history_3 + phasor_85) + 0.75); | |||||
double mod_58 = safemod(add_59, 1); | |||||
double delta_41 = m_delta_42(mod_58); | |||||
double sah_22 = m_sah_43(mul_39, delta_41, 0); | |||||
int sah_40 = m_sah_44(4800, delta_41, 0); | |||||
double mul_31 = (sah_40 * mod_58); | |||||
double tap_71 = m_delay_17.read_linear(mul_34); | |||||
double tap_72 = m_delay_17.read_linear(mul_33); | |||||
double tap_73 = m_delay_17.read_linear(mul_32); | |||||
double tap_74 = m_delay_17.read_linear(mul_31); | |||||
double mul_60 = (tap_73 * mul_51); | |||||
double mul_68 = (tap_72 * mul_52); | |||||
double mul_69 = (tap_71 * mul_53); | |||||
double sub_57 = (mod_58 - 0.5); | |||||
double mul_56 = (sub_57 * 3.1415926535898); | |||||
double cos_55 = cos(mul_56); | |||||
double mul_50 = (cos_55 * cos_55); | |||||
double mul_54 = (tap_74 * mul_50); | |||||
double add_254 = (((mul_69 + mul_68) + mul_60) + mul_54); | |||||
double mix_253 = (m_y_2 + (clamp_17 * (add_254 - m_y_2))); | |||||
double mix_14 = mix_253; | |||||
double mix_255 = (in1 + (mul_12 * (mix_14 - in1))); | |||||
double mix_86 = mix_255; | |||||
double mul_89 = (mix_86 * 0.707); | |||||
double mix_256 = (mul_89 + (rsub_8 * (m_history_1 - mul_89))); | |||||
double mix_225 = mix_256; | |||||
double add_119 = (mix_221 + mix_139); | |||||
double add_117 = (mix_133 + mix_127); | |||||
double add_112 = (add_119 + add_117); | |||||
double mul_95 = (add_112 * 0.5); | |||||
double sub_116 = (add_119 - add_117); | |||||
double mul_98 = (sub_116 * 0.5); | |||||
double tap_174 = m_delay_16.read_linear(mul_175); | |||||
double tap_195 = m_delay_15.read_linear(mul_196); | |||||
double sub_118 = (mix_221 - mix_139); | |||||
double sub_115 = (mix_133 - mix_127); | |||||
double sub_114 = (sub_118 - sub_115); | |||||
double mul_97 = (sub_114 * 0.5); | |||||
double add_113 = (sub_118 + sub_115); | |||||
double rsub_111 = (0 - add_113); | |||||
double mul_96 = (rsub_111 * 0.5); | |||||
double tap_143 = m_delay_14.read_linear(add_158); | |||||
double tap_144 = m_delay_14.read_linear(add_157); | |||||
double tap_145 = m_delay_14.read_linear(add_156); | |||||
double tap_146 = m_delay_14.read_linear(add_155); | |||||
double mul_147 = (tap_146 * expr_232); | |||||
double add_120 = (mul_95 + mul_147); | |||||
double mul_153 = (tap_143 * expr_235); | |||||
double add_123 = (mul_98 + mul_153); | |||||
double mul_151 = (tap_144 * expr_234); | |||||
double add_122 = (mul_97 + mul_151); | |||||
double mul_149 = (tap_145 * expr_233); | |||||
double add_121 = (mul_96 + mul_149); | |||||
double mul_172 = (tap_174 * 0.625); | |||||
double mul_193 = (tap_195 * 0.625); | |||||
double tap_209 = m_delay_13.read_cubic(mul_210); | |||||
double mul_207 = (tap_209 * 0.75); | |||||
double sub_206 = (mix_225 - mul_207); | |||||
double mul_205 = (sub_206 * 0.75); | |||||
double add_204 = (mul_205 + tap_209); | |||||
double tap_181 = m_delay_12.read_linear(mul_182); | |||||
double tap_202 = m_delay_11.read_linear(mul_203); | |||||
double mul_179 = (tap_181 * 0.75); | |||||
double mul_200 = (tap_202 * 0.75); | |||||
double mul_106 = (mul_153 * mul_5); | |||||
double mul_104 = (mul_149 * mul_5); | |||||
double add_92 = (mul_106 + mul_104); | |||||
double mul_105 = (mul_151 * mul_5); | |||||
double mul_103 = (mul_147 * mul_5); | |||||
double add_91 = (mul_105 + mul_103); | |||||
double sub_101 = (add_92 - add_91); | |||||
double mul_110 = (mul_98 * dbtoa_2); | |||||
double mul_108 = (mul_96 * dbtoa_2); | |||||
double add_94 = (mul_110 + mul_108); | |||||
double mul_109 = (mul_97 * dbtoa_2); | |||||
double mul_107 = (mul_95 * dbtoa_2); | |||||
double add_93 = (mul_109 + mul_107); | |||||
double sub_102 = (add_94 - add_93); | |||||
double add_88 = (sub_102 + sub_101); | |||||
double add_90 = (add_88 + mix_86); | |||||
double sub_178 = (add_90 - mul_179); | |||||
double mul_177 = (sub_178 * 0.75); | |||||
double add_176 = (mul_177 + tap_181); | |||||
double sub_171 = (add_176 - mul_172); | |||||
double mul_170 = (sub_171 * 0.625); | |||||
double add_169 = (mul_170 + tap_174); | |||||
double sub_164 = (add_169 - mul_165); | |||||
double mul_163 = (sub_164 * 0.625); | |||||
double add_162 = (mul_163 + tap_167); | |||||
double mul_87 = (add_162 * mul_11); | |||||
double out2 = (in1 + mul_87); | |||||
double add_100 = (add_88 + mix_86); | |||||
double sub_199 = (add_100 - mul_200); | |||||
double mul_198 = (sub_199 * 0.75); | |||||
double add_197 = (mul_198 + tap_202); | |||||
double sub_192 = (add_197 - mul_193); | |||||
double mul_191 = (sub_192 * 0.625); | |||||
double add_190 = (mul_191 + tap_195); | |||||
double sub_185 = (add_190 - mul_186); | |||||
double mul_184 = (sub_185 * 0.625); | |||||
double add_183 = (mul_184 + tap_188); | |||||
double mul_99 = (add_183 * mul_11); | |||||
double out1 = (in1 + mul_99); | |||||
double history_126_next_239 = mix_127; | |||||
double history_132_next_240 = mix_133; | |||||
double history_220_next_241 = mix_221; | |||||
double history_138_next_242 = mix_139; | |||||
double history_27_next_243 = sah_26; | |||||
double history_25_next_244 = sah_24; | |||||
double history_30_next_245 = sah_28; | |||||
double history_23_next_246 = sah_22; | |||||
double y0_next_247 = mix_14; | |||||
double history_224_next_248 = mix_225; | |||||
m_delay_23.write(add_120); | |||||
m_delay_22.write(add_121); | |||||
m_delay_21.write(add_123); | |||||
m_delay_20.write(add_122); | |||||
m_delay_19.write(sub_164); | |||||
m_delay_18.write(sub_185); | |||||
m_delay_17.write(in1); | |||||
m_delay_16.write(sub_171); | |||||
m_delay_15.write(sub_192); | |||||
m_delay_14.write(add_204); | |||||
m_delay_13.write(sub_206); | |||||
m_delay_12.write(sub_178); | |||||
m_delay_11.write(sub_199); | |||||
m_history_10 = history_126_next_239; | |||||
m_history_9 = history_132_next_240; | |||||
m_history_8 = history_220_next_241; | |||||
m_history_7 = history_138_next_242; | |||||
m_history_6 = history_27_next_243; | |||||
m_history_5 = history_25_next_244; | |||||
m_history_4 = history_30_next_245; | |||||
m_history_3 = history_23_next_246; | |||||
m_y_2 = y0_next_247; | |||||
m_history_1 = history_224_next_248; | |||||
m_delay_11.step(); | |||||
m_delay_12.step(); | |||||
m_delay_13.step(); | |||||
m_delay_14.step(); | |||||
m_delay_15.step(); | |||||
m_delay_16.step(); | |||||
m_delay_17.step(); | |||||
m_delay_18.step(); | |||||
m_delay_19.step(); | |||||
m_delay_20.step(); | |||||
m_delay_21.step(); | |||||
m_delay_22.step(); | |||||
m_delay_23.step(); | |||||
// assign results to output buffer; | |||||
(*(__out1++)) = out1; | |||||
(*(__out2++)) = out2; | |||||
}; | |||||
return __exception; | |||||
}; | |||||
inline void set_shimmer(double _value) { | |||||
m_shimmer_24 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_decay(double _value) { | |||||
m_decay_25 = (_value < 1 ? 1 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_damping(double _value) { | |||||
m_damping_26 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_mix(double _value) { | |||||
m_mix_27 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_ratio(double _value) { | |||||
m_ratio_28 = (_value < 0.5 ? 0.5 : (_value > 2 ? 2 : _value)); | |||||
}; | |||||
inline void set_roomsize(double _value) { | |||||
m_roomsize_29 = (_value < 1 ? 1 : (_value > 300 ? 300 : _value)); | |||||
}; | |||||
inline void set_bandwidth(double _value) { | |||||
m_bandwidth_30 = (_value < 0 ? 0 : (_value > 100 ? 100 : _value)); | |||||
}; | |||||
inline void set_tone(double _value) { | |||||
m_tone_31 = (_value < 500 ? 500 : (_value > 6000 ? 6000 : _value)); | |||||
}; | |||||
} State; | |||||
/// | |||||
/// Configuration for the genlib API | |||||
/// | |||||
/// Number of signal inputs and outputs | |||||
int gen_kernel_numins = 1; | |||||
int gen_kernel_numouts = 2; | |||||
int num_inputs() { return gen_kernel_numins; } | |||||
int num_outputs() { return gen_kernel_numouts; } | |||||
int num_params() { return 8; } | |||||
/// Assistive lables for the signal inputs and outputs | |||||
const char * gen_kernel_innames[] = { "in1" }; | |||||
const char * gen_kernel_outnames[] = { "out1", "out2" }; | |||||
/// Invoke the signal process of a State object | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n) { | |||||
State * self = (State *)cself; | |||||
return self->perform(ins, outs, n); | |||||
} | |||||
/// Reset all parameters and stateful operators of a State object | |||||
void reset(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
self->reset(cself->sr, cself->vs); | |||||
} | |||||
/// Set a parameter of a State object | |||||
void setparameter(CommonState *cself, long index, double value, void *ref) { | |||||
State * self = (State *)cself; | |||||
switch (index) { | |||||
case 0: self->set_shimmer(value); break; | |||||
case 1: self->set_decay(value); break; | |||||
case 2: self->set_damping(value); break; | |||||
case 3: self->set_mix(value); break; | |||||
case 4: self->set_ratio(value); break; | |||||
case 5: self->set_roomsize(value); break; | |||||
case 6: self->set_bandwidth(value); break; | |||||
case 7: self->set_tone(value); break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Get the value of a parameter of a State object | |||||
void getparameter(CommonState *cself, long index, double *value) { | |||||
State *self = (State *)cself; | |||||
switch (index) { | |||||
case 0: *value = self->m_shimmer_24; break; | |||||
case 1: *value = self->m_decay_25; break; | |||||
case 2: *value = self->m_damping_26; break; | |||||
case 3: *value = self->m_mix_27; break; | |||||
case 4: *value = self->m_ratio_28; break; | |||||
case 5: *value = self->m_roomsize_29; break; | |||||
case 6: *value = self->m_bandwidth_30; break; | |||||
case 7: *value = self->m_tone_31; break; | |||||
default: break; | |||||
} | |||||
} | |||||
/// Allocate and configure a new State object and it's internal CommonState: | |||||
void * create(double sr, long vs) { | |||||
State *self = new State; | |||||
self->reset(sr, vs); | |||||
ParamInfo *pi; | |||||
self->__commonstate.inputnames = gen_kernel_innames; | |||||
self->__commonstate.outputnames = gen_kernel_outnames; | |||||
self->__commonstate.numins = gen_kernel_numins; | |||||
self->__commonstate.numouts = gen_kernel_numouts; | |||||
self->__commonstate.sr = sr; | |||||
self->__commonstate.vs = vs; | |||||
self->__commonstate.params = (ParamInfo *)genlib_sysmem_newptr(8 * sizeof(ParamInfo)); | |||||
self->__commonstate.numparams = 8; | |||||
// initialize parameter 0 ("m_shimmer_24") | |||||
pi = self->__commonstate.params + 0; | |||||
pi->name = "shimmer"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_shimmer_24; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 1 ("m_decay_25") | |||||
pi = self->__commonstate.params + 1; | |||||
pi->name = "decay"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_decay_25; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 1; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 2 ("m_damping_26") | |||||
pi = self->__commonstate.params + 2; | |||||
pi->name = "damping"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_damping_26; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 3 ("m_mix_27") | |||||
pi = self->__commonstate.params + 3; | |||||
pi->name = "mix"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_mix_27; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 4 ("m_ratio_28") | |||||
pi = self->__commonstate.params + 4; | |||||
pi->name = "ratio"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_ratio_28; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0.5; | |||||
pi->outputmax = 2; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 5 ("m_roomsize_29") | |||||
pi = self->__commonstate.params + 5; | |||||
pi->name = "roomsize"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_roomsize_29; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 1; | |||||
pi->outputmax = 300; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 6 ("m_bandwidth_30") | |||||
pi = self->__commonstate.params + 6; | |||||
pi->name = "bandwidth"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_bandwidth_30; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 0; | |||||
pi->outputmax = 100; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
// initialize parameter 7 ("m_tone_31") | |||||
pi = self->__commonstate.params + 7; | |||||
pi->name = "tone"; | |||||
pi->paramtype = GENLIB_PARAMTYPE_FLOAT; | |||||
pi->defaultvalue = self->m_tone_31; | |||||
pi->defaultref = 0; | |||||
pi->hasinputminmax = false; | |||||
pi->inputmin = 0; | |||||
pi->inputmax = 1; | |||||
pi->hasminmax = true; | |||||
pi->outputmin = 500; | |||||
pi->outputmax = 6000; | |||||
pi->exp = 0; | |||||
pi->units = ""; // no units defined | |||||
return self; | |||||
} | |||||
/// Release all resources and memory used by a State object: | |||||
void destroy(CommonState *cself) { | |||||
State * self = (State *)cself; | |||||
genlib_sysmem_freeptr(cself->params); | |||||
delete self; | |||||
} | |||||
} // gen_exported:: |
@@ -1,37 +0,0 @@ | |||||
/******************************************************************************************************************* | |||||
Copyright (c) 2012 Cycling '74 | |||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |||||
and associated documentation files (the "Software"), to deal in the Software without restriction, | |||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |||||
subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in all copies | |||||
or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |||||
*******************************************************************************************************************/ | |||||
#include "genlib.h" | |||||
#include "genlib_exportfunctions.h" | |||||
#include "genlib_ops.h" | |||||
namespace gen_exported { | |||||
int num_inputs(); | |||||
int num_outputs(); | |||||
int num_params(); | |||||
int perform(CommonState *cself, t_sample **ins, long numins, t_sample **outs, long numouts, long n); | |||||
void reset(CommonState *cself); | |||||
void setparameter(CommonState *cself, long index, double value, void *ref); | |||||
void getparameter(CommonState *cself, long index, double *value); | |||||
void * create(double sr, long vs); | |||||
void destroy(CommonState *cself); | |||||
} // gen_exported:: |
@@ -1,509 +0,0 @@ | |||||
{ | |||||
"patcher" : { | |||||
"fileversion" : 1, | |||||
"appversion" : { | |||||
"major" : 6, | |||||
"minor" : 1, | |||||
"revision" : 9, | |||||
"architecture" : "x86" | |||||
} | |||||
, | |||||
"rect" : [ 25.0, 70.0, 640.0, 480.0 ], | |||||
"bglocked" : 0, | |||||
"openinpresentation" : 0, | |||||
"default_fontsize" : 12.0, | |||||
"default_fontface" : 0, | |||||
"default_fontname" : "Arial", | |||||
"gridonopen" : 0, | |||||
"gridsize" : [ 15.0, 15.0 ], | |||||
"gridsnaponopen" : 0, | |||||
"statusbarvisible" : 2, | |||||
"toolbarvisible" : 1, | |||||
"boxanimatetime" : 200, | |||||
"imprint" : 0, | |||||
"enablehscroll" : 1, | |||||
"enablevscroll" : 1, | |||||
"devicewidth" : 0.0, | |||||
"description" : "", | |||||
"digest" : "", | |||||
"tags" : "", | |||||
"boxes" : [ { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-1", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "signal" ], | |||||
"patcher" : { | |||||
"fileversion" : 1, | |||||
"appversion" : { | |||||
"major" : 6, | |||||
"minor" : 1, | |||||
"revision" : 9, | |||||
"architecture" : "x86" | |||||
} | |||||
, | |||||
"rect" : [ 50.0, 94.0, 600.0, 450.0 ], | |||||
"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ], | |||||
"bglocked" : 0, | |||||
"openinpresentation" : 0, | |||||
"default_fontsize" : 12.0, | |||||
"default_fontface" : 0, | |||||
"default_fontname" : "Arial", | |||||
"gridonopen" : 0, | |||||
"gridsize" : [ 15.0, 15.0 ], | |||||
"gridsnaponopen" : 0, | |||||
"statusbarvisible" : 2, | |||||
"toolbarvisible" : 1, | |||||
"boxanimatetime" : 200, | |||||
"imprint" : 0, | |||||
"enablehscroll" : 1, | |||||
"enablevscroll" : 1, | |||||
"devicewidth" : 0.0, | |||||
"description" : "", | |||||
"digest" : "", | |||||
"tags" : "", | |||||
"boxes" : [ { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-9", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 322.0, 56.0, 88.0, 20.0 ], | |||||
"text" : "param amp2 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-8", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 322.0, 94.0, 87.0, 20.0 ], | |||||
"text" : "setparam amp" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-7", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 191.0, 56.0, 88.0, 20.0 ], | |||||
"text" : "param amp1 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-6", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 190.0, 94.0, 87.0, 20.0 ], | |||||
"text" : "setparam amp" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-5", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patcher" : { | |||||
"fileversion" : 1, | |||||
"appversion" : { | |||||
"major" : 6, | |||||
"minor" : 1, | |||||
"revision" : 9, | |||||
"architecture" : "x86" | |||||
} | |||||
, | |||||
"rect" : [ 75.0, 119.0, 600.0, 450.0 ], | |||||
"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ], | |||||
"bglocked" : 0, | |||||
"openinpresentation" : 0, | |||||
"default_fontsize" : 12.0, | |||||
"default_fontface" : 0, | |||||
"default_fontname" : "Arial", | |||||
"gridonopen" : 0, | |||||
"gridsize" : [ 15.0, 15.0 ], | |||||
"gridsnaponopen" : 0, | |||||
"statusbarvisible" : 2, | |||||
"toolbarvisible" : 1, | |||||
"boxanimatetime" : 200, | |||||
"imprint" : 0, | |||||
"enablehscroll" : 1, | |||||
"enablevscroll" : 1, | |||||
"devicewidth" : 0.0, | |||||
"description" : "", | |||||
"digest" : "", | |||||
"tags" : "", | |||||
"boxes" : [ { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-1", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 50.0, 14.0, 30.0, 20.0 ], | |||||
"text" : "in 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-2", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 305.0, 14.0, 81.0, 20.0 ], | |||||
"text" : "param amp 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-3", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 176.0, 149.0, 32.5, 20.0 ], | |||||
"text" : "+" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-4", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 0, | |||||
"patching_rect" : [ 176.0, 418.0, 37.0, 20.0 ], | |||||
"text" : "out 1" | |||||
} | |||||
} | |||||
], | |||||
"lines" : [ { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-1", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-2", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-4", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-3", 0 ] | |||||
} | |||||
} | |||||
] | |||||
} | |||||
, | |||||
"patching_rect" : [ 262.0, 149.0, 32.5, 20.0 ], | |||||
"text" : "gen" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-1", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 50.0, 14.0, 30.0, 20.0 ], | |||||
"text" : "in 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-2", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 305.0, 14.0, 30.0, 20.0 ], | |||||
"text" : "in 2" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-3", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patcher" : { | |||||
"fileversion" : 1, | |||||
"appversion" : { | |||||
"major" : 6, | |||||
"minor" : 1, | |||||
"revision" : 9, | |||||
"architecture" : "x86" | |||||
} | |||||
, | |||||
"rect" : [ 75.0, 119.0, 600.0, 450.0 ], | |||||
"bgcolor" : [ 0.9, 0.9, 0.9, 1.0 ], | |||||
"bglocked" : 0, | |||||
"openinpresentation" : 0, | |||||
"default_fontsize" : 12.0, | |||||
"default_fontface" : 0, | |||||
"default_fontname" : "Arial", | |||||
"gridonopen" : 0, | |||||
"gridsize" : [ 15.0, 15.0 ], | |||||
"gridsnaponopen" : 0, | |||||
"statusbarvisible" : 2, | |||||
"toolbarvisible" : 1, | |||||
"boxanimatetime" : 200, | |||||
"imprint" : 0, | |||||
"enablehscroll" : 1, | |||||
"enablevscroll" : 1, | |||||
"devicewidth" : 0.0, | |||||
"description" : "", | |||||
"digest" : "", | |||||
"tags" : "", | |||||
"boxes" : [ { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-1", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 50.0, 14.0, 30.0, 20.0 ], | |||||
"text" : "in 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-2", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 0, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 305.0, 14.0, 81.0, 20.0 ], | |||||
"text" : "param amp 1" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-3", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 2, | |||||
"numoutlets" : 1, | |||||
"outlettype" : [ "" ], | |||||
"patching_rect" : [ 176.0, 149.0, 32.5, 20.0 ], | |||||
"text" : "+" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-4", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 0, | |||||
"patching_rect" : [ 176.0, 418.0, 37.0, 20.0 ], | |||||
"text" : "out 1" | |||||
} | |||||
} | |||||
], | |||||
"lines" : [ { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-1", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 1 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-2", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-4", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-3", 0 ] | |||||
} | |||||
} | |||||
] | |||||
} | |||||
, | |||||
"patching_rect" : [ 176.0, 149.0, 32.5, 20.0 ], | |||||
"text" : "gen" | |||||
} | |||||
} | |||||
, { | |||||
"box" : { | |||||
"fontname" : "Arial", | |||||
"fontsize" : 12.0, | |||||
"id" : "obj-4", | |||||
"maxclass" : "newobj", | |||||
"numinlets" : 1, | |||||
"numoutlets" : 0, | |||||
"patching_rect" : [ 176.0, 418.0, 37.0, 20.0 ], | |||||
"text" : "out 1" | |||||
} | |||||
} | |||||
], | |||||
"lines" : [ { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-1", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-5", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-2", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-4", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-3", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-4", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-5", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-3", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-6", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-6", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-7", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-5", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-8", 0 ] | |||||
} | |||||
} | |||||
, { | |||||
"patchline" : { | |||||
"destination" : [ "obj-8", 0 ], | |||||
"disabled" : 0, | |||||
"hidden" : 0, | |||||
"source" : [ "obj-9", 0 ] | |||||
} | |||||
} | |||||
] | |||||
} | |||||
, | |||||
"patching_rect" : [ 219.0, 149.0, 38.0, 20.0 ], | |||||
"text" : "gen~" | |||||
} | |||||
} | |||||
], | |||||
"lines" : [ ], | |||||
"dependency_cache" : [ ] | |||||
} | |||||
} |