Retrig pattern from step 1 while host transport is running

This commit is contained in:
Armin 2026-08-06 15:57:58 +02:00
commit 8925199aa3
2 changed files with 19 additions and 3 deletions

View file

@ -524,9 +524,25 @@ void MonostepAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juc
{
lastStep = -1;
lastGateApplied = false;
retrigPpq = 0.0;
}
freePpq = hostPpq;
// Optional retrigger: a fresh note-on restarts the pattern from
// step 1, offset from the host transport position.
const bool retrigOn = seqRetrigParam->load() >= 0.5f;
if (noteOnSeen && retrigOn)
{
retrigPpq = hostPpq;
lastStep = -1;
lastGateApplied = false;
}
else if (! retrigOn)
{
retrigPpq = 0.0;
}
freePpq = hostPpq - retrigPpq;
}
else
{
@ -537,8 +553,7 @@ void MonostepAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juc
}
// Optional retrigger: a fresh note-on restarts the pattern from
// step 1. Only honoured in free-run mode; while the host transport
// is running, the pattern follows the host grid instead.
// step 1 in free-run mode.
if (noteOnSeen && seqRetrigParam->load() >= 0.5f)
{
freePpq = 0.0;