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

Method Kickall

src/Kickall.cpp:49–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 chowdsp::Oversampling<UPSAMPLE> oversampler;
48
49 Kickall() {
50 config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
51 // TODO: review this mapping, using displayBase multiplier seems more normal
52 configParam(TUNE_PARAM, FREQ_A0, FREQ_B2, 0.5 * (FREQ_A0 + FREQ_B2), "Tune", "Hz");
53 configButton(TRIGG_BUTTON_PARAM, "Manual trigger");
54 configParam(SHAPE_PARAM, 0.f, 1.f, 0.f, "Wave shape");
55 configParam(DECAY_PARAM, 0.f, 1.f, 0.01f, "VCA Envelope decay time");
56 configParam(TIME_PARAM, 0.f, 1.0f, 0.f, "Pitch envelope decay time");
57 configParam(BEND_PARAM, 0.f, 1.f, 0.f, "Pitch envelope attenuator");
58
59 volume.attackTime = 0.01;
60 volume.attackShape = 0.5;
61 volume.decayShape = 3.0;
62 pitch.attackTime = 0.00165;
63 pitch.decayShape = 3.0;
64
65 configInput(TRIGG_INPUT, "Trigger");
66 configInput(VOLUME_INPUT, "Gain");
67 configInput(TUNE_INPUT, "Tune (V/Oct)");
68 configInput(SHAPE_INPUT, "Shape CV");
69 configInput(DECAY_INPUT, "Decay CV");
70
71 configOutput(OUT_OUTPUT, "Kick");
72 configLight(ENV_LIGHT, "Volume envelope");
73
74 // calculate up/downsampling rates
75 onSampleRateChange();
76 }
77
78 void onSampleRateChange() override {
79 oversampler.reset(APP->engine->getSampleRate());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected