computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit bb56e007b9c016684031062fd1bef4fe7fc52385
parent 6e0b908ecd06b86c4a24f9a2a934786b5f874fb7
Author: Adam M <aemalone@gmail.com>
Date:   Sat,  4 Aug 2018 13:53:03 -0500

added ignore bulid directory

Diffstat:
M.DS_Store | 0
A.gitignore | 1+
Mbuild/src/ComputerscareDebug.cpp.o | 0
Mbuild/src/ComputerscarePatchSequencer.cpp.o | 0
Msrc/ComputerscareDebug.cpp | 21++-------------------
Msrc/ComputerscarePatchSequencer.cpp | 23++++++++++-------------
6 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/.DS_Store b/.DS_Store Binary files differ. diff --git a/.gitignore b/.gitignore @@ -0,0 +1 @@ +/build diff --git a/build/src/ComputerscareDebug.cpp.o b/build/src/ComputerscareDebug.cpp.o Binary files differ. diff --git a/build/src/ComputerscarePatchSequencer.cpp.o b/build/src/ComputerscarePatchSequencer.cpp.o Binary files differ. diff --git a/src/ComputerscareDebug.cpp b/src/ComputerscareDebug.cpp @@ -36,13 +36,10 @@ struct ComputerscareDebug : Module { int lineCounter = 0; - float phase = 0.0; - float blinkPhase = 0.0; - SchmittTrigger clockTrigger; SchmittTrigger clearTrigger; SchmittTrigger manualClockTrigger; - SchmittTrigger manualClearTrigger; + SchmittTrigger manualClearTrigger; ComputerscareDebug() : Module(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS) {} void step() override; @@ -57,28 +54,18 @@ struct ComputerscareDebug : Module { void ComputerscareDebug::step() { std::string thisVal; if (clockTrigger.process(inputs[TRG_INPUT].value / 2.f) || manualClockTrigger.process(params[MANUAL_TRIGGER].value)) { - //textField->text = inputs[VAL_INPUT].value; - //std::stringstream ss; - //ss << "Hello, world, " << myInt << niceToSeeYouString; - //std::string s = ss.str(); for( unsigned int a = NUM_LINES-1; a > 0; a = a - 1 ) { logLines[a] = logLines[a-1]; - //cout << "value of a: " << texts[a] << endl; } logLines[0] = inputs[VAL_INPUT].value; thisVal = std::to_string(logLines[0]).substr(0,10); for( unsigned int a = 1; a < NUM_LINES; a = a + 1 ) { - //logLines[a] = logLines[a-1]; thisVal = thisVal + "\n" + std::to_string(logLines[a]).substr(0,10); - //strValue = strValue; - //cout << "value of a: " << texts[a] << endl; } - - //thisVal = std::to_string(inputs[VAL_INPUT].value).substr(0,10); strValue = thisVal; } if(clearTrigger.process(inputs[CLR_INPUT].value / 2.f) || manualClearTrigger.process(params[MANUAL_CLEAR_TRIGGER].value)) { @@ -123,7 +110,6 @@ struct StringDisplayWidget3 : TransparentWidget { Vec textPos = Vec(6.0f, 12.0f); NVGcolor textColor = nvgRGB(0xC0, 0xE7, 0xDE); nvgFillColor(vg, textColor); - // nvgText(vg, textPos.x, textPos.y, to_display.str().c_str(), NULL); nvgTextBox(vg, textPos.x, textPos.y,80,to_display.str().c_str(), NULL); } @@ -135,8 +121,6 @@ struct ComputerscareDebugWidget : ModuleWidget { ComputerscareDebugWidget(ComputerscareDebug *module) : ModuleWidget(module) { setPanel(SVG::load(assetPlugin(plugin, "res/ComputerscareDebugVectorGradient.svg"))); - //addParam(ParamWidget::create<Davies1900hBlackKnob>(Vec(28, 287), module, ComputerscareDebug::PITCH_PARAM, -3.0, 3.0, 0.0)); - addInput(Port::create<InPort>(Vec(3, 330), Port::INPUT, module, ComputerscareDebug::TRG_INPUT)); addInput(Port::create<InPort>(Vec(33, 330), Port::INPUT, module, ComputerscareDebug::VAL_INPUT)); addInput(Port::create<InPort>(Vec(63, 330), Port::INPUT, module, ComputerscareDebug::CLR_INPUT)); @@ -144,7 +128,6 @@ struct ComputerscareDebugWidget : ModuleWidget { addParam(ParamWidget::create<LEDButton>(Vec(3, 290), module, ComputerscareDebug::MANUAL_TRIGGER, 0.0, 1.0, 0.0)); addParam(ParamWidget::create<LEDButton>(Vec(63, 290), module, ComputerscareDebug::MANUAL_CLEAR_TRIGGER, 0.0, 1.0, 0.0)); - StringDisplayWidget3 *display = new StringDisplayWidget3(); display->box.pos = Vec(1,24); display->box.size = Vec(88, 250); @@ -159,4 +142,4 @@ struct ComputerscareDebugWidget : ModuleWidget { // author name for categorization per plugin, module slug (should never // change), human-readable module name, and any number of tags // (found in `include/tags.hpp`) separated by commas. -Model *modelComputerscareDebug = Model::create<ComputerscareDebug, ComputerscareDebugWidget>("computerscare", "ComputerscareDebug", "Debug", UTILITY_TAG); +Model *modelComputerscareDebug = Model::create<ComputerscareDebug, ComputerscareDebugWidget>("computerscare", "computerscare-debug", "Debug", UTILITY_TAG); diff --git a/src/ComputerscarePatchSequencer.cpp b/src/ComputerscarePatchSequencer.cpp @@ -405,9 +405,9 @@ struct ComputerscarePatchSequencerWidget : ModuleWidget { ComputerscarePatchSequencerWidget(ComputerscarePatchSequencer *module) : ModuleWidget(module) { setPanel(SVG::load(assetPlugin(plugin, "res/ComputerscarePatchSequencer.svg"))); - int top_row = 75; - int row_spacing = 25; - int column_spacing = 25; + int top_row = 70; + int row_spacing = 26; + int column_spacing = 26; for (int i = 0 ; i < 10 ; i++) { @@ -429,34 +429,32 @@ struct ComputerscarePatchSequencerWidget : ModuleWidget { //clock input addInput(Port::create<InPort>(Vec(3, 0), Port::INPUT, module, ComputerscarePatchSequencer::TRG_INPUT)); - //manual clock button + + //manual clock button addParam(ParamWidget::create<LEDButton>(Vec(7 , 41), module, ComputerscarePatchSequencer::MANUAL_CLOCK_PARAM, 0.0, 1.0, 0.0)); - //randomize input addInput(Port::create<InPort>(Vec(270, 0), Port::INPUT, module, ComputerscarePatchSequencer::RANDOMIZE_INPUT)); - - - //active step display + //active step display NumberDisplayWidget3 *display = new NumberDisplayWidget3(); display->box.pos = Vec(30,40); display->box.size = Vec(50, 20); display->value = &module->addressPlusOne; addChild(display); - // number of steps + // number of steps display NumberDisplayWidget3 *stepsDisplay = new NumberDisplayWidget3(); stepsDisplay->box.pos = Vec(150,40); stepsDisplay->box.size = Vec(50, 20); stepsDisplay->value = &module->numAddresses; addChild(stepsDisplay); - //number-of-steps dial. Discrete - 16 positions + //number-of-steps dial. Discrete, 16 positions ParamWidget* stepsKnob = ParamWidget::create<LrgKnob>(Vec(108,30), module, ComputerscarePatchSequencer::STEPS_PARAM, 1.0f, 16.0f, 2.0f); addParam(stepsKnob); - //editAddress button + //editAddressNext button addParam(ParamWidget::create<LEDButton>(Vec(227 , 41), module, ComputerscarePatchSequencer::EDIT_PARAM, 0.0, 1.0, 0.0)); //editAddressPrevious button @@ -468,10 +466,9 @@ struct ComputerscarePatchSequencerWidget : ModuleWidget { displayEdit->box.size = Vec(50, 20); displayEdit->value = &module->editAddressPlusOne; addChild(displayEdit); - } + } }; - // Specify the Module and ModuleWidget subclass, human-readable // author name for categorization per plugin, module slug (should never // change), human-readable module name, and any number of tags