shithub: monome

Download patch

ref: 4ae000bc715d98584e88082897ed9355e195b522
parent: 33dd40832cfa17d473edc20452a3158373dd6e5e
author: glenda <glenda@9front.local>
date: Fri Nov 27 20:06:58 EST 2020

hmph

--- a/rate.c
+++ b/rate.c
@@ -11,6 +11,6 @@
 		if((readn(0, buf, rate)) < rate)
 			break;
 		write(1, buf, rate);
-		sleep(235);
+		sleep(250);
 	}
 }
--- a/reverb.c
+++ b/reverb.c
@@ -22,11 +22,11 @@
 		l = buf[i+0] | (buf[i+1] << 8);
 		r = buf[i+2] | (buf[i+3] << 8);
 
-		l += tmp[(i/2+0+dur)%len] * decay;
-		r += tmp[(i/2+1+dur)%len] * decay;
+		l += tmp[(i/2+0+dur)%rate] * decay;
+		r += tmp[(i/2+1+dur)%rate] * decay;
 
-		tmp[(i/2+0)%len] = l;
-		tmp[(i/2+1)%len] = r;
+		tmp[(i/2+0)%rate] = l;
+		tmp[(i/2+1)%rate] = r;
 
 		buf[i+0] = l & 0xFF;
 		buf[i+1] = (l >> 8) & 0xFF;
@@ -53,7 +53,7 @@
 void
 redraw(Image *screen)
 {
-	int x = delay;
+	int x = delay / 8;
 
 	draw(screen, screen->r, display->white, nil, ZP);
 
@@ -103,7 +103,7 @@
 			if (xy.y > c.y)
 				decay = xy.x / (double)Dx(screen->r);
 			else
-				delay = xy.x;
+				delay = xy.x * 8;
 			
 			redraw(screen);
 		}