MCPcopy Create free account
hub / github.com/VCVRack/Rack / config

Method config

src/engine/Module.cpp:59–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58
59void Module::config(int numParams, int numInputs, int numOutputs, int numLights) {
60 // This method should only be called once.
61 assert(params.empty() && inputs.empty() && outputs.empty() && lights.empty() && paramQuantities.empty());
62 params.resize(numParams);
63 inputs.resize(numInputs);
64 outputs.resize(numOutputs);
65 lights.resize(numLights);
66 // Initialize paramQuantities
67 paramQuantities.resize(numParams);
68 for (int i = 0; i < numParams; i++) {
69 configParam(i, 0.f, 1.f, 0.f);
70 }
71 // Initialize PortInfos
72 inputInfos.resize(numInputs);
73 for (int i = 0; i < numInputs; i++) {
74 configInput(i);
75 }
76 outputInfos.resize(numOutputs);
77 for (int i = 0; i < numOutputs; i++) {
78 configOutput(i);
79 }
80 // Initialize LightInfos with null
81 lightInfos.resize(numLights);
82}
83
84
85std::string Module::createPatchStorageDirectory() {

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected