Make spline EG drags audible live: held and new notes follow a dragged knot
Contours ride their own seqlock block into a double-buffered engine copy, and the swap step is smoothed. Each drag move publishes contours without a model write; release still commits and reloads.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// live_contours.cpp — the VelocityCurve -> fixed-capacity copy the contour block carries.
|
||||
|
||||
#include "core/instrument/engine/live_contours.h"
|
||||
|
||||
namespace reasampler::instrument::engine {
|
||||
|
||||
ContourPoints contourPoints(const VelocityCurve& curve) {
|
||||
ContourPoints out{};
|
||||
const std::vector<VelocityPoint>& pts = curve.points();
|
||||
const std::size_t n = pts.size() < kMaxCurvePoints ? pts.size() : kMaxCurvePoints;
|
||||
for (std::size_t i = 0; i < n; ++i) out.points[i] = pts[i];
|
||||
out.count = static_cast<std::uint32_t>(n);
|
||||
return out;
|
||||
}
|
||||
|
||||
} // namespace reasampler::instrument::engine
|
||||
Reference in New Issue
Block a user