@@ -1,6 +1,6 @@ | |||||
RACK_DIR ?= ../.. | RACK_DIR ?= ../.. | ||||
SLUG = Bidoo | SLUG = Bidoo | ||||
VERSION = 0.6.27 | |||||
VERSION = 0.6.28 | |||||
DISTRIBUTABLES += $(wildcard LICENSE*) res | DISTRIBUTABLES += $(wildcard LICENSE*) res | ||||
FLAGS += -Idep/include -I./src/dep/dr_wav -I./src/dep/filters -I./src/dep/freeverb -I./src/dep/gverb/include -I./src/dep/minimp3 -I./src/dep/lodepng -I./src/dep/pffft | FLAGS += -Idep/include -I./src/dep/dr_wav -I./src/dep/filters -I./src/dep/freeverb -I./src/dep/gverb/include -I./src/dep/minimp3 -I./src/dep/lodepng -I./src/dep/pffft | ||||
@@ -1,7 +1,7 @@ | |||||
# Bidoo's plugins for [VCVRack](https://vcvrack.com) | # Bidoo's plugins for [VCVRack](https://vcvrack.com) | ||||
<!-- Version and License Badges --> | <!-- Version and License Badges --> | ||||
 | |||||
 | |||||
 |  | ||||
 |  | ||||
@@ -13,6 +13,10 @@ You can find information on that plugins pack in the [wiki](https://github.com/s | |||||
## Last changes | ## Last changes | ||||
01/04/2019 => 0.6.28 | |||||
**REI** fix, big thanks to Bastian. | |||||
*NEW* **cuRt** v0.1 still under dev but already operational. | |||||
13/02/2019 => 0.6.26 | 13/02/2019 => 0.6.26 | ||||
**bordL** pitch calibration and KEY input fix. | **bordL** pitch calibration and KEY input fix. | ||||
**REI** reverberator (based on freeverb with a pitchshifter in the feedback loop) has been redesigned and the control calibration is better than before, it still needs some adjustments. | **REI** reverberator (based on freeverb with a pitchshifter in the feedback loop) has been redesigned and the control calibration is better than before, it still needs some adjustments. | ||||
@@ -90,19 +90,14 @@ void BAR::step() { | |||||
in_R_dBFS = -96.3f; | in_R_dBFS = -96.3f; | ||||
float data_L = in_L_dBFS*in_L_dBFS; | float data_L = in_L_dBFS*in_L_dBFS; | ||||
float data_R = in_R_dBFS*in_R_dBFS; | |||||
if (!vu_L_Buffer.full()) { | if (!vu_L_Buffer.full()) { | ||||
vu_L_Buffer.push(data_L); | vu_L_Buffer.push(data_L); | ||||
vu_R_Buffer.push(data_R); | |||||
} | } | ||||
if (!rms_L_Buffer.full()) { | if (!rms_L_Buffer.full()) { | ||||
rms_L_Buffer.push(data_L); | rms_L_Buffer.push(data_L); | ||||
} | |||||
float data_R = in_R_dBFS*in_R_dBFS; | |||||
if (!vu_R_Buffer.full()) { | |||||
vu_R_Buffer.push(data_R); | |||||
} | |||||
if (!rms_R_Buffer.full()) { | |||||
rms_R_Buffer.push(data_R); | rms_R_Buffer.push(data_R); | ||||
} | } | ||||
@@ -328,6 +323,6 @@ struct BARWidget : ModuleWidget { | |||||
using namespace rack_plugin_Bidoo; | using namespace rack_plugin_Bidoo; | ||||
RACK_PLUGIN_MODEL_INIT(Bidoo, BAR) { | RACK_PLUGIN_MODEL_INIT(Bidoo, BAR) { | ||||
Model *modelBAR = Model::create<BAR, BARWidget>("Bidoo", "baR", "bAR compressor", DYNAMICS_TAG); | |||||
Model *modelBAR = Model::create<BAR, BARWidget>("Bidoo", "baR", "bAR compressor", DYNAMICS_TAG, COMPRESSOR_TAG, EFFECT_TAG); | |||||
return modelBAR; | return modelBAR; | ||||
} | } |
@@ -40,7 +40,7 @@ RACK_PLUGIN_INIT(Bidoo) { | |||||
RACK_PLUGIN_INIT_ID(); | RACK_PLUGIN_INIT_ID(); | ||||
RACK_PLUGIN_INIT_WEBSITE("https://github.com/sebastien-bouffier/Bidoo"); | RACK_PLUGIN_INIT_WEBSITE("https://github.com/sebastien-bouffier/Bidoo"); | ||||
RACK_PLUGIN_INIT_VERSION("0.6.27"); | |||||
RACK_PLUGIN_INIT_VERSION("0.6.28"); | |||||
RACK_PLUGIN_MODEL_ADD(Bidoo, DTROY); | RACK_PLUGIN_MODEL_ADD(Bidoo, DTROY); | ||||
RACK_PLUGIN_MODEL_ADD(Bidoo, BORDL); | RACK_PLUGIN_MODEL_ADD(Bidoo, BORDL); | ||||
@@ -3,8 +3,10 @@ | |||||
#include "dsp/digital.hpp" | #include "dsp/digital.hpp" | ||||
#include "dsp/ringbuffer.hpp" | #include "dsp/ringbuffer.hpp" | ||||
#include "dep/filters/pitchshifter.h" | #include "dep/filters/pitchshifter.h" | ||||
#include "dsp/fir.hpp" | |||||
#define BUFF_SIZE 128 | |||||
#define BUFF_SIZE 256 | |||||
#define OVERLAP 4 | |||||
using namespace std; | using namespace std; | ||||
@@ -13,6 +15,7 @@ namespace rack_plugin_Bidoo { | |||||
struct CURT : Module { | struct CURT : Module { | ||||
enum ParamIds { | enum ParamIds { | ||||
PITCH_PARAM, | PITCH_PARAM, | ||||
MODE_PARAM, | |||||
NUM_PARAMS | NUM_PARAMS | ||||
}; | }; | ||||
enum InputIds { | enum InputIds { | ||||
@@ -29,33 +32,85 @@ struct CURT : Module { | |||||
}; | }; | ||||
DoubleRingBuffer<float,BUFF_SIZE> in_Buffer; | DoubleRingBuffer<float,BUFF_SIZE> in_Buffer; | ||||
DoubleRingBuffer<float,BUFF_SIZE> out_Buffer; | |||||
DoubleRingBuffer<float, 2*BUFF_SIZE> out_Buffer; | |||||
float bins[OVERLAP][BUFF_SIZE]; | |||||
int index=-1; | |||||
int readSteps=0; | |||||
int writeSteps=0; | |||||
SchmittTrigger modeTrigger; | |||||
bool mode=0; | |||||
CURT() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { | CURT() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) { | ||||
for(int i=0; i<OVERLAP; i++) { | |||||
memset(bins[i], 0, sizeof(bins[i])); | |||||
} | |||||
for(int i=0; i<BUFF_SIZE; i++) { | |||||
in_Buffer.push(0.0f); | |||||
} | |||||
for(int i=0; i<2*BUFF_SIZE; i++) { | |||||
out_Buffer.push(0.0f); | |||||
} | |||||
} | } | ||||
~CURT() { | ~CURT() { | ||||
} | } | ||||
json_t *toJson() override { | |||||
json_t *rootJ = json_object(); | |||||
json_object_set_new(rootJ, "mode", json_boolean(mode)); | |||||
return rootJ; | |||||
} | |||||
void fromJson(json_t *rootJ) override { | |||||
json_t *modeJ = json_object_get(rootJ, "mode"); | |||||
if (modeJ) | |||||
mode = json_is_true(modeJ); | |||||
} | |||||
void step() override; | void step() override; | ||||
}; | }; | ||||
void CURT::step() { | void CURT::step() { | ||||
in_Buffer.push(inputs[INPUT].value/10.0f); | |||||
if (modeTrigger.process(params[MODE_PARAM].value)) { | |||||
mode = !mode; | |||||
} | |||||
if (in_Buffer.full()) { | |||||
//pShifter->process(clamp(params[PITCH_PARAM].value + inputs[PITCH_INPUT].value ,0.5f,2.0f), in_Buffer.startData(), out_Buffer.endData()); | |||||
out_Buffer.endIncr(BUFF_SIZE); | |||||
in_Buffer.clear(); | |||||
in_Buffer.startIncr(1); | |||||
in_Buffer.push(inputs[INPUT].value); | |||||
readSteps++; | |||||
if (readSteps>=(BUFF_SIZE/OVERLAP)) { | |||||
index=(index+1)%OVERLAP; | |||||
for(int i=0; i<BUFF_SIZE; i++) { | |||||
bins[index][i]=*(in_Buffer.startData()+i); | |||||
} | |||||
blackmanHarrisWindow(bins[index],BUFF_SIZE); | |||||
readSteps = 0; | |||||
} | } | ||||
if (out_Buffer.size()>0) { | |||||
outputs[OUTPUT].value = *out_Buffer.startData() * 5.0f; | |||||
out_Buffer.startIncr(1); | |||||
writeSteps++; | |||||
if ((writeSteps>=((float)BUFF_SIZE*params[PITCH_PARAM].value/(float)OVERLAP))) { | |||||
if ((index%2==0) || (mode)) { | |||||
for(int i=0; i<BUFF_SIZE; i++) { | |||||
out_Buffer.data[out_Buffer.mask(out_Buffer.end-BUFF_SIZE+i)] += bins[index][i]; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
for(int i=0; i<BUFF_SIZE; i++) { | |||||
out_Buffer.data[out_Buffer.mask(out_Buffer.end-BUFF_SIZE+i)] += bins[index][BUFF_SIZE-i-1]; | |||||
} | |||||
} | |||||
writeSteps = 0; | |||||
} | } | ||||
outputs[OUTPUT].value = *out_Buffer.startData(); | |||||
out_Buffer.startIncr(1); | |||||
out_Buffer.push(0.0f); | |||||
} | } | ||||
struct CURTWidget : ModuleWidget { | struct CURTWidget : ModuleWidget { | ||||
@@ -68,12 +123,10 @@ struct CURTWidget : ModuleWidget { | |||||
addChild(Widget::create<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | addChild(Widget::create<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH))); | ||||
addParam(ParamWidget::create<BidooBlueKnob>(Vec(8, 100), module, CURT::PITCH_PARAM, 0.5f, 2.0f, 1.0f)); | |||||
addInput(Port::create<PJ301MPort>(Vec(10, 150.66f), Port::INPUT, module, CURT::PITCH_INPUT)); | |||||
addParam(ParamWidget::create<BidooBlueKnob>(Vec(8, 100), module, CURT::PITCH_PARAM, 0.2f, 2.0f, 1.0f)); | |||||
addInput(Port::create<PJ301MPort>(Vec(10, 150.0f), Port::INPUT, module, CURT::PITCH_INPUT)); | |||||
addParam(ParamWidget::create<BlueCKD6>(Vec(8, 190.0f), module, CURT::MODE_PARAM, 0.0f, 1.0f, 0.0f)); | |||||
addInput(Port::create<PJ301MPort>(Vec(10, 242.66f), Port::INPUT, module, CURT::INPUT)); | addInput(Port::create<PJ301MPort>(Vec(10, 242.66f), Port::INPUT, module, CURT::INPUT)); | ||||
addOutput(Port::create<PJ301MPort>(Vec(10, 299), Port::OUTPUT, module, CURT::OUTPUT)); | addOutput(Port::create<PJ301MPort>(Vec(10, 299), Port::OUTPUT, module, CURT::OUTPUT)); | ||||
} | } | ||||
}; | }; | ||||
@@ -88,10 +88,12 @@ struct PitchShifter { | |||||
/* 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]; | ||||
if(gRover >= inFifoLatency) // [bsp] 09Mar2019: this fixes the noise burst issue in REI | |||||
output[i] = gOutFIFO[gRover-inFifoLatency]; | |||||
else | |||||
output[i] = 0.0f; | |||||
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 */ | ||||