session-2012-02-17-143659

clive

clive is a C audio live-coding skeleton. It allows you to hot-swap DSP processing callbacks, providing not much more than automatic C code recompilation, object code reloading, and state preservation.

diff @ 2012-02-17 14:38:31 +0000
diff --git a/src/go.c b/src/go.c
index 9879110..8399288 100644
--- a/src/go.c
+++ b/src/go.c
@@ -1,7 +1,16 @@
+#include <stdlib.h>
+#define SR 48000.0
+
+#include <math.h>
+#define PI 3.1415926
+
 typedef struct {
   float like_a_butterfly;
+  double radioactivity;
 } S;
 
 float go(S *s, float x) {
-  return 0;
+  s->radioactivity += 1/(SR * 1e-5);
+  double decay = rand() / (double) RAND_MAX < s->radioactivity;
+  return decay;
 }
diff @ 2012-02-17 14:39:17 +0000
diff --git a/src/go.c b/src/go.c
index 8399288..fe2c2b9 100644
--- a/src/go.c
+++ b/src/go.c
@@ -7,10 +7,14 @@
 typedef struct {
   float like_a_butterfly;
   double radioactivity;
+  double rx, ry;
 } S;
 
 float go(S *s, float x) {
-  s->radioactivity += 1/(SR * 1e-5);
+  s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
+  double fr = 0.9;
+  double fa = 2 * PI * 60 / SR;
+  double fx = fr * 
   return decay;
 }
