MCPcopy Create free account
hub / github.com/VCVRack/AudibleInstruments / Braids

Class Braids

src/Braids.cpp:7–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6
7struct Braids : Module {
8 enum ParamIds {
9 FINE_PARAM,
10 COARSE_PARAM,
11 FM_PARAM,
12 TIMBRE_PARAM,
13 MODULATION_PARAM,
14 COLOR_PARAM,
15 SHAPE_PARAM,
16 NUM_PARAMS
17 };
18 enum InputIds {
19 TRIG_INPUT,
20 PITCH_INPUT,
21 FM_INPUT,
22 TIMBRE_INPUT,
23 COLOR_INPUT,
24 NUM_INPUTS
25 };
26 enum OutputIds {
27 OUT_OUTPUT,
28 NUM_OUTPUTS
29 };
30
31 braids::MacroOscillator osc;
32 braids::SettingsData settings;
33 braids::VcoJitterSource jitter_source;
34 braids::SignatureWaveshaper ws;
35
36 dsp::SampleRateConverter<1> src;
37 dsp::DoubleRingBuffer<dsp::Frame<1>, 256> outputBuffer;
38 bool lastTrig = false;
39 bool lowCpu = false;
40
41 Braids() {
42 config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS);
43 configParam(SHAPE_PARAM, 0.0, 1.0, 0.0, "Model");
44 configParam(FINE_PARAM, -1.0, 1.0, 0.0, "Fine frequency", " semitones");
45 configParam(COARSE_PARAM, -5.0, 3.0, -1.0, "Coarse frequency", " semitones", 0.f, 12.f, 12.f);
46 configParam(FM_PARAM, -1.0, 1.0, 0.0, "FM");
47 configParam(TIMBRE_PARAM, 0.0, 1.0, 0.5, "Timbre", "%", 0.f, 100.f);
48 configParam(MODULATION_PARAM, -1.0, 1.0, 0.0, "Modulation");
49 configParam(COLOR_PARAM, 0.0, 1.0, 0.5, "Color", "%", 0.f, 100.f);
50
51 memset(&osc, 0, sizeof(osc));
52 osc.Init();
53 memset(&jitter_source, 0, sizeof(jitter_source));
54 jitter_source.Init();
55 memset(&ws, 0, sizeof(ws));
56 ws.Init(0x0000);
57 memset(&settings, 0, sizeof(settings));
58
59 // List of supported settings
60 settings.meta_modulation = 0;
61 settings.vco_drift = 0;
62 settings.signature = 0;
63 }
64

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected