Here is a model of what I want to do, from the Reaktor Library:
Here is the C++ code for the Maximilian delay:
Code: Select all
class maxiDelayline {
double frequency;
int phase;
double startphase;
double endphase;
double output;
double memory[88200];
public:
maxiDelayline();
double dl(double input, int size, double feedback);
double dl(double input, int size, double feedback, int position);
private:
//This used to be important for dealing with multichannel playback
float chandiv = 1;
};
double maxiDelayline::dl(double input, int size, double feedback) {
if (phase >= size) {
phase = 0;
}
output = memory[phase];
memory[phase] = (memory[phase] * feedback) + (input)*chandiv;
phase += 1;
return(output);
}
I am trying but I am not yet experienced enough with programming DSP to be able to figure it out. Thanks.