diff options
Diffstat (limited to 'ofxMaxim/ofxMaximExamples007OSX')
| -rw-r--r-- | ofxMaxim/ofxMaximExamples007OSX/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ofxMaxim/ofxMaximExamples007OSX/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp b/ofxMaxim/ofxMaximExamples007OSX/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp index e75ddf5..102ef15 100644 --- a/ofxMaxim/ofxMaximExamples007OSX/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp +++ b/ofxMaxim/ofxMaximExamples007OSX/ofMaximExample007OSX/ofxMaxim/libs/maximilian.cpp @@ -228,9 +228,9 @@ double maxiDelayline::dl(double input, int size, double feedback) { if ( phase >=size ) { phase = 0; } + output=memory[phase]; memory[phase]=(memory[phase]*feedback)+(input*feedback)*0.5; phase+=1; - output=memory[phase]; return(output); } @@ -238,13 +238,14 @@ double maxiDelayline::dl(double input, int size, double feedback) { double maxiDelayline::dl(double input, int size, double feedback, int position) { if ( phase >=size ) phase = 0; if ( position >=size ) position = 0; - memory[phase]=(memory[phase]*feedback)+(input*feedback)*chandiv; + output=memory[position]; + memory[phase]=(memory[phase]*feedback)+(input*feedback)*chandiv; phase+=1; - output=memory[position]; return(output); } + //I particularly like these. cutoff between 0 and 1 double maxiFilter::lopass(double input, double cutoff) { output=outputs[0] + cutoff*(input-outputs[0]); |
