Prototype

This commit is contained in:
Armin 2026-08-05 23:12:17 +02:00
commit 4271fc34bb
14 changed files with 950 additions and 169 deletions

View file

@ -17,6 +17,7 @@ struct Step
int semitone = 0; // -12 .. +12
float cents = 0.0f; // -50 .. +50
bool slide = false;
bool accent = false;
};
class StepSequencer
@ -31,6 +32,20 @@ public:
s = Step{};
}
void shift (int dir)
{
if (dir == 0)
return;
std::array<Step, numSteps> rotated = steps;
for (int i = 0; i < numSteps; ++i)
{
const int from = (i - dir + numSteps) % numSteps;
steps[i] = rotated[from];
}
}
int stepsPerBeatFromRate (int rateIndex) const
{
// 0: 1/4, 1: 1/8, 2: 1/8T, 3: 1/16, 4: 1/32