computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit edceab01493bdb8dd15725a10cce42a693c1283e
parent 77aeb0c674ad67d2d811d1037b699954c25c24eb
Author: Adam M <aemalone@gmail.com>
Date:   Fri, 29 Oct 2021 16:27:10 -0500

button labels, and use configButton and configSwitch where applicable

Diffstat:
Msrc/ComputerscareBolyPuttons.cpp | 2+-
Msrc/ComputerscareDebug.cpp | 8++++----
Msrc/ComputerscareILoveCookies.cpp | 16++++++++++++----
Msrc/ComputerscareLaundrySoup.cpp | 16++++++++++++----
Msrc/ComputerscarePatchSequencer.cpp | 12++++++++++++
Msrc/ComputerscareSolyPequencer.cpp | 4++--
6 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/src/ComputerscareBolyPuttons.cpp b/src/ComputerscareBolyPuttons.cpp @@ -40,7 +40,7 @@ struct ComputerscareBolyPuttons : ComputerscarePolyModule { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); for (int i = 0; i < numToggles; i++) { - configParam(TOGGLE + i, 0.f, 1.f, 0.f, "Channel " + std::to_string(i + 1)); + configSwitch(TOGGLE + i, 0.f, 1.f, 0.f, "Channel " + std::to_string(i + 1), {"A", "B"}); } configParam<AutoParamQuantity>(POLY_CHANNELS, 0.f, 16.f, 16.f, "Poly Channels"); diff --git a/src/ComputerscareDebug.cpp b/src/ComputerscareDebug.cpp @@ -68,10 +68,10 @@ struct ComputerscareDebug : Module { ComputerscareDebug() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - configParam(MANUAL_TRIGGER, 0.0f, 1.0f, 0.0f, "Manual Trigger"); - configParam(MANUAL_CLEAR_TRIGGER, 0.0f, 1.0f, 0.0f, "Clear"); - configParam(SWITCH_VIEW, 0.0f, 2.0f, 2.0f, "Input Mode"); - configParam(WHICH_CLOCK, 0.0f, 2.0f, 1.0f, "Clock Mode"); + configButton(MANUAL_TRIGGER, "Manual Trigger"); + configButton(MANUAL_CLEAR_TRIGGER, "Reset/Clear"); + configSwitch(SWITCH_VIEW, 0.0f, 2.0f, 2.0f, "Input Mode", {"Single-Channel", "Internal", "Polyphonic"}); + configSwitch(WHICH_CLOCK, 0.0f, 2.0f, 1.0f, "Clock Mode", {"Single-Channel", "Internal", "Polyphonic"}); configParam(CLOCK_CHANNEL_FOCUS, 0.f, 15.f, 0.f, "Clock Channel Selector"); configParam(INPUT_CHANNEL_FOCUS, 0.f, 15.f, 0.f, "Input Channel Selector"); diff --git a/src/ComputerscareILoveCookies.cpp b/src/ComputerscareILoveCookies.cpp @@ -102,11 +102,15 @@ struct ComputerscareILoveCookies : Module { checkIfShouldChange(i); resetOneOfThem(i); - configInput(CLOCK_INPUT + i, "Row " + std::to_string(i + 1) + " Clock"); - configInput(RESET_INPUT + i, "Row " + std::to_string(i + 1) + " Reset"); + std::string rowi = std::to_string(i + 1); - configOutput(TRG_OUTPUT + i, "Row " + std::to_string(i + 1) + " CV"); - configOutput(FIRST_STEP_OUTPUT + i, "Row " + std::to_string(i + 1) + " End of Cycle"); + configButton(INDIVIDUAL_RESET_PARAM + i, "Reset Row " + rowi ); + + configInput(CLOCK_INPUT + i, "Row " + rowi + " Clock"); + configInput(RESET_INPUT + i, "Row " + rowi + " Reset"); + + configOutput(TRG_OUTPUT + i, "Row " + rowi + " CV"); + configOutput(FIRST_STEP_OUTPUT + i, "Row " + rowi + " End of Cycle"); } for (int k = 0; k < numKnobs; k++) { configParam( KNOB_PARAM + k, 0.f, 10.f, 0.0f, string::f("knob %c", knoblookup[k])); @@ -114,8 +118,12 @@ struct ComputerscareILoveCookies : Module { configInput(SIGNAL_INPUT + k, string::f("%c", uppercaseLetters.at(k))); } + configButton(MANUAL_CLOCK_PARAM, "Manual Clock Advance"); + configButton(MANUAL_RESET_PARAM, "Manual Reset"); + configInput(GLOBAL_CLOCK_INPUT, "Global Clock"); configInput(GLOBAL_RESET_INPUT, "Global Reset"); + } json_t *dataToJson() override { json_t *rootJ = json_object(); diff --git a/src/ComputerscareLaundrySoup.cpp b/src/ComputerscareLaundrySoup.cpp @@ -114,17 +114,25 @@ struct ComputerscareLaundrySoup : Module { checkIfShouldChange(i); resetOneOfThem(i); - configInput(CLOCK_INPUT + i, "Row " + std::to_string(i + 1) + " Clock"); - configInput(RESET_INPUT + i, "Row " + std::to_string(i + 1) + " Reset"); + std::string rowi = std::to_string(i + 1); - configOutput(TRG_OUTPUT + i, "Row " + std::to_string(i + 1) + " Trigger"); - configOutput(FIRST_STEP_OUTPUT + i, "Row " + std::to_string(i + 1) + " End of Cycle"); + configButton(INDIVIDUAL_RESET_PARAM + i, "Reset Row " + rowi ); + + configInput(CLOCK_INPUT + i, "Row " + rowi + " Clock"); + configInput(RESET_INPUT + i, "Row " + rowi + " Reset"); + + configOutput(TRG_OUTPUT + i, "Row " + rowi + " Trigger"); + configOutput(FIRST_STEP_OUTPUT + i, "Row " + rowi + " End of Cycle"); LaundryPoly lp = LaundryPoly(currentFormula[i]); laundryPoly[i] = lp; channelCountEnum[i] = -1; channelCount[i] = 1; } + + configButton(MANUAL_CLOCK_PARAM, "Manual Clock Advance"); + configButton(MANUAL_RESET_PARAM, "Manual Reset"); + configInput(GLOBAL_CLOCK_INPUT, "Global Clock"); configInput(GLOBAL_RESET_INPUT, "Global Reset"); } diff --git a/src/ComputerscarePatchSequencer.cpp b/src/ComputerscarePatchSequencer.cpp @@ -76,8 +76,20 @@ struct ComputerscarePatchSequencer : Module { configInput(INPUT_JACKS + i, "Row " + std::to_string(i + 1)); configOutput(OUTPUTS + i, "Column " + std::to_string(i + 1)); } + + for (int inRow = 0; inRow < numInputs; inRow++) { + for (int outCol = 0; outCol < numOutputs; outCol++) { + configButton(SWITCHES + outCol * numInputs + inRow, "Toggle Input Row " + std::to_string(inRow + 1) + ",Output Column " + std::to_string(outCol + 1)); + } + } getParamQuantity(STEPS_PARAM)->randomizeEnabled = false; + configButton(MANUAL_CLOCK_PARAM, "Manual Scene Advance"); + configButton(RESET_PARAM, "Reset To Scene 1"); + + configButton(EDIT_PARAM, "Edit Next Scene"); + configButton(EDIT_PREV_PARAM, "Edit Previous Scene"); + configInput(TRG_INPUT, "Clock"); configInput(RESET_INPUT, "Reset Trigger"); configInput(RANDOMIZE_INPUT, "Randomize Trigger"); diff --git a/src/ComputerscareSolyPequencer.cpp b/src/ComputerscareSolyPequencer.cpp @@ -47,8 +47,8 @@ struct ComputerscareSolyPequencer : ComputerscarePolyModule { ComputerscareSolyPequencer() { config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS); - configParam(MANUAL_CLOCK_BUTTON, 0.f, 1.f, 0.f); - configParam(MANUAL_RESET_BUTTON, 0.f, 1.f, 0.f); + configButton(MANUAL_CLOCK_BUTTON, "Manual Clock Advance"); + configButton(MANUAL_RESET_BUTTON, "Manual Reset"); configParam<AutoParamQuantity>(POLY_CHANNELS, 0.f, 16.f, 16.f, "Poly Channels"); getParamQuantity(POLY_CHANNELS)->randomizeEnabled = false;