diff @ 2012-02-17 14:39:24 +0000
diff --git a/src/go.c b/src/go.c
index fe2c2b9..a921f56 100644
--- a/src/go.c
+++ b/src/go.c
@@ -11,6 +11,7 @@ typedef struct {
 } S;
 
 float go(S *s, float x) {
+  s->radioactivity = 0;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9;
diff @ 2012-02-17 14:39:29 +0000
diff --git a/src/go.c b/src/go.c
index a921f56..b175891 100644
--- a/src/go.c
+++ b/src/go.c
@@ -16,6 +16,6 @@ float go(S *s, float x) {
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9;
   double fa = 2 * PI * 60 / SR;
-  double fx = fr * 
+//  double fx = fr * 
   return decay;
 }
diff @ 2012-02-17 14:39:33 +0000
diff --git a/src/go.c b/src/go.c
index b175891..8179854 100644
--- a/src/go.c
+++ b/src/go.c
@@ -11,7 +11,7 @@ typedef struct {
 } S;
 
 float go(S *s, float x) {
-  s->radioactivity = 0;
+//  s->radioactivity = 0;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9;
diff @ 2012-02-17 14:40:34 +0000
diff --git a/src/go.c b/src/go.c
index 8179854..57ad314 100644
--- a/src/go.c
+++ b/src/go.c
@@ -16,6 +16,11 @@ float go(S *s, float x) {
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9;
   double fa = 2 * PI * 60 / SR;
-//  double fx = fr * 
-  return decay;
+  double fx = fr * cos(fa);
+  double fy = fr * sin(fa);
+  double px = fx * s->rx - fy * s->ry + decay;
+  double py = fy * s->rx + fx * s->ry;
+  s->rx = px;
+  s->ry = py;
+  return tanh(px);
 }
diff @ 2012-02-17 14:40:40 +0000
diff --git a/src/go.c b/src/go.c
index 57ad314..aff4131 100644
--- a/src/go.c
+++ b/src/go.c
@@ -14,7 +14,7 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.9;
+  double fr = 0.95;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
diff @ 2012-02-17 14:40:49 +0000
diff --git a/src/go.c b/src/go.c
index aff4131..a239fa5 100644
--- a/src/go.c
+++ b/src/go.c
@@ -12,7 +12,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->radioactivity += 1/(SR * 1e5);
+  s->radioactivity -= 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.95;
   double fa = 2 * PI * 60 / SR;
diff @ 2012-02-17 14:40:54 +0000
diff --git a/src/go.c b/src/go.c
index a239fa5..304d6eb 100644
--- a/src/go.c
+++ b/src/go.c
@@ -14,7 +14,7 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   s->radioactivity -= 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.95;
+  double fr = 0.99;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
diff @ 2012-02-17 14:41:26 +0000
diff --git a/src/go.c b/src/go.c
index 304d6eb..4fbe683 100644
--- a/src/go.c
+++ b/src/go.c
@@ -8,6 +8,7 @@ typedef struct {
   float like_a_butterfly;
   double radioactivity;
   double rx, ry;
+  double leak;
 } S;
 
 float go(S *s, float x) {
@@ -22,5 +23,7 @@ float go(S *s, float x) {
   double py = fy * s->rx + fx * s->ry;
   s->rx = px;
   s->ry = py;
+  s->leak = 0.999 * s->leak + 0.001 * px;
+  px -= s->leak;
   return tanh(px);
 }
diff @ 2012-02-17 14:41:34 +0000
diff --git a/src/go.c b/src/go.c
index 4fbe683..511babe 100644
--- a/src/go.c
+++ b/src/go.c
@@ -15,7 +15,7 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   s->radioactivity -= 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.99;
+  double fr = 0.995;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
diff @ 2012-02-17 14:41:39 +0000
diff --git a/src/go.c b/src/go.c
index 511babe..75c8c27 100644
--- a/src/go.c
+++ b/src/go.c
@@ -15,7 +15,7 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   s->radioactivity -= 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.995;
+  double fr = 0.999;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
diff @ 2012-02-17 14:41:46 +0000
diff --git a/src/go.c b/src/go.c
index 75c8c27..4bf10ff 100644
--- a/src/go.c
+++ b/src/go.c
@@ -15,7 +15,7 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   s->radioactivity -= 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.999;
+  double fr = 0.9999;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
diff @ 2012-02-17 14:42:10 +0000
diff --git a/src/go.c b/src/go.c
index 4bf10ff..c8d71ad 100644
--- a/src/go.c
+++ b/src/go.c
@@ -9,11 +9,13 @@ typedef struct {
   double radioactivity;
   double rx, ry;
   double leak;
+  double clock;
 } S;
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->radioactivity -= 1/(SR * 1e5);
+  s->clock = fmod(s->clock + 2/SR +
+  s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9999;
   double fa = 2 * PI * 60 / SR;
diff @ 2012-02-17 14:42:26 +0000
diff --git a/src/go.c b/src/go.c
index c8d71ad..5994684 100644
--- a/src/go.c
+++ b/src/go.c
@@ -14,7 +14,8 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->clock = fmod(s->clock + 2/SR +
+  double old_clock = s->clock;
+  s->clock = fmod(s->clock + 2/SR, 1);
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9999;
diff @ 2012-02-17 14:42:41 +0000
diff --git a/src/go.c b/src/go.c
index 5994684..ed9c672 100644
--- a/src/go.c
+++ b/src/go.c
@@ -16,13 +16,14 @@ float go(S *s, float x) {
 //  s->radioactivity = 0;
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
+  double tick = s->clock < old_clock;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9999;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
-  double px = fx * s->rx - fy * s->ry + decay;
+  double px = fx * s->rx - fy * s->ry + tick;
   double py = fy * s->rx + fx * s->ry;
   s->rx = px;
   s->ry = py;
diff @ 2012-02-17 14:43:49 +0000
diff --git a/src/go.c b/src/go.c
index ed9c672..dd678ef 100644
--- a/src/go.c
+++ b/src/go.c
@@ -10,6 +10,8 @@ typedef struct {
   double rx, ry;
   double leak;
   double clock;
+  float delayline[48000];
+  int delayw;
 } S;
 
 float go(S *s, float x) {
@@ -29,5 +31,7 @@ float go(S *s, float x) {
   s->ry = py;
   s->leak = 0.999 * s->leak + 0.001 * px;
   px -= s->leak;
+  s->delayline[s->delayw] = px;
+  s->delayw = (s->delayw + 1) % 48000;
   return tanh(px);
 }
diff @ 2012-02-17 14:45:13 +0000
diff --git a/src/go.c b/src/go.c
index dd678ef..261af85 100644
--- a/src/go.c
+++ b/src/go.c
@@ -12,6 +12,7 @@ typedef struct {
   double clock;
   float delayline[48000];
   int delayw;
+  double delayr[8];
 } S;
 
 float go(S *s, float x) {
@@ -21,7 +22,7 @@ float go(S *s, float x) {
   double tick = s->clock < old_clock;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.9999;
+  double fr = 0.9997;
   double fa = 2 * PI * 60 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
@@ -33,5 +34,8 @@ float go(S *s, float x) {
   px -= s->leak;
   s->delayline[s->delayw] = px;
   s->delayw = (s->delayw + 1) % 48000;
+  for (int i = 0; i < 8; ++i) {
+    double delayt = 0;
+  }
   return tanh(px);
 }
diff @ 2012-02-17 14:47:08 +0000
diff --git a/src/go.c b/src/go.c
index 261af85..c544ee1 100644
--- a/src/go.c
+++ b/src/go.c
@@ -34,8 +34,13 @@ float go(S *s, float x) {
   px -= s->leak;
   s->delayline[s->delayw] = px;
   s->delayw = (s->delayw + 1) % 48000;
+  double o = 0;
   for (int i = 0; i < 8; ++i) {
-    double delayt = 0;
+    s->delayr[i] = fmod(s->delayr + (1 + i/8.0)/48000, 1);
+    double r = s->delayr * 48000;
+    int ri = floor(r);
+    double rf = r - ri;
+    o += s->delayline[ri] * (1 - rf) + rf * s->delayline[(ri + 1) % 48000];
   }
-  return tanh(px);
+  return tanh(o/8);
 }
diff @ 2012-02-17 14:47:18 +0000
diff --git a/src/go.c b/src/go.c
index c544ee1..a439553 100644
--- a/src/go.c
+++ b/src/go.c
@@ -37,7 +37,7 @@ float go(S *s, float x) {
   double o = 0;
   for (int i = 0; i < 8; ++i) {
     s->delayr[i] = fmod(s->delayr + (1 + i/8.0)/48000, 1);
-    double r = s->delayr * 48000;
+    double r = s->delayr[i] * 48000;
     int ri = floor(r);
     double rf = r - ri;
     o += s->delayline[ri] * (1 - rf) + rf * s->delayline[(ri + 1) % 48000];
diff @ 2012-02-17 14:47:30 +0000
diff --git a/src/go.c b/src/go.c
index a439553..455fc3e 100644
--- a/src/go.c
+++ b/src/go.c
@@ -36,7 +36,7 @@ float go(S *s, float x) {
   s->delayw = (s->delayw + 1) % 48000;
   double o = 0;
   for (int i = 0; i < 8; ++i) {
-    s->delayr[i] = fmod(s->delayr + (1 + i/8.0)/48000, 1);
+    s->delayr[i] = fmod(s->delayr[i] + (1 + i/8.0)/48000, 1);
     double r = s->delayr[i] * 48000;
     int ri = floor(r);
     double rf = r - ri;
diff @ 2012-02-17 14:48:01 +0000
diff --git a/src/go.c b/src/go.c
index 455fc3e..8a4130d 100644
--- a/src/go.c
+++ b/src/go.c
@@ -32,8 +32,6 @@ float go(S *s, float x) {
   s->ry = py;
   s->leak = 0.999 * s->leak + 0.001 * px;
   px -= s->leak;
-  s->delayline[s->delayw] = px;
-  s->delayw = (s->delayw + 1) % 48000;
   double o = 0;
   for (int i = 0; i < 8; ++i) {
     s->delayr[i] = fmod(s->delayr[i] + (1 + i/8.0)/48000, 1);
@@ -42,5 +40,7 @@ float go(S *s, float x) {
     double rf = r - ri;
     o += s->delayline[ri] * (1 - rf) + rf * s->delayline[(ri + 1) % 48000];
   }
+  s->delayline[s->delayw] = tanh(o / 4);
+  s->delayw = (s->delayw + 1) % 48000;
   return tanh(o/8);
 }
diff @ 2012-02-17 14:48:11 +0000
diff --git a/src/go.c b/src/go.c
index 8a4130d..980164a 100644
--- a/src/go.c
+++ b/src/go.c
@@ -32,7 +32,7 @@ float go(S *s, float x) {
   s->ry = py;
   s->leak = 0.999 * s->leak + 0.001 * px;
   px -= s->leak;
-  double o = 0;
+  double o = px;
   for (int i = 0; i < 8; ++i) {
     s->delayr[i] = fmod(s->delayr[i] + (1 + i/8.0)/48000, 1);
     double r = s->delayr[i] * 48000;
diff @ 2012-02-17 14:48:38 +0000
diff --git a/src/go.c b/src/go.c
index 980164a..c739012 100644
--- a/src/go.c
+++ b/src/go.c
@@ -30,8 +30,6 @@ float go(S *s, float x) {
   double py = fy * s->rx + fx * s->ry;
   s->rx = px;
   s->ry = py;
-  s->leak = 0.999 * s->leak + 0.001 * px;
-  px -= s->leak;
   double o = px;
   for (int i = 0; i < 8; ++i) {
     s->delayr[i] = fmod(s->delayr[i] + (1 + i/8.0)/48000, 1);
@@ -40,6 +38,8 @@ float go(S *s, float x) {
     double rf = r - ri;
     o += s->delayline[ri] * (1 - rf) + rf * s->delayline[(ri + 1) % 48000];
   }
+  s->leak = 0.999 * s->leak + 0.001 * o;
+  o -= s->leak;
   s->delayline[s->delayw] = tanh(o / 4);
   s->delayw = (s->delayw + 1) % 48000;
   return tanh(o/8);
diff @ 2012-02-17 14:48:47 +0000
diff --git a/src/go.c b/src/go.c
index c739012..f46e0d9 100644
--- a/src/go.c
+++ b/src/go.c
@@ -40,7 +40,7 @@ float go(S *s, float x) {
   }
   s->leak = 0.999 * s->leak + 0.001 * o;
   o -= s->leak;
-  s->delayline[s->delayw] = tanh(o / 4);
+  s->delayline[s->delayw] = tanh(o / 2);
   s->delayw = (s->delayw + 1) % 48000;
   return tanh(o/8);
 }
diff @ 2012-02-17 14:49:02 +0000
diff --git a/src/go.c b/src/go.c
index f46e0d9..3639301 100644
--- a/src/go.c
+++ b/src/go.c
@@ -32,7 +32,7 @@ float go(S *s, float x) {
   s->ry = py;
   double o = px;
   for (int i = 0; i < 8; ++i) {
-    s->delayr[i] = fmod(s->delayr[i] + (1 + i/8.0)/48000, 1);
+    s->delayr[i] = fmod(s->delayr[i] + (1 + i/80.0)/48000, 1);
     double r = s->delayr[i] * 48000;
     int ri = floor(r);
     double rf = r - ri;
diff @ 2012-02-17 14:49:47 +0000
diff --git a/src/go.c b/src/go.c
index 3639301..10edc8c 100644
--- a/src/go.c
+++ b/src/go.c
@@ -23,7 +23,7 @@ float go(S *s, float x) {
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
   double fr = 0.9997;
-  double fa = 2 * PI * 60 / SR;
+  double fa = 2 * PI * 50 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);
   double px = fx * s->rx - fy * s->ry + tick;
diff @ 2012-02-17 14:50:07 +0000
diff --git a/src/go.c b/src/go.c
index 10edc8c..adf9e63 100644
--- a/src/go.c
+++ b/src/go.c
@@ -32,7 +32,7 @@ float go(S *s, float x) {
   s->ry = py;
   double o = px;
   for (int i = 0; i < 8; ++i) {
-    s->delayr[i] = fmod(s->delayr[i] + (1 + i/80.0)/48000, 1);
+    s->delayr[i] = fmod(s->delayr[i] + (1 + (2*(i&1)-1)*i/80.0)/48000, 1);
     double r = s->delayr[i] * 48000;
     int ri = floor(r);
     double rf = r - ri;
diff @ 2012-02-17 14:51:25 +0000
diff --git a/src/go.c b/src/go.c
index adf9e63..ae79b51 100644
--- a/src/go.c
+++ b/src/go.c
@@ -13,10 +13,12 @@ typedef struct {
   float delayline[48000];
   int delayw;
   double delayr[8];
+  double t;
 } S;
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
+  if (0 <= s->t && s->t < 60) { s->t += 1/SR; } else { s->t -= 2/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:51:40 +0000
diff --git a/src/go.c b/src/go.c
index ae79b51..6a5ca1d 100644
--- a/src/go.c
+++ b/src/go.c
@@ -34,7 +34,7 @@ float go(S *s, float x) {
   s->ry = py;
   double o = px;
   for (int i = 0; i < 8; ++i) {
-    s->delayr[i] = fmod(s->delayr[i] + (1 + (2*(i&1)-1)*i/80.0)/48000, 1);
+    s->delayr[i] = fmod(s->delayr[i] + (1 + (2*(i&1)-1)*i/(s->t + 10.0))/48000, 1);
     double r = s->delayr[i] * 48000;
     int ri = floor(r);
     double rf = r - ri;
diff @ 2012-02-17 14:52:33 +0000
diff --git a/src/go.c b/src/go.c
index 6a5ca1d..3e34543 100644
--- a/src/go.c
+++ b/src/go.c
@@ -42,7 +42,7 @@ float go(S *s, float x) {
   }
   s->leak = 0.999 * s->leak + 0.001 * o;
   o -= s->leak;
-  s->delayline[s->delayw] = tanh(o / 2);
+  s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   return tanh(o/8);
 }
diff @ 2012-02-17 14:55:16 +0000
diff --git a/src/go.c b/src/go.c
index 3e34543..3858b9f 100644
--- a/src/go.c
+++ b/src/go.c
@@ -14,6 +14,8 @@ typedef struct {
   int delayw;
   double delayr[8];
   double t;
+
+  double qx, qy;
 } S;
 
 float go(S *s, float x) {
@@ -44,5 +46,14 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  return tanh(o/8);
+  double gr = 0.99;
+  double ga = 40 * pow(2, s->t / 60); 
+  double gx = gr * cos(ga);
+  double gy = gr * sin(ga);
+  double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
+  double hy = gy * s->qx + gx * s->qy;
+  s->qx = hx;
+  s->qy = hy;
+  o = tanh(hx);
+  return o;
 }
diff @ 2012-02-17 14:55:22 +0000
diff --git a/src/go.c b/src/go.c
index 3858b9f..7c0f721 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, s->t / 60); 
+  double ga = 40 * pow(2, s->t / 60 / Sr); 
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:55:24 +0000
diff --git a/src/go.c b/src/go.c
index 7c0f721..30eb5a1 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, s->t / 60 / Sr); 
+  double ga = 40 * pow(2, s->t / 60 / SR); 
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:55:38 +0000
diff --git a/src/go.c b/src/go.c
index 30eb5a1..f7322d0 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, s->t / 60 / SR); 
+  double ga = 40 * pow(2, s->t / 12 / 60 / SR); 
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:55:58 +0000
diff --git a/src/go.c b/src/go.c
index f7322d0..94f928b 100644
--- a/src/go.c
+++ b/src/go.c
@@ -46,7 +46,7 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  double gr = 0.99;
+  double gr = 0.999;
   double ga = 40 * pow(2, s->t / 12 / 60 / SR); 
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
diff @ 2012-02-17 14:56:13 +0000
diff --git a/src/go.c b/src/go.c
index 94f928b..0d7f8b5 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.999;
-  double ga = 40 * pow(2, s->t / 12 / 60 / SR); 
+  double ga = 40 * pow(2, s->t / 12 / 60) / SR; 
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:56:25 +0000
diff --git a/src/go.c b/src/go.c
index 0d7f8b5..e9caab6 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.999;
-  double ga = 40 * pow(2, s->t / 12 / 60) / SR; 
+  double ga = 40 * pow(2, s->t / 12) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:56:29 +0000
diff --git a/src/go.c b/src/go.c
index e9caab6..8b299bb 100644
--- a/src/go.c
+++ b/src/go.c
@@ -46,7 +46,7 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  double gr = 0.999;
+  double gr = 0.99;
   double ga = 40 * pow(2, s->t / 12) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
diff @ 2012-02-17 14:56:57 +0000
diff --git a/src/go.c b/src/go.c
index 8b299bb..a5f386c 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 <= s->t && s->t < 60) { s->t += 1/SR; } else { s->t -= 2/SR; }
+  if (0 <= s->t && s->t < 60) { s->t += 8/SR; } else { s->t -= 16/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:57:14 +0000
diff --git a/src/go.c b/src/go.c
index a5f386c..df3c886 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 <= s->t && s->t < 60) { s->t += 8/SR; } else { s->t -= 16/SR; }
+  if (0 <= s->t && s->t < 60) { s->t += 64/SR; } else { s->t -= 16/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:57:21 +0000
diff --git a/src/go.c b/src/go.c
index df3c886..38379b4 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 <= s->t && s->t < 60) { s->t += 64/SR; } else { s->t -= 16/SR; }
+  if (0 <= s->t && s->t < 60) { s->t += 64/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:57:26 +0000
diff --git a/src/go.c b/src/go.c
index 38379b4..b49a4b5 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 <= s->t && s->t < 60) { s->t += 64/SR; } else { s->t -= 256/SR; }
+  if (0 <= s->t && s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:58:09 +0000
diff --git a/src/go.c b/src/go.c
index b49a4b5..974f15a 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 <= s->t && s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
+  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
diff @ 2012-02-17 14:58:46 +0000
diff --git a/src/go.c b/src/go.c
index 974f15a..00e0557 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,8 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
+  s->t = fmod(s->t + 0.5/SR, 1);
+//  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
   double tick = s->clock < old_clock;
@@ -47,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, s->t / 12) / SR;
+  double ga = 40 * pow(2, 24 - 24 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:58:59 +0000
diff --git a/src/go.c b/src/go.c
index 00e0557..b164b5e 100644
--- a/src/go.c
+++ b/src/go.c
@@ -48,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, 24 - 24 * s->t) / SR;
+  double ga = 40 * pow(2, 3 - 3 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:59:07 +0000
diff --git a/src/go.c b/src/go.c
index b164b5e..f46228b 100644
--- a/src/go.c
+++ b/src/go.c
@@ -48,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, 3 - 3 * s->t) / SR;
+  double ga = 40 * pow(2, 5 - 5 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:59:27 +0000
diff --git a/src/go.c b/src/go.c
index f46228b..468601b 100644
--- a/src/go.c
+++ b/src/go.c
@@ -20,7 +20,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->t = fmod(s->t + 0.5/SR, 1);
+  s->t = fmod(s->t + 2/SR, 1);
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
diff @ 2012-02-17 14:59:38 +0000
diff --git a/src/go.c b/src/go.c
index 468601b..ab42d86 100644
--- a/src/go.c
+++ b/src/go.c
@@ -48,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, 5 - 5 * s->t) / SR;
+  double ga = 40 * pow(2, 6 - 6 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:59:43 +0000
diff --git a/src/go.c b/src/go.c
index ab42d86..79a5230 100644
--- a/src/go.c
+++ b/src/go.c
@@ -48,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, 6 - 6 * s->t) / SR;
+  double ga = 40 * pow(2, 7 - 7 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 14:59:53 +0000
diff --git a/src/go.c b/src/go.c
index 79a5230..431ed10 100644
--- a/src/go.c
+++ b/src/go.c
@@ -48,7 +48,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 40 * pow(2, 7 - 7 * s->t) / SR;
+  double ga = 50 * pow(2, 7 - 7 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 15:01:24 +0000
diff --git a/src/go.c b/src/go.c
index 431ed10..1a9dfaf 100644
--- a/src/go.c
+++ b/src/go.c
@@ -16,6 +16,7 @@ typedef struct {
   double t;
 
   double qx, qy;
+  int j;
 } S;
 
 float go(S *s, float x) {
@@ -24,6 +25,9 @@ float go(S *s, float x) {
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 2/SR, 1);
+  if (s->clock < old_clock) {
+    s->j = (s->j + 1) % 11;
+  }
   double tick = s->clock < old_clock;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
@@ -48,7 +52,8 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double ga = 50 * pow(2, 7 - 7 * s->t) / SR;
+  double k = 10 * ("02084640183"[s->j]-'0']);
+  double ga = k * pow(2, 7 - 7 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 15:02:01 +0000
diff --git a/src/go.c b/src/go.c
index 1a9dfaf..9b9b725 100644
--- a/src/go.c
+++ b/src/go.c
@@ -52,7 +52,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double k = 10 * ("02084640183"[s->j]-'0']);
+  double k = 10 * ("02084640183"[s->j]-'0');
   double ga = k * pow(2, 7 - 7 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
diff @ 2012-02-17 15:02:13 +0000
diff --git a/src/go.c b/src/go.c
index 9b9b725..ed8e3fc 100644
--- a/src/go.c
+++ b/src/go.c
@@ -24,7 +24,7 @@ float go(S *s, float x) {
   s->t = fmod(s->t + 2/SR, 1);
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
-  s->clock = fmod(s->clock + 2/SR, 1);
+  s->clock = fmod(s->clock + 0.5/SR, 1);
   if (s->clock < old_clock) {
     s->j = (s->j + 1) % 11;
   }
diff @ 2012-02-17 15:02:27 +0000
diff --git a/src/go.c b/src/go.c
index ed8e3fc..e3fc64c 100644
--- a/src/go.c
+++ b/src/go.c
@@ -21,7 +21,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->t = fmod(s->t + 2/SR, 1);
+  s->t = fmod(s->t + 8/SR, 1);
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 0.5/SR, 1);
diff @ 2012-02-17 15:02:31 +0000
diff --git a/src/go.c b/src/go.c
index e3fc64c..267e48e 100644
--- a/src/go.c
+++ b/src/go.c
@@ -21,7 +21,7 @@ typedef struct {
 
 float go(S *s, float x) {
 //  s->radioactivity = 0;
-  s->t = fmod(s->t + 8/SR, 1);
+  s->t = fmod(s->t + 4/SR, 1);
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
   s->clock = fmod(s->clock + 0.5/SR, 1);
diff @ 2012-02-17 15:02:39 +0000
diff --git a/src/go.c b/src/go.c
index 267e48e..5b50cf8 100644
--- a/src/go.c
+++ b/src/go.c
@@ -52,7 +52,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double k = 10 * ("02084640183"[s->j]-'0');
+  double k = 60 * ("02084640183"[s->j]-'0');
   double ga = k * pow(2, 7 - 7 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
diff @ 2012-02-17 15:02:49 +0000
diff --git a/src/go.c b/src/go.c
index 5b50cf8..c950246 100644
--- a/src/go.c
+++ b/src/go.c
@@ -53,7 +53,7 @@ float go(S *s, float x) {
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
   double k = 60 * ("02084640183"[s->j]-'0');
-  double ga = k * pow(2, 7 - 7 * s->t) / SR;
+  double ga = k * pow(2, 4 - 4 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 15:02:53 +0000
diff --git a/src/go.c b/src/go.c
index c950246..dae8aad 100644
--- a/src/go.c
+++ b/src/go.c
@@ -53,7 +53,7 @@ float go(S *s, float x) {
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
   double k = 60 * ("02084640183"[s->j]-'0');
-  double ga = k * pow(2, 4 - 4 * s->t) / SR;
+  double ga = k * pow(2, 2 - 2 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 15:03:00 +0000
diff --git a/src/go.c b/src/go.c
index dae8aad..d5e7040 100644
--- a/src/go.c
+++ b/src/go.c
@@ -52,7 +52,7 @@ float go(S *s, float x) {
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.99;
-  double k = 60 * ("02084640183"[s->j]-'0');
+  double k = 60 * ("02084640183"[s->j]-'0' + 1);
   double ga = k * pow(2, 2 - 2 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
diff @ 2012-02-17 15:03:04 +0000
diff --git a/src/go.c b/src/go.c
index d5e7040..70fb752 100644
--- a/src/go.c
+++ b/src/go.c
@@ -51,7 +51,7 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  double gr = 0.99;
+  double gr = 0.999;
   double k = 60 * ("02084640183"[s->j]-'0' + 1);
   double ga = k * pow(2, 2 - 2 * s->t) / SR;
   double gx = gr * cos(ga);
diff @ 2012-02-17 15:03:27 +0000
diff --git a/src/go.c b/src/go.c
index 70fb752..7ba6fe0 100644
--- a/src/go.c
+++ b/src/go.c
@@ -24,7 +24,7 @@ float go(S *s, float x) {
   s->t = fmod(s->t + 4/SR, 1);
 //  if (0 > s->t || s->t < 60) { s->t += 640/SR; } else { s->t -= 256/SR; }
   double old_clock = s->clock;
-  s->clock = fmod(s->clock + 0.5/SR, 1);
+  s->clock = fmod(s->clock + 4/SR, 1);
   if (s->clock < old_clock) {
     s->j = (s->j + 1) % 11;
   }
diff @ 2012-02-17 15:03:47 +0000
diff --git a/src/go.c b/src/go.c
index 7ba6fe0..fdfaf5e 100644
--- a/src/go.c
+++ b/src/go.c
@@ -53,7 +53,7 @@ float go(S *s, float x) {
   s->delayw = (s->delayw + 1) % 48000;
   double gr = 0.999;
   double k = 60 * ("02084640183"[s->j]-'0' + 1);
-  double ga = k * pow(2, 2 - 2 * s->t) / SR;
+  double ga = k * pow(2, 0.1 * s->t) / SR;
   double gx = gr * cos(ga);
   double gy = gr * sin(ga);
   double hx = gx * s->qx - gy * s->qy + 0.1 * tanh(o);
diff @ 2012-02-17 15:03:59 +0000
diff --git a/src/go.c b/src/go.c
index fdfaf5e..1f8cbed 100644
--- a/src/go.c
+++ b/src/go.c
@@ -51,7 +51,7 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  double gr = 0.999;
+  double gr = 0.7;
   double k = 60 * ("02084640183"[s->j]-'0' + 1);
   double ga = k * pow(2, 0.1 * s->t) / SR;
   double gx = gr * cos(ga);
diff @ 2012-02-17 15:04:08 +0000
diff --git a/src/go.c b/src/go.c
index 1f8cbed..ada0142 100644
--- a/src/go.c
+++ b/src/go.c
@@ -47,7 +47,7 @@ float go(S *s, float x) {
     double rf = r - ri;
     o += s->delayline[ri] * (1 - rf) + rf * s->delayline[(ri + 1) % 48000];
   }
-  s->leak = 0.999 * s->leak + 0.001 * o;
+  s->leak = 0.99 * s->leak + 0.01 * o;
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
diff @ 2012-02-17 15:04:19 +0000
diff --git a/src/go.c b/src/go.c
index ada0142..04558b3 100644
--- a/src/go.c
+++ b/src/go.c
@@ -51,7 +51,7 @@ float go(S *s, float x) {
   o -= s->leak;
   s->delayline[s->delayw] = tanh(o);
   s->delayw = (s->delayw + 1) % 48000;
-  double gr = 0.7;
+  double gr = -0.7;
   double k = 60 * ("02084640183"[s->j]-'0' + 1);
   double ga = k * pow(2, 0.1 * s->t) / SR;
   double gx = gr * cos(ga);
diff @ 2012-02-17 15:04:34 +0000
diff --git a/src/go.c b/src/go.c
index 04558b3..21ec556 100644
--- a/src/go.c
+++ b/src/go.c
@@ -31,7 +31,7 @@ float go(S *s, float x) {
   double tick = s->clock < old_clock;
   s->radioactivity += 1/(SR * 1e5);
   double decay = rand() / (double) RAND_MAX < s->radioactivity;
-  double fr = 0.9997;
+  double fr = 0.7;
   double fa = 2 * PI * 50 / SR;
   double fx = fr * cos(fa);
   double fy = fr * sin(fa);

the end