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:
@@ -293,6 +293,14 @@ AutomationChannel::ReleaseProof ReaSamplerProcessor::publishLiveParams() {
|
||||
return AutomationChannel::ReleaseProof::fromPublish(before, liveParams_.generation());
|
||||
}
|
||||
|
||||
void ReaSamplerProcessor::publishLiveContours(const PlaySeconds& play) {
|
||||
// Folded outside the lock, as publishLiveParams' block is. A contour is normalized time, so
|
||||
// unlike that block it needs no rate and publishes even before anything is built.
|
||||
const instrument::engine::LiveContours contours = instrument::engine::foldContours(play);
|
||||
std::lock_guard<std::mutex> lock(livePublishMutex_);
|
||||
liveContours_.publish(contours);
|
||||
}
|
||||
|
||||
SampleRefs ReaSamplerProcessor::sampleRefs() {
|
||||
std::lock_guard<std::mutex> lock(refsMutex_);
|
||||
return sampleRefs_;
|
||||
|
||||
Reference in New Issue
Block a user