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

Method Elements

src/Elements.cpp:81–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 elements::Part* parts[16];
80
81 Elements() {
82 config(NUM_PARAMS, NUM_INPUTS, NUM_OUTPUTS, NUM_LIGHTS);
83 configParam(CONTOUR_PARAM, 0.0, 1.0, 1.0, "Envelope contour");
84 configParam(BOW_PARAM, 0.0, 1.0, 0.0, "Bow exciter");
85 configParam(BLOW_PARAM, 0.0, 1.0, 0.0, "Blow exciter");
86 configParam(STRIKE_PARAM, 0.0, 1.0, 0.5, "Percussive noise amount");
87 configParam(COARSE_PARAM, -30.0, 30.0, 0.0, "Coarse frequency adjustment");
88 configParam(FINE_PARAM, -2.0, 2.0, 0.0, "Fine frequency adjustment");
89 configParam(FM_PARAM, -1.0, 1.0, 0.0, "FM input attenuverter");
90 configParam(FLOW_PARAM, 0.0, 1.0, 0.5, "Air flow noise color");
91 configParam(MALLET_PARAM, 0.0, 1.0, 0.5, "Percussive noise type");
92 configParam(GEOMETRY_PARAM, 0.0, 1.0, 0.5, "Resonator geometry");
93 configParam(BRIGHTNESS_PARAM, 0.0, 1.0, 0.5, "Brightness");
94 configParam(BOW_TIMBRE_PARAM, 0.0, 1.0, 0.5, "Bow timbre");
95 configParam(BLOW_TIMBRE_PARAM, 0.0, 1.0, 0.5, "Blow timbre");
96 configParam(STRIKE_TIMBRE_PARAM, 0.0, 1.0, 0.5, "Strike timbre");
97 configParam(DAMPING_PARAM, 0.0, 1.0, 0.5, "Energy dissipation speed");
98 configParam(POSITION_PARAM, 0.0, 1.0, 0.5, "Excitation position");
99 configParam(SPACE_PARAM, 0.0, 2.0, 0.0, "Reverb space");
100 configParam(BOW_TIMBRE_MOD_PARAM, -1.0, 1.0, 0.0, "Bow timbre attenuverter");
101 configParam(FLOW_MOD_PARAM, -1.0, 1.0, 0.0, "Air flow noise attenuverter");
102 configParam(BLOW_TIMBRE_MOD_PARAM, -1.0, 1.0, 0.0, "Blow timbre attenuverter");
103 configParam(MALLET_MOD_PARAM, -1.0, 1.0, 0.0, "Percussive noise attenuverter");
104 configParam(STRIKE_TIMBRE_MOD_PARAM, -1.0, 1.0, 0.0, "Strike timbre attenuverter");
105 configParam(DAMPING_MOD_PARAM, -1.0, 1.0, 0.0, "Energy dissipation speed attenuverter");
106 configParam(GEOMETRY_MOD_PARAM, -1.0, 1.0, 0.0, "Resonator geometry attenuverter");
107 configParam(POSITION_MOD_PARAM, -1.0, 1.0, 0.0, "Excitation position attenuverter");
108 configParam(BRIGHTNESS_MOD_PARAM, -1.0, 1.0, 0.0, "Brightness attenuverter");
109 configParam(SPACE_MOD_PARAM, -2.0, 2.0, 0.0, "Reverb space attenuverter");
110 configParam(PLAY_PARAM, 0.0, 1.0, 0.0, "Play");
111
112 for (int c = 0; c < 16; c++) {
113 parts[c] = new elements::Part();
114 // In the Mutable Instruments code, Part doesn't initialize itself, so zero it here.
115 std::memset(parts[c], 0, sizeof(*parts[c]));
116 parts[c]->Init(reverb_buffers[c]);
117 // Just some random numbers
118 uint32_t seed[3] = {1, 2, 3};
119 parts[c]->Seed(seed, 3);
120 }
121 }
122
123 ~Elements() {
124 for (int c = 0; c < 16; c++) {

Callers

nothing calls this directly

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected