computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit 6b4575ef2ee7c47c8c890b8b6823fcf4c36b4666
parent 2d3e0839498b0e1a4e2d075d478928b677cab5d4
Author: Adam M <aemalone@gmail.com>
Date:   Sat, 16 Oct 2021 09:55:56 -0500

lots of modulewidget fromjson commenting out and removal of randomize overrides.  Must be fixed later

Diffstat:
Msrc/ComputerscareBolyPuttons.cpp | 4++--
Msrc/ComputerscareDebug.cpp | 5++---
Msrc/ComputerscareILoveCookies.cpp | 9++++-----
Msrc/ComputerscareLaundrySoup.cpp | 48++++++++++++++++++++++++------------------------
Msrc/ComputerscareMolyPatrix.cpp | 6++----
Msrc/ComputerscareOhPeas.cpp | 4++--
Msrc/ComputerscarePatchSequencer.cpp | 18+++++++++---------
7 files changed, 45 insertions(+), 49 deletions(-)

diff --git a/src/ComputerscareBolyPuttons.cpp b/src/ComputerscareBolyPuttons.cpp @@ -264,11 +264,11 @@ struct ComputerscareBolyPuttonsWidget : ModuleWidget { } - void fromJson(json_t *rootJ) override + /*void fromJson(json_t *rootJ) override { ModuleWidget::fromJson(rootJ); bolyPuttons->legacyJSON(rootJ); - } + }*/ void appendContextMenu(Menu *menu) override; DisableableParamWidget* button; diff --git a/src/ComputerscareDebug.cpp b/src/ComputerscareDebug.cpp @@ -271,7 +271,6 @@ struct HidableSmallSnapKnob : SmallSnapKnob { Widget::draw(args); } }; - void randomize() override { return; } }; //////////////////////////////////// struct StringDisplayWidget3 : Widget { @@ -405,7 +404,7 @@ struct ComputerscareDebugWidget : ModuleWidget { json_object_set_new(rootJ, "lines", sequencesJ); return rootJ; }*/ - void fromJson(json_t *rootJ) override + /*void fromJson(json_t *rootJ) override { float val; ModuleWidget::fromJson(rootJ); @@ -426,7 +425,7 @@ struct ComputerscareDebugWidget : ModuleWidget { } - } + }*/ void appendContextMenu(Menu *menu) override; ComputerscareDebug *debug; }; diff --git a/src/ComputerscareILoveCookies.cpp b/src/ComputerscareILoveCookies.cpp @@ -1,7 +1,6 @@ #include "Computerscare.hpp" #include "dsp/digital.hpp" #include "dsp/filter.hpp" -#include "window.hpp" #include "dtpulse.hpp" #include <string> @@ -666,7 +665,7 @@ struct ComputerscareILoveCookiesWidget : ModuleWidget { } - void fromJson(json_t *rootJ) override + /*void fromJson(json_t *rootJ) override { std::string val; ModuleWidget::fromJson(rootJ); json_t *sequencesJ = json_object_get(rootJ, "sequences");//legacy @@ -681,7 +680,7 @@ struct ComputerscareILoveCookiesWidget : ModuleWidget { } cookies->jsonLoaded = true; } - /*else { + else { json_t *textJLegacy = json_object_get(rootJ, "data"); if (textJLegacy) { json_t *seqJLegacy = json_object_get(textJLegacy, "sequences"); @@ -696,8 +695,8 @@ struct ComputerscareILoveCookiesWidget : ModuleWidget { } } } - }*/ - } + } + }*/ ComputerscareILoveCookies *cookies; diff --git a/src/ComputerscareLaundrySoup.cpp b/src/ComputerscareLaundrySoup.cpp @@ -614,33 +614,33 @@ struct ComputerscareLaundrySoupWidget : ModuleWidget { } } } + /*This is a deprecated method, but since I used ModuleWidget::toJson to save the custom sequences, + old patches have "sequences" at the root of the JSON serialization. Module::dataFromJSON does not provide + the root object, just the "data" key, so this is the only way to get the sequences from patches prior to v1.2 + + */ + /* void fromJson(json_t *rootJ) override + { + + std::string val; + ModuleWidget::fromJson(rootJ); + + json_t *seqJLegacy = json_object_get(rootJ, "sequences"); + if (seqJLegacy) { + for (int i = 0; i < numFields; i++) { + json_t *sequenceJ = json_array_get(seqJLegacy, i); + if (sequenceJ) { + val = json_string_value(sequenceJ); + laundry->currentTextFieldValue[i] = val; + laundry->manualSet[i] = true; + } - void fromJson(json_t *rootJ) override - { - /*This is a deprecated method, but since I used ModuleWidget::toJson to save the custom sequences, - old patches have "sequences" at the root of the JSON serialization. Module::dataFromJSON does not provide - the root object, just the "data" key, so this is the only way to get the sequences from patches prior to v1.2 - - */ - std::string val; - ModuleWidget::fromJson(rootJ); - - json_t *seqJLegacy = json_object_get(rootJ, "sequences"); - if (seqJLegacy) { - for (int i = 0; i < numFields; i++) { - json_t *sequenceJ = json_array_get(seqJLegacy, i); - if (sequenceJ) { - val = json_string_value(sequenceJ); - laundry->currentTextFieldValue[i] = val; - laundry->manualSet[i] = true; - } - - } - laundry->jsonLoaded = true; - } + } + laundry->jsonLoaded = true; + } - } + }*/ ComputerscareLaundrySoup *laundry; LaundryTF2 *textFieldTemp; diff --git a/src/ComputerscareMolyPatrix.cpp b/src/ComputerscareMolyPatrix.cpp @@ -139,7 +139,6 @@ struct DisableableSmallKnob : RoundKnob { setSvg(enabledThemes[themeIndex]); shadow->box.size = math::Vec(0, 0); shadow->opacity = 0.f; - dirtyValue = -21.f; } void draw(const DrawArgs& args) override { @@ -147,7 +146,6 @@ struct DisableableSmallKnob : RoundKnob { bool candidateDisabled = (module->numInputChannels != 0 && inputChannel > module->numInputChannels - 1 || outputChannel > module->polyChannels - 1) ; if (disabled != candidateDisabled || !initialized) { setSvg(candidateDisabled ? disabledSvg : enabledThemes[themeIndex]); - dirtyValue = -20.f; disabled = candidateDisabled; initialized = true; } @@ -156,14 +154,14 @@ struct DisableableSmallKnob : RoundKnob { } RoundKnob::draw(args); } - void randomize() override { + /*void randomize() override { if (randomizable) { RoundKnob::randomize(); } else { return; } - } + }*/ }; struct ComputerscareMolyPatrixWidget : ModuleWidget { diff --git a/src/ComputerscareOhPeas.cpp b/src/ComputerscareOhPeas.cpp @@ -362,7 +362,7 @@ struct ComputerscareOhPeasWidget : ModuleWidget peas = module; } - void fromJson(json_t *rootJ) override + /*void fromJson(json_t *rootJ) override { std::string val; ModuleWidget::fromJson(rootJ); @@ -373,7 +373,7 @@ struct ComputerscareOhPeasWidget : ModuleWidget peas->currentFormula = json_string_value(textJ); peas->manualSet = true; } - } + }*/ ComputerscareOhPeas *peas; PeasTF2 *textFieldTemp; diff --git a/src/ComputerscarePatchSequencer.cpp b/src/ComputerscarePatchSequencer.cpp @@ -535,15 +535,15 @@ struct ComputerscarePatchSequencerWidget : ModuleWidget { } - void fromJson(json_t *rootJ) override - { - ModuleWidget::fromJson(rootJ); - json_t *button_statesJ = json_object_get(rootJ, "buttons"); - if (button_statesJ) { - //there be legacy JSON - fatherSon->dataFromJson(rootJ); - } - } + /* void fromJson(json_t *rootJ) override + { + ModuleWidget::fromJson(rootJ); + json_t *button_statesJ = json_object_get(rootJ, "buttons"); + if (button_statesJ) { + //there be legacy JSON + fatherSon->dataFromJson(rootJ); + } + }*/ void appendContextMenu(Menu *menu) override; ComputerscarePatchSequencer *fatherSon;