Skip to content

Commit

Permalink
AHDSR Optimizations (#1331)
Browse files Browse the repository at this point in the history
Underlying optimizations; but also not computing the curve except
for AEG since we don't actually use the curves.

Closes #1327
  • Loading branch information
baconpaul authored Sep 16, 2024
1 parent 444418e commit 44214ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/engine/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ template <bool OS> void Group::processWithOS(scxt::engine::Engine &e)
{
auto &aegp = endpoints.eg[0];
eg[0].processBlock(*aegp.aP, *aegp.hP, *aegp.dP, *aegp.sP, *aegp.rP, *aegp.asP, *aegp.dsP,
*aegp.rsP, envGate);
*aegp.rsP, envGate, false);
}
if (egsActive[1])
{
auto &eg2p = endpoints.eg[1];
eg[1].processBlock(*eg2p.aP, *eg2p.hP, *eg2p.dP, *eg2p.sP, *eg2p.rP, *eg2p.asP, *eg2p.dsP,
*eg2p.rsP, envGate);
*eg2p.rsP, envGate, false);
}
modMatrix.process();

Expand Down
6 changes: 3 additions & 3 deletions src/voice/voice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,20 @@ template <bool OS> bool Voice::processWithOS()
{
// we need the aegOS for the curve in oversample space
aegOS.processBlock(*aegp.aP, *aegp.hP, *aegp.dP, *aegp.sP, *aegp.rP, *aegp.asP, *aegp.dsP,
*aegp.rsP, envGate);
*aegp.rsP, envGate, true);
}

// But We need to run the undersample AEG no matter what since it is a modulatino source
aeg.processBlock(*aegp.aP, *aegp.hP, *aegp.dP, *aegp.sP, *aegp.rP, *aegp.asP, *aegp.dsP,
*aegp.rsP, envGate);
*aegp.rsP, envGate, true);
// TODO: And output is non zero once we are past attack
isAEGRunning = (aeg.stage != ahdsrenv_t ::s_complete);

if (egsActive[1])
{
auto &eg2p = endpoints->eg2;
eg2.processBlock(*eg2p.aP, *eg2p.hP, *eg2p.dP, *eg2p.sP, *eg2p.rP, *eg2p.asP, *eg2p.dsP,
*eg2p.rsP, envGate);
*eg2p.rsP, envGate, false);
}
updateTransportPhasors();

Expand Down

0 comments on commit 44214ef

Please sign in to comment.