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

Method select

src/extended/SfxrNode.cpp:1034–1047  ·  view source on GitHub ↗

@TODO remove need for context lock see above

Source from the content-addressed store, hash-verified

1032
1033/// @TODO remove need for context lock see above
1034void SfxrNode::select()
1035{
1036 setDefaultBeep();
1037 _waveType->setEnumeration(rnd(1));
1038 if (_waveType->valueUint32() == SQUARE)
1039 _squareDuty->setValue(frnd(0.6f));
1040 else
1041 _squareDuty->setValue(1);
1042 _startFrequency->setValue(0.2f + frnd(0.4f));
1043 _attack->setValue(0);
1044 _sustainTime->setValue(0.1f + frnd(0.1f));
1045 _decayTime->setValue(frnd(0.2f));
1046 _hpFilterCutoff->setValue(0.1f);
1047}
1048
1049void SfxrNode::mutate()
1050{

Callers 1

SfxrNodeMethod · 0.95

Calls 5

rndFunction · 0.85
frndFunction · 0.85
setEnumerationMethod · 0.80
valueUint32Method · 0.80
setValueMethod · 0.80

Tested by

no test coverage detected