Help With Making A Basic Reverb

template<int channels=8>
struct MultiChannelFeedback {
	using Array = std::array<double, channels>;

	double delayMs = 150;
	double decayGain = 0.85;

	std::array<int, channels> delaySamples;
	std::array<Delay, channels> delays;
	void configure(double sampleRate) {
		double delaySamplesBase = delayMs*0.001*sampleRate;
		for (int c = 0; c < channels; ++c) {
			// Distribute delay times exponentially between delayMs and 2*delayMs
			double r = c*1.0/channels;
			delaySamples[c] = std::pow(2, r)*delaySamplesBase;
			delays[c].resize(delaySamples[c] + 1);
	Array process(Array input) {
		Array delayed;
		for (int c = 0; c < channels; ++c) {
			delayed[c] = delays[c].read(delaySamples[c]);
		for (int c = 0; c < channels; ++c) {
			double sum = input[c] + delayed[c]*decayGain;
		return delayed;

Hi, I’m trying to implement the same code but in Nyquist.
I am trying to use snd-delay for the feedbacks.

I’m reading the tutorial from here: Let's Write A Reverb  :  Blog  :  Signalsmith Audio

I’m confused on how to exponentially distribute the delay times.
Is there any advice anyone can give me?


Please be more descriptive. Distributing across channels?

I assume you’re aware that Nyquist has several reverb primitives, but you are wanting to implement one yourself based on delay lines (as an exercise)?