Play cross-rate captures at their own pitch and length
The voice now converts the file's rate to the host's at note-on instead of assuming they match. Stage times resolve at the host rate, the filter solves at it, and the bake follows. Same-rate renders are unchanged bit for bit.
This commit is contained in:
@@ -114,7 +114,7 @@ BakeChainResult runBake(ReaSamplerProcessor& processor) {
|
||||
if (!sourceEntry) return fail("the loaded capture has no resolvable file");
|
||||
const SelectedSample* source = &sourceEntry->ref;
|
||||
|
||||
const int sampleRate = static_cast<int>(processor.sampleRate());
|
||||
const int sampleRate = processor.hostRenderRate();
|
||||
if (sampleRate <= 0) return fail("the host has not reported a sample rate yet");
|
||||
|
||||
const std::optional<Tempo> tempo = Tempo::fromBpm(bridge.projectTempoBpm());
|
||||
@@ -128,7 +128,7 @@ BakeChainResult runBake(ReaSamplerProcessor& processor) {
|
||||
|
||||
// The snapshot comes first: the default program's window is derived from the sound it
|
||||
// carries (a Gate release, a Trigger play span), not from a constant.
|
||||
std::optional<SampleData> snapshot = processor.bakeSnapshot();
|
||||
std::optional<SampleData> snapshot = processor.bakeSnapshot(sampleRate);
|
||||
if (!snapshot) return fail("the loaded capture could not be decoded for the render");
|
||||
|
||||
// The note fires at the velocity the user has been auditioning at: three velocity curves
|
||||
|
||||
Reference in New Issue
Block a user