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

Method setDefaultBeep

src/extended/SfxrNode.cpp:816–863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814// https://github.com/grumdrig/jsfxr/blob/master/sfxr.js
815
816void SfxrNode::setDefaultBeep()
817{
818 // Wave shape
819 _waveType->setEnumeration(SQUARE);
820
821 // Envelope
822 _attack->setValue(0);
823 _sustainTime->setValue(0.3f);
824 _sustainPunch->setValue(0);
825 _decayTime->setValue(0.4f);
826
827 // Tone
828 _startFrequency->setValue(0.3f);
829 _minFrequency->setValue(0);
830 _slide->setValue(0);
831 _deltaSlide->setValue(0);
832
833 // Vibrato
834 _vibratoDepth->setValue(0);
835 _vibratoSpeed->setValue(0);
836
837 // Tonal change
838 _changeAmount->setValue(0);
839 _changeSpeed->setValue(0);
840
841 // Square wave duty (proportion of time signal is high vs. low)
842 _squareDuty->setValue(0);
843 _dutySweep->setValue(0);
844
845 // Repeat
846 _repeatSpeed->setValue(0);
847
848 // Flanger
849 _phaserOffset->setValue(0);
850 _phaserSweep->setValue(0);
851
852 // Low-pass filter
853 _lpFilterCutoff->setValue(1);
854 _lpFilterCutoffSweep->setValue(0);
855 _lpFilterResonance->setValue(0);
856 _hpFilterCutoff->setValue(0);
857 _hpFilterCutoffSweep->setValue(0);
858
859 // Sample parameters
860 sfxr->sound_vol = 0.5f;
861 sfxr->wav_freq = 44100;
862 sfxr->wav_bits = 16;
863}
864
865void SfxrNode::coin()
866{

Callers 1

SfxrNodeMethod · 0.95

Calls 2

setEnumerationMethod · 0.80
setValueMethod · 0.80

Tested by

no test coverage detected