17 lines
645 B
C
17 lines
645 B
C
#pragma once
|
|
#include "../SynthVoice.h"
|
|
|
|
void NeuralSynthVoice::renderSimpleDelay(juce::dsp::AudioBlock<float> &block)
|
|
{
|
|
// ================================================================
|
|
// Simple Delay (per-voice)
|
|
// ================================================================
|
|
if (shared.delayOn && shared.delayOn->load() > 0.5f)
|
|
{
|
|
auto& delay = chain.get<delayIndex>();
|
|
const float time = shared.delayTime ? shared.delayTime->load() : 0.1f;
|
|
delay.setDelay (juce::jmax (0.0f, time * (float) spec.sampleRate));
|
|
delay.process (juce::dsp::ProcessContextReplacing<float> (block));
|
|
}
|
|
}
|