| 963 | } |
| 964 | |
| 965 | void SfxrNode::powerUp() |
| 966 | { |
| 967 | setDefaultBeep(); |
| 968 | if (rnd(1)) |
| 969 | { |
| 970 | _waveType->setEnumeration(SAWTOOTH); |
| 971 | _squareDuty->setValue(1); |
| 972 | } |
| 973 | else |
| 974 | { |
| 975 | _squareDuty->setValue(frnd(0.6f)); |
| 976 | } |
| 977 | _startFrequency->setValue(0.2f + frnd(0.3f)); |
| 978 | if (rnd(1)) |
| 979 | { |
| 980 | _slide->setValue(0.1f + frnd(0.4f)); |
| 981 | _repeatSpeed->setValue(0.4f + frnd(0.4f)); |
| 982 | } |
| 983 | else |
| 984 | { |
| 985 | _slide->setValue(0.05f + frnd(0.2f)); |
| 986 | if (rnd(1)) |
| 987 | { |
| 988 | _vibratoDepth->setValue(frnd(0.7f)); |
| 989 | _vibratoSpeed->setValue(frnd(0.6f)); |
| 990 | } |
| 991 | } |
| 992 | _attack->setValue(0); |
| 993 | _sustainTime->setValue(frnd(0.4f)); |
| 994 | _decayTime->setValue(0.1f + frnd(0.4f)); |
| 995 | } |
| 996 | |
| 997 | /// @TODO remove need for context lock see above |
| 998 | void SfxrNode::hit() |
no test coverage detected