diff --git a/lv2/rkrlv2.C b/lv2/rkrlv2.C index 272b5c4..cd947d0 100644 --- a/lv2/rkrlv2.C +++ b/lv2/rkrlv2.C @@ -15,6 +15,7 @@ #include #include #include +#include #include"rkrlv2.h" #include"EQ.h" @@ -803,7 +804,7 @@ LV2_Handle init_harmnomidlv2(const LV2_Descriptor *descriptor,double sample_freq getFeatures(plug,host_features); //magic numbers: shift qual 4, downsample 5, up qual 4, down qual 2, - plug->harm = new Harmonizer(0,0,4,5,4,2, plug->period_max, sample_freq); + plug->harm = new Harmonizer(0,0,4,5,SRC_LINEAR,SRC_SINC_FASTEST, plug->period_max, sample_freq); plug->noteID = new Recognize(0,0,.6, sample_freq, 440.0, plug->period_max);//.6 is default trigger value plug->chordID = new RecChord(); @@ -2809,7 +2810,7 @@ LV2_Handle init_stomplv2(const LV2_Descriptor *descriptor,double sample_freq, co getFeatures(plug,host_features); plug->stomp = new StompBox(0,0, sample_freq, plug->period_max, /*oversampling*/2, - /*up interpolation method*/4, /*down interpolation method*/2); + /*up interpolation method*/SRC_LINEAR, /*down interpolation method*/SRC_SINC_FASTEST); return plug; } @@ -2866,8 +2867,8 @@ LV2_Handle init_stomp_fuzzlv2(const LV2_Descriptor *descriptor,double sample_fre getFeatures(plug,host_features); - plug->stomp = new StompBox(0,0, sample_freq, plug->period_max, /*oversampling*/2, - /*up interpolation method*/4, /*down interpolation method*/2); + plug->stomp = new StompBox(0,0, sample_freq, plug->period_max, /*oversampling*/1, + /*up interpolation method*/SRC_LINEAR, /*down interpolation method*/SRC_LINEAR); plug->stomp->changepar(5,7);//set to fuzz return plug; @@ -2891,7 +2892,7 @@ LV2_Handle init_revtronlv2(const LV2_Descriptor *descriptor,double sample_freq, } lv2_atom_forge_init(&plug->forge, plug->urid_map); - plug->revtron = new Reverbtron(0,0, sample_freq, plug->period_max, /*downsample*/5, /*up interpolation method*/4, /*down interpolation method*/2); + plug->revtron = new Reverbtron(0,0, sample_freq, plug->period_max, /*downsample*/5, /*up interpolation method*/SRC_LINEAR, /*down interpolation method*/SRC_SINC_FASTEST); plug->revtron->changepar(4,1);//set to user selected files plug->rvbfile = new RvbFile; diff --git a/src/Dual_Flange.C b/src/Dual_Flange.C index f4eaef4..35653d3 100644 --- a/src/Dual_Flange.C +++ b/src/Dual_Flange.C @@ -41,10 +41,6 @@ Dflange::Dflange (float * efxoutl_, float * efxoutr_, double sample_rate) //default values Ppreset = 0; - ldelay = NULL; - rdelay = NULL; - - maxx_delay = (int) sample_rate * 0.055f; ldelay = new float[maxx_delay]; rdelay = new float[maxx_delay]; @@ -80,6 +76,8 @@ Dflange::Dflange (float * efxoutl_, float * efxoutr_, double sample_rate) lsB = 0.0f; logmax = logf(1000.0f)/logf(2.0f); + kl = kr = 0; + lfo = new EffectLFO(sample_rate); PERIOD = 255;//best guess for init setpreset (Ppreset); @@ -88,10 +86,10 @@ Dflange::Dflange (float * efxoutl_, float * efxoutr_, double sample_rate) Dflange::~Dflange () { - delete ldelay; - delete rdelay; - delete zldelay; - delete zrdelay; + delete[] ldelay; + delete[] rdelay; + delete[] zldelay; + delete[] zrdelay; delete ldelayline0; delete rdelayline0; delete ldelayline1; diff --git a/src/Sustainer.C b/src/Sustainer.C index 3d65902..98fd5cc 100644 --- a/src/Sustainer.C +++ b/src/Sustainer.C @@ -121,10 +121,11 @@ Sustainer::out (float * smpsl, float * smpsr, uint32_t period) void -Sustainer::setpreset (int npreset, int pdata[]) +Sustainer::setpreset (int npreset) { const int PRESET_SIZE = 2; const int NUM_PRESETS = 3; + int pdata[PRESET_SIZE]; int presets[NUM_PRESETS][PRESET_SIZE] = { //Moderate {79, 54}, diff --git a/src/Sustainer.h b/src/Sustainer.h index 8e6e1f2..3963bd5 100644 --- a/src/Sustainer.h +++ b/src/Sustainer.h @@ -35,7 +35,7 @@ class Sustainer void out (float * smpsl, float * smpr, uint32_t period); void changepar (int npar, int value); int getpar (int npar); - void setpreset (int npreset,int pdata[]); + void setpreset (int npreset); int Ppreset;