MCPcopy Create free account
hub / github.com/amsynth/amsynth / processreplace

Method processreplace

external/freeverb/revmodel.cpp:88–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void
89revmodel::processreplace(float *inputL, float *inputR, float *outputL, float *outputR, long numsamples, int skip)
90{
91 float outL,outR,input;
92 int i;
93
94 while(numsamples-- > 0)
95 {
96 outL = outR = 0;
97 input = (*inputL) * gain;
98
99 // Accumulate comb filters in parallel
100 for(i=0; i<numcombs; i++)
101 {
102 outL += combL[i].process(input);
103 outR += combR[i].process(input);
104 }
105
106 // Feed through allpasses in series
107 for(i=0; i<numallpasses; i++)
108 {
109 outL = allpassL[i].process(outL);
110 outR = allpassR[i].process(outR);
111 }
112
113 // De-zipper
114 float d = (dryz += ((dry - dryz) * 0.005F));
115 float w1 = (wet1z += ((wet1 - wet1z) * 0.005F));
116 float w2 = (wet2z += ((wet2 - wet2z) * 0.005F));
117
118 // Calculate output REPLACING anything already there
119 *outputL = outL*w1 + outR*w2 + *inputL*d;
120 *outputR = outR*w1 + outL*w2 + *inputR*d;
121
122 // Increment sample pointers, allowing for interleave (if any)
123 inputL += skip;
124 inputR += skip;
125 outputL += skip;
126 outputR += skip;
127 }
128}
129
130void
131revmodel::processreplace(float *inputM, float *outputL, float *outputR, long numsamples, int stride_in, int stride_out)

Callers

nothing calls this directly

Calls 1

processMethod · 0.45

Tested by

no test coverage detected