MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / Set

Method Set

Source/ADSR.cpp:32–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include "SynthGlobals.h"
31
32void ::ADSR::Set(float a, float d, float s, float r, float h /*=-1*/)
33{
34 mStages[0].target = 1;
35 mStages[0].time = MAX(a, 1);
36 mStages[0].curve = 0;
37 mStages[1].target = MAX(s, .0001f);
38 mStages[1].time = MAX(d, 1);
39 mStages[1].curve = -.5f;
40 mStages[2].target = 0;
41 mStages[2].time = MAX(r, 1);
42 mStages[2].curve = -.5f;
43 mNumStages = 3;
44 mSustainStage = 1;
45 mMaxSustain = h;
46 mHasSustainStage = true;
47}
48
49void ::ADSR::Set(const ADSR& other)
50{

Callers 8

ProcessAudioMethod · 0.45
OnClickedMethod · 0.45
SetADSRMethod · 0.45
StartMethod · 0.45
SingleOscillatorMethod · 0.45
SamplerMethod · 0.45
SetFilterParamsMethod · 0.45
OnClickedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected