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

Method resetChannelToDefaults

src/Random8.cpp:178–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 }
177
178 void resetChannelToDefaults(int channel) {
179 if (channel < 0 || channel >= NUM_CHANNELS) {
180 return;
181 }
182
183 params[GAIN_VALUE_PARAM + channel].setValue(0.5f);
184 params[DIVIDER_VALUE_PARAM + channel].setValue(1.f);
185 params[PROB_VALUE_PARAM + channel].setValue(100.f);
186 params[STYLE_VALUE_PARAM + channel].setValue(0.f);
187 params[OFFSET_VALUE_PARAM + channel].setValue(0.f);
188 params[SCALE_VALUE_PARAM + channel].setValue(1.f);
189 params[SLIDE_VALUE_PARAM + channel].setValue(0.f);
190 params[STEPS_VALUE_PARAM + channel].setValue(16.f);
191
192 core.resetChannel(channel);
193 loopModes[channel] = 0;
194 channelParamsDirty[channel] = true;
195 }
196
197 void onReset(const ResetEvent &e) override {
198 inMenu = false;

Callers 1

appendContextMenuMethod · 0.80

Calls 2

setValueMethod · 0.80
resetChannelMethod · 0.80

Tested by

no test coverage detected