Remove autonomous shuffle ghost-note generation

This commit is contained in:
Armin 2026-08-05 00:19:57 +02:00
commit 91ed1b209f

View file

@ -106,20 +106,7 @@ void TrommelkisteProcessor::processBlock(juce::AudioBuffer<float>& buffer, juce:
} }
} }
// Independent shuffle: generate events even without MIDI input, on the same track
std::uniform_real_distribution<float> dist(0.0f, 1.0f); std::uniform_real_distribution<float> dist(0.0f, 1.0f);
if (globalShuffleAmt > 0.0f && barAllowed && lastTriggeredTrack >= 0)
{
float prob = globalShuffleAmt * 0.15f;
if (dist(rng) < prob && numPendingShuffle < MAX_PENDING_SHUFFLE)
{
float vel = (0.3f + dist(rng) * 0.5f) * globalShuffleAmt;
int stepsAhead = std::uniform_int_distribution<int>(1, 4)(rng);
double gridPpq = nextGridPpq(ppq) + stepsAhead * sixteenthPpq;
int delay = juce::jmax(1, (int)((gridPpq - ppq) / ppqPerSample));
pendingShuffle[numPendingShuffle++] = { lastTriggeredTrack, vel, delay };
}
}
for (const auto metadata : midi) for (const auto metadata : midi)
{ {