aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2019-09-06 09:54:58 +0000
committers-ol <s-ol@users.noreply.github.com>2019-09-06 09:54:58 +0000
commit77d1f54c12709aa3bf350b91c0e5ff81c77e353f (patch)
treef922d5642ba5c3642067964ec1c6d06348bf655f /src
parentupdate to rack v1 compat (diff)
downloadvcvmods-77d1f54c12709aa3bf350b91c0e5ff81c77e353f.tar.gz
vcvmods-77d1f54c12709aa3bf350b91c0e5ff81c77e353f.zip
add parameter descriptions
Diffstat (limited to 'src')
-rw-r--r--src/CircleVCO.cpp14
-rw-r--r--src/Modulo.cpp3
-rw-r--r--src/WrapComp.cpp10
-rw-r--r--src/plugin.cpp (renamed from src/s-ol.cpp)2
-rw-r--r--src/plugin.hpp (renamed from src/s-ol.hpp)0
5 files changed, 15 insertions, 14 deletions
diff --git a/src/CircleVCO.cpp b/src/CircleVCO.cpp
index 3749a9a..4bec6a1 100644
--- a/src/CircleVCO.cpp
+++ b/src/CircleVCO.cpp
@@ -1,8 +1,8 @@
-#include "s-ol.hpp"
+#include "plugin.hpp"
struct CircleVCO : Module {
enum ParamIds {
- PITCH_PARAM,
+ FREQ_PARAM,
NUM_PARAMS
};
enum InputIds {
@@ -23,7 +23,7 @@ struct CircleVCO : Module {
CircleVCO() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
- configParam(PITCH_PARAM, -54.0f, 54.0f, 0.0f);
+ configParam(FREQ_PARAM, -54.0f, 54.0f, 0.0f, "Frequency", " Hz", dsp::FREQ_SEMITONE, dsp::FREQ_C4);
}
void process(const ProcessArgs &args) override;
};
@@ -32,9 +32,9 @@ struct CircleVCO : Module {
void CircleVCO::process(const ProcessArgs &args) {
float deltaTime = 1.0f / args.sampleRate;
- float pitch = params[PITCH_PARAM].getValue();
- pitch += 12.0f * inputs[PITCH_INPUT].getVoltage();
- float freq = 261.626f * powf(2.0f, pitch / 12.0f);
+ float pitch = params[FREQ_PARAM].getValue() / 12.f;
+ pitch += inputs[PITCH_INPUT].getVoltage();
+ float freq = dsp::FREQ_C4 * powf(2.f, pitch);
phase += freq * deltaTime;
while (phase >= 1.0f)
@@ -64,7 +64,7 @@ CircleVCOWidget::CircleVCOWidget(CircleVCO *module) {
Vec center = Vec(box.size.x, 0).minus(p.box.size).div(2);
Vec kcenter = Vec(box.size.x, 0).minus(k.box.size).div(2);
- addParam(createParam<RoundSmallBlackKnob>(kcenter.plus(Vec(0, 90)), module, CircleVCO::PITCH_PARAM));
+ addParam(createParam<RoundSmallBlackKnob>(kcenter.plus(Vec(0, 90)), module, CircleVCO::FREQ_PARAM));
addInput(createInput<PJ301MPort>(center.plus(Vec(0, 144)), module, CircleVCO::PITCH_INPUT));
diff --git a/src/Modulo.cpp b/src/Modulo.cpp
index ad85920..8441152 100644
--- a/src/Modulo.cpp
+++ b/src/Modulo.cpp
@@ -1,4 +1,4 @@
-#include "s-ol.hpp"
+#include "plugin.hpp"
struct Modulo : Module {
enum ParamIds {
@@ -22,6 +22,7 @@ struct Modulo : Module {
Modulo() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
configParam(GAIN_PARAM, -3.0, 3.0, 0.0);
+ configParam(GAIN_PARAM, -3.0f, 3.0f, 0.0f, "Gain", "%", 2.0f, 100.0f);
}
void process(const ProcessArgs &args) override;
};
diff --git a/src/WrapComp.cpp b/src/WrapComp.cpp
index 3eaee98..6e47aa0 100644
--- a/src/WrapComp.cpp
+++ b/src/WrapComp.cpp
@@ -1,4 +1,4 @@
-#include "s-ol.hpp"
+#include "plugin.hpp"
struct WrapComp : Module {
enum ParamIds {
@@ -26,10 +26,10 @@ struct WrapComp : Module {
WrapComp() {
config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
- configParam(OFFSET_PARAM, -5.0, 5.0, 0.0);
- configParam(RANGE_PARAM, -5.0, 5.0, 0.0);
- configParam(A_OUT_PARAM, -8.0, 8.0, 1.0);
- configParam(B_OUT_PARAM, -8.0, 8.0, 0.0);
+ configParam(OFFSET_PARAM, -5.0f, 5.0f, 0.0f, "Window Offset", " V");
+ configParam(RANGE_PARAM, -5.0f, 5.0f, 0.0f, "Window Size", " V");
+ configParam(A_OUT_PARAM, -8.0f, 8.0f, 8.0f, "A Output", " V");
+ configParam(B_OUT_PARAM, -8.0f, 8.0f, 0.0f, "B Output", " V");
}
void process(const ProcessArgs &args) override;
};
diff --git a/src/s-ol.cpp b/src/plugin.cpp
index 01f4fd2..ddf1e47 100644
--- a/src/s-ol.cpp
+++ b/src/plugin.cpp
@@ -1,4 +1,4 @@
-#include "s-ol.hpp"
+#include "plugin.hpp"
Plugin *pluginInstance;
diff --git a/src/s-ol.hpp b/src/plugin.hpp
index 64bca42..64bca42 100644
--- a/src/s-ol.hpp
+++ b/src/plugin.hpp