Skip to content

Commit cd9d368

Browse files
committed
Adjust rwa default convergence.
1 parent 33d04c1 commit cd9d368

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/audio/include/audio/AudioUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace l::audio {
4444
return false;
4545
}
4646

47-
FilterRWA<T>& SetConvergenceInMs(T convergenceInMS, T limit = static_cast<T>(0.0001)) {
47+
FilterRWA<T>& SetConvergenceInMs(T convergenceInMS, T limit = static_cast<T>(0.001)) {
4848
mSmooth = GetRWAFactorFromMS(convergenceInMS, limit);
4949
return *this;
5050
}

packages/nodegraph/include/nodegraph/operations/NodeGraphOpControl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ namespace l::nodegraph {
3636
mNodeInputManager.AddInputBase(InputTypeBase::CONSTANT_VALUE, AddInput("Rate", 256.0f, 1, 1.0f, 2048.0f));
3737
mNodeInputManager.AddInputBase(InputTypeBase::INTERPOLATED, AddInput("Velocity", 0.5f, 1, 0.0f, 1.0f));
3838
mNodeInputManager.AddInputBase(InputTypeBase::INTERPOLATED, AddInput("Fade", 0.1f, 1, 0.0001f, 1.0f));
39-
mNodeInputManager.AddInputBase(InputTypeBase::INTERPOLATED, AddInput("Attack", 50.0f, 1, 1.0f, 10000.0f));
40-
mNodeInputManager.AddInputBase(InputTypeBase::INTERPOLATED, AddInput("Release", 50.0f, 1, 1.0f, 10000.0f));
39+
mNodeInputManager.AddInputBase(InputTypeBase::CONSTANT_VALUE, AddInput("Attack", 50.0f, 1, 1.0f, 10000.0f));
40+
mNodeInputManager.AddInputBase(InputTypeBase::CONSTANT_VALUE, AddInput("Release", 50.0f, 1, 1.0f, 10000.0f));
4141

4242
AddOutput("Freq");
4343
AddOutput("Volume");

packages/nodegraph/source/common/operations/NodeGraphOpControl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ namespace l::nodegraph {
4848
inputManager.SetTarget(mFreqId, mFreqTarget);
4949
mAttackFrames = static_cast<int32_t>(inputManager.GetValue(4));
5050
mReleaseFrames = static_cast<int32_t>(inputManager.GetValue(5));
51-
mAttackFactor = l::audio::GetRWAFactorFromTicks(inputManager.GetValueNext(4), 0.001f);
52-
mReleaseFactor = l::audio::GetRWAFactorFromTicks(inputManager.GetValueNext(5), 0.001f);
51+
mAttackFactor = l::audio::GetRWAFactorFromTicks(inputManager.GetValueNext(4), 0.01f);
52+
mReleaseFactor = l::audio::GetRWAFactorFromTicks(inputManager.GetValueNext(5), 0.01f);
5353
}
5454

5555
std::pair<float, float> GraphControlEnvelope::ProcessSignal(NodeInputManager& inputManager) {
@@ -108,7 +108,7 @@ namespace l::nodegraph {
108108
// note off
109109
}
110110

111-
return { freq, l::math::functions::pow(mEnvelope, 0.5f) };
111+
return { freq, mEnvelope };
112112
}
113113

114114
/*********************************************************************/

0 commit comments

Comments
 (0)