feat: legible ReaSampler 9000 editor — bigger knobs, ms time constants, per-ring double-click reset, and an antialiased draw pass

This commit is contained in:
2026-08-01 09:16:30 -04:00
parent 213ecfafe6
commit 7f74b11dce
27 changed files with 859 additions and 285 deletions
+21 -5
View File
@@ -298,17 +298,33 @@ void drawWaveform(LICE_IBitmap* bmp, const KitBox& box, const Envelope& env) {
if (bins.empty() || innerW <= 0) continue;
// One filled span per pixel column (see draw_kit.h — gap-free via columnMinMax).
// One filled span per pixel column (see draw_kit.h — gap-free via columnMinMax), then
// an antialiased stroke joining each column's extremes to its neighbour's. The fill
// alone leaves the outline stepped — a vertical span has no aa to apply — and where two
// adjacent columns differ sharply it reads as a comb rather than one envelope. The
// stroke is the SAME ink as the fill it edges, so it can only soften the boundary.
double prevTop = 0.0;
double prevBottom = 0.0;
for (int col = 0; col < innerW; ++col) {
const MinMax mm = columnMinMax(bins, innerW, col);
const int x = box.x + 2 + col;
int yMax = midY - static_cast<int>(
compressAmplitudeForDisplay(mm.max) * halfSpan);
int yMin = midY - static_cast<int>(
compressAmplitudeForDisplay(mm.min) * halfSpan);
const double topF = midY - compressAmplitudeForDisplay(mm.max) * halfSpan;
const double bottomF = midY - compressAmplitudeForDisplay(mm.min) * halfSpan;
int yMax = static_cast<int>(topF);
int yMin = static_cast<int>(bottomF);
if (yMax < bandTop) yMax = bandTop;
if (yMin > bandTop + bandH - 1) yMin = bandTop + bandH - 1;
LICE_Line(bmp, x, yMin, x, yMax, waveCol, 1.0f, 0, false);
if (col > 0) {
const float xPrev = static_cast<float>(x - 1);
const float xF = static_cast<float>(x);
LICE_FLine(bmp, xPrev, static_cast<float>(prevTop), xF,
static_cast<float>(topF), waveCol, 1.0f, 0, true);
LICE_FLine(bmp, xPrev, static_cast<float>(prevBottom), xF,
static_cast<float>(bottomF), waveCol, 1.0f, 0, true);
}
prevTop = topF;
prevBottom = bottomF;
}
}
}