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

Method explosion

src/extended/SfxrNode.cpp:926–963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

924}
925
926void SfxrNode::explosion()
927{
928 setDefaultBeep();
929 _waveType->setEnumeration(NOISE);
930 if (rnd(1))
931 {
932 _startFrequency->setValue(sqr(0.1f + frnd(0.4f)));
933 _slide->setValue(-0.1f + frnd(0.4f));
934 }
935 else
936 {
937 _startFrequency->setValue(sqr(0.2f + frnd(0.7f)));
938 _slide->setValue(-0.2f - frnd(0.2f));
939 }
940 if (rnd(4) == 0)
941 _slide->setValue(0);
942 if (rnd(2) == 0)
943 _repeatSpeed->setValue(0.3f + frnd(0.5f));
944 _attack->setValue(0);
945 _sustainTime->setValue(0.1f + frnd(0.3f));
946 _decayTime->setValue(frnd(0.5f));
947 if (rnd(1))
948 {
949 _phaserOffset->setValue(-0.3f + frnd(0.9f));
950 _phaserSweep->setValue(-frnd(0.3f));
951 }
952 _sustainPunch->setValue(0.2f + frnd(0.6f));
953 if (rnd(1))
954 {
955 _vibratoDepth->setValue(frnd(0.7f));
956 _vibratoSpeed->setValue(frnd(0.6f));
957 }
958 if (rnd(2) == 0)
959 {
960 _changeSpeed->setValue(0.6f + frnd(0.3f));
961 _changeAmount->setValue(0.8f - frnd(1.6f));
962 }
963}
964
965void SfxrNode::powerUp()
966{

Callers 1

SfxrNodeMethod · 0.95

Calls 5

rndFunction · 0.85
sqrFunction · 0.85
frndFunction · 0.85
setEnumerationMethod · 0.80
setValueMethod · 0.80

Tested by

no test coverage detected