MCPcopy Create free account
hub / github.com/VCVRack/Befaco / updateLEDRing

Method updateLEDRing

src/Burst.cpp:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263 }
264
265 void updateLEDRing(const ProcessArgs& args) {
266 int activeLed;
267 if (burstEngine.active) {
268 activeLed = (burstEngine.triggersOccurred - 1) % 16;
269 }
270 else {
271 activeLed = (((int) params[QUANTITY_PARAM].getValue() - 1) % 16);
272 }
273 for (int i = 0; i < 16; ++i) {
274 lights[QUANTITY_LIGHTS + i].setBrightnessSmooth(i == activeLed, args.sampleTime * ledUpdateRate);
275 }
276 }
277
278 json_t* dataToJson() override {
279 json_t* rootJ = json_object();

Callers

nothing calls this directly

Calls 1

getValueMethod · 0.80

Tested by

no test coverage detected