46 int8_t early_reflection1 = 37,
47 int8_t early_reflection2 = 77,
48 int8_t early_reflection3 = 127,
49 int8_t loop1_delay=117,
50 uint8_t loop2_delay=255,
51 int8_t feedback_level = 85):
55 aLoopDel1.set(loop1_delay);
56 aLoopDel2.set(loop2_delay);
66 static int recycle1, recycle2;
69 int asig = aLoopDel0.next(input, _early_reflection1);
70 asig += aLoopDel0.read(_early_reflection2);
71 asig += aLoopDel0.read(_early_reflection3);
75 int8_t feedback_sig1 = (int8_t) min(max(((recycle1 * _feedback_level)>>7),-128),127);
76 int8_t feedback_sig2 = (int8_t) min(max(((recycle2 * _feedback_level)>>7),-128),127);
77 int sig3 = aLoopDel1.next(asig+feedback_sig1);
78 int sig4 = aLoopDel2.next(asig+feedback_sig2);
79 recycle1 = sig3 + sig4;
80 recycle2 = sig3 - sig4;
91 void setEarlyReflections(int8_t early_reflection1, int8_t early_reflection2, int8_t early_reflection3){
92 _early_reflection1=early_reflection1;
93 _early_reflection2=early_reflection2;
94 _early_reflection3=early_reflection3;
103 aLoopDel1.set(loop1_delay);
104 aLoopDel2.set(loop2_delay);
111 _feedback_level=feedback_level;
116 int8_t _early_reflection1;
117 int8_t _early_reflection2;
118 int8_t _early_reflection3;
120 int8_t _feedback_level;
122 AudioDelay <128> aLoopDel0;