MCPcopy Create free account
hub / github.com/LabSound/LabSound / DiodeNode

Method DiodeNode

src/extended/DiodeNode.cpp:28–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28DiodeNode::DiodeNode(AudioContext & ac)
29 : WaveShaperNode(ac, *desc())
30{
31 _distortion = setting("distortion");
32 _vb = setting("vb");
33 _vl = setting("vl");
34 _vb->setFloat(0.2f);
35 _vl->setFloat(0.4f);
36 setDistortion(1.f);
37
38 _distortion->setValueChanged([this]() {
39 this->_precalc();
40 });
41 _vb->setValueChanged([this]() {
42 this->_precalc();
43 });
44 _vl->setValueChanged([this]() {
45 this->_precalc();
46 });
47
48 initialize();
49}
50
51void DiodeNode::setDistortion(float distortion)
52{

Callers

nothing calls this directly

Calls 3

_precalcMethod · 0.95
setFloatMethod · 0.80
setValueChangedMethod · 0.80

Tested by

no test coverage detected