Skip to content

Commit

Permalink
Change the nature of RM
Browse files Browse the repository at this point in the history
It basically becomes mix-like which is really what you want
  • Loading branch information
baconpaul committed Jan 7, 2025
1 parent 31c5429 commit b62fd28
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/dsp/matrix_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,19 @@ struct MatrixNodeFrom : public EnvelopeSupport<Patch::MatrixNode>,
}
}

mech::mul_block<blockSize>(modlev, from.output, mod);

if (isrm)
{
// we want op * ( 1 - depth ) + op * rm * depth or
// op * ( 1 + depth ( rm - 1 ) )
// since the multiplier of depth is rmLevel and it starts at one that means
for (int i=0; i<blockSize; ++i)
{
onto.rmLevel[i] += modlev[i] * (from.output[i] - 1.0);
}
#if OLD_WAY
mech::mul_block<blockSize>(modlev, from.output, mod);

if (onto.rmAssigned)
{
mech::accumulate_from_to<blockSize>(mod, onto.rmLevel);
Expand All @@ -118,9 +127,12 @@ struct MatrixNodeFrom : public EnvelopeSupport<Patch::MatrixNode>,

mech::copy_from_to<blockSize>(mod, onto.rmLevel);
}
#endif
}
else
{
mech::mul_block<blockSize>(modlev, from.output, mod);

for (int j = 0; j < blockSize; ++j)
{
onto.phaseInput[j] += (int32_t)((1 << 27) * (mod[j]));
Expand Down

0 comments on commit b62fd28

Please sign in to comment.