Polish GUI, add pattern retrig option, and rework voice DSP

This commit is contained in:
Armin 2026-08-06 15:51:56 +02:00
commit 4732240cc7
7 changed files with 546 additions and 129 deletions

View file

@ -66,6 +66,22 @@ void SequencerMatrix::paint (juce::Graphics& g)
const float ox = (float) bounds.getX();
const float oy = (float) bounds.getY();
// Slightly-3D header band above the grid.
juce::ColourGradient headerGrad (colours::gridLight,
0.0f, 0.0f,
colours::panel.darker (0.10f),
0.0f, headerH, false);
g.setGradientFill (headerGrad);
g.fillRect (0.0f, 0.0f, (float) getWidth(), headerH);
g.setColour (colours::gridLight.brighter (0.3f).withAlpha (0.4f));
g.fillRect (0.0f, 0.0f, (float) getWidth(), 1.0f);
g.setColour (colours::grid);
g.drawHorizontalLine (juce::roundToInt (headerH) - 1, 0, (float) getWidth());
g.setColour (colours::bg);
g.drawHorizontalLine (juce::roundToInt (headerH), 0, (float) getWidth());
// grid background
g.setColour (colours::bg);
g.fillRect (bounds.toFloat());
@ -156,28 +172,21 @@ void SequencerMatrix::paint (juce::Graphics& g)
const bool isSelected = (i == selectedStep);
const float radius = 3.0f;
// cell body
juce::ColourGradient grad (colours::accent,
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
isSelected ? colours::accent.brighter (0.12f) : colours::accent.darker (0.35f),
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
false);
// cell body: keep a visible top->bottom gradient in both states. The selected
// note is brighter overall, but still holds its gradient (a flat bright fill
// would read as "no gradient").
const juce::Colour noteTop = isSelected ? colours::accent.brighter (0.2f) : colours::accent;
const juce::Colour noteBottom = colours::accent.darker (0.3f);
juce::ColourGradient grad (noteTop,
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
noteBottom,
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
false);
g.setGradientFill (grad);
g.fillRoundedRectangle (cell, radius);
// slide arrow
if (s.slide)
{
const float ax = cell.getX() + cell.getWidth() * 0.5f;
const float ay = cell.getY() + cell.getHeight() - 4.0f;
g.setColour (colours::selected);
juce::Path tri;
tri.addTriangle (ax - 3.5f, ay - 1.5f, ax + 3.5f, ay - 1.5f, ax, ay + 3.5f);
g.fillPath (tri);
}
// fine-tune indicator
if (std::fabs (s.cents) > 0.5f)
{
@ -206,9 +215,15 @@ void SequencerMatrix::paint (juce::Graphics& g)
continue;
const auto cell = juce::Rectangle<float> (ox + i * cellW + 1.5f, slideY + 1.5f,
cellW - 3.0f, cellH - 3.0f);
cellW - 3.0f, cellH - 3.0f);
g.setColour (colours::accent);
// match the gradient style of the note cells
juce::ColourGradient grad (colours::accent,
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
colours::accent.darker (0.3f),
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
false);
g.setGradientFill (grad);
g.fillRoundedRectangle (cell, 3.0f);
const float ax = cell.getX() + cell.getWidth() * 0.5f;
@ -241,7 +256,15 @@ void SequencerMatrix::paint (juce::Graphics& g)
const auto cell = juce::Rectangle<float> (ox + i * cellW + 1.5f, accentY + 1.5f,
cellW - 3.0f, cellH - 3.0f);
g.setColour (colours::accent2);
const bool isSelected = (i == selectedStep);
juce::ColourGradient agrad (isSelected ? colours::accent2.brighter (0.2f) : colours::accent2,
cell.getTopLeft().translated (cell.getWidth() * 0.5f, 0.0f),
colours::accent2.darker (0.3f),
cell.getBottomLeft().translated (cell.getWidth() * 0.5f, 0.0f),
false);
g.setGradientFill (agrad);
g.fillRoundedRectangle (cell, 3.0f);
const float ax = cell.getX() + cell.getWidth() * 0.5f;