Browse Source

Updates

pull/150/head
Steve Russell 1 month ago
parent
commit
8bf7197f14
7 changed files with 7547 additions and 25 deletions
  1. +10
    -4
      .gitignore
  2. +6
    -0
      plugin.json
  3. +0
    -2
      src/Merge.cpp
  4. +24
    -16
      src/Random.cpp
  5. +0
    -3
      src/Split.cpp
  6. +5
    -0
      src/dr_wav.c
  7. +7502
    -0
      src/dr_wav.h

+ 10
- 4
.gitignore View File

@@ -1,6 +1,12 @@
# Ignore all dotfiles except git dotfiles
.*
!.git*

# Binaries and build targets
*.a
*.so
*.dylib
*.dll
/build /build
/dep
/dist /dist
/plugin.dylib
/plugin.dll
/plugin.so
.DS_Store

+ 6
- 0
plugin.json View File

@@ -1,7 +1,11 @@
{ {
"slug": "Fundamental", "slug": "Fundamental",
"name": "VCV Free", "name": "VCV Free",
<<<<<<< HEAD
"version": "2.6.1-SR", "version": "2.6.1-SR",
=======
"version": "2.6.1",
>>>>>>> e80c373575b337720703a41691536272b21b554c
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"brand": "VCV", "brand": "VCV",
"author": "VCV", "author": "VCV",
@@ -359,6 +363,8 @@
"description": "CV processor", "description": "CV processor",
"manualUrl": "https://vcvrack.com/Free#Process", "manualUrl": "https://vcvrack.com/Free#Process",
"tags": [ "tags": [
"Sample and hold",
"Slew limiter",
"Polyphonic" "Polyphonic"
] ]
}, },


+ 0
- 2
src/Merge.cpp View File

@@ -18,7 +18,6 @@ struct Merge : Module {
NUM_LIGHTS NUM_LIGHTS
}; };


dsp::ClockDivider lightDivider;
int channels = -1; int channels = -1;
int automaticChannels = 0; int automaticChannels = 0;


@@ -28,7 +27,6 @@ struct Merge : Module {
configInput(MONO_INPUTS + i, string::f("Channel %d", i + 1)); configInput(MONO_INPUTS + i, string::f("Channel %d", i + 1));
configOutput(POLY_OUTPUT, "Polyphonic"); configOutput(POLY_OUTPUT, "Polyphonic");


lightDivider.setDivision(512);
onReset(); onReset();
} }




+ 24
- 16
src/Random.cpp View File

@@ -7,7 +7,7 @@ struct Random : Module {
SHAPE_PARAM, SHAPE_PARAM,
OFFSET_PARAM, OFFSET_PARAM,
MODE_PARAM, // removed in 2.0 MODE_PARAM, // removed in 2.0
// new in 2.0
// added in 2.0
PROB_PARAM, PROB_PARAM,
RAND_PARAM, RAND_PARAM,
RATE_CV_PARAM, RATE_CV_PARAM,
@@ -21,7 +21,7 @@ struct Random : Module {
SHAPE_INPUT, SHAPE_INPUT,
TRIG_INPUT, TRIG_INPUT,
EXTERNAL_INPUT, EXTERNAL_INPUT,
// new in 2.0
// added in 2.0
PROB_INPUT, PROB_INPUT,
RAND_INPUT, RAND_INPUT,
NUM_INPUTS NUM_INPUTS
@@ -31,7 +31,7 @@ struct Random : Module {
LINEAR_OUTPUT, LINEAR_OUTPUT,
SMOOTH_OUTPUT, SMOOTH_OUTPUT,
EXPONENTIAL_OUTPUT, EXPONENTIAL_OUTPUT,
// new in 2.0
// added in 2.0
TRIG_OUTPUT, TRIG_OUTPUT,
NUM_OUTPUTS NUM_OUTPUTS
}; };
@@ -74,6 +74,8 @@ struct Random : Module {


configSwitch(OFFSET_PARAM, 0.f, 1.f, 0.f, "Offset", {"Bipolar", "Unipolar"}); configSwitch(OFFSET_PARAM, 0.f, 1.f, 0.f, "Offset", {"Bipolar", "Unipolar"});


getParamQuantity(MODE_PARAM)->randomizeEnabled = false;

configInput(RATE_INPUT, "Clock rate"); configInput(RATE_INPUT, "Clock rate");
configInput(SHAPE_INPUT, "Shape"); configInput(SHAPE_INPUT, "Shape");
configInput(PROB_INPUT, "Trigger probability"); configInput(PROB_INPUT, "Trigger probability");
@@ -230,20 +232,26 @@ struct Random : Module {
lights[OFFSET_LIGHT].setBrightness(uni); lights[OFFSET_LIGHT].setBrightness(uni);
} }


void paramsFromJson(json_t* rootJ) override {
// In <2.0, there were no attenuverters, so set them to 1.0 in case they are not overwritten.
params[RATE_CV_PARAM].setValue(1.f);
params[SHAPE_CV_PARAM].setValue(1.f);
params[PROB_CV_PARAM].setValue(1.f);
params[RAND_CV_PARAM].setValue(1.f);
// In <2.0, mode=0 implied relative mode, corresponding to about 20% RND.
params[RAND_PARAM].setValue(0.2f);
Module::paramsFromJson(rootJ);

// In <2.0, mode was used for absolute/relative mode. RND is a generalization so set it if mode is enabled.
if (params[MODE_PARAM].getValue() > 0.f) {
void fromJson(json_t* rootJ) override {
Module::fromJson(rootJ);

// Migrate from version <2.0
string::Version version;
json_t* versionJ = json_object_get(rootJ, "version");
if (versionJ)
version = json_string_value(versionJ);
if (version < string::Version("2")) {
// In <2.0, there were no attenuverters, so set them to 1.0 which achieves the old behavior.
params[RATE_CV_PARAM].setValue(1.f);
params[SHAPE_CV_PARAM].setValue(1.f);
params[PROB_CV_PARAM].setValue(1.f);
params[RAND_CV_PARAM].setValue(1.f);

int mode = params[MODE_PARAM].getValue();
// In <2.0, mode=0 implied relative mode, corresponding to about 20% RND.
// Absolute mode is 100% RND
params[RAND_PARAM].setValue(mode == 0 ? 0.2f : 1.f);
params[MODE_PARAM].setValue(0.f); params[MODE_PARAM].setValue(0.f);
params[RAND_PARAM].setValue(1.f);
} }
} }
}; };


+ 0
- 3
src/Split.cpp View File

@@ -19,15 +19,12 @@ struct Split : Module {
}; };


int lastChannels = 0; int lastChannels = 0;
dsp::ClockDivider lightDivider;


Split() { Split() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
configInput(POLY_INPUT, "Polyphonic"); configInput(POLY_INPUT, "Polyphonic");
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
configOutput(MONO_OUTPUTS + i, string::f("Channel %d", i + 1)); configOutput(MONO_OUTPUTS + i, string::f("Channel %d", i + 1));

lightDivider.setDivision(512);
} }


void process(const ProcessArgs& args) override { void process(const ProcessArgs& args) override {


+ 5
- 0
src/dr_wav.c View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
#ifndef dr_wav_c #ifndef dr_wav_c
#define dr_wav_c #define dr_wav_c
@@ -7492,3 +7493,7 @@ 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 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
=======
#define DR_WAV_IMPLEMENTATION
#include "dr_wav.h"
>>>>>>> e80c373575b337720703a41691536272b21b554c

+ 7502
- 0
src/dr_wav.h
File diff suppressed because it is too large
View File


Loading…
Cancel
Save