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

Method GetIndividualValue

Source/ModulationChain.cpp:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48float ModulationChain::GetIndividualValue(int samplesIn) const
49{
50 double time = gTime + gInvSampleRateMs * samplesIn;
51 float value;
52 if (mRamp.HasValue(time))
53 value = mRamp.Value(time);
54 else
55 value = 0;
56 if (mLFOAmount != 0)
57 value += mLFO.Value(samplesIn) * mLFOAmount;
58 if (mBuffer != nullptr && samplesIn >= 0 && samplesIn < gBufferSize)
59 value += mBuffer[samplesIn];
60 return value;
61}
62
63void ModulationChain::SetValue(float value)
64{

Callers 2

GetValueMethod · 0.80
PlayNoteMethod · 0.80

Calls 2

HasValueMethod · 0.80
ValueMethod · 0.45

Tested by

no test coverage detected