| @@ -26,6 +26,16 @@ struct PitchShifter { | |||||
| double freqPerBin, expct, invOsamp, invFftFrameSize, invFftFrameSize2, invPi; | double freqPerBin, expct, invOsamp, invFftFrameSize, invFftFrameSize2, invPi; | ||||
| long fftFrameSize, osamp, i,k, qpd, index, inFifoLatency, stepSize, fftFrameSize2; | long fftFrameSize, osamp, i,k, qpd, index, inFifoLatency, stepSize, fftFrameSize2; | ||||
| static void *my_calloc(size_t _size) { | |||||
| // (note) same as calloc, this does not fix the noise issue in REI (edit: see below for actual fix) | |||||
| void *r = malloc(_size); | |||||
| if(NULL != r) | |||||
| { | |||||
| memset(r, 0, _size); | |||||
| } | |||||
| return r; | |||||
| } | |||||
| PitchShifter(long fftFrameSize, long osamp, float sampleRate) { | PitchShifter(long fftFrameSize, long osamp, float sampleRate) { | ||||
| this->fftFrameSize = fftFrameSize; | this->fftFrameSize = fftFrameSize; | ||||
| this->osamp = osamp; | this->osamp = osamp; | ||||
| @@ -41,19 +51,19 @@ struct PitchShifter { | |||||
| invFftFrameSize2 = 1.0f/fftFrameSize2; | invFftFrameSize2 = 1.0f/fftFrameSize2; | ||||
| invPi = 1.0f/M_PI; | invPi = 1.0f/M_PI; | ||||
| gInFIFO = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| gOutFIFO = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| gInFIFO = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| gOutFIFO = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| gFFTworksp = (float*)pffft_aligned_malloc(fftFrameSize*sizeof(float)); | gFFTworksp = (float*)pffft_aligned_malloc(fftFrameSize*sizeof(float)); | ||||
| memset((void*)gFFTworksp, 0, sizeof(fftFrameSize*sizeof(float))); // [bsp] 09Mar2019: fix noise burst after patch loading | |||||
| memset((void*)gFFTworksp, 0, sizeof(fftFrameSize*sizeof(float))); | |||||
| gFFTworkspOut = (float*)pffft_aligned_malloc(fftFrameSize*sizeof(float)); | gFFTworkspOut = (float*)pffft_aligned_malloc(fftFrameSize*sizeof(float)); | ||||
| memset((void*)gFFTworkspOut, 0, sizeof(fftFrameSize*sizeof(float))); // [bsp] 09Mar2019: fix noise burst after patch loading | |||||
| gLastPhase = (float*)calloc((fftFrameSize/2+1),sizeof(float)); | |||||
| gSumPhase = (float*)calloc((fftFrameSize/2+1),sizeof(float)); | |||||
| gOutputAccum = (float*)calloc(2*fftFrameSize,sizeof(float)); | |||||
| gAnaFreq = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| gAnaMagn = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| gSynFreq = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| gSynMagn = (float*)calloc(fftFrameSize,sizeof(float)); | |||||
| memset((void*)gFFTworkspOut, 0, sizeof(fftFrameSize*sizeof(float))); | |||||
| gLastPhase = (float*)my_calloc((fftFrameSize/2+1) * sizeof(float)); | |||||
| gSumPhase = (float*)my_calloc((fftFrameSize/2+1) * sizeof(float)); | |||||
| gOutputAccum = (float*)my_calloc(2*fftFrameSize * sizeof(float)); | |||||
| gAnaFreq = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| gAnaMagn = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| gSynFreq = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| gSynMagn = (float*)my_calloc(fftFrameSize * sizeof(float)); | |||||
| } | } | ||||
| ~PitchShifter() { | ~PitchShifter() { | ||||
| @@ -73,11 +83,15 @@ struct PitchShifter { | |||||
| void process(const float pitchShift, const float *input, float *output) { | void process(const float pitchShift, const float *input, float *output) { | ||||
| for (i = 0; i < fftFrameSize; i++) { | for (i = 0; i < fftFrameSize; i++) { | ||||
| /* As long as we have not yet collected enough data just read in */ | /* As long as we have not yet collected enough data just read in */ | ||||
| gInFIFO[gRover] = input[i]; | gInFIFO[gRover] = input[i]; | ||||
| output[i] = gOutFIFO[gRover-inFifoLatency]; | |||||
| if(gRover >= inFifoLatency) // [bsp] 09Mar2019: this fixes the noise burst issue in REI | |||||
| output[i] = gOutFIFO[gRover-inFifoLatency]; | |||||
| else | |||||
| output[i] = 0.0f; | |||||
| gRover++; | gRover++; | ||||
| /* now we have enough data for processing */ | /* now we have enough data for processing */ | ||||
| @@ -6,11 +6,43 @@ | |||||
| #include "revmodel.hpp" | #include "revmodel.hpp" | ||||
| #include <math.h> | #include <math.h> | ||||
| #include <string.h> // memset | |||||
| namespace rack_plugin_Bidoo { | namespace rack_plugin_Bidoo { | ||||
| revmodel::revmodel() | revmodel::revmodel() | ||||
| { | { | ||||
| // (note) still doesn't fix REI noise burst issue | |||||
| #define Dclearbuf(b) memset((void*)b, 0, sizeof(b)) | |||||
| Dclearbuf(bufcombL1); | |||||
| Dclearbuf(bufcombR1); | |||||
| Dclearbuf(bufcombL2); | |||||
| Dclearbuf(bufcombR2); | |||||
| Dclearbuf(bufcombL3); | |||||
| Dclearbuf(bufcombR3); | |||||
| Dclearbuf(bufcombL4); | |||||
| Dclearbuf(bufcombR4); | |||||
| Dclearbuf(bufcombL5); | |||||
| Dclearbuf(bufcombR5); | |||||
| Dclearbuf(bufcombL6); | |||||
| Dclearbuf(bufcombR6); | |||||
| Dclearbuf(bufcombL7); | |||||
| Dclearbuf(bufcombR7); | |||||
| Dclearbuf(bufcombL8); | |||||
| Dclearbuf(bufcombR8); | |||||
| // Buffers for the allpasses | |||||
| Dclearbuf(bufallpassL1); | |||||
| Dclearbuf(bufallpassR1); | |||||
| Dclearbuf(bufallpassL2); | |||||
| Dclearbuf(bufallpassR2); | |||||
| Dclearbuf(bufallpassL3); | |||||
| Dclearbuf(bufallpassR3); | |||||
| Dclearbuf(bufallpassL4); | |||||
| Dclearbuf(bufallpassR4); | |||||
| #undef Dclearbuf | |||||
| // Tie the components to their buffers | // Tie the components to their buffers | ||||
| combL[0].setbuffer(bufcombL1,combtuningL1); | combL[0].setbuffer(bufcombL1,combtuningL1); | ||||
| combR[0].setbuffer(bufcombR1,combtuningR1); | combR[0].setbuffer(bufcombR1,combtuningR1); | ||||
| @@ -165,6 +165,9 @@ | |||||
| ------------------------------------------------------------------------ | |||||
| + REI: fix noise burst issue in pitchshifter (out of bounds read) | |||||
| @@ -1,4 +1,9 @@ | |||||
| ** March 9th, 2019 | |||||
| - fix loud noise burst issue in Bidoo.REI module | |||||
| - add patch collection (see vst2_bin/patches/bsp/, 90 patches) | |||||
| ** March 8th, 2019 | ** March 8th, 2019 | ||||
| - update AmalgamatedHarmonics.* 0.6.1 => 0.6.5 | - update AmalgamatedHarmonics.* 0.6.1 => 0.6.5 | ||||
| - update Alikins.* 0.6.0 => 0.6.6 | - update Alikins.* 0.6.0 => 0.6.6 | ||||
| @@ -144,7 +149,6 @@ | |||||
| - add module Valley.Interzone | - add module Valley.Interzone | ||||
| ** October 31st, 2018 | ** October 31st, 2018 | ||||
| - add Linux port | - add Linux port | ||||
| - thanks to Github user "cameronleger" for porting LGLW ! | - thanks to Github user "cameronleger" for porting LGLW ! | ||||
| @@ -28,7 +28,7 @@ | |||||
| "idleDetectFx": 2, | "idleDetectFx": 2, | ||||
| "allowCursorLock": true, | "allowCursorLock": true, | ||||
| "sampleRate": 44100.0, | "sampleRate": 44100.0, | ||||
| "lastPath": "", | |||||
| "lastPath": "F:\\eureka_data\\vst_patches\\bsp_VeeSeeVST Rack 0.6.1 I_1983212406\\BSP chip bell 1.vcv", | |||||
| "moduleBrowser": { | "moduleBrowser": { | ||||
| "favorites": [ | "favorites": [ | ||||
| { | { | ||||
| @@ -44,32 +44,56 @@ | |||||
| "model": "SpecificValue" | "model": "SpecificValue" | ||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-Additator" | |||||
| "plugin": "AS", | |||||
| "model": "ADSR" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bidoo", | |||||
| "model": "BISTROT" | |||||
| "plugin": "AS", | |||||
| "model": "AtNuVrTr" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-VCAmp" | |||||
| "plugin": "AS", | |||||
| "model": "TriLFO" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-XFade" | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Rings" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-XCO" | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Braids" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bidoo", | |||||
| "model": "ÎŁ" | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Tides" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-Noise" | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Elements" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Clouds" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Stages" | |||||
| }, | |||||
| { | |||||
| "plugin": "Befaco", | |||||
| "model": "Mixer" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Plaits" | |||||
| }, | |||||
| { | |||||
| "plugin": "Autodafe", | |||||
| "model": "Multiple 1x8" | |||||
| }, | |||||
| { | |||||
| "plugin": "Befaco", | |||||
| "model": "SlewLimiter" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bidoo", | "plugin": "Bidoo", | ||||
| @@ -77,43 +101,59 @@ | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | "plugin": "Bogaudio", | ||||
| "model": "Bogaudio-SampleHold" | |||||
| "model": "Bogaudio-Mult" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bogaudio", | "plugin": "Bogaudio", | ||||
| "model": "Bogaudio-Mult" | |||||
| "model": "Bogaudio-Switch" | |||||
| }, | |||||
| { | |||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-XFade" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Bidoo", | "plugin": "Bidoo", | ||||
| "model": "lIMbO" | "model": "lIMbO" | ||||
| }, | }, | ||||
| { | |||||
| "plugin": "Bidoo", | |||||
| "model": "ÎŁ" | |||||
| }, | |||||
| { | { | ||||
| "plugin": "Bogaudio", | "plugin": "Bogaudio", | ||||
| "model": "Bogaudio-Switch" | |||||
| "model": "Bogaudio-XCO" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "DHE-Modules", | |||||
| "model": "Cubic" | |||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-Additator" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "huaba", | |||||
| "model": "EQ3" | |||||
| "plugin": "Bidoo", | |||||
| "model": "BISTROT" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "HetrickCV", | |||||
| "model": "Exponent" | |||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-VCAmp" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | |||||
| "model": "VCO2" | |||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-Noise" | |||||
| }, | |||||
| { | |||||
| "plugin": "Bogaudio", | |||||
| "model": "Bogaudio-SampleHold" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "ErraticInstruments", | "plugin": "ErraticInstruments", | ||||
| "model": "MPEToCV" | "model": "MPEToCV" | ||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | |||||
| "model": "LFO2" | |||||
| "plugin": "FrankBussFormula", | |||||
| "model": "FrankBussFormula" | |||||
| }, | |||||
| { | |||||
| "plugin": "DHE-Modules", | |||||
| "model": "Cubic" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| @@ -121,23 +161,27 @@ | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| "model": "VCA" | |||||
| "model": "VCO" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| "model": "LFO" | |||||
| "model": "VCO2" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "FrankBussFormula", | |||||
| "model": "FrankBussFormula" | |||||
| "plugin": "Fundamental", | |||||
| "model": "Scope" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| "model": "VCO" | |||||
| "model": "VCA" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| "model": "Scope" | |||||
| "model": "VCMixer" | |||||
| }, | |||||
| { | |||||
| "plugin": "Fundamental", | |||||
| "model": "LFO2" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| @@ -145,35 +189,39 @@ | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Fundamental", | "plugin": "Fundamental", | ||||
| "model": "VCMixer" | |||||
| "model": "LFO" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "LindenbergResearch", | "plugin": "LindenbergResearch", | ||||
| "model": "MS20 VCF" | |||||
| "model": "VCF" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "JE", | |||||
| "model": "RingModulator" | |||||
| "plugin": "HetrickCV", | |||||
| "model": "Exponent" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "LindenbergResearch", | |||||
| "model": "VCF" | |||||
| "plugin": "JE", | |||||
| "model": "RingModulator" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "LindenbergResearch", | "plugin": "LindenbergResearch", | ||||
| "model": "Westcoast VCS" | |||||
| "model": "MS20 VCF" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "LindenbergResearch", | |||||
| "model": "VCO" | |||||
| "plugin": "huaba", | |||||
| "model": "EQ3" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "ML_modules", | "plugin": "ML_modules", | ||||
| "model": "VoltMeter" | "model": "VoltMeter" | ||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "mscHack", | |||||
| "model": "Maude221" | |||||
| "plugin": "LindenbergResearch", | |||||
| "model": "Westcoast VCS" | |||||
| }, | |||||
| { | |||||
| "plugin": "LindenbergResearch", | |||||
| "model": "VCO" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "PG-Instruments", | "plugin": "PG-Instruments", | ||||
| @@ -183,17 +231,25 @@ | |||||
| "plugin": "PG-Instruments", | "plugin": "PG-Instruments", | ||||
| "model": "PGPanner" | "model": "PGPanner" | ||||
| }, | }, | ||||
| { | |||||
| "plugin": "mscHack", | |||||
| "model": "Maude221" | |||||
| }, | |||||
| { | { | ||||
| "plugin": "Southpole", | "plugin": "Southpole", | ||||
| "model": "Abr" | "model": "Abr" | ||||
| }, | }, | ||||
| { | |||||
| "plugin": "Valley", | |||||
| "model": "Plateau" | |||||
| }, | |||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| "model": "Obxd_VCF" | |||||
| "model": "AttenuMixer" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "Template_shared", | |||||
| "model": "MyModule" | |||||
| "plugin": "bsp", | |||||
| "model": "DownSampler" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| @@ -205,15 +261,11 @@ | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| "model": "Sway" | |||||
| }, | |||||
| { | |||||
| "plugin": "bsp", | |||||
| "model": "DownSampler" | |||||
| "model": "Scanner" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| "model": "RMS" | |||||
| "model": "Obxd_VCF" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| @@ -221,67 +273,15 @@ | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| "model": "AttenuMixer" | |||||
| }, | |||||
| { | |||||
| "plugin": "Valley", | |||||
| "model": "Plateau" | |||||
| "model": "RMS" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "bsp", | "plugin": "bsp", | ||||
| "model": "Scanner" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Clouds" | |||||
| }, | |||||
| { | |||||
| "plugin": "AS", | |||||
| "model": "AtNuVrTr" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Tides" | |||||
| }, | |||||
| { | |||||
| "plugin": "AS", | |||||
| "model": "TriLFO" | |||||
| }, | |||||
| { | |||||
| "plugin": "AS", | |||||
| "model": "ADSR" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Rings" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Elements" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Braids" | |||||
| }, | |||||
| { | |||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Stages" | |||||
| }, | |||||
| { | |||||
| "plugin": "Autodafe", | |||||
| "model": "Multiple 1x8" | |||||
| }, | |||||
| { | |||||
| "plugin": "Befaco", | |||||
| "model": "Mixer" | |||||
| }, | |||||
| { | |||||
| "plugin": "Befaco", | |||||
| "model": "SlewLimiter" | |||||
| "model": "Sway" | |||||
| }, | }, | ||||
| { | { | ||||
| "plugin": "AudibleInstruments", | |||||
| "model": "Plaits" | |||||
| "plugin": "Template_shared", | |||||
| "model": "MyModule" | |||||
| } | } | ||||
| ] | ] | ||||
| }, | }, | ||||