Skip to content

Commit

Permalink
Fuzz Machine CPU tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Jul 6, 2023
1 parent 3f22b20 commit 11312bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ modernize-avoid-bind,
modernize-concat-nested-namespaces,
modernize-deprecated-headers,
modernize-deprecated-ios-base-aliases,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-raw-string-literal,
Expand Down
9 changes: 6 additions & 3 deletions src/processors/drive/fuzz_machine/FuzzFaceNDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ void FuzzFaceNDK::reset_state()
{
x_n[ch].setZero();
v_n[ch].setZero();
// v_n[ch] = Eigen::Vector<T, num_nl_ports> { 1.43236, 1.77569, -0.636511, 0.021566 };
// v_n[ch] = Eigen::Vector<T, num_nl_ports> { 0.00079512734663310196,
// 0.086036015040678246,
// 6.9641953425394627,
// 6.9946688952593483 };
}
}

Expand Down Expand Up @@ -199,9 +202,9 @@ void FuzzFaceNDK::process (std::span<float> channel_data, size_t ch) noexcept
F_min.noalias() = p_n + K_mat * i_n - v_n[ch];
A_solve.noalias() = K_mat * Jac - eye;
delta_v.noalias() = A_solve.householderQr().solve (F_min);
v_n[ch] -= delta_v * 0.25;
v_n[ch] -= delta_v * 0.5;
delta = delta_v.array().abs().sum();
} while (delta > 1.0e-2 && ++nIters < 8);
} while (delta > 1.0e-2 && ++nIters < 3);
calc_currents();

y_n.noalias() = D_mat * x_n[ch] + E_mat_var * u_n_var + E_u_fix + F_mat * i_n;
Expand Down
2 changes: 2 additions & 0 deletions src/processors/drive/fuzz_machine/FuzzFaceNDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <modules/Eigen/Eigen/Dense>
// END USER INCLUDES



struct FuzzFaceNDK
{
// START USER ENTRIES
Expand Down
4 changes: 2 additions & 2 deletions src/processors/drive/fuzz_machine/FuzzMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ParamLayout FuzzMachine::createParameterLayout()

createPercentParameter (params, "fuzz", "Fuzz", 1.0f);
createPercentParameter (params, "bias", "Bias", 1.0f);
createPercentParameter (params, "vol", "Volume", 0.5f);
createPercentParameter (params, "vol", "Volume", 1.0f);

return { params.begin(), params.end() };
}
Expand Down Expand Up @@ -118,7 +118,7 @@ void FuzzMachine::processAudio (AudioBuffer<float>& buffer)

dcBlocker.processBlock (buffer);

volume.setGainLinear (volumeParam->getCurrentValue() * 80.0f);
volume.setGainLinear (volumeParam->getCurrentValue() * 100.0f);
volume.process (buffer);

for (auto [ch, data] : chowdsp::buffer_iters::channels (buffer))
Expand Down

0 comments on commit 11312bb

Please sign in to comment.