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 @ 2013-11-06 09:22:22 +0000 diff --git a/src/go.c b/src/go.c index 4e349ff..58488f8 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 100 + 50 * cell(s); } decay(s); - return tanhf(s->env * sinf(s->sample * 2 * PI / SR)); + return tanhf(s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:22:49 +0000 diff --git a/src/go.c b/src/go.c index 58488f8..08853c9 100644 --- a/src/go.c +++ b/src/go.c @@ -25,7 +25,7 @@ int cell(S *s) { int beat(S *s) { s->sample++; - if (s->sample >= 12000) { + if (s->sample >= 60 * SR / BPM / 4) { s->sample = 0; return 1; }
diff @ 2013-11-06 09:23:24 +0000 diff --git a/src/go.c b/src/go.c index 08853c9..19809ee 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s) { } void decay(S *s) { - s->env *= 0.999; + s->env *= 0.9995; } float go(S *s, float x) {
diff @ 2013-11-06 09:23:35 +0000 diff --git a/src/go.c b/src/go.c index 19809ee..42de2f1 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 100 + 50 * cell(s); } decay(s); - return tanhf(s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:23:42 +0000 diff --git a/src/go.c b/src/go.c index 42de2f1..be00ef7 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 100 + 50 * cell(s); } decay(s); - return sinf(s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(2 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:24:01 +0000 diff --git a/src/go.c b/src/go.c index be00ef7..014bb10 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 3; if (beat(s)) { trigger(s); - s->freq = 100 + 50 * cell(s); + s->freq = 150 + 50 * cell(s); } decay(s); return sinf(2 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:24:12 +0000 diff --git a/src/go.c b/src/go.c index 014bb10..4c589fe 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s) { } void decay(S *s) { - s->env *= 0.9995; + s->env *= 0.9997; } float go(S *s, float x) {
diff @ 2013-11-06 09:24:40 +0000 diff --git a/src/go.c b/src/go.c index 4c589fe..994581e 100644 --- a/src/go.c +++ b/src/go.c @@ -41,7 +41,7 @@ void decay(S *s) { } float go(S *s, float x) { - //s->cell = 3; + s->cell = 1; if (beat(s)) { trigger(s); s->freq = 150 + 50 * cell(s);
diff @ 2013-11-06 09:24:44 +0000 diff --git a/src/go.c b/src/go.c index 994581e..97df15d 100644 --- a/src/go.c +++ b/src/go.c @@ -41,7 +41,7 @@ void decay(S *s) { } float go(S *s, float x) { - s->cell = 1; + //s->cell = 1; if (beat(s)) { trigger(s); s->freq = 150 + 50 * cell(s);
diff @ 2013-11-06 09:26:12 +0000 diff --git a/src/go.c b/src/go.c index 97df15d..5ec430c 100644 --- a/src/go.c +++ b/src/go.c @@ -32,8 +32,8 @@ int beat(S *s) { return 0; } -void trigger(S *s) { - s->env += 1; +void trigger(S *s, float k) { + s->env += k; } void decay(S *s) { @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s); + trigger(s, s->subcell % 6 == 0 ? 2 : 1); s->freq = 150 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:26:40 +0000 diff --git a/src/go.c b/src/go.c index 5ec430c..40ab400 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 2 : 1); + trigger(s, s->subcell % 6 == 5 ? 2 : 1); s->freq = 150 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:27:10 +0000 diff --git a/src/go.c b/src/go.c index 40ab400..d767ffd 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 5 ? 2 : 1); + trigger(s, s->subcell % 4 == 0 ? 2 : 1); s->freq = 150 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:27:35 +0000 diff --git a/src/go.c b/src/go.c index d767ffd..a829a29 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 4 == 0 ? 2 : 1); - s->freq = 150 + 50 * cell(s); + s->freq = 250 + 50 * cell(s); } decay(s); return sinf(2 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:27:47 +0000 diff --git a/src/go.c b/src/go.c index a829a29..7be33b6 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 4 == 0 ? 2 : 1); - s->freq = 250 + 50 * cell(s); + s->freq = 80 + 10 * cell(s); } decay(s); return sinf(2 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:27:52 +0000 diff --git a/src/go.c b/src/go.c index 7be33b6..743514e 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 80 + 10 * cell(s); } decay(s); - return sinf(2 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(3 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:28:04 +0000 diff --git a/src/go.c b/src/go.c index 743514e..c590c68 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 80 + 10 * cell(s); } decay(s); - return sinf(3 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:28:13 +0000 diff --git a/src/go.c b/src/go.c index c590c68..a58fadb 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.9997; + s->env *= 0.9998; } float go(S *s, float x) {
diff @ 2013-11-06 09:28:50 +0000 diff --git a/src/go.c b/src/go.c index a58fadb..be9ed42 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 4 == 0 ? 2 : 1); - s->freq = 80 + 10 * cell(s); + s->freq = 70 + 10 * cell(s); } decay(s); return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:29:03 +0000 diff --git a/src/go.c b/src/go.c index be9ed42..30039ac 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 4 == 0 ? 2 : 1); - s->freq = 70 + 10 * cell(s); + s->freq = 70 + 5 * cell(s); } decay(s); return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:29:27 +0000 diff --git a/src/go.c b/src/go.c index 30039ac..357f850 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 4 == 0 ? 2 : 1); + trigger(s, s->subcell % 3 == 0 ? 2 : 1); s->freq = 70 + 5 * cell(s); } decay(s);
diff @ 2013-11-06 09:29:44 +0000 diff --git a/src/go.c b/src/go.c index 357f850..4e03ed7 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 3 == 0 ? 2 : 1); + trigger(s, s->subcell % 6 == 0 ? 2 : 1); s->freq = 70 + 5 * cell(s); } decay(s);
diff @ 2013-11-06 09:29:55 +0000 diff --git a/src/go.c b/src/go.c index 4e03ed7..33c7276 100644 --- a/src/go.c +++ b/src/go.c @@ -25,7 +25,7 @@ int cell(S *s) { int beat(S *s) { s->sample++; - if (s->sample >= 60 * SR / BPM / 4) { + if (s->sample >= 60 * SR / BPM / 6) { s->sample = 0; return 1; }
diff @ 2013-11-06 09:30:11 +0000 diff --git a/src/go.c b/src/go.c index 33c7276..576f7a9 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.9998; + s->env *= 0.999; } float go(S *s, float x) {
diff @ 2013-11-06 09:30:19 +0000 diff --git a/src/go.c b/src/go.c index 576f7a9..3bab31c 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 70 + 5 * cell(s); } decay(s); - return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(8 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:30:58 +0000 diff --git a/src/go.c b/src/go.c index 3bab31c..ec915d4 100644 --- a/src/go.c +++ b/src/go.c @@ -18,7 +18,7 @@ int cell(S *s) { s->subcell++; if (s->subcell >= 18) { s->subcell = 0; - s->cell = (~((s->cell << 1) | ((s->cell >> 17) ^ s->cell))) & ((1 << 18) - 1); + s->cell = (~((s->cell << 1) | (s->cell >> 17)) ^ s->cell))) & ((1 << 18) - 1); } return !!(s->cell & (1 << s->subcell)); }
diff @ 2013-11-06 09:31:05 +0000 diff --git a/src/go.c b/src/go.c index ec915d4..037d62e 100644 --- a/src/go.c +++ b/src/go.c @@ -18,7 +18,7 @@ int cell(S *s) { s->subcell++; if (s->subcell >= 18) { s->subcell = 0; - s->cell = (~((s->cell << 1) | (s->cell >> 17)) ^ s->cell))) & ((1 << 18) - 1); + s->cell = (~(((s->cell << 1) | (s->cell >> 17)) ^ s->cell))) & ((1 << 18) - 1); } return !!(s->cell & (1 << s->subcell)); }
diff @ 2013-11-06 09:31:13 +0000 diff --git a/src/go.c b/src/go.c index 037d62e..326f2db 100644 --- a/src/go.c +++ b/src/go.c @@ -18,7 +18,7 @@ int cell(S *s) { s->subcell++; if (s->subcell >= 18) { s->subcell = 0; - s->cell = (~(((s->cell << 1) | (s->cell >> 17)) ^ s->cell))) & ((1 << 18) - 1); + s->cell = (~(((s->cell << 1) | (s->cell >> 17)) ^ s->cell)) & ((1 << 18) - 1); } return !!(s->cell & (1 << s->subcell)); }
diff @ 2013-11-06 09:31:32 +0000 diff --git a/src/go.c b/src/go.c index 326f2db..d4817dd 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 6 == 0 ? 2 : 1); - s->freq = 70 + 5 * cell(s); + s->freq = 75 + 25 * cell(s); } decay(s); return sinf(8 * s->env * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:31:40 +0000 diff --git a/src/go.c b/src/go.c index d4817dd..0d25c86 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 75 + 25 * cell(s); } decay(s); - return sinf(8 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:31:45 +0000 diff --git a/src/go.c b/src/go.c index 0d25c86..546f46c 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.999; + s->env *= 0.9999; } float go(S *s, float x) {
diff @ 2013-11-06 09:31:53 +0000 diff --git a/src/go.c b/src/go.c index 546f46c..a4cca7f 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 75 + 25 * cell(s); } decay(s); - return sinf(4 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(3 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:32:00 +0000 diff --git a/src/go.c b/src/go.c index a4cca7f..52d1520 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 2 : 1); + trigger(s, s->subcell % 6 == 0 ? 1.1 : 1); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:32:12 +0000 diff --git a/src/go.c b/src/go.c index 52d1520..4d7b8b7 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1.1 : 1); + trigger(s, s->subcell % 6 == 0 ? 1 : 0.5); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:32:52 +0000 diff --git a/src/go.c b/src/go.c index 4d7b8b7..cdb92c0 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1 : 0.5); + trigger(s, s->subcell % 6 == 0 ? 1 : 0.25); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:33:01 +0000 diff --git a/src/go.c b/src/go.c index cdb92c0..1071fd8 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1 : 0.25); + trigger(s, s->subcell % 6 == 0 ? 1 : 0.75); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:33:19 +0000 diff --git a/src/go.c b/src/go.c index 1071fd8..28cddd0 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1 : 0.75); + trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.75); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:33:30 +0000 diff --git a/src/go.c b/src/go.c index 28cddd0..8311700 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.75); + trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.25); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:33:36 +0000 diff --git a/src/go.c b/src/go.c index 8311700..87f8a77 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.25); + trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.125); s->freq = 75 + 25 * cell(s); } decay(s);
diff @ 2013-11-06 09:33:48 +0000 diff --git a/src/go.c b/src/go.c index 87f8a77..69dbf1f 100644 --- a/src/go.c +++ b/src/go.c @@ -47,5 +47,5 @@ float go(S *s, float x) { s->freq = 75 + 25 * cell(s); } decay(s); - return sinf(3 * s->env * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(3 * tanh(s->env) * sinf(s->sample * s->freq * 2 * PI / SR)); }
diff @ 2013-11-06 09:33:55 +0000 diff --git a/src/go.c b/src/go.c index 69dbf1f..ab25886 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.9999; + s->env *= 0.99995; } float go(S *s, float x) {
diff @ 2013-11-06 09:34:02 +0000 diff --git a/src/go.c b/src/go.c index ab25886..33c783f 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.99995; + s->env *= 0.99997; } float go(S *s, float x) {
diff @ 2013-11-06 09:34:16 +0000 diff --git a/src/go.c b/src/go.c index 33c783f..bc3f5c8 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.125); - s->freq = 75 + 25 * cell(s); + s->freq = 150 + 25 * cell(s); } decay(s); return sinf(3 * tanh(s->env) * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:34:22 +0000 diff --git a/src/go.c b/src/go.c index bc3f5c8..22442ba 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.125); - s->freq = 150 + 25 * cell(s); + s->freq = 125 + 25 * cell(s); } decay(s); return sinf(3 * tanh(s->env) * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:34:50 +0000 diff --git a/src/go.c b/src/go.c index 22442ba..f0aa6d5 100644 --- a/src/go.c +++ b/src/go.c @@ -44,7 +44,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.125); - s->freq = 125 + 25 * cell(s); + s->freq = 125 + 50 * cell(s); } decay(s); return sinf(3 * tanh(s->env) * sinf(s->sample * s->freq * 2 * PI / SR));
diff @ 2013-11-06 09:34:57 +0000 diff --git a/src/go.c b/src/go.c index f0aa6d5..4c7b703 100644 --- a/src/go.c +++ b/src/go.c @@ -37,7 +37,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.99997; + s->env *= 0.99999; } float go(S *s, float x) {
diff @ 2013-11-06 09:35:17 +0000 diff --git a/src/go.c b/src/go.c index 4c7b703..aa68a3e 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 0.25 : 0.125); + trigger(s, s->subcell % 6 == 0 ? 0 : 0.125); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:35:26 +0000 diff --git a/src/go.c b/src/go.c index aa68a3e..131c639 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 0 : 0.125); + trigger(s, s->subcell % 6 == 0 ? 0 : 0); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:35:43 +0000 diff --git a/src/go.c b/src/go.c index 131c639..57ac845 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void decay(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 0 : 0); + trigger(s, s->subcell % 6 == 0 ? 1 : 0.5); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:37:14 +0000 diff --git a/src/go.c b/src/go.c index 57ac845..6290197 100644 --- a/src/go.c +++ b/src/go.c @@ -12,6 +12,7 @@ typedef struct { int cell; float freq; float env; + float phase; } S; int cell(S *s) { @@ -40,6 +41,10 @@ void decay(S *s) { s->env *= 0.99999; } +float phasor(S *s) { + return s->phase = fmodf(s->phase + s->freq/SR, 1); +} + float go(S *s, float x) { //s->cell = 1; if (beat(s)) { @@ -47,5 +52,5 @@ float go(S *s, float x) { s->freq = 125 + 50 * cell(s); } decay(s); - return sinf(3 * tanh(s->env) * sinf(s->sample * s->freq * 2 * PI / SR)); + return sinf(3 * tanh(s->env) * sinf(2 * PI * phasor(s))); }
diff @ 2013-11-06 09:37:22 +0000 diff --git a/src/go.c b/src/go.c index 6290197..512c5de 100644 --- a/src/go.c +++ b/src/go.c @@ -38,7 +38,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.99999; + s->env *= 0.9999; } float phasor(S *s) {
diff @ 2013-11-06 09:37:30 +0000 diff --git a/src/go.c b/src/go.c index 512c5de..0a20e77 100644 --- a/src/go.c +++ b/src/go.c @@ -38,7 +38,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.9999; + s->env *= 0.999; } float phasor(S *s) {
diff @ 2013-11-06 09:37:35 +0000 diff --git a/src/go.c b/src/go.c index 0a20e77..8ccb9fc 100644 --- a/src/go.c +++ b/src/go.c @@ -38,7 +38,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.999; + s->env *= 0.9998; } float phasor(S *s) {
diff @ 2013-11-06 09:37:42 +0000 diff --git a/src/go.c b/src/go.c index 8ccb9fc..c1c8e91 100644 --- a/src/go.c +++ b/src/go.c @@ -52,5 +52,5 @@ float go(S *s, float x) { s->freq = 125 + 50 * cell(s); } decay(s); - return sinf(3 * tanh(s->env) * sinf(2 * PI * phasor(s))); + return sinf(3 * s->env * sinf(2 * PI * phasor(s))); }
diff @ 2013-11-06 09:37:54 +0000 diff --git a/src/go.c b/src/go.c index c1c8e91..14486ed 100644 --- a/src/go.c +++ b/src/go.c @@ -38,7 +38,7 @@ void trigger(S *s, float k) { } void decay(S *s) { - s->env *= 0.9998; + s->env *= 0.9999; } float phasor(S *s) {
diff @ 2013-11-06 09:38:03 +0000 diff --git a/src/go.c b/src/go.c index 14486ed..9c9f8b8 100644 --- a/src/go.c +++ b/src/go.c @@ -48,7 +48,7 @@ float phasor(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1 : 0.5); + trigger(s, s->subcell % 6 == 0 ? 1 : 0.25); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:38:19 +0000 diff --git a/src/go.c b/src/go.c index 9c9f8b8..908521a 100644 --- a/src/go.c +++ b/src/go.c @@ -48,7 +48,7 @@ float phasor(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 6 == 0 ? 1 : 0.25); + trigger(s, s->subcell % 3 == 0 ? 1 : 0.25); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:38:24 +0000 diff --git a/src/go.c b/src/go.c index 908521a..0cf5366 100644 --- a/src/go.c +++ b/src/go.c @@ -26,7 +26,7 @@ int cell(S *s) { int beat(S *s) { s->sample++; - if (s->sample >= 60 * SR / BPM / 6) { + if (s->sample >= 60 * SR / BPM / 3) { s->sample = 0; return 1; }
diff @ 2013-11-06 09:39:24 +0000 diff --git a/src/go.c b/src/go.c index 0cf5366..daef117 100644 --- a/src/go.c +++ b/src/go.c @@ -48,7 +48,7 @@ float phasor(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, s->subcell % 3 == 0 ? 1 : 0.25); + trigger(s, (s->subcell == 0) + (s->subcell % 3 == 0) + 0.25); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:40:02 +0000 diff --git a/src/go.c b/src/go.c index daef117..ba12fd7 100644 --- a/src/go.c +++ b/src/go.c @@ -48,7 +48,7 @@ float phasor(S *s) { float go(S *s, float x) { //s->cell = 1; if (beat(s)) { - trigger(s, (s->subcell == 0) + (s->subcell % 3 == 0) + 0.25); + trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 125 + 50 * cell(s); } decay(s);
diff @ 2013-11-06 09:40:26 +0000 diff --git a/src/go.c b/src/go.c index ba12fd7..9dda51a 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); - s->freq = 125 + 50 * cell(s); + s->freq = 125 + 125 * cell(s); } decay(s); return sinf(3 * s->env * sinf(2 * PI * phasor(s)));
diff @ 2013-11-06 09:40:36 +0000 diff --git a/src/go.c b/src/go.c index 9dda51a..0c25b46 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float go(S *s, float x) { //s->cell = 1; if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); - s->freq = 125 + 125 * cell(s); + s->freq = 110 + 110 * cell(s); } decay(s); return sinf(3 * s->env * sinf(2 * PI * phasor(s)));
diff @ 2013-11-06 09:40:56 +0000 diff --git a/src/go.c b/src/go.c index 0c25b46..137eaa6 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ float phasor(S *s) { } float go(S *s, float x) { - //s->cell = 1; + s->cell = rand() % 18; if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 110 + 110 * cell(s);
diff @ 2013-11-06 09:41:05 +0000 diff --git a/src/go.c b/src/go.c index 137eaa6..98312ae 100644 --- a/src/go.c +++ b/src/go.c @@ -1,4 +1,5 @@ #include <math.h> +#include <stdlib.h> #define PI 3.141592653 #define SR 48000
diff @ 2013-11-06 09:41:11 +0000 diff --git a/src/go.c b/src/go.c index 98312ae..fcfe18d 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ float phasor(S *s) { } float go(S *s, float x) { - s->cell = rand() % 18; +// s->cell = rand() % 18; if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 110 + 110 * cell(s);
diff @ 2013-11-06 09:41:50 +0000 diff --git a/src/go.c b/src/go.c index fcfe18d..a1b5331 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ float phasor(S *s) { } float go(S *s, float x) { -// s->cell = rand() % 18; + s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 110 + 110 * cell(s);
diff @ 2013-11-06 09:41:54 +0000 diff --git a/src/go.c b/src/go.c index a1b5331..aae6434 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ float phasor(S *s) { } float go(S *s, float x) { - s->cell = rand() & ((1 << 18) - 1); + // s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 110 + 110 * cell(s);
diff @ 2013-11-06 09:42:36 +0000 diff --git a/src/go.c b/src/go.c index aae6434..e521c1f 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float phasor(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { - trigger(s, 2 * (s->subcell == 0) + (s->subcell % 3 == 0) + 0.5); + trigger(s, 2 * (s->subcell % 9 == 0) + (s->subcell % 3 == 0) + 0.5); s->freq = 110 + 110 * cell(s); } decay(s);
diff @ 2013-11-06 09:42:52 +0000 diff --git a/src/go.c b/src/go.c index e521c1f..75c53c6 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float phasor(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { - trigger(s, 2 * (s->subcell % 9 == 0) + (s->subcell % 3 == 0) + 0.5); + trigger(s, 2 * (s->subcell % 9 == 0) + (s->subcell % 3 == 2) + 0.5); s->freq = 110 + 110 * cell(s); } decay(s);
diff @ 2013-11-06 09:43:08 +0000 diff --git a/src/go.c b/src/go.c index 75c53c6..ce88f05 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float phasor(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { - trigger(s, 2 * (s->subcell % 9 == 0) + (s->subcell % 3 == 2) + 0.5); + trigger(s, 4 * (s->subcell % 9 == 0) + (s->subcell % 3 == 2) + 0.5); s->freq = 110 + 110 * cell(s); } decay(s);
diff @ 2013-11-06 09:43:49 +0000 diff --git a/src/go.c b/src/go.c index ce88f05..e6833de 100644 --- a/src/go.c +++ b/src/go.c @@ -49,7 +49,7 @@ float phasor(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); if (beat(s)) { - trigger(s, 4 * (s->subcell % 9 == 0) + (s->subcell % 3 == 2) + 0.5); + trigger(s, cell(s) + 0.25); s->freq = 110 + 110 * cell(s); } decay(s);
diff @ 2013-11-06 09:44:01 +0000 diff --git a/src/go.c b/src/go.c index e6833de..bbf9cd1 100644 --- a/src/go.c +++ b/src/go.c @@ -48,9 +48,9 @@ float phasor(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); + s->freq = 110; if (beat(s)) { trigger(s, cell(s) + 0.25); - s->freq = 110 + 110 * cell(s); } decay(s); return sinf(3 * s->env * sinf(2 * PI * phasor(s)));
diff @ 2013-11-06 09:44:52 +0000 diff --git a/src/go.c b/src/go.c index bbf9cd1..d973023 100644 --- a/src/go.c +++ b/src/go.c @@ -27,7 +27,7 @@ int cell(S *s) { int beat(S *s) { s->sample++; - if (s->sample >= 60 * SR / BPM / 3) { + if (s->sample >= 60 * SR / BPM / 6) { s->sample = 0; return 1; }
diff @ 2013-11-06 09:45:02 +0000 diff --git a/src/go.c b/src/go.c index d973023..8b3f662 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 136 +#define BPM 111 typedef struct { float like_a_butterfly;
diff @ 2013-11-06 09:45:14 +0000 diff --git a/src/go.c b/src/go.c index 8b3f662..231394b 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 111 +#define BPM 136 typedef struct { float like_a_butterfly; @@ -27,7 +27,7 @@ int cell(S *s) { int beat(S *s) { s->sample++; - if (s->sample >= 60 * SR / BPM / 6) { + if (s->sample >= 60 * SR / BPM / 4) { s->sample = 0; return 1; }
diff @ 2013-11-06 09:46:56 +0000 diff --git a/src/go.c b/src/go.c index 231394b..cae5b9a 100644 --- a/src/go.c +++ b/src/go.c @@ -5,18 +5,22 @@ #define SR 48000 #define BPM 136 -typedef struct { - float like_a_butterfly; - int sample; - int beat; +struct cellsynth { int subcell; int cell; float freq; float env; float phase; +}; + +typedef struct { + float like_a_butterfly; + int sample; + int beat; + struct cellsynth[8]; } S; -int cell(S *s) { +int cell(struct cellsynth *s) { s->subcell++; if (s->subcell >= 18) { s->subcell = 0; @@ -34,12 +38,12 @@ int beat(S *s) { return 0; } -void trigger(S *s, float k) { +void trigger(struct cellsynth *s, float k) { s->env += k; } -void decay(S *s) { - s->env *= 0.9999; +void decay(struct cellsynth *s) { + s->env *= 0.9997; } float phasor(S *s) {
diff @ 2013-11-06 09:49:23 +0000 diff --git a/src/go.c b/src/go.c index cae5b9a..72f8933 100644 --- a/src/go.c +++ b/src/go.c @@ -46,16 +46,24 @@ void decay(struct cellsynth *s) { s->env *= 0.9997; } -float phasor(S *s) { +float phasor(struct cellsynth *s) { return s->phase = fmodf(s->phase + s->freq/SR, 1); } +void hit(S *s) { + trigger(&s->cellsynth[0], cell(&s->cellsynth[0]) + 0.25); +} + +float hear(S *s) { + decay(s); + return sinf(3 * s->env * sinf(2 * PI * phasor(s))); + + float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); s->freq = 110; if (beat(s)) { - trigger(s, cell(s) + 0.25); + hit(s); } - decay(s); - return sinf(3 * s->env * sinf(2 * PI * phasor(s))); + return hear(s); }
diff @ 2013-11-06 09:49:35 +0000 diff --git a/src/go.c b/src/go.c index 72f8933..71f6133 100644 --- a/src/go.c +++ b/src/go.c @@ -61,7 +61,7 @@ float hear(S *s) { float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1); - s->freq = 110; +// s->freq = 110; if (beat(s)) { hit(s); }
diff @ 2013-11-06 09:49:42 +0000 diff --git a/src/go.c b/src/go.c index 71f6133..477a8a3 100644 --- a/src/go.c +++ b/src/go.c @@ -57,7 +57,7 @@ void hit(S *s) { float hear(S *s) { decay(s); return sinf(3 * s->env * sinf(2 * PI * phasor(s))); - +} float go(S *s, float x) { // s->cell = rand() & ((1 << 18) - 1);
diff @ 2013-11-06 09:50:08 +0000 diff --git a/src/go.c b/src/go.c index 477a8a3..24da1a1 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ void hit(S *s) { trigger(&s->cellsynth[0], cell(&s->cellsynth[0]) + 0.25); } -float hear(S *s) { +float hear(struct cellsynth *s) { decay(s); return sinf(3 * s->env * sinf(2 * PI * phasor(s))); } @@ -65,5 +65,5 @@ float go(S *s, float x) { if (beat(s)) { hit(s); } - return hear(s); + return hear(&s->cellsynth[0]); }
diff @ 2013-11-06 09:50:25 +0000 diff --git a/src/go.c b/src/go.c index 24da1a1..6d6e170 100644 --- a/src/go.c +++ b/src/go.c @@ -17,7 +17,7 @@ typedef struct { float like_a_butterfly; int sample; int beat; - struct cellsynth[8]; + struct cellsynth cellsynth[8]; } S; int cell(struct cellsynth *s) {
diff @ 2013-11-06 09:51:40 +0000 diff --git a/src/go.c b/src/go.c index 6d6e170..5f8337d 100644 --- a/src/go.c +++ b/src/go.c @@ -59,8 +59,15 @@ float hear(struct cellsynth *s) { return sinf(3 * s->env * sinf(2 * PI * phasor(s))); } +void inits(struct S *s) { + for (int i = 0; i < 8; ++i) { + s->cellsynth[i].freq = 110 * (i + 1); + s->cellsynth[i].cell = rand() & ((1 << 18) - 1); + } +} + float go(S *s, float x) { - // s->cell = rand() & ((1 << 18) - 1); + // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:51:56 +0000 diff --git a/src/go.c b/src/go.c index 5f8337d..9baad4e 100644 --- a/src/go.c +++ b/src/go.c @@ -59,7 +59,7 @@ float hear(struct cellsynth *s) { return sinf(3 * s->env * sinf(2 * PI * phasor(s))); } -void inits(struct S *s) { +void inits(S *s) { for (int i = 0; i < 8; ++i) { s->cellsynth[i].freq = 110 * (i + 1); s->cellsynth[i].cell = rand() & ((1 << 18) - 1);
diff @ 2013-11-06 09:52:04 +0000 diff --git a/src/go.c b/src/go.c index 9baad4e..0be0e9c 100644 --- a/src/go.c +++ b/src/go.c @@ -67,7 +67,7 @@ void inits(S *s) { } float go(S *s, float x) { - + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:52:06 +0000 diff --git a/src/go.c b/src/go.c index 0be0e9c..283da45 100644 --- a/src/go.c +++ b/src/go.c @@ -67,7 +67,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:53:29 +0000 diff --git a/src/go.c b/src/go.c index 283da45..670d15b 100644 --- a/src/go.c +++ b/src/go.c @@ -59,6 +59,14 @@ float hear(struct cellsynth *s) { return sinf(3 * s->env * sinf(2 * PI * phasor(s))); } +void hears(S *s) { + float h = 0; + for (int i = 0; i < 8; ++i) { + h += hear(&s->cellsynth[i]); + } + return tanhf(h / 4); +} + void inits(S *s) { for (int i = 0; i < 8; ++i) { s->cellsynth[i].freq = 110 * (i + 1); @@ -72,5 +80,5 @@ float go(S *s, float x) { if (beat(s)) { hit(s); } - return hear(&s->cellsynth[0]); + return hears(s); }
diff @ 2013-11-06 09:53:38 +0000 diff --git a/src/go.c b/src/go.c index 670d15b..adfbf26 100644 --- a/src/go.c +++ b/src/go.c @@ -59,7 +59,7 @@ float hear(struct cellsynth *s) { return sinf(3 * s->env * sinf(2 * PI * phasor(s))); } -void hears(S *s) { +float hears(S *s) { float h = 0; for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]);
diff @ 2013-11-06 09:53:45 +0000 diff --git a/src/go.c b/src/go.c index adfbf26..060dc5b 100644 --- a/src/go.c +++ b/src/go.c @@ -64,7 +64,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return tanhf(h / 4); + return tanhf(h / 2); } void inits(S *s) {
diff @ 2013-11-06 09:53:51 +0000 diff --git a/src/go.c b/src/go.c index 060dc5b..08a13ee 100644 --- a/src/go.c +++ b/src/go.c @@ -75,7 +75,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:53:55 +0000 diff --git a/src/go.c b/src/go.c index 08a13ee..060dc5b 100644 --- a/src/go.c +++ b/src/go.c @@ -75,7 +75,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:54:45 +0000 diff --git a/src/go.c b/src/go.c index 060dc5b..2cae5f2 100644 --- a/src/go.c +++ b/src/go.c @@ -51,7 +51,9 @@ float phasor(struct cellsynth *s) { } void hit(S *s) { - trigger(&s->cellsynth[0], cell(&s->cellsynth[0]) + 0.25); + for (int i = 0; i < 8; ++i) { + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25); + } } float hear(struct cellsynth *s) { @@ -64,7 +66,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return tanhf(h / 2); + return tanhf(h / 4); } void inits(S *s) {
diff @ 2013-11-06 09:55:01 +0000 diff --git a/src/go.c b/src/go.c index 2cae5f2..62a1fde 100644 --- a/src/go.c +++ b/src/go.c @@ -71,13 +71,13 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 110 * (i + 1); + s->cellsynth[i].freq = 55 * (i + 1); s->cellsynth[i].cell = rand() & ((1 << 18) - 1); } } float go(S *s, float x) { -// inits(s); + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:55:04 +0000 diff --git a/src/go.c b/src/go.c index 62a1fde..9637525 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:55:39 +0000 diff --git a/src/go.c b/src/go.c index 9637525..1b0cb22 100644 --- a/src/go.c +++ b/src/go.c @@ -71,7 +71,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 55 * (i + 1); + s->cellsynth[i].freq = 55 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << 18) - 1); } }
diff @ 2013-11-06 09:55:42 +0000 diff --git a/src/go.c b/src/go.c index 1b0cb22..4dfe6b4 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:55:46 +0000 diff --git a/src/go.c b/src/go.c index 4dfe6b4..1b0cb22 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:55:59 +0000 diff --git a/src/go.c b/src/go.c index 1b0cb22..c4e44a1 100644 --- a/src/go.c +++ b/src/go.c @@ -66,7 +66,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return tanhf(h / 4); + return tanhf(h / 8); } void inits(S *s) {
diff @ 2013-11-06 09:56:33 +0000 diff --git a/src/go.c b/src/go.c index c4e44a1..a8ecc90 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.9997; + s->env *= 0.999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 09:56:39 +0000 diff --git a/src/go.c b/src/go.c index a8ecc90..d0b32d6 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.999; + s->env *= 0.9999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 09:57:07 +0000 diff --git a/src/go.c b/src/go.c index d0b32d6..b4ef20b 100644 --- a/src/go.c +++ b/src/go.c @@ -71,7 +71,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 55 * (i + 1) + 0.1; + s->cellsynth[i].freq = 50 + 10 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << 18) - 1); } }
diff @ 2013-11-06 09:57:40 +0000 diff --git a/src/go.c b/src/go.c index b4ef20b..5a2cc8a 100644 --- a/src/go.c +++ b/src/go.c @@ -73,11 +73,14 @@ void inits(S *s) { for (int i = 0; i < 8; ++i) { s->cellsynth[i].freq = 50 + 10 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << 18) - 1); + s->cellsynth[i].env = 0; + s->cellsynth[i].phase = 0; + s->cellsynth[i].subcell = 0; } } float go(S *s, float x) { -// inits(s); + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:58:00 +0000 diff --git a/src/go.c b/src/go.c index 5a2cc8a..50c7e82 100644 --- a/src/go.c +++ b/src/go.c @@ -80,7 +80,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:58:19 +0000 diff --git a/src/go.c b/src/go.c index 50c7e82..70e8029 100644 --- a/src/go.c +++ b/src/go.c @@ -71,7 +71,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 50 + 10 * (i + 1) + 0.1; + s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << 18) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 09:58:22 +0000 diff --git a/src/go.c b/src/go.c index 70e8029..23e5b93 100644 --- a/src/go.c +++ b/src/go.c @@ -80,7 +80,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:58:25 +0000 diff --git a/src/go.c b/src/go.c index 23e5b93..70e8029 100644 --- a/src/go.c +++ b/src/go.c @@ -80,7 +80,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); // s->freq = 110; if (beat(s)) { hit(s);
diff @ 2013-11-06 09:59:02 +0000 diff --git a/src/go.c b/src/go.c index 70e8029..6bb064d 100644 --- a/src/go.c +++ b/src/go.c @@ -66,7 +66,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return tanhf(h / 8); + return tanhf(h / 16); } void inits(S *s) {
diff @ 2013-11-06 09:59:23 +0000 diff --git a/src/go.c b/src/go.c index 6bb064d..b9a03f8 100644 --- a/src/go.c +++ b/src/go.c @@ -71,7 +71,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.1; + s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.01; s->cellsynth[i].cell = rand() & ((1 << 18) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 09:59:29 +0000 diff --git a/src/go.c b/src/go.c index b9a03f8..c79c60d 100644 --- a/src/go.c +++ b/src/go.c @@ -80,8 +80,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); -// s->freq = 110; + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 09:59:32 +0000 diff --git a/src/go.c b/src/go.c index c79c60d..377465f 100644 --- a/src/go.c +++ b/src/go.c @@ -80,7 +80,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 09:59:50 +0000 diff --git a/src/go.c b/src/go.c index 377465f..3698beb 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.9999; + s->env *= 0.999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 09:59:53 +0000 diff --git a/src/go.c b/src/go.c index 3698beb..248eaf8 100644 --- a/src/go.c +++ b/src/go.c @@ -43,7 +43,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.999; + s->env *= 0.9995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:01:11 +0000 diff --git a/src/go.c b/src/go.c index 248eaf8..73eb034 100644 --- a/src/go.c +++ b/src/go.c @@ -5,6 +5,8 @@ #define SR 48000 #define BPM 136 +#define BEATS 12 + struct cellsynth { int subcell; int cell; @@ -24,7 +26,7 @@ int cell(struct cellsynth *s) { s->subcell++; if (s->subcell >= 18) { s->subcell = 0; - s->cell = (~(((s->cell << 1) | (s->cell >> 17)) ^ s->cell)) & ((1 << 18) - 1); + s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } return !!(s->cell & (1 << s->subcell)); } @@ -72,7 +74,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.01; - s->cellsynth[i].cell = rand() & ((1 << 18) - 1); + s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; s->cellsynth[i].subcell = 0;
diff @ 2013-11-06 10:01:31 +0000 diff --git a/src/go.c b/src/go.c index 73eb034..332fdc6 100644 --- a/src/go.c +++ b/src/go.c @@ -24,7 +24,7 @@ typedef struct { int cell(struct cellsynth *s) { s->subcell++; - if (s->subcell >= 18) { + if (s->subcell >= BEATS) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); }
diff @ 2013-11-06 10:02:20 +0000 diff --git a/src/go.c b/src/go.c index 332fdc6..c66409b 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 1); } }
diff @ 2013-11-06 10:02:26 +0000 diff --git a/src/go.c b/src/go.c index c66409b..332fdc6 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 1); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25); } }
diff @ 2013-11-06 10:02:36 +0000 diff --git a/src/go.c b/src/go.c index 332fdc6..2633c46 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { float hear(struct cellsynth *s) { decay(s); - return sinf(3 * s->env * sinf(2 * PI * phasor(s))); + return sinf(4 * s->env * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:02:54 +0000 diff --git a/src/go.c b/src/go.c index 2633c46..28f506f 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 136 +#define BPM 144 #define BEATS 12
diff @ 2013-11-06 10:03:46 +0000 diff --git a/src/go.c b/src/go.c index 28f506f..49c3e54 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 12 +#define BEATS 10 struct cellsynth { int subcell;
diff @ 2013-11-06 10:04:17 +0000 diff --git a/src/go.c b/src/go.c index 49c3e54..3da26d6 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 10 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 10:05:16 +0000 diff --git a/src/go.c b/src/go.c index 3da26d6..9fad9e3 100644 --- a/src/go.c +++ b/src/go.c @@ -45,7 +45,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.9995; + s->env *= 0.99985; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:06:08 +0000 diff --git a/src/go.c b/src/go.c index 9fad9e3..5886dd0 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.01; + s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:06:12 +0000 diff --git a/src/go.c b/src/go.c index 5886dd0..14daa2b 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 60 + 30 * (i + 1) + 0.1; + s->cellsynth[i].freq = 60 + 60 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:06:16 +0000 diff --git a/src/go.c b/src/go.c index 14daa2b..8e3ff05 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:06:20 +0000 diff --git a/src/go.c b/src/go.c index 8e3ff05..14daa2b 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:07:18 +0000 diff --git a/src/go.c b/src/go.c index 14daa2b..4d81194 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 5 +#define BEATS 10 struct cellsynth { int subcell;
diff @ 2013-11-06 10:07:46 +0000 diff --git a/src/go.c b/src/go.c index 4d81194..d7f4524 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:07:50 +0000 diff --git a/src/go.c b/src/go.c index d7f4524..4d81194 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:08:35 +0000 diff --git a/src/go.c b/src/go.c index 4d81194..cf4652f 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 10 +#define BEATS 11 struct cellsynth { int subcell;
diff @ 2013-11-06 10:09:09 +0000 diff --git a/src/go.c b/src/go.c index cf4652f..82131bb 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 60 + 60 * (i + 1) + 0.1; + s->cellsynth[i].freq = 100 + 10 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:09:18 +0000 diff --git a/src/go.c b/src/go.c index 82131bb..6c82374 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:09:20 +0000 diff --git a/src/go.c b/src/go.c index 6c82374..82131bb 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:09:44 +0000 diff --git a/src/go.c b/src/go.c index 82131bb..a7f2491 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 100 + 10 * (i + 1) + 0.1; + s->cellsynth[i].freq = 210 + 30 * (i + 1) + 0.1; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:09:57 +0000 diff --git a/src/go.c b/src/go.c index a7f2491..500f88c 100644 --- a/src/go.c +++ b/src/go.c @@ -74,15 +74,17 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { s->cellsynth[i].freq = 210 + 30 * (i + 1) + 0.1; +/* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; s->cellsynth[i].subcell = 0; +*/ } } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:10:12 +0000 diff --git a/src/go.c b/src/go.c index 500f88c..b08a4ad 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 210 + 30 * (i + 1) + 0.1; + s->cellsynth[i].freq = 210 + 30 * i + 0.1; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:10:23 +0000 diff --git a/src/go.c b/src/go.c index b08a4ad..4715a99 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 210 + 30 * i + 0.1; + s->cellsynth[i].freq = 105 + 30 * i + 0.1; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:10:41 +0000 diff --git a/src/go.c b/src/go.c index 4715a99..fda353b 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 105 + 30 * i + 0.1; + s->cellsynth[i].freq = 120 + 30 * i + 0.1; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:10:56 +0000 diff --git a/src/go.c b/src/go.c index fda353b..368ff46 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 11 +#define BEATS 14 struct cellsynth { int subcell;
diff @ 2013-11-06 10:11:28 +0000 diff --git a/src/go.c b/src/go.c index 368ff46..249945c 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.05); } }
diff @ 2013-11-06 10:11:36 +0000 diff --git a/src/go.c b/src/go.c index 249945c..8efa9d0 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.05); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i])); } }
diff @ 2013-11-06 10:12:41 +0000 diff --git a/src/go.c b/src/go.c index 8efa9d0..1f7535e 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i])); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + (s->cellsynth[i].subcell % 4 == 0)); } }
diff @ 2013-11-06 10:12:53 +0000 diff --git a/src/go.c b/src/go.c index 1f7535e..a9fd34c 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + (s->cellsynth[i].subcell % 4 == 0)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25 * (s->cellsynth[i].subcell % 4 == 0)); } }
diff @ 2013-11-06 10:13:26 +0000 diff --git a/src/go.c b/src/go.c index a9fd34c..bdeaab4 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 0.25 * (s->cellsynth[i].subcell % 4 == 0)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + (i == 0) * (s->cellsynth[i].subcell % 4 == 0)); } }
diff @ 2013-11-06 10:13:44 +0000 diff --git a/src/go.c b/src/go.c index bdeaab4..ad757c0 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + (i == 0) * (s->cellsynth[i].subcell % 4 == 0)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 4 * (i == 0) * (s->cellsynth[i].subcell % 4 == 0)); } }
diff @ 2013-11-06 10:14:08 +0000 diff --git a/src/go.c b/src/go.c index ad757c0..599ecc7 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 4 * (i == 0) * (s->cellsynth[i].subcell % 4 == 0)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 4 * (i == 0) * (s->cellsynth[i].subcell == 0)); } }
diff @ 2013-11-06 10:14:26 +0000 diff --git a/src/go.c b/src/go.c index 599ecc7..8efa9d0 100644 --- a/src/go.c +++ b/src/go.c @@ -54,7 +54,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < 8; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) + 4 * (i == 0) * (s->cellsynth[i].subcell == 0)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i])); } }
diff @ 2013-11-06 10:14:41 +0000 diff --git a/src/go.c b/src/go.c index 8efa9d0..2561d16 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 144 -#define BEATS 14 +#define BEATS 12 struct cellsynth { int subcell;
diff @ 2013-11-06 10:15:01 +0000 diff --git a/src/go.c b/src/go.c index 2561d16..e205862 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 144 +#define BPM 128 #define BEATS 12
diff @ 2013-11-06 10:15:15 +0000 diff --git a/src/go.c b/src/go.c index e205862..63e3cd5 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { float hear(struct cellsynth *s) { decay(s); - return sinf(4 * s->env * sinf(2 * PI * phasor(s))); + return sinf(2 * s->env * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:15:29 +0000 diff --git a/src/go.c b/src/go.c index 63e3cd5..9433caa 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return tanhf(h / 16); + return sinf(h / 8); } void inits(S *s) {
diff @ 2013-11-06 10:15:33 +0000 diff --git a/src/go.c b/src/go.c index 9433caa..e8fbcd0 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 8); + return sinf(h / 4); } void inits(S *s) {
diff @ 2013-11-06 10:15:38 +0000 diff --git a/src/go.c b/src/go.c index e8fbcd0..d60889f 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 4); + return sinf(h / 2); } void inits(S *s) {
diff @ 2013-11-06 10:15:50 +0000 diff --git a/src/go.c b/src/go.c index d60889f..04cc759 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 120 + 30 * i + 0.1; + s->cellsynth[i].freq = 120 + 30 * i + 0.01; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:15:58 +0000 diff --git a/src/go.c b/src/go.c index 04cc759..c717fb9 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 120 + 30 * i + 0.01; + s->cellsynth[i].freq = 120 + 30 * i + 1; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:16:07 +0000 diff --git a/src/go.c b/src/go.c index c717fb9..eedbccb 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 120 + 30 * i + 1; + s->cellsynth[i].freq = 120.1 + 30 * i; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:16:15 +0000 diff --git a/src/go.c b/src/go.c index eedbccb..9df6e85 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < 8; ++i) { - s->cellsynth[i].freq = 120.1 + 30 * i; + s->cellsynth[i].freq = 120 + 30.1 * i; /* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0;
diff @ 2013-11-06 10:16:30 +0000 diff --git a/src/go.c b/src/go.c index 9df6e85..5fa4316 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < 8; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 2); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:19:27 +0000 diff --git a/src/go.c b/src/go.c index 5fa4316..c0fd5d1 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 128 - +#define COUNT 16 #define BEATS 12 struct cellsynth { @@ -19,7 +19,7 @@ typedef struct { float like_a_butterfly; int sample; int beat; - struct cellsynth cellsynth[8]; + struct cellsynth cellsynth[COUNT]; } S; int cell(struct cellsynth *s) { @@ -53,7 +53,7 @@ float phasor(struct cellsynth *s) { } void hit(S *s) { - for (int i = 0; i < 8; ++i) { + for (int i = 0; i < COUNT; ++i) { trigger(&s->cellsynth[i], cell(&s->cellsynth[i])); } } @@ -65,21 +65,19 @@ float hear(struct cellsynth *s) { float hears(S *s) { float h = 0; - for (int i = 0; i < 8; ++i) { + for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } return sinf(h); } void inits(S *s) { - for (int i = 0; i < 8; ++i) { + for (int i = 0; i < COUNT; ++i) { s->cellsynth[i].freq = 120 + 30.1 * i; -/* s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; s->cellsynth[i].subcell = 0; -*/ } }
diff @ 2013-11-06 10:19:32 +0000 diff --git a/src/go.c b/src/go.c index c0fd5d1..cf4439f 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:19:39 +0000 diff --git a/src/go.c b/src/go.c index cf4439f..2dbaa25 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(h / 4); } void inits(S *s) {
diff @ 2013-11-06 10:19:50 +0000 diff --git a/src/go.c b/src/go.c index 2dbaa25..129c7dc 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 120 + 30.1 * i; + s->cellsynth[i].freq = 120 + 30.01 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:19:55 +0000 diff --git a/src/go.c b/src/go.c index 129c7dc..1f98c6b 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:19:57 +0000 diff --git a/src/go.c b/src/go.c index 1f98c6b..129c7dc 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:21:35 +0000 diff --git a/src/go.c b/src/go.c index 129c7dc..aa9c85c 100644 --- a/src/go.c +++ b/src/go.c @@ -23,12 +23,13 @@ typedef struct { } S; int cell(struct cellsynth *s) { + int old = s->cell & (1 << s->subcell); s->subcell++; if (s->subcell >= BEATS) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return !!(s->cell & (1 << s->subcell)); + return (s->cell & (1 << s->subcell)) > old; } int beat(S *s) {
diff @ 2013-11-06 10:21:51 +0000 diff --git a/src/go.c b/src/go.c index aa9c85c..4d1572f 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.99985; + s->env *= 0.9995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:22:00 +0000 diff --git a/src/go.c b/src/go.c index 4d1572f..403b642 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.9995; + s->env *= 0.999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:22:13 +0000 diff --git a/src/go.c b/src/go.c index 403b642..71fd2e4 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.999; + s->env *= 0.99999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:22:23 +0000 diff --git a/src/go.c b/src/go.c index 71fd2e4..532a817 100644 --- a/src/go.c +++ b/src/go.c @@ -69,7 +69,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 4); + return sinf(h / 16); } void inits(S *s) {
diff @ 2013-11-06 10:22:28 +0000 diff --git a/src/go.c b/src/go.c index 532a817..7c6ce78 100644 --- a/src/go.c +++ b/src/go.c @@ -69,7 +69,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 16); + return sinf(h / 8); } void inits(S *s) {
diff @ 2013-11-06 10:22:35 +0000 diff --git a/src/go.c b/src/go.c index 7c6ce78..56ba932 100644 --- a/src/go.c +++ b/src/go.c @@ -61,7 +61,7 @@ void hit(S *s) { float hear(struct cellsynth *s) { decay(s); - return sinf(2 * s->env * sinf(2 * PI * phasor(s))); + return sinf(s->env * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:22:49 +0000 diff --git a/src/go.c b/src/go.c index 56ba932..da0e1fe 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } void decay(struct cellsynth *s) { - s->env *= 0.99999; + s->env *= 0.99995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:23:23 +0000 diff --git a/src/go.c b/src/go.c index da0e1fe..c80f369 100644 --- a/src/go.c +++ b/src/go.c @@ -45,8 +45,8 @@ void trigger(struct cellsynth *s, float k) { s->env += k; } -void decay(struct cellsynth *s) { - s->env *= 0.99995; +float decay(struct cellsynth *s) { + return s->env *= 0.99995; } float phasor(struct cellsynth *s) { @@ -60,8 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - decay(s); - return sinf(s->env * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:23:33 +0000 diff --git a/src/go.c b/src/go.c index c80f369..adff6af 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 128 #define COUNT 16 -#define BEATS 12 +#define BEATS 13 struct cellsynth { int subcell;
diff @ 2013-11-06 10:23:46 +0000 diff --git a/src/go.c b/src/go.c index adff6af..531f22e 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 128 #define COUNT 16 -#define BEATS 13 +#define BEATS 7 struct cellsynth { int subcell;
diff @ 2013-11-06 10:24:28 +0000 diff --git a/src/go.c b/src/go.c index 531f22e..44b50c4 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:24:31 +0000 diff --git a/src/go.c b/src/go.c index 44b50c4..531f22e 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:24:51 +0000 diff --git a/src/go.c b/src/go.c index 531f22e..e522439 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 120 + 30.01 * i; + s->cellsynth[i].freq = 120 + 30.1 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:24:54 +0000 diff --git a/src/go.c b/src/go.c index e522439..497a699 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:24:56 +0000 diff --git a/src/go.c b/src/go.c index 497a699..e522439 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:25:10 +0000 diff --git a/src/go.c b/src/go.c index e522439..bf358fc 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 120 + 30.1 * i; + s->cellsynth[i].freq = 120 + 60.01 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:25:16 +0000 diff --git a/src/go.c b/src/go.c index bf358fc..bc65656 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:25:53 +0000 diff --git a/src/go.c b/src/go.c index bc65656..130b6ae 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 128 -#define COUNT 16 +#define COUNT 32 #define BEATS 7 struct cellsynth { @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:25:56 +0000 diff --git a/src/go.c b/src/go.c index 130b6ae..7db9324 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:26:22 +0000 diff --git a/src/go.c b/src/go.c index 7db9324..ab97dde 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 8); + return sinf(h / 16); } void inits(S *s) {
diff @ 2013-11-06 10:26:30 +0000 diff --git a/src/go.c b/src/go.c index ab97dde..fbfc208 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 16); + return h / 32; } void inits(S *s) {
diff @ 2013-11-06 10:27:20 +0000 diff --git a/src/go.c b/src/go.c index fbfc208..ec6a080 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (s->cell & (1 << s->subcell)) > old; + return (s->cell & (1 << s->subcell)) != old; } int beat(S *s) {
diff @ 2013-11-06 10:27:44 +0000 diff --git a/src/go.c b/src/go.c index ec6a080..f8d73dc 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.99995; + return s->env *= 0.9995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:28:00 +0000 diff --git a/src/go.c b/src/go.c index f8d73dc..fc09d53 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 128 +#define BPM 160 #define COUNT 32 #define BEATS 7
diff @ 2013-11-06 10:28:15 +0000 diff --git a/src/go.c b/src/go.c index fc09d53..a51e8ff 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (s->cell & (1 << s->subcell)) != old; + return (s->cell & (1 << s->subcell)) == old; } int beat(S *s) {
diff @ 2013-11-06 10:28:39 +0000 diff --git a/src/go.c b/src/go.c index a51e8ff..6a4cab9 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (s->cell & (1 << s->subcell)) == old; + return !!(s->cell & (1 << s->subcell)) > !!old; } int beat(S *s) {
diff @ 2013-11-06 10:28:50 +0000 diff --git a/src/go.c b/src/go.c index 6a4cab9..6774a6e 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return !!(s->cell & (1 << s->subcell)) > !!old; + return (!!(s->cell & (1 << s->subcell))) > (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:28:59 +0000 diff --git a/src/go.c b/src/go.c index 6774a6e..c840c02 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.9995; + return s->env *= 0.9999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:29:11 +0000 diff --git a/src/go.c b/src/go.c index c840c02..466d86e 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return h / 32; + return sinf(h / 16); } void inits(S *s) {
diff @ 2013-11-06 10:29:25 +0000 diff --git a/src/go.c b/src/go.c index 466d86e..85461d9 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 16); + return sinf(h / 8); } void inits(S *s) {
diff @ 2013-11-06 10:29:39 +0000 diff --git a/src/go.c b/src/go.c index 85461d9..5685116 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 120 + 60.01 * i; + s->cellsynth[i].freq = 60 + 60.01 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:29:42 +0000 diff --git a/src/go.c b/src/go.c index 5685116..6cec90e 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:29:44 +0000 diff --git a/src/go.c b/src/go.c index 6cec90e..5685116 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:30:10 +0000 diff --git a/src/go.c b/src/go.c index 5685116..cb7c77c 100644 --- a/src/go.c +++ b/src/go.c @@ -55,7 +55,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i])); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); } }
diff @ 2013-11-06 10:30:23 +0000 diff --git a/src/go.c b/src/go.c index cb7c77c..22164e8 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 8); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:30:41 +0000 diff --git a/src/go.c b/src/go.c index 22164e8..522c5cb 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:30:47 +0000 diff --git a/src/go.c b/src/go.c index 522c5cb..c07c717 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:31:37 +0000 diff --git a/src/go.c b/src/go.c index c07c717..bcd5068 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 7 +#define BEATS 9 struct cellsynth { int subcell;
diff @ 2013-11-06 10:32:11 +0000 diff --git a/src/go.c b/src/go.c index bcd5068..ce58ffe 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 9 +#define BEATS 6 struct cellsynth { int subcell;
diff @ 2013-11-06 10:32:26 +0000 diff --git a/src/go.c b/src/go.c index ce58ffe..335b1c2 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 6 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 10:33:48 +0000 diff --git a/src/go.c b/src/go.c index 335b1c2..6eb3f57 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 5 +#define BEATS 10 struct cellsynth { int subcell;
diff @ 2013-11-06 10:34:26 +0000 diff --git a/src/go.c b/src/go.c index 6eb3f57..5b1c83f 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:34:28 +0000 diff --git a/src/go.c b/src/go.c index 5b1c83f..6eb3f57 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:35:19 +0000 diff --git a/src/go.c b/src/go.c index 6eb3f57..2c2a9d8 100644 --- a/src/go.c +++ b/src/go.c @@ -27,7 +27,7 @@ int cell(struct cellsynth *s) { s->subcell++; if (s->subcell >= BEATS) { s->subcell = 0; - s->cell = (~(((s->cell << 1) | (s->cell >> (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); + s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } return (!!(s->cell & (1 << s->subcell))) > (!!old); }
diff @ 2013-11-06 10:36:07 +0000 diff --git a/src/go.c b/src/go.c index 2c2a9d8..033a5f3 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.9999; + return s->env *= 0.99995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:36:16 +0000 diff --git a/src/go.c b/src/go.c index 033a5f3..dd70d6b 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.99995; + return s->env *= 0.99993; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:36:22 +0000 diff --git a/src/go.c b/src/go.c index dd70d6b..9c151dc 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.99993; + return s->env *= 0.9995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:36:42 +0000 diff --git a/src/go.c b/src/go.c index 9c151dc..634d07a 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.9995; + return s->env *= 0.999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:37:02 +0000 diff --git a/src/go.c b/src/go.c index 634d07a..033a5f3 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.999; + return s->env *= 0.99995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:37:06 +0000 diff --git a/src/go.c b/src/go.c index 033a5f3..2c2a9d8 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.99995; + return s->env *= 0.9999; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:37:19 +0000 diff --git a/src/go.c b/src/go.c index 2c2a9d8..72f6c5b 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(2*h); } void inits(S *s) {
diff @ 2013-11-06 10:37:48 +0000 diff --git a/src/go.c b/src/go.c index 72f6c5b..560219b 100644 --- a/src/go.c +++ b/src/go.c @@ -55,7 +55,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); } }
diff @ 2013-11-06 10:38:00 +0000 diff --git a/src/go.c b/src/go.c index 560219b..d33b28e 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(2*h); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:38:17 +0000 diff --git a/src/go.c b/src/go.c index d33b28e..aa447bb 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) > (!!old); + return (!!(s->cell & (1 << s->subcell))) < (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:38:31 +0000 diff --git a/src/go.c b/src/go.c index aa447bb..5a8d7cf 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) < (!!old); + return (!!(s->cell & (1 << s->subcell))) - (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:38:45 +0000 diff --git a/src/go.c b/src/go.c index 5a8d7cf..d33b28e 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) - (!!old); + return (!!(s->cell & (1 << s->subcell))) > (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:39:10 +0000 diff --git a/src/go.c b/src/go.c index d33b28e..93121c4 100644 --- a/src/go.c +++ b/src/go.c @@ -55,7 +55,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); } }
diff @ 2013-11-06 10:39:28 +0000 diff --git a/src/go.c b/src/go.c index 93121c4..e3f6a7f 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:39:39 +0000 diff --git a/src/go.c b/src/go.c index e3f6a7f..c451aef 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(h / 2); } void inits(S *s) {
diff @ 2013-11-06 10:40:05 +0000 diff --git a/src/go.c b/src/go.c index c451aef..f7e7b56 100644 --- a/src/go.c +++ b/src/go.c @@ -73,7 +73,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 60 + 60.01 * i; + s->cellsynth[i].freq = 50 + 50.01 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0;
diff @ 2013-11-06 10:40:20 +0000 diff --git a/src/go.c b/src/go.c index f7e7b56..61042e9 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 10 +#define BEATS 14 struct cellsynth { int subcell; @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:40:21 +0000 diff --git a/src/go.c b/src/go.c index 61042e9..0fd4b81 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:40:48 +0000 diff --git a/src/go.c b/src/go.c index 0fd4b81..61ca9e3 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 160 #define COUNT 32 -#define BEATS 14 +#define BEATS 12 struct cellsynth { int subcell;
diff @ 2013-11-06 10:41:26 +0000 diff --git a/src/go.c b/src/go.c index 61ca9e3..41932ce 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 160 -#define COUNT 32 +#define COUNT 64 #define BEATS 12 struct cellsynth { @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:41:29 +0000 diff --git a/src/go.c b/src/go.c index 41932ce..915ea12 100644 --- a/src/go.c +++ b/src/go.c @@ -82,7 +82,7 @@ void inits(S *s) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); }
diff @ 2013-11-06 10:41:51 +0000 diff --git a/src/go.c b/src/go.c index 915ea12..c91717f 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 160 +#define BPM 136 #define COUNT 64 #define BEATS 12
diff @ 2013-11-06 10:42:01 +0000 diff --git a/src/go.c b/src/go.c index c91717f..161ac28 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 136 +#define BPM 120 #define COUNT 64 #define BEATS 12
diff @ 2013-11-06 10:42:31 +0000 diff --git a/src/go.c b/src/go.c index 161ac28..af414e6 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 64 -#define BEATS 12 +#define BEATS 7 struct cellsynth { int subcell;
diff @ 2013-11-06 10:43:18 +0000 diff --git a/src/go.c b/src/go.c index af414e6..52cfc44 100644 --- a/src/go.c +++ b/src/go.c @@ -55,7 +55,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 2.0 / (i + 1)); } }
diff @ 2013-11-06 10:43:22 +0000 diff --git a/src/go.c b/src/go.c index 52cfc44..af414e6 100644 --- a/src/go.c +++ b/src/go.c @@ -55,7 +55,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 2.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); } }
diff @ 2013-11-06 10:43:35 +0000 diff --git a/src/go.c b/src/go.c index af414e6..a4b36d0 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 2); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:44:09 +0000 diff --git a/src/go.c b/src/go.c index a4b36d0..5e17098 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 64 +#define COUNT 4 #define BEATS 7 struct cellsynth {
diff @ 2013-11-06 10:44:20 +0000 diff --git a/src/go.c b/src/go.c index 5e17098..329cdf6 100644 --- a/src/go.c +++ b/src/go.c @@ -46,7 +46,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.9999; + return s->env *= 0.99995; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:44:42 +0000 diff --git a/src/go.c b/src/go.c index 329cdf6..217fb58 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 4 -#define BEATS 7 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 10:45:32 +0000 diff --git a/src/go.c b/src/go.c index 217fb58..d3f6985 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(2 * h); } void inits(S *s) {
diff @ 2013-11-06 10:45:42 +0000 diff --git a/src/go.c b/src/go.c index d3f6985..328fe09 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(2 * h); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:47:32 +0000 diff --git a/src/go.c b/src/go.c index 328fe09..e02d548 100644 --- a/src/go.c +++ b/src/go.c @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(2 * h); } void inits(S *s) {
diff @ 2013-11-06 10:47:43 +0000 diff --git a/src/go.c b/src/go.c index e02d548..15fe7b3 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(3 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -68,7 +68,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(2 * h); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 10:48:01 +0000 diff --git a/src/go.c b/src/go.c index 15fe7b3..9e0c23e 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 4 +#define COUNT 2 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 10:48:47 +0000 diff --git a/src/go.c b/src/go.c index 9e0c23e..8b7d161 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 2 +#define COUNT 32 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 10:48:54 +0000 diff --git a/src/go.c b/src/go.c index 8b7d161..2328d3c 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 32 +#define COUNT 6 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 10:49:33 +0000 diff --git a/src/go.c b/src/go.c index 2328d3c..0f9af00 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) > (!!old); + return (!!(s->cell & (1 << s->subcell))) < (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:49:47 +0000 diff --git a/src/go.c b/src/go.c index 0f9af00..6219af3 100644 --- a/src/go.c +++ b/src/go.c @@ -29,7 +29,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) < (!!old); + return (!!(s->cell & (1 << s->subcell))) != (!!old); } int beat(S *s) {
diff @ 2013-11-06 10:51:26 +0000 diff --git a/src/go.c b/src/go.c index 6219af3..19d87d0 100644 --- a/src/go.c +++ b/src/go.c @@ -13,6 +13,7 @@ struct cellsynth { float freq; float env; float phase; + float lop; }; typedef struct { @@ -46,7 +47,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->env *= 0.99995; + return s->lop = (s->env *= 0.99995) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:51:51 +0000 diff --git a/src/go.c b/src/go.c index 19d87d0..f861959 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.99995) * 0.01 + 0.99 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:52:17 +0000 diff --git a/src/go.c b/src/go.c index f861959..4591124 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.99995) * 0.05 + 0.95 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:52:27 +0000 diff --git a/src/go.c b/src/go.c index 4591124..e3385b1 100644 --- a/src/go.c +++ b/src/go.c @@ -47,7 +47,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.05 + 0.95 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.05 + 0.95 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 10:53:34 +0000 diff --git a/src/go.c b/src/go.c index e3385b1..245a1e7 100644 --- a/src/go.c +++ b/src/go.c @@ -61,7 +61,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(3 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 10:53:53 +0000 diff --git a/src/go.c b/src/go.c index 245a1e7..81a1b55 100644 --- a/src/go.c +++ b/src/go.c @@ -69,7 +69,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(1.5 * h); } void inits(S *s) {
diff @ 2013-11-06 10:57:29 +0000 diff --git a/src/go.c b/src/go.c index 81a1b55..eee496e 100644 --- a/src/go.c +++ b/src/go.c @@ -16,10 +16,16 @@ struct cellsynth { float lop; }; +struct hat { + float env; + int beat; +}; + typedef struct { float like_a_butterfly; int sample; int beat; + struct hat hat; struct cellsynth cellsynth[COUNT]; } S; @@ -82,10 +88,19 @@ void inits(S *s) { } } +float noise() { + return rand() / (float) RAND_MAX - 0.5; +} + +float hat(struct hat *hat) { + return noise() * (hat->env *= 0.999); +} + float go(S *s, float x) { // inits(s); if (beat(s)) { hit(s); + s->hat->env += (s->hat->beat = (s->hat->beat + 1) % 4) == 0; } - return hears(s); + return tanhf(hears(s) + hat(&s->hat)); }
diff @ 2013-11-06 10:57:44 +0000 diff --git a/src/go.c b/src/go.c index eee496e..8553ea2 100644 --- a/src/go.c +++ b/src/go.c @@ -100,7 +100,7 @@ float go(S *s, float x) { // inits(s); if (beat(s)) { hit(s); - s->hat->env += (s->hat->beat = (s->hat->beat + 1) % 4) == 0; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; } return tanhf(hears(s) + hat(&s->hat)); }
diff @ 2013-11-06 10:57:53 +0000 diff --git a/src/go.c b/src/go.c index 8553ea2..8867b67 100644 --- a/src/go.c +++ b/src/go.c @@ -97,7 +97,7 @@ float hat(struct hat *hat) { } float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 10:57:56 +0000 diff --git a/src/go.c b/src/go.c index 8867b67..8553ea2 100644 --- a/src/go.c +++ b/src/go.c @@ -97,7 +97,7 @@ float hat(struct hat *hat) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:00:08 +0000 diff --git a/src/go.c b/src/go.c index 8553ea2..3bfad31 100644 --- a/src/go.c +++ b/src/go.c @@ -16,6 +16,11 @@ struct cellsynth { float lop; }; +struct kick { + float env; + int beat; +}; + struct hat { float env; int beat; @@ -25,8 +30,9 @@ typedef struct { float like_a_butterfly; int sample; int beat; - struct hat hat; struct cellsynth cellsynth[COUNT]; + struct kick kick; + struct hat hat; } S; int cell(struct cellsynth *s) { @@ -96,11 +102,15 @@ float hat(struct hat *hat) { return noise() * (hat->env *= 0.999); } +float kick(struct kick *k) { + return sinf(kick->env *= 0.999); + float go(S *s, float x) { // inits(s); if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; + s->kick.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; + s->hat.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; } - return tanhf(hears(s) + hat(&s->hat)); + return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick)); }
diff @ 2013-11-06 11:00:20 +0000 diff --git a/src/go.c b/src/go.c index 3bfad31..e211ebf 100644 --- a/src/go.c +++ b/src/go.c @@ -104,9 +104,10 @@ float hat(struct hat *hat) { float kick(struct kick *k) { return sinf(kick->env *= 0.999); +} float go(S *s, float x) { -// inits(s); + inits(s); if (beat(s)) { hit(s); s->kick.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:01:03 +0000 diff --git a/src/go.c b/src/go.c index e211ebf..c715e2c 100644 --- a/src/go.c +++ b/src/go.c @@ -102,7 +102,7 @@ float hat(struct hat *hat) { return noise() * (hat->env *= 0.999); } -float kick(struct kick *k) { +float kick(struct kick *kick) { return sinf(kick->env *= 0.999); } @@ -110,8 +110,8 @@ float go(S *s, float x) { inits(s); if (beat(s)) { hit(s); - s->kick.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; - s->hat.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick)); }
diff @ 2013-11-06 11:01:09 +0000 diff --git a/src/go.c b/src/go.c index c715e2c..b19881b 100644 --- a/src/go.c +++ b/src/go.c @@ -103,7 +103,7 @@ float hat(struct hat *hat) { } float kick(struct kick *kick) { - return sinf(kick->env *= 0.999); + return sinf(kick->env *= 0.9994); } float go(S *s, float x) {
diff @ 2013-11-06 11:01:13 +0000 diff --git a/src/go.c b/src/go.c index b19881b..8534b08 100644 --- a/src/go.c +++ b/src/go.c @@ -107,7 +107,7 @@ float kick(struct kick *kick) { } float go(S *s, float x) { - inits(s); +// inits(s); if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:01:37 +0000 diff --git a/src/go.c b/src/go.c index 8534b08..6cb2cdc 100644 --- a/src/go.c +++ b/src/go.c @@ -108,6 +108,8 @@ float kick(struct kick *kick) { float go(S *s, float x) { // inits(s); +kick->beat = 3; +hat->beat = 3; if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:02:08 +0000 diff --git a/src/go.c b/src/go.c index 6cb2cdc..d75b287 100644 --- a/src/go.c +++ b/src/go.c @@ -108,8 +108,8 @@ float kick(struct kick *kick) { float go(S *s, float x) { // inits(s); -kick->beat = 3; -hat->beat = 3; +//s->kick.beat = 3; +//s->hat.beat = 3; if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:07:17 +0000 diff --git a/src/go.c b/src/go.c index d75b287..4ef517b 100644 --- a/src/go.c +++ b/src/go.c @@ -26,6 +26,13 @@ struct hat { int beat; }; +struct snare { + float env; + int beat; + float x; + float y; +}; + typedef struct { float like_a_butterfly; int sample; @@ -33,6 +40,7 @@ typedef struct { struct cellsynth cellsynth[COUNT]; struct kick kick; struct hat hat; + struct snare snare; } S; int cell(struct cellsynth *s) { @@ -106,6 +114,12 @@ float kick(struct kick *kick) { return sinf(kick->env *= 0.9994); } +float snare(struct snare *s) { + s->x = s->x * 0.5 + 0.5 * noise() * s->env; + s->y = 0.9 * s->x - 0.1 * s->y; + return s->y; +} + float go(S *s, float x) { // inits(s); //s->kick.beat = 3; @@ -114,6 +128,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 4); } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick)); }
diff @ 2013-11-06 11:07:24 +0000 diff --git a/src/go.c b/src/go.c index 4ef517b..b2533b7 100644 --- a/src/go.c +++ b/src/go.c @@ -130,5 +130,5 @@ float go(S *s, float x) { s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 4); } - return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick)); + return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + snare(&s->snare)); }
diff @ 2013-11-06 11:07:43 +0000 diff --git a/src/go.c b/src/go.c index b2533b7..bbbdd2b 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.5 + 0.5 * noise() * s->env; + s->x = s->x * 0.5 + 0.5 * noise() * (s->env *= 0.999); s->y = 0.9 * s->x - 0.1 * s->y; return s->y; }
diff @ 2013-11-06 11:07:58 +0000 diff --git a/src/go.c b/src/go.c index bbbdd2b..7102325 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.5 + 0.5 * noise() * (s->env *= 0.999); + s->x = s->x * 0.5 + 0.5 * noise() * (s->env *= 0.9995); s->y = 0.9 * s->x - 0.1 * s->y; return s->y; }
diff @ 2013-11-06 11:08:07 +0000 diff --git a/src/go.c b/src/go.c index 7102325..1bb5e92 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.5 + 0.5 * noise() * (s->env *= 0.9995); + s->x = s->x * 0.5 + noise() * (s->env *= 0.9995); s->y = 0.9 * s->x - 0.1 * s->y; return s->y; }
diff @ 2013-11-06 11:08:12 +0000 diff --git a/src/go.c b/src/go.c index 1bb5e92..858d4bb 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.5 + noise() * (s->env *= 0.9995); + s->x = s->x * 0.9 + noise() * (s->env *= 0.9995); s->y = 0.9 * s->x - 0.1 * s->y; return s->y; }
diff @ 2013-11-06 11:08:19 +0000 diff --git a/src/go.c b/src/go.c index 858d4bb..d6919c3 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.9 + noise() * (s->env *= 0.9995); + s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); s->y = 0.9 * s->x - 0.1 * s->y; return s->y; }
diff @ 2013-11-06 11:08:27 +0000 diff --git a/src/go.c b/src/go.c index d6919c3..66d1fa4 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = 0.9 * s->x - 0.1 * s->y; + s->y = 0.5 * s->x - 0.5 * s->y; return s->y; }
diff @ 2013-11-06 11:08:38 +0000 diff --git a/src/go.c b/src/go.c index 66d1fa4..ead0482 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = 0.5 * s->x - 0.5 * s->y; + s->y = 0.1 * s->x - 0.9 * s->y; return s->y; }
diff @ 2013-11-06 11:08:45 +0000 diff --git a/src/go.c b/src/go.c index ead0482..4c6ed05 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = 0.1 * s->x - 0.9 * s->y; + s->y = s->x - 0.9 * s->y; return s->y; }
diff @ 2013-11-06 11:08:53 +0000 diff --git a/src/go.c b/src/go.c index 4c6ed05..0012da7 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = s->x - 0.9 * s->y; + s->y = s->x - 0.99 * s->y; return s->y; }
diff @ 2013-11-06 11:09:02 +0000 diff --git a/src/go.c b/src/go.c index 0012da7..991b85b 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = s->x - 0.99 * s->y; + s->y = s->x + 0.99 * s->y; return s->y; }
diff @ 2013-11-06 11:09:14 +0000 diff --git a/src/go.c b/src/go.c index 991b85b..2463554 100644 --- a/src/go.c +++ b/src/go.c @@ -116,7 +116,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); - s->y = s->x + 0.99 * s->y; + s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 11:09:24 +0000 diff --git a/src/go.c b/src/go.c index 2463554..85e21ca 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.9995); + s->x = s->x * 0.95 + noise() * (s->env *= 0.999); s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 11:09:29 +0000 diff --git a/src/go.c b/src/go.c index 85e21ca..f216880 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.999); + s->x = s->x * 0.95 + noise() * (s->env *= 0.9993); s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 11:09:34 +0000 diff --git a/src/go.c b/src/go.c index f216880..d2558b7 100644 --- a/src/go.c +++ b/src/go.c @@ -115,7 +115,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.9993); + s->x = s->x * 0.95 + noise() * (s->env *= 0.9992); s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 11:09:49 +0000 diff --git a/src/go.c b/src/go.c index d2558b7..81fe749 100644 --- a/src/go.c +++ b/src/go.c @@ -122,8 +122,9 @@ float snare(struct snare *s) { float go(S *s, float x) { // inits(s); -//s->kick.beat = 3; -//s->hat.beat = 3; +s->kick.beat = 3; +s->hat.beat = 3; +s->snare.beat = 7; if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:10:07 +0000 diff --git a/src/go.c b/src/go.c index 81fe749..4d43b7c 100644 --- a/src/go.c +++ b/src/go.c @@ -122,9 +122,11 @@ float snare(struct snare *s) { float go(S *s, float x) { // inits(s); +/* s->kick.beat = 3; s->hat.beat = 3; s->snare.beat = 7; +*/ if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:10:48 +0000 diff --git a/src/go.c b/src/go.c index 4d43b7c..36669f1 100644 --- a/src/go.c +++ b/src/go.c @@ -131,7 +131,7 @@ s->snare.beat = 7; hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 4); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + snare(&s->snare)); }
diff @ 2013-11-06 11:11:08 +0000 diff --git a/src/go.c b/src/go.c index 36669f1..9437f58 100644 --- a/src/go.c +++ b/src/go.c @@ -131,7 +131,7 @@ s->snare.beat = 7; hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + snare(&s->snare)); }
diff @ 2013-11-06 11:19:18 +0000 diff --git a/src/go.c b/src/go.c index 9437f58..575136a 100644 --- a/src/go.c +++ b/src/go.c @@ -33,6 +33,12 @@ struct snare { float y; }; +struct comb { + int delwrite; + int delread; + float delay[SR]; +}; + typedef struct { float like_a_butterfly; int sample; @@ -120,6 +126,12 @@ float snare(struct snare *s) { return s->y; } +float comb(struct comb *s, float x) { + float y = x - 0.95 * s->delay[(s->delwrite - s->delread + SR) % SR]; + s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; + return y; +} + float go(S *s, float x) { // inits(s); /* @@ -132,6 +144,9 @@ s->snare.beat = 7; s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); + if (s->snare.beat == 6) { + s->comb.delread = SR / ((noise() + 1) * 120); + } } - return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + snare(&s->snare)); + return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(snare(&s->snare))); }
diff @ 2013-11-06 11:19:37 +0000 diff --git a/src/go.c b/src/go.c index 575136a..af7be51 100644 --- a/src/go.c +++ b/src/go.c @@ -47,6 +47,7 @@ typedef struct { struct kick kick; struct hat hat; struct snare snare; + struct comb comb; } S; int cell(struct cellsynth *s) { @@ -148,5 +149,5 @@ s->snare.beat = 7; s->comb.delread = SR / ((noise() + 1) * 120); } } - return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(snare(&s->snare))); + return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(s->comb, snare(&s->snare))); }
diff @ 2013-11-06 11:19:40 +0000 diff --git a/src/go.c b/src/go.c index af7be51..d70c787 100644 --- a/src/go.c +++ b/src/go.c @@ -149,5 +149,5 @@ s->snare.beat = 7; s->comb.delread = SR / ((noise() + 1) * 120); } } - return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(s->comb, snare(&s->snare))); + return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare))); }
diff @ 2013-11-06 11:20:03 +0000 diff --git a/src/go.c b/src/go.c index d70c787..9eff7ad 100644 --- a/src/go.c +++ b/src/go.c @@ -146,7 +146,7 @@ s->snare.beat = 7; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->snare.beat == 6) { - s->comb.delread = SR / ((noise() + 1) * 120); + s->comb.delread = SR / ((noise() + 1) * 240); } } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:20:15 +0000 diff --git a/src/go.c b/src/go.c index 9eff7ad..7f7ffd7 100644 --- a/src/go.c +++ b/src/go.c @@ -146,7 +146,7 @@ s->snare.beat = 7; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->snare.beat == 6) { - s->comb.delread = SR / ((noise() + 1) * 240); + s->comb.delread = SR / ((noise() + 1) * 440); } } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:20:33 +0000 diff --git a/src/go.c b/src/go.c index 7f7ffd7..731f2e9 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float snare(struct snare *s) { } float comb(struct comb *s, float x) { - float y = x - 0.95 * s->delay[(s->delwrite - s->delread + SR) % SR]; + float y = tanhf(x - 0.99 * s->delay[(s->delwrite - s->delread + SR) % SR]); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return y; }
diff @ 2013-11-06 11:20:49 +0000 diff --git a/src/go.c b/src/go.c index 731f2e9..a66acb0 100644 --- a/src/go.c +++ b/src/go.c @@ -130,7 +130,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = tanhf(x - 0.99 * s->delay[(s->delwrite - s->delread + SR) % SR]); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; - return y; + return x + y; } float go(S *s, float x) {
diff @ 2013-11-06 11:20:55 +0000 diff --git a/src/go.c b/src/go.c index a66acb0..54c8af6 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float snare(struct snare *s) { } float comb(struct comb *s, float x) { - float y = tanhf(x - 0.99 * s->delay[(s->delwrite - s->delread + SR) % SR]); + float y = tanhf(x - 0.999 * s->delay[(s->delwrite - s->delread + SR) % SR]); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:21:27 +0000 diff --git a/src/go.c b/src/go.c index 54c8af6..7e4d665 100644 --- a/src/go.c +++ b/src/go.c @@ -146,7 +146,7 @@ s->snare.beat = 7; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->snare.beat == 6) { - s->comb.delread = SR / ((noise() + 1) * 440); + s->comb.delread = SR / ((noise() + 1) * 660); } } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:23:21 +0000 diff --git a/src/go.c b/src/go.c index 7e4d665..3b56a94 100644 --- a/src/go.c +++ b/src/go.c @@ -37,6 +37,7 @@ struct comb { int delwrite; int delread; float delay[SR]; + int beat; }; typedef struct { @@ -145,8 +146,9 @@ s->snare.beat = 7; s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); - if (s->snare.beat == 6) { - s->comb.delread = SR / ((noise() + 1) * 660); + if (s->kick.beat == 0) { + s->comb.beat = (s->comb.beat + 1) % 32; + s->comb.delread = SR / (60 * (s->comb.beat + 1)); } } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:25:28 +0000 diff --git a/src/go.c b/src/go.c index 3b56a94..1b0f78a 100644 --- a/src/go.c +++ b/src/go.c @@ -35,7 +35,8 @@ struct snare { struct comb { int delwrite; - int delread; + int delread1; + int delread2; float delay[SR]; int beat; }; @@ -129,7 +130,9 @@ float snare(struct snare *s) { } float comb(struct comb *s, float x) { - float y = tanhf(x - 0.999 * s->delay[(s->delwrite - s->delread + SR) % SR]); + float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; + y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; + y = tanhf(x - 0.49 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; } @@ -148,7 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 32; - s->comb.delread = SR / (60 * (s->comb.beat + 1)); + s->comb.delread1 = SR / (60 * (s->comb.beat + 1)); + s->comb.delread2 = SR / (60 * ((s->comb.beat + 16) % 32 + 1)); } } return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:25:34 +0000 diff --git a/src/go.c b/src/go.c index 1b0f78a..be709fd 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = tanhf(x - 0.49 * y); + y = tanhf(x - 0.499 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:25:51 +0000 diff --git a/src/go.c b/src/go.c index be709fd..2c9bdc4 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = tanhf(x - 0.499 * y); + y = tanhf(x - 0.51 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:25:59 +0000 diff --git a/src/go.c b/src/go.c index 2c9bdc4..c182fe0 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = tanhf(x - 0.51 * y); + y = tanhf(x - 0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:26:29 +0000 diff --git a/src/go.c b/src/go.c index c182fe0..6d9735d 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = tanhf(x - 0.5 * y); + y = 0.9 * tanhf(x - 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:26:35 +0000 diff --git a/src/go.c b/src/go.c index 6d9735d..85e52f3 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.9 * tanhf(x - 0.6 * y); + y = 0.5 * tanhf(x - 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:26:39 +0000 diff --git a/src/go.c b/src/go.c index 85e52f3..141b418 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.5 * tanhf(x - 0.6 * y); + y = 0.7 * tanhf(x - 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:26:52 +0000 diff --git a/src/go.c b/src/go.c index 141b418..49b71df 100644 --- a/src/go.c +++ b/src/go.c @@ -155,5 +155,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (60 * ((s->comb.beat + 16) % 32 + 1)); } } - return tanhf(hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare))); + return tanhf(0.1 * hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare))); }
diff @ 2013-11-06 11:27:03 +0000 diff --git a/src/go.c b/src/go.c index 49b71df..6d13add 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.7 * tanhf(x - 0.6 * y); + y = 0.8 * tanhf(x - 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:27:15 +0000 diff --git a/src/go.c b/src/go.c index 6d13add..e14891e 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.8 * tanhf(x - 0.6 * y); + y = 0.85 * tanhf(x - 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:27:52 +0000 diff --git a/src/go.c b/src/go.c index e14891e..4df89e4 100644 --- a/src/go.c +++ b/src/go.c @@ -151,8 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 32; - s->comb.delread1 = SR / (60 * (s->comb.beat + 1)); - s->comb.delread2 = SR / (60 * ((s->comb.beat + 16) % 32 + 1)); + s->comb.delread1 = SR / (30 * (s->comb.beat + 1)); + s->comb.delread2 = SR / (30 * ((s->comb.beat + 16) % 32 + 1)); } } return tanhf(0.1 * hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:28:06 +0000 diff --git a/src/go.c b/src/go.c index 4df89e4..e195330 100644 --- a/src/go.c +++ b/src/go.c @@ -150,9 +150,9 @@ s->snare.beat = 7; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { - s->comb.beat = (s->comb.beat + 1) % 32; + s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (30 * (s->comb.beat + 1)); - s->comb.delread2 = SR / (30 * ((s->comb.beat + 16) % 32 + 1)); + s->comb.delread2 = SR / (30 * ((s->comb.beat + 8) % 16 + 1)); } } return tanhf(0.1 * hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare)));
diff @ 2013-11-06 11:28:28 +0000 diff --git a/src/go.c b/src/go.c index e195330..04ab846 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.85 * tanhf(x - 0.6 * y); + y = 0.85 * tanhf(x + 0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:28:40 +0000 diff --git a/src/go.c b/src/go.c index 04ab846..c9f2c4d 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.85 * tanhf(x + 0.6 * y); + y = 0.7 * tanhf(x + 0.7 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:28:46 +0000 diff --git a/src/go.c b/src/go.c index c9f2c4d..93e6be5 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.7 * tanhf(x + 0.7 * y); + y = 0.8 * tanhf(x + 0.7 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:29:03 +0000 diff --git a/src/go.c b/src/go.c index 93e6be5..73b4469 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.8 * tanhf(x + 0.7 * y); + y = 0.9 * tanhf(x + 0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:29:09 +0000 diff --git a/src/go.c b/src/go.c index 73b4469..4987623 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.9 * tanhf(x + 0.5 * y); + y = 0.95 * tanhf(x + 0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:29:18 +0000 diff --git a/src/go.c b/src/go.c index 4987623..2fd4595 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.95 * tanhf(x + 0.5 * y); + y = 0.95 * tanhf(x + 0.4999 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:29:24 +0000 diff --git a/src/go.c b/src/go.c index 2fd4595..f2e8fb7 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.95 * tanhf(x + 0.4999 * y); + y = 0.975 * tanhf(x + 0.4999 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y; }
diff @ 2013-11-06 11:29:31 +0000 diff --git a/src/go.c b/src/go.c index f2e8fb7..0963c59 100644 --- a/src/go.c +++ b/src/go.c @@ -131,7 +131,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; - y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; + y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; y = 0.975 * tanhf(x + 0.4999 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + y;
diff @ 2013-11-06 11:30:16 +0000 diff --git a/src/go.c b/src/go.c index 0963c59..94064d1 100644 --- a/src/go.c +++ b/src/go.c @@ -155,5 +155,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (30 * ((s->comb.beat + 8) % 16 + 1)); } } - return tanhf(0.1 * hears(s) + hat(&s->hat) + kick(&s->kick) + comb(&s->comb, snare(&s->snare))); + return tanhf(hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:30:27 +0000 diff --git a/src/go.c b/src/go.c index 94064d1..9962e88 100644 --- a/src/go.c +++ b/src/go.c @@ -155,5 +155,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (30 * ((s->comb.beat + 8) % 16 + 1)); } } - return tanhf(hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:30:42 +0000 diff --git a/src/go.c b/src/go.c index 9962e88..a95addd 100644 --- a/src/go.c +++ b/src/go.c @@ -134,7 +134,7 @@ float comb(struct comb *s, float x) { y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; y = 0.975 * tanhf(x + 0.4999 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; - return x + y; + return x + 0.5 * y; } float go(S *s, float x) {
diff @ 2013-11-06 11:31:39 +0000 diff --git a/src/go.c b/src/go.c index a95addd..8d71bd5 100644 --- a/src/go.c +++ b/src/go.c @@ -151,8 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (30 * (s->comb.beat + 1)); - s->comb.delread2 = SR / (30 * ((s->comb.beat + 8) % 16 + 1)); + s->comb.delread1 = SR / (15 * (s->comb.beat + 1)); + s->comb.delread2 = SR / (15 * ((s->comb.beat + 8) % 16 + 1)); } } return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:32:11 +0000 diff --git a/src/go.c b/src/go.c index 8d71bd5..8076bd2 100644 --- a/src/go.c +++ b/src/go.c @@ -151,8 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (15 * (s->comb.beat + 1)); - s->comb.delread2 = SR / (15 * ((s->comb.beat + 8) % 16 + 1)); + s->comb.delread1 = SR / (25 * (s->comb.beat + 1)); + s->comb.delread2 = SR / (25 * ((s->comb.beat + 8) % 16 + 1)); } } return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:32:40 +0000 diff --git a/src/go.c b/src/go.c index 8076bd2..6909172 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = 0.975 * tanhf(x + 0.4999 * y); + y = x + 0.499 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + 0.5 * y; }
diff @ 2013-11-06 11:32:46 +0000 diff --git a/src/go.c b/src/go.c index 6909172..9159d1c 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.499 * y; + y = x + 0.49 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; return x + 0.5 * y; }
diff @ 2013-11-06 11:33:46 +0000 diff --git a/src/go.c b/src/go.c index 9159d1c..fbd1881 100644 --- a/src/go.c +++ b/src/go.c @@ -151,8 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (25 * (s->comb.beat + 1)); - s->comb.delread2 = SR / (25 * ((s->comb.beat + 8) % 16 + 1)); + s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 16.0)); + s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 16.0)); } } return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:34:08 +0000 diff --git a/src/go.c b/src/go.c index fbd1881..24061ec 100644 --- a/src/go.c +++ b/src/go.c @@ -151,8 +151,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 16.0)); - s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 16.0)); + s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 8.0)); + s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:35:14 +0000 diff --git a/src/go.c b/src/go.c index 24061ec..a8b03af 100644 --- a/src/go.c +++ b/src/go.c @@ -39,6 +39,7 @@ struct comb { int delread2; float delay[SR]; int beat; + float lop; }; typedef struct { @@ -133,7 +134,7 @@ float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; y = x + 0.49 * y; - s->delay[s->delwrite = (s->delwrite + 1) % SR] = y; + s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:35:28 +0000 diff --git a/src/go.c b/src/go.c index a8b03af..b12be90 100644 --- a/src/go.c +++ b/src/go.c @@ -133,7 +133,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.49 * y; + y = x + 0.5 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:35:33 +0000 diff --git a/src/go.c b/src/go.c index b12be90..4e0e1ba 100644 --- a/src/go.c +++ b/src/go.c @@ -133,7 +133,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.5 * y; + y = x + 0.499 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:35:39 +0000 diff --git a/src/go.c b/src/go.c index 4e0e1ba..afbaf5f 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; - y += s->delay[(s->delwrite - s->delread2 + SR) % SR]; + y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; y = x + 0.499 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y;
diff @ 2013-11-06 11:35:56 +0000 diff --git a/src/go.c b/src/go.c index afbaf5f..e1f68fe 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } - return tanhf(0.5 * hears(s) + kick(&s->kick) + comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.5 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:36:02 +0000 diff --git a/src/go.c b/src/go.c index e1f68fe..0a1e728 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } - return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.5 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.75 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:36:11 +0000 diff --git a/src/go.c b/src/go.c index 0a1e728..79511ce 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } - return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.75 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:36:40 +0000 diff --git a/src/go.c b/src/go.c index 79511ce..04c576c 100644 --- a/src/go.c +++ b/src/go.c @@ -133,7 +133,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.499 * y; + y = x + 0.501 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:37:18 +0000 diff --git a/src/go.c b/src/go.c index 04c576c..eb4140c 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } - return tanhf(0.5 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.0 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:37:40 +0000 diff --git a/src/go.c b/src/go.c index eb4140c..fad3a16 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ s->snare.beat = 7; s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); } } - return tanhf(0.0 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); }
diff @ 2013-11-06 11:39:10 +0000 diff --git a/src/go.c b/src/go.c index fad3a16..f043b05 100644 --- a/src/go.c +++ b/src/go.c @@ -152,8 +152,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 8.0)); - s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 8.0)); + s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 4.0)); + s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 4.0)); } } return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:39:55 +0000 diff --git a/src/go.c b/src/go.c index f043b05..3c7ce31 100644 --- a/src/go.c +++ b/src/go.c @@ -152,8 +152,8 @@ s->snare.beat = 7; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; - s->comb.delread1 = SR / (50 * (1 + (s->comb.beat + 1) / 4.0)); - s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16 + 1) / 4.0)); + s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0)); + s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } } return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat)));
diff @ 2013-11-06 11:40:28 +0000 diff --git a/src/go.c b/src/go.c index 3c7ce31..3a3e9f0 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 6 +#define COUNT 8 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 11:40:48 +0000 diff --git a/src/go.c b/src/go.c index 3a3e9f0..25fbc87 100644 --- a/src/go.c +++ b/src/go.c @@ -139,12 +139,12 @@ float comb(struct comb *s, float x) { } float go(S *s, float x) { -// inits(s); -/* -s->kick.beat = 3; -s->hat.beat = 3; -s->snare.beat = 7; -*/ + inits(s); + +s->kick.beat = 0; +s->hat.beat = 0 +s->snare.beat = 0; + if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:41:01 +0000 diff --git a/src/go.c b/src/go.c index 25fbc87..3642533 100644 --- a/src/go.c +++ b/src/go.c @@ -142,7 +142,7 @@ float go(S *s, float x) { inits(s); s->kick.beat = 0; -s->hat.beat = 0 +s->hat.beat = 0; s->snare.beat = 0; if (beat(s)) {
diff @ 2013-11-06 11:41:09 +0000 diff --git a/src/go.c b/src/go.c index 3642533..b760991 100644 --- a/src/go.c +++ b/src/go.c @@ -139,12 +139,13 @@ float comb(struct comb *s, float x) { } float go(S *s, float x) { +/* inits(s); s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0; - +*/ if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:41:58 +0000 diff --git a/src/go.c b/src/go.c index b760991..ff1f8fd 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 8 +#define COUNT 6 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 11:42:07 +0000 diff --git a/src/go.c b/src/go.c index ff1f8fd..b760991 100644 --- a/src/go.c +++ b/src/go.c @@ -4,7 +4,7 @@ #define PI 3.141592653 #define SR 48000 #define BPM 120 -#define COUNT 6 +#define COUNT 8 #define BEATS 5 struct cellsynth {
diff @ 2013-11-06 11:42:24 +0000 diff --git a/src/go.c b/src/go.c index b760991..ee355b1 100644 --- a/src/go.c +++ b/src/go.c @@ -139,13 +139,13 @@ float comb(struct comb *s, float x) { } float go(S *s, float x) { -/* + inits(s); s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0; -*/ + if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:42:58 +0000 diff --git a/src/go.c b/src/go.c index ee355b1..b99d0af 100644 --- a/src/go.c +++ b/src/go.c @@ -142,6 +142,9 @@ float go(S *s, float x) { inits(s); +s->snare.env = 0; +s->kick.env = 0; +s->hat.env = 0; s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0;
diff @ 2013-11-06 11:43:05 +0000 diff --git a/src/go.c b/src/go.c index b99d0af..12b0eac 100644 --- a/src/go.c +++ b/src/go.c @@ -140,6 +140,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { +/* inits(s); s->snare.env = 0; @@ -148,7 +149,7 @@ s->hat.env = 0; s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0; - +*/ if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:43:44 +0000 diff --git a/src/go.c b/src/go.c index 12b0eac..cc3aad4 100644 --- a/src/go.c +++ b/src/go.c @@ -140,16 +140,15 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { -/* - inits(s); - +inits(s); +s->comb.beat = 0 s->snare.env = 0; s->kick.env = 0; s->hat.env = 0; s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0; -*/ + if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:43:49 +0000 diff --git a/src/go.c b/src/go.c index cc3aad4..c34e7c2 100644 --- a/src/go.c +++ b/src/go.c @@ -141,7 +141,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { inits(s); -s->comb.beat = 0 +s->comb.beat = 0; s->snare.env = 0; s->kick.env = 0; s->hat.env = 0;
diff @ 2013-11-06 11:43:54 +0000 diff --git a/src/go.c b/src/go.c index c34e7c2..8d3e5e5 100644 --- a/src/go.c +++ b/src/go.c @@ -139,7 +139,7 @@ float comb(struct comb *s, float x) { } float go(S *s, float x) { - +/* inits(s); s->comb.beat = 0; s->snare.env = 0; @@ -148,7 +148,7 @@ s->hat.env = 0; s->kick.beat = 0; s->hat.beat = 0; s->snare.beat = 0; - +*/ if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:45:09 +0000 diff --git a/src/go.c b/src/go.c index 8d3e5e5..a7a32ca 100644 --- a/src/go.c +++ b/src/go.c @@ -141,6 +141,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { /* inits(s); + s->comb.beat = 0; s->snare.env = 0; s->kick.env = 0;
diff @ 2013-11-06 11:45:35 +0000 diff --git a/src/go.c b/src/go.c index a7a32ca..9bc4c45 100644 --- a/src/go.c +++ b/src/go.c @@ -139,17 +139,10 @@ float comb(struct comb *s, float x) { } float go(S *s, float x) { -/* + +memset(s, 0, sizeof(S)); inits(s); -s->comb.beat = 0; -s->snare.env = 0; -s->kick.env = 0; -s->hat.env = 0; -s->kick.beat = 0; -s->hat.beat = 0; -s->snare.beat = 0; -*/ if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0;
diff @ 2013-11-06 11:45:41 +0000 diff --git a/src/go.c b/src/go.c index 9bc4c45..0c769a2 100644 --- a/src/go.c +++ b/src/go.c @@ -140,8 +140,8 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { -memset(s, 0, sizeof(S)); -inits(s); +//memset(s, 0, sizeof(S)); +//inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 11:46:31 +0000 diff --git a/src/go.c b/src/go.c index 0c769a2..aff6a9b 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 8 -#define BEATS 5 +#define BEATS 6 struct cellsynth { int subcell;
diff @ 2013-11-06 11:46:50 +0000 diff --git a/src/go.c b/src/go.c index aff6a9b..2407d23 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 8 -#define BEATS 6 +#define BEATS 12 struct cellsynth { int subcell;
diff @ 2013-11-06 11:47:40 +0000 diff --git a/src/go.c b/src/go.c index 2407d23..d30e183 100644 --- a/src/go.c +++ b/src/go.c @@ -106,9 +106,11 @@ void inits(S *s) { for (int i = 0; i < COUNT; ++i) { s->cellsynth[i].freq = 50 + 50.01 * i; s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); +/* s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; s->cellsynth[i].subcell = 0; +*/ } } @@ -141,7 +143,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -//inits(s); +inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 11:47:42 +0000 diff --git a/src/go.c b/src/go.c index d30e183..757bf1f 100644 --- a/src/go.c +++ b/src/go.c @@ -143,7 +143,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -inits(s); +//inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 11:48:10 +0000 diff --git a/src/go.c b/src/go.c index 757bf1f..d55f4c0 100644 --- a/src/go.c +++ b/src/go.c @@ -99,7 +99,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(1.5 * h); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 11:48:17 +0000 diff --git a/src/go.c b/src/go.c index d55f4c0..b279d12 100644 --- a/src/go.c +++ b/src/go.c @@ -91,7 +91,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(8 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 11:48:32 +0000 diff --git a/src/go.c b/src/go.c index b279d12..0f2ccd2 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.05 + 0.95 * s->lop; + return s->lop = (s->env *= 0.9995) * 0.05 + 0.95 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:49:10 +0000 diff --git a/src/go.c b/src/go.c index 0f2ccd2..ab0ab42 100644 --- a/src/go.c +++ b/src/go.c @@ -86,7 +86,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); } }
diff @ 2013-11-06 11:49:21 +0000 diff --git a/src/go.c b/src/go.c index ab0ab42..d8633af 100644 --- a/src/go.c +++ b/src/go.c @@ -91,7 +91,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(8 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 11:49:34 +0000 diff --git a/src/go.c b/src/go.c index d8633af..f6109a8 100644 --- a/src/go.c +++ b/src/go.c @@ -60,7 +60,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) != (!!old); + return (!!(s->cell & (1 << s->subcell))) > (!!old); } int beat(S *s) {
diff @ 2013-11-06 11:50:25 +0000 diff --git a/src/go.c b/src/go.c index f6109a8..282de3a 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9995) * 0.05 + 0.95 * s->lop; + return s->lop = (s->env *= 0.99975) * 0.05 + 0.95 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:50:37 +0000 diff --git a/src/go.c b/src/go.c index 282de3a..0843324 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99975) * 0.05 + 0.95 * s->lop; + return s->lop = (s->env *= 0.99975) * 0.15 + 0.85 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:50:43 +0000 diff --git a/src/go.c b/src/go.c index 0843324..bc7cdbf 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99975) * 0.15 + 0.85 * s->lop; + return s->lop = (s->env *= 0.99975) * 0.5 + 0.5 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:50:51 +0000 diff --git a/src/go.c b/src/go.c index bc7cdbf..ecd2da8 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99975) * 0.5 + 0.5 * s->lop; + return s->lop = (s->env *= 0.99975) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:51:04 +0000 diff --git a/src/go.c b/src/go.c index ecd2da8..7465b9d 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99975) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.99999) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:51:14 +0000 diff --git a/src/go.c b/src/go.c index 7465b9d..5cc85c7 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99999) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:51:19 +0000 diff --git a/src/go.c b/src/go.c index 5cc85c7..8f9540f 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.99995) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:51:35 +0000 diff --git a/src/go.c b/src/go.c index 8f9540f..d32245f 100644 --- a/src/go.c +++ b/src/go.c @@ -86,7 +86,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); } }
diff @ 2013-11-06 11:51:52 +0000 diff --git a/src/go.c b/src/go.c index d32245f..27ecdfb 100644 --- a/src/go.c +++ b/src/go.c @@ -135,7 +135,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.501 * y; + y = x + 0.51 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:52:01 +0000 diff --git a/src/go.c b/src/go.c index 27ecdfb..9a27a6d 100644 --- a/src/go.c +++ b/src/go.c @@ -135,7 +135,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.51 * y; + y = x + 0.52 * y; s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:52:22 +0000 diff --git a/src/go.c b/src/go.c index 9a27a6d..7d1132a 100644 --- a/src/go.c +++ b/src/go.c @@ -135,7 +135,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + 0.52 * y; + y = x + tanh(0.52 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:52:28 +0000 diff --git a/src/go.c b/src/go.c index 7d1132a..e1df5e4 100644 --- a/src/go.c +++ b/src/go.c @@ -135,7 +135,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanh(0.52 * y); + y = x + tanhf(0.52 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + 0.5 * y; }
diff @ 2013-11-06 11:52:42 +0000 diff --git a/src/go.c b/src/go.c index e1df5e4..f20d2b6 100644 --- a/src/go.c +++ b/src/go.c @@ -119,7 +119,7 @@ float noise() { } float hat(struct hat *hat) { - return noise() * (hat->env *= 0.999); + return noise() * (hat->env *= 0.9995); } float kick(struct kick *kick) {
diff @ 2013-11-06 11:53:43 +0000 diff --git a/src/go.c b/src/go.c index f20d2b6..157496f 100644 --- a/src/go.c +++ b/src/go.c @@ -118,8 +118,8 @@ float noise() { return rand() / (float) RAND_MAX - 0.5; } -float hat(struct hat *hat) { - return noise() * (hat->env *= 0.9995); +float hat(struct hat *hat, float fb) { + return noise() * (hat->env *= fb); } float kick(struct kick *kick) { @@ -156,5 +156,5 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.001 / (s->comb.beat + 1)))); }
diff @ 2013-11-06 11:53:54 +0000 diff --git a/src/go.c b/src/go.c index 157496f..b014204 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.001 / (s->comb.beat + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat + 1)))); }
diff @ 2013-11-06 11:54:13 +0000 diff --git a/src/go.c b/src/go.c index b014204..6da8d21 100644 --- a/src/go.c +++ b/src/go.c @@ -156,5 +156,5 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 11:54:32 +0000 diff --git a/src/go.c b/src/go.c index 6da8d21..198cb77 100644 --- a/src/go.c +++ b/src/go.c @@ -147,7 +147,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) == 0; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) < 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) {
diff @ 2013-11-06 11:55:06 +0000 diff --git a/src/go.c b/src/go.c index 198cb77..147c86b 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 8 -#define BEATS 12 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 11:55:23 +0000 diff --git a/src/go.c b/src/go.c index 147c86b..a0dc8b2 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.99995) * 0.01 + 0.99 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:55:29 +0000 diff --git a/src/go.c b/src/go.c index a0dc8b2..5674333 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.99995) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:55:34 +0000 diff --git a/src/go.c b/src/go.c index 5674333..70bccc5 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9995) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:55:44 +0000 diff --git a/src/go.c b/src/go.c index 70bccc5..8920175 100644 --- a/src/go.c +++ b/src/go.c @@ -77,7 +77,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9995) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9995) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 11:57:04 +0000 diff --git a/src/go.c b/src/go.c index 8920175..2690725 100644 --- a/src/go.c +++ b/src/go.c @@ -40,6 +40,7 @@ struct comb { float delay[SR]; int beat; float lop; + float gate; }; typedef struct { @@ -137,7 +138,7 @@ float comb(struct comb *s, float x) { y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; y = x + tanhf(0.52 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); - return x + 0.5 * y; + return x + s->gate * y; } float go(S *s, float x) { @@ -155,6 +156,7 @@ float go(S *s, float x) { s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0)); s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } + s->comb.gate = 1 - s->comb.gate; } return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 11:57:25 +0000 diff --git a/src/go.c b/src/go.c index 2690725..a63c92f 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + 0 * kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 11:57:41 +0000 diff --git a/src/go.c b/src/go.c index a63c92f..1cc50b9 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + 0 * kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + 0 * kick(&s->kick) + 0.7 * comb(&s->comb, 0 *snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 11:57:55 +0000 diff --git a/src/go.c b/src/go.c index 1cc50b9..2c36c6a 100644 --- a/src/go.c +++ b/src/go.c @@ -148,7 +148,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) < 2; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) < 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) {
diff @ 2013-11-06 11:58:12 +0000 diff --git a/src/go.c b/src/go.c index 2c36c6a..dffd770 100644 --- a/src/go.c +++ b/src/go.c @@ -148,7 +148,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) < 3; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) {
diff @ 2013-11-06 11:59:04 +0000 diff --git a/src/go.c b/src/go.c index dffd770..6d6ccac 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf(kick->env *= 0.9994); + return tanhf((kick->env + 1) * sinf(kick->env *= 0.9994)); } float snare(struct snare *s) { @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 32 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + 0 * kick(&s->kick) + 0.7 * comb(&s->comb, 0 *snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 0 *snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 11:59:36 +0000 diff --git a/src/go.c b/src/go.c index 6d6ccac..db0d1b1 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf((kick->env + 1) * sinf(kick->env *= 0.9994)); + return tanhf((kick->env + 1) * sinf(kick->env *= 0.999)); } float snare(struct snare *s) {
diff @ 2013-11-06 11:59:54 +0000 diff --git a/src/go.c b/src/go.c index db0d1b1..cadf320 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 0 *snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:00:12 +0000 diff --git a/src/go.c b/src/go.c index cadf320..a8c6cae 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 2 * snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:00:29 +0000 diff --git a/src/go.c b/src/go.c index a8c6cae..67f4d1a 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf((kick->env + 1) * sinf(kick->env *= 0.999)); + return sinf((kick->env + 1) * sinf(kick->env *= 0.999)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:00:34 +0000 diff --git a/src/go.c b/src/go.c index 67f4d1a..f17c673 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf((kick->env + 1) * sinf(kick->env *= 0.999)); + return sinf((kick->env + 1) * sinf(kick->env *= 0.9999)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:00:44 +0000 diff --git a/src/go.c b/src/go.c index f17c673..ee81dde 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 24 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 16 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:00:48 +0000 diff --git a/src/go.c b/src/go.c index ee81dde..eb30c5e 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 16 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 8 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:01:03 +0000 diff --git a/src/go.c b/src/go.c index eb30c5e..c44ae30 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf((kick->env + 1) * sinf(kick->env *= 0.9999)); + return sinf((kick->env + 1) * sinf(kick->env *= 0.999)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:01:10 +0000 diff --git a/src/go.c b/src/go.c index c44ae30..92c7766 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf((kick->env + 1) * sinf(kick->env *= 0.999)); + return sinf((kick->env + 1) * sinf(kick->env *= 0.9995)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:01:27 +0000 diff --git a/src/go.c b/src/go.c index 92c7766..07154e0 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 8 -#define BEATS 5 +#define BEATS 7 struct cellsynth { int subcell;
diff @ 2013-11-06 12:01:40 +0000 diff --git a/src/go.c b/src/go.c index 07154e0..fa16744 100644 --- a/src/go.c +++ b/src/go.c @@ -144,7 +144,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -//inits(s); +inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:01:43 +0000 diff --git a/src/go.c b/src/go.c index fa16744..07154e0 100644 --- a/src/go.c +++ b/src/go.c @@ -144,7 +144,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -inits(s); +//inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:01:52 +0000 diff --git a/src/go.c b/src/go.c index 07154e0..0610bba 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 8 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 4 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:02:05 +0000 diff --git a/src/go.c b/src/go.c index 0610bba..47fbe99 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 4 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) == 2) * 4 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:02:29 +0000 diff --git a/src/go.c b/src/go.c index 47fbe99..1702543 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) == 2) * 4 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:03:09 +0000 diff --git a/src/go.c b/src/go.c index 1702543..ef4b805 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 6); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) % 5 == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:03:15 +0000 diff --git a/src/go.c b/src/go.c index ef4b805..d0159cf 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) % 5 == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) % 6 == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:03:23 +0000 diff --git a/src/go.c b/src/go.c index d0159cf..4f2c579 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) % 6 == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:03:33 +0000 diff --git a/src/go.c b/src/go.c index 4f2c579..3a8ce9e 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 4); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:03:39 +0000 diff --git a/src/go.c b/src/go.c index 3a8ce9e..6c8c357 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 4); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:03:49 +0000 diff --git a/src/go.c b/src/go.c index 6c8c357..bd7de99 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 7 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:04:11 +0000 diff --git a/src/go.c b/src/go.c index bd7de99..3103905 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 4 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 7 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:04:25 +0000 diff --git a/src/go.c b/src/go.c index 3103905..0d7febe 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 7 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:04:32 +0000 diff --git a/src/go.c b/src/go.c index 0d7febe..b708648 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:04:35 +0000 diff --git a/src/go.c b/src/go.c index b708648..9cf758d 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 3); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:04:43 +0000 diff --git a/src/go.c b/src/go.c index 9cf758d..3c403d9 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 3); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 4); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:04:54 +0000 diff --git a/src/go.c b/src/go.c index 3c403d9..42d30ee 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 5 == 4); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 4); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:05:03 +0000 diff --git a/src/go.c b/src/go.c index 42d30ee..d2d0fad 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 6 == 4); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 4 == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:05:15 +0000 diff --git a/src/go.c b/src/go.c index d2d0fad..c92d847 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 4 == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 2 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:05:31 +0000 diff --git a/src/go.c b/src/go.c index c92d847..d4673e7 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 2 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 1 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0)); @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 2 * snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:05:36 +0000 diff --git a/src/go.c b/src/go.c index d4673e7..f2c2209 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 8 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 16 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 1 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:05:41 +0000 diff --git a/src/go.c b/src/go.c index f2c2209..283feb9 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 16 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 1 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:05:52 +0000 diff --git a/src/go.c b/src/go.c index 283feb9..eff80b0 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 16) % 1 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 32) % 6 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:06:20 +0000 diff --git a/src/go.c b/src/go.c index eff80b0..21f4863 100644 --- a/src/go.c +++ b/src/go.c @@ -124,11 +124,11 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf((kick->env + 1) * sinf(kick->env *= 0.9995)); + return sinf((kick->env + 1) * sinf(kick->env *= 0.9997)); } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.9992); + s->x = s->x * 0.95 + noise() * (s->env *= 0.9996); s->y = tanhf(s->x + 0.99 * s->y); return s->y; } @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 4 * snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:06:34 +0000 diff --git a/src/go.c b/src/go.c index 21f4863..8121c17 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, 4 * snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:06:49 +0000 diff --git a/src/go.c b/src/go.c index 8121c17..3989918 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 32) % 6 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 32) % 12 % 8 == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:07:11 +0000 diff --git a/src/go.c b/src/go.c index 3989918..0991c55 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 32) % 12 % 8 == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:07:19 +0000 diff --git a/src/go.c b/src/go.c index 0991c55..0035ff5 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:07:40 +0000 diff --git a/src/go.c b/src/go.c index 0035ff5..34636c2 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, snare(&s->snare) + hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:07:53 +0000 diff --git a/src/go.c b/src/go.c index 34636c2..c885f3c 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf((kick->env + 1) * sinf(kick->env *= 0.9997)); + return sinf(kick->env *= 0.9997)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:07:57 +0000 diff --git a/src/go.c b/src/go.c index c885f3c..add6e5b 100644 --- a/src/go.c +++ b/src/go.c @@ -124,7 +124,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf(kick->env *= 0.9997)); + return sinf(kick->env *= 0.9997); } float snare(struct snare *s) {
diff @ 2013-11-06 12:08:05 +0000 diff --git a/src/go.c b/src/go.c index add6e5b..18efcc9 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 12 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:08:24 +0000 diff --git a/src/go.c b/src/go.c index 18efcc9..d5af5d2 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->kick) * kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:08:29 +0000 diff --git a/src/go.c b/src/go.c index d5af5d2..b93a45e 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->kick) * kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) * kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:08:41 +0000 diff --git a/src/go.c b/src/go.c index b93a45e..b274708 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) * kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:08:50 +0000 diff --git a/src/go.c b/src/go.c index b274708..f0b8ac5 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 24 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 5 == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:08:58 +0000 diff --git a/src/go.c b/src/go.c index f0b8ac5..4a04a10 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 5 == 2) * 24 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:09:13 +0000 diff --git a/src/go.c b/src/go.c index 4a04a10..2257b45 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 24 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:09:28 +0000 diff --git a/src/go.c b/src/go.c index 2257b45..8586372 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.01 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->comb.beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:09:46 +0000 diff --git a/src/go.c b/src/go.c index 8586372..1ba0026 100644 --- a/src/go.c +++ b/src/go.c @@ -158,5 +158,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->comb.beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 5 % 8 + 1)))); }
diff @ 2013-11-06 12:10:35 +0000 diff --git a/src/go.c b/src/go.c index 1ba0026..7ab253b 100644 --- a/src/go.c +++ b/src/go.c @@ -67,6 +67,7 @@ int cell(struct cellsynth *s) { int beat(S *s) { s->sample++; if (s->sample >= 60 * SR / BPM / 4) { + s->beat = (s->beat + 1) % 64; s->sample = 0; return 1; }
diff @ 2013-11-06 12:10:47 +0000 diff --git a/src/go.c b/src/go.c index 7ab253b..8840d85 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 5 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 8 + 1)))); }
diff @ 2013-11-06 12:10:56 +0000 diff --git a/src/go.c b/src/go.c index 8840d85..c66d8c9 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1 - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 8 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); }
diff @ 2013-11-06 12:11:33 +0000 diff --git a/src/go.c b/src/go.c index c66d8c9..b9fc3b5 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 4) != 2; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 3 != 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); if (s->kick.beat == 0) {
diff @ 2013-11-06 12:11:53 +0000 diff --git a/src/go.c b/src/go.c index b9fc3b5..6504acb 100644 --- a/src/go.c +++ b/src/go.c @@ -157,7 +157,7 @@ float go(S *s, float x) { s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0)); s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } - s->comb.gate = 1 - s->comb.gate; + s->comb.gate = 1;// - s->comb.gate; } return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); }
diff @ 2013-11-06 12:12:04 +0000 diff --git a/src/go.c b/src/go.c index 6504acb..9b25a02 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.52 * y); + y = x + tanhf(0.53 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:12:12 +0000 diff --git a/src/go.c b/src/go.c index 9b25a02..d80efd5 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.53 * y); + y = x + tanhf(0.56 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:12:27 +0000 diff --git a/src/go.c b/src/go.c index d80efd5..ac50e2c 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.56 * y); + y = x + tanhf(0.6 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:12:53 +0000 diff --git a/src/go.c b/src/go.c index ac50e2c..59f182a 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); + return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); }
diff @ 2013-11-06 12:13:04 +0000 diff --git a/src/go.c b/src/go.c index 59f182a..f7a5c2f 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.6 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); + return tanhf(0 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); }
diff @ 2013-11-06 12:13:33 +0000 diff --git a/src/go.c b/src/go.c index f7a5c2f..d25fc75 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9995) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.9995) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) { @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); + return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); }
diff @ 2013-11-06 12:13:58 +0000 diff --git a/src/go.c b/src/go.c index d25fc75..5da20bf 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + 0.7 * comb(&s->comb, 0*hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)))); + return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + /*0.7 * comb(&s->comb, 0*/hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)));//); }
diff @ 2013-11-06 12:14:22 +0000 diff --git a/src/go.c b/src/go.c index 5da20bf..12e035e 100644 --- a/src/go.c +++ b/src/go.c @@ -61,7 +61,7 @@ int cell(struct cellsynth *s) { s->subcell = 0; s->cell = (~(((s->cell >> 1) | (s->cell << (BEATS - 1))) ^ s->cell)) & ((1 << BEATS) - 1); } - return (!!(s->cell & (1 << s->subcell))) > (!!old); + return (!!(s->cell & (1 << s->subcell))) < (!!old); } int beat(S *s) {
diff @ 2013-11-06 12:14:39 +0000 diff --git a/src/go.c b/src/go.c index 12e035e..5fd9946 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 120 #define COUNT 8 -#define BEATS 7 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 12:15:06 +0000 diff --git a/src/go.c b/src/go.c index 5fd9946..75f380c 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(16 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:15:17 +0000 diff --git a/src/go.c b/src/go.c index 75f380c..7f64256 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9995) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.999) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:15:24 +0000 diff --git a/src/go.c b/src/go.c index 7f64256..5dc5a2b 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.999) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.999) * 1;// + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:15:35 +0000 diff --git a/src/go.c b/src/go.c index 5dc5a2b..3f5e922 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.999) * 1;// + 0.9 * s->lop; + return s->lop = (s->env *= 0.9999) * 1;// + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:15:43 +0000 diff --git a/src/go.c b/src/go.c index 3f5e922..25224b6 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 1;// + 0.9 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.1 + 0.9 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:16:02 +0000 diff --git a/src/go.c b/src/go.c index 25224b6..d4b3a06 100644 --- a/src/go.c +++ b/src/go.c @@ -149,8 +149,8 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 3 != 0; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 3 == 2) * 24 * PI; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 24 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:16:08 +0000 diff --git a/src/go.c b/src/go.c index d4b3a06..9cf1804 100644 --- a/src/go.c +++ b/src/go.c @@ -151,7 +151,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 24 * PI; - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 0); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:16:24 +0000 diff --git a/src/go.c b/src/go.c index 9cf1804..05440d1 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + /*0.7 * comb(&s->comb, 0*/hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 16 + 1)));//); + return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + /*0.7 * comb(&s->comb, 0*/hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1)));//); }
diff @ 2013-11-06 12:16:58 +0000 diff --git a/src/go.c b/src/go.c index 05440d1..08606ca 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(16 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:17:34 +0000 diff --git a/src/go.c b/src/go.c index 08606ca..2731594 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + /*0.7 * comb(&s->comb, 0*/hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1)));//); + return tanhf(0.7 * comb(&s->comb, hears(s)) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:17:42 +0000 diff --git a/src/go.c b/src/go.c index 2731594..a836fc3 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.6 * y); + y = x + tanhf(0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:17:59 +0000 diff --git a/src/go.c b/src/go.c index a836fc3..6033eba 100644 --- a/src/go.c +++ b/src/go.c @@ -101,7 +101,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(2 * h); } void inits(S *s) {
diff @ 2013-11-06 12:18:04 +0000 diff --git a/src/go.c b/src/go.c index 6033eba..c8cdd6e 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:18:08 +0000 diff --git a/src/go.c b/src/go.c index c8cdd6e..a40dafc 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:18:22 +0000 diff --git a/src/go.c b/src/go.c index a40dafc..958a22c 100644 --- a/src/go.c +++ b/src/go.c @@ -88,7 +88,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); } }
diff @ 2013-11-06 12:18:34 +0000 diff --git a/src/go.c b/src/go.c index 958a22c..8f091dd 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.01 + 0.99 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:18:50 +0000 diff --git a/src/go.c b/src/go.c index 8f091dd..cd6db5e 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.99999) * 0.01 + 0.99 * s->lop; } float phasor(struct cellsynth *s) { @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -101,7 +101,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(2 * h); + return sinf(h); } void inits(S *s) {
diff @ 2013-11-06 12:19:07 +0000 diff --git a/src/go.c b/src/go.c index cd6db5e..16e590f 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.5 * y); + y = x + tanhf(0.3 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:19:25 +0000 diff --git a/src/go.c b/src/go.c index 16e590f..1808681 100644 --- a/src/go.c +++ b/src/go.c @@ -88,7 +88,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / sqrtf(i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); } }
diff @ 2013-11-06 12:19:35 +0000 diff --git a/src/go.c b/src/go.c index 1808681..51cc3b0 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99999) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.99999) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:19:48 +0000 diff --git a/src/go.c b/src/go.c index 51cc3b0..aaecd45 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99999) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.001 + 0.999 * s->lop; } float phasor(struct cellsynth *s) {
diff @ 2013-11-06 12:20:28 +0000 diff --git a/src/go.c b/src/go.c index aaecd45..0ae0b5f 100644 --- a/src/go.c +++ b/src/go.c @@ -106,8 +106,8 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 50 + 50.01 * i; - s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); + s->cellsynth[i].freq = 60 + 60.01 * i; +// s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); /* s->cellsynth[i].env = 0; s->cellsynth[i].phase = 0; @@ -145,7 +145,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -//inits(s); +inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:20:31 +0000 diff --git a/src/go.c b/src/go.c index 0ae0b5f..f72875a 100644 --- a/src/go.c +++ b/src/go.c @@ -145,7 +145,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -inits(s); +//inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:20:43 +0000 diff --git a/src/go.c b/src/go.c index f72875a..34473a1 100644 --- a/src/go.c +++ b/src/go.c @@ -137,7 +137,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.3 * y); + y = x + tanhf(0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:21:03 +0000 diff --git a/src/go.c b/src/go.c index 34473a1..b45ee49 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.7 * comb(&s->comb, hears(s)) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:21:09 +0000 diff --git a/src/go.c b/src/go.c index b45ee49..eaa75bb 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(0.7 * hears(s) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(hears(s) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:21:20 +0000 diff --git a/src/go.c b/src/go.c index eaa75bb..eb7dac9 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s) + snare(&s->snare) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(hears(s) + comb(&s->comb, snare(&s->snare)) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:21:40 +0000 diff --git a/src/go.c b/src/go.c index eb7dac9..b342d7a 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s) + comb(&s->comb, snare(&s->snare)) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(hears(s));// + comb(&s->comb, snare(&s->snare)) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:21:50 +0000 diff --git a/src/go.c b/src/go.c index b342d7a..f126565 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:21:55 +0000 diff --git a/src/go.c b/src/go.c index f126565..846f094 100644 --- a/src/go.c +++ b/src/go.c @@ -101,7 +101,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(2 * h); } void inits(S *s) {
diff @ 2013-11-06 12:22:09 +0000 diff --git a/src/go.c b/src/go.c index 846f094..a73971f 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 120 +#define BPM 121 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:12 +0000 diff --git a/src/go.c b/src/go.c index a73971f..fecbe6c 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 121 +#define BPM 122 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:13 +0000 diff --git a/src/go.c b/src/go.c index fecbe6c..ade296c 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 122 +#define BPM 123 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:15 +0000 diff --git a/src/go.c b/src/go.c index ade296c..aeaac40 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 123 +#define BPM 124 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:17 +0000 diff --git a/src/go.c b/src/go.c index aeaac40..e8e5505 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 124 +#define BPM 125 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:20 +0000 diff --git a/src/go.c b/src/go.c index e8e5505..390b455 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 125 +#define BPM 126 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:22 +0000 diff --git a/src/go.c b/src/go.c index 390b455..f2fe44b 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 126 +#define BPM 127 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:22:26 +0000 diff --git a/src/go.c b/src/go.c index f2fe44b..e799da5 100644 --- a/src/go.c +++ b/src/go.c @@ -3,7 +3,7 @@ #define PI 3.141592653 #define SR 48000 -#define BPM 127 +#define BPM 136 #define COUNT 8 #define BEATS 5
diff @ 2013-11-06 12:23:02 +0000 diff --git a/src/go.c b/src/go.c index e799da5..74c851d 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 4 == 2) * 24 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 5 == 2) * 36 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s));// + comb(&s->comb, snare(&s->snare)) + kick(&s->kick) + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(hears(s) + kick(&s->kick));// + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); }
diff @ 2013-11-06 12:23:15 +0000 diff --git a/src/go.c b/src/go.c index 74c851d..3274b78 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 8) % 5 == 2) * 36 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 5) % 5 == 2) * 36 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:23:24 +0000 diff --git a/src/go.c b/src/go.c index 3274b78..3f48850 100644 --- a/src/go.c +++ b/src/go.c @@ -150,7 +150,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 5) % 5 == 2) * 36 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 36 * PI; s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:23:42 +0000 diff --git a/src/go.c b/src/go.c index 3f48850..3bb231a 100644 --- a/src/go.c +++ b/src/go.c @@ -125,7 +125,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf(kick->env *= 0.9997); + return sinf(kick->env *= 0.9993); } float snare(struct snare *s) {
diff @ 2013-11-06 12:23:50 +0000 diff --git a/src/go.c b/src/go.c index 3bb231a..e452014 100644 --- a/src/go.c +++ b/src/go.c @@ -125,7 +125,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return sinf(kick->env *= 0.9993); + return kick->env * sinf(kick->env *= 0.9993); } float snare(struct snare *s) {
diff @ 2013-11-06 12:24:19 +0000 diff --git a/src/go.c b/src/go.c index e452014..9d0916e 100644 --- a/src/go.c +++ b/src/go.c @@ -125,7 +125,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return kick->env * sinf(kick->env *= 0.9993); + return kick->env * sinf((kick->env *= 0.9993) * 36 * PI); } float snare(struct snare *s) { @@ -150,7 +150,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; - s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2) * 36 * PI; + s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16;
diff @ 2013-11-06 12:24:34 +0000 diff --git a/src/go.c b/src/go.c index 9d0916e..e99fbdc 100644 --- a/src/go.c +++ b/src/go.c @@ -125,7 +125,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return kick->env * sinf((kick->env *= 0.9993) * 36 * PI); + return tanhf(4 * kick->env * sinf((kick->env *= 0.9993) * 36 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:24:42 +0000 diff --git a/src/go.c b/src/go.c index e99fbdc..a44946d 100644 --- a/src/go.c +++ b/src/go.c @@ -125,7 +125,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(4 * kick->env * sinf((kick->env *= 0.9993) * 36 * PI)); + return tanhf(4 * kick->env * sinf((kick->env *= 0.9993) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:25:15 +0000 diff --git a/src/go.c b/src/go.c index a44946d..66d149d 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 != 0; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) { @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s) + kick(&s->kick));// + hat(&s->hat, 1 - 0.005 / (s->beat * 3 % 17 + 1))); + return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.99)); }
diff @ 2013-11-06 12:25:24 +0000 diff --git a/src/go.c b/src/go.c index 66d149d..345d363 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 0; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 1; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) {
diff @ 2013-11-06 12:25:27 +0000 diff --git a/src/go.c b/src/go.c index 345d363..0a56c0d 100644 --- a/src/go.c +++ b/src/go.c @@ -149,7 +149,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 1; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); if (s->kick.beat == 0) {
diff @ 2013-11-06 12:25:36 +0000 diff --git a/src/go.c b/src/go.c index 0a56c0d..14b0895 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.99)); + return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.995)); }
diff @ 2013-11-06 12:25:40 +0000 diff --git a/src/go.c b/src/go.c index 14b0895..0019712 100644 --- a/src/go.c +++ b/src/go.c @@ -159,5 +159,5 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; } - return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.995)); + return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:25:59 +0000 diff --git a/src/go.c b/src/go.c index 0019712..8641057 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 60 + 60.01 * i; + s->cellsynth[i].freq = 60 + 60.02 * i; // s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); /* s->cellsynth[i].env = 0; @@ -145,7 +145,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -//inits(s); +inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:26:06 +0000 diff --git a/src/go.c b/src/go.c index 8641057..469ba0f 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 60 + 60.02 * i; + s->cellsynth[i].freq = 60 + 60.1 * i; // s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); /* s->cellsynth[i].env = 0;
diff @ 2013-11-06 12:26:30 +0000 diff --git a/src/go.c b/src/go.c index 469ba0f..c6c25a2 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { void inits(S *s) { for (int i = 0; i < COUNT; ++i) { - s->cellsynth[i].freq = 60 + 60.1 * i; + s->cellsynth[i].freq = 60 + (60 + noise()) * i; // s->cellsynth[i].cell = rand() & ((1 << BEATS) - 1); /* s->cellsynth[i].env = 0;
diff @ 2013-11-06 12:26:46 +0000 diff --git a/src/go.c b/src/go.c index c6c25a2..34ab4cf 100644 --- a/src/go.c +++ b/src/go.c @@ -104,6 +104,11 @@ float hears(S *s) { return sinf(2 * h); } + +float noise() { + return rand() / (float) RAND_MAX - 0.5; +} + void inits(S *s) { for (int i = 0; i < COUNT; ++i) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; @@ -116,10 +121,6 @@ void inits(S *s) { } } -float noise() { - return rand() / (float) RAND_MAX - 0.5; -} - float hat(struct hat *hat, float fb) { return noise() * (hat->env *= fb); }
diff @ 2013-11-06 12:27:04 +0000 diff --git a/src/go.c b/src/go.c index 34ab4cf..cc0bbc9 100644 --- a/src/go.c +++ b/src/go.c @@ -146,7 +146,7 @@ float comb(struct comb *s, float x) { float go(S *s, float x) { //memset(s, 0, sizeof(S)); -inits(s); +//inits(s); if (beat(s)) { hit(s);
diff @ 2013-11-06 12:30:39 +0000 diff --git a/src/go.c b/src/go.c index cc0bbc9..27045d4 100644 --- a/src/go.c +++ b/src/go.c @@ -83,7 +83,7 @@ float decay(struct cellsynth *s) { } float phasor(struct cellsynth *s) { - return s->phase = fmodf(s->phase + s->freq/SR, 1); + return s->phase = fmodf(s->phase + s->freq/SR + noise() / 1000, 1); } void hit(S *s) {
diff @ 2013-11-06 12:30:55 +0000 diff --git a/src/go.c b/src/go.c index 27045d4..fc84235 100644 --- a/src/go.c +++ b/src/go.c @@ -82,6 +82,10 @@ float decay(struct cellsynth *s) { return s->lop = (s->env *= 0.9999) * 0.001 + 0.999 * s->lop; } +float noise() { + return rand() / (float) RAND_MAX - 0.5; +} + float phasor(struct cellsynth *s) { return s->phase = fmodf(s->phase + s->freq/SR + noise() / 1000, 1); } @@ -105,9 +109,6 @@ float hears(S *s) { } -float noise() { - return rand() / (float) RAND_MAX - 0.5; -} void inits(S *s) { for (int i = 0; i < COUNT; ++i) {
diff @ 2013-11-06 12:31:07 +0000 diff --git a/src/go.c b/src/go.c index fc84235..fd79053 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - return s->phase = fmodf(s->phase + s->freq/SR + noise() / 1000, 1); + return s->phase = fmodf(s->phase + s->freq/SR + noise() / 100, 1); } void hit(S *s) {
diff @ 2013-11-06 12:31:15 +0000 diff --git a/src/go.c b/src/go.c index fd79053..d654c9c 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - return s->phase = fmodf(s->phase + s->freq/SR + noise() / 100, 1); + return s->phase = fmodf(s->phase + s->freq/SR + noise() / 500, 1); } void hit(S *s) {
diff @ 2013-11-06 12:31:20 +0000 diff --git a/src/go.c b/src/go.c index d654c9c..fc84235 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - return s->phase = fmodf(s->phase + s->freq/SR + noise() / 500, 1); + return s->phase = fmodf(s->phase + s->freq/SR + noise() / 1000, 1); } void hit(S *s) {
diff @ 2013-11-06 12:31:37 +0000 diff --git a/src/go.c b/src/go.c index fc84235..de92715 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,8 @@ float noise() { } float phasor(struct cellsynth *s) { - return s->phase = fmodf(s->phase + s->freq/SR + noise() / 1000, 1); + s->freq += noise() / 1000; + return s->phase = fmodf(s->phase + s->freq/SR, 1); } void hit(S *s) {
diff @ 2013-11-06 12:33:09 +0000 diff --git a/src/go.c b/src/go.c index de92715..91e262a 100644 --- a/src/go.c +++ b/src/go.c @@ -161,6 +161,23 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; + switch(s->beat) { + case 0: + for (int i = 0; i < COUNT; ++i) { + s->cellsynth[i].freq = 60 + (60 + noise()) * i; + } + break; + case 32: + for (int i = 0; i < COUNT; ++i) { + s->cellsynth[i].freq = 50 + (50 + noise()) * i; + } + break; + case 48: + for (int i = 0; i < COUNT; ++i) { + s->cellsynth[i].freq = 75 + (75 + noise()) * i; + } + break; + } } return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:34:01 +0000 diff --git a/src/go.c b/src/go.c index 91e262a..47211af 100644 --- a/src/go.c +++ b/src/go.c @@ -163,17 +163,17 @@ float go(S *s, float x) { s->comb.gate = 1;// - s->comb.gate; switch(s->beat) { case 0: - for (int i = 0; i < COUNT; ++i) { + for (int i = 0; i < COUNT; i += 2) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; } break; case 32: - for (int i = 0; i < COUNT; ++i) { + for (int i = 0; i < COUNT; i += 2) { s->cellsynth[i].freq = 50 + (50 + noise()) * i; } break; case 48: - for (int i = 0; i < COUNT; ++i) { + for (int i = 0; i < COUNT; i += 2) { s->cellsynth[i].freq = 75 + (75 + noise()) * i; } break;
diff @ 2013-11-06 12:34:14 +0000 diff --git a/src/go.c b/src/go.c index 47211af..222067b 100644 --- a/src/go.c +++ b/src/go.c @@ -168,12 +168,12 @@ float go(S *s, float x) { } break; case 32: - for (int i = 0; i < COUNT; i += 2) { + for (int i = 0; i < COUNT; i += 4) { s->cellsynth[i].freq = 50 + (50 + noise()) * i; } break; case 48: - for (int i = 0; i < COUNT; i += 2) { + for (int i = 0; i < COUNT; i += 4) { s->cellsynth[i].freq = 75 + (75 + noise()) * i; } break;
diff @ 2013-11-06 12:34:21 +0000 diff --git a/src/go.c b/src/go.c index 222067b..1a937de 100644 --- a/src/go.c +++ b/src/go.c @@ -163,7 +163,7 @@ float go(S *s, float x) { s->comb.gate = 1;// - s->comb.gate; switch(s->beat) { case 0: - for (int i = 0; i < COUNT; i += 2) { + for (int i = 0; i < COUNT; i++) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; } break;
diff @ 2013-11-06 12:34:45 +0000 diff --git a/src/go.c b/src/go.c index 1a937de..3b73f16 100644 --- a/src/go.c +++ b/src/go.c @@ -168,12 +168,12 @@ float go(S *s, float x) { } break; case 32: - for (int i = 0; i < COUNT; i += 4) { + for (int i = 4; i < COUNT; i++) { s->cellsynth[i].freq = 50 + (50 + noise()) * i; } break; case 48: - for (int i = 0; i < COUNT; i += 4) { + for (int i = 4; i < COUNT; i++) { s->cellsynth[i].freq = 75 + (75 + noise()) * i; } break;
diff @ 2013-11-06 12:35:18 +0000 diff --git a/src/go.c b/src/go.c index 3b73f16..2c86848 100644 --- a/src/go.c +++ b/src/go.c @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 32: for (int i = 4; i < COUNT; i++) { - s->cellsynth[i].freq = 50 + (50 + noise()) * i; + s->cellsynth[i].freq = 80 + (80 + noise()) * i; } break; case 48:
diff @ 2013-11-06 12:35:35 +0000 diff --git a/src/go.c b/src/go.c index 2c86848..58f1788 100644 --- a/src/go.c +++ b/src/go.c @@ -169,12 +169,12 @@ float go(S *s, float x) { break; case 32: for (int i = 4; i < COUNT; i++) { - s->cellsynth[i].freq = 80 + (80 + noise()) * i; + s->cellsynth[i].freq = 120 + (120 + noise()) * i; } break; case 48: for (int i = 4; i < COUNT; i++) { - s->cellsynth[i].freq = 75 + (75 + noise()) * i; + s->cellsynth[i].freq = 90 + (90 + noise()) * i; } break; }
diff @ 2013-11-06 12:36:20 +0000 diff --git a/src/go.c b/src/go.c index 58f1788..9f95c10 100644 --- a/src/go.c +++ b/src/go.c @@ -173,7 +173,7 @@ float go(S *s, float x) { } break; case 48: - for (int i = 4; i < COUNT; i++) { + for (int i = 0; i < COUNT && i < 4; i++) { s->cellsynth[i].freq = 90 + (90 + noise()) * i; } break;
diff @ 2013-11-06 12:36:40 +0000 diff --git a/src/go.c b/src/go.c index 9f95c10..3ce5d36 100644 --- a/src/go.c +++ b/src/go.c @@ -163,7 +163,7 @@ float go(S *s, float x) { s->comb.gate = 1;// - s->comb.gate; switch(s->beat) { case 0: - for (int i = 0; i < COUNT; i++) { + for (int i = 2; i < COUNT && i < 6; i++) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; } break;
diff @ 2013-11-06 12:37:03 +0000 diff --git a/src/go.c b/src/go.c index 3ce5d36..26f205e 100644 --- a/src/go.c +++ b/src/go.c @@ -167,6 +167,11 @@ float go(S *s, float x) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; } break; + case 16: + for (int i = 0; i < COUNT; i++) { + s->cellsynth[i].freq = 60 + (60 + noise()) * i; + } + break; case 32: for (int i = 4; i < COUNT; i++) { s->cellsynth[i].freq = 120 + (120 + noise()) * i;
diff @ 2013-11-06 12:37:32 +0000 diff --git a/src/go.c b/src/go.c index 26f205e..cc8def9 100644 --- a/src/go.c +++ b/src/go.c @@ -164,7 +164,7 @@ float go(S *s, float x) { switch(s->beat) { case 0: for (int i = 2; i < COUNT && i < 6; i++) { - s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 1500 + (150 + noise()) * i; } break; case 16:
diff @ 2013-11-06 12:37:49 +0000 diff --git a/src/go.c b/src/go.c index cc8def9..14ad818 100644 --- a/src/go.c +++ b/src/go.c @@ -164,7 +164,7 @@ float go(S *s, float x) { switch(s->beat) { case 0: for (int i = 2; i < COUNT && i < 6; i++) { - s->cellsynth[i].freq = 1500 + (150 + noise()) * i; + s->cellsynth[i].freq = 150 + (150 + noise()) * i; } break; case 16:
diff @ 2013-11-06 12:38:08 +0000 diff --git a/src/go.c b/src/go.c index 14ad818..17da206 100644 --- a/src/go.c +++ b/src/go.c @@ -168,7 +168,7 @@ float go(S *s, float x) { } break; case 16: - for (int i = 0; i < COUNT; i++) { + for (int i = 0; i < COUNT && i < 4; i++) { s->cellsynth[i].freq = 60 + (60 + noise()) * i; } break;
diff @ 2013-11-06 12:38:36 +0000 diff --git a/src/go.c b/src/go.c index 17da206..ffe938c 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(2 * h); + return sinf(h); }
diff @ 2013-11-06 12:38:48 +0000 diff --git a/src/go.c b/src/go.c index ffe938c..58fb8f1 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:38:55 +0000 diff --git a/src/go.c b/src/go.c index 58fb8f1..3b8600c 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:39:54 +0000 diff --git a/src/go.c b/src/go.c index 3b8600c..1b2c57a 100644 --- a/src/go.c +++ b/src/go.c @@ -161,27 +161,19 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; + int i = rand() % count; switch(s->beat) { case 0: - for (int i = 2; i < COUNT && i < 6; i++) { - s->cellsynth[i].freq = 150 + (150 + noise()) * i; - } + s->cellsynth[i].freq = 150 + (150 + noise()) * i; break; case 16: - for (int i = 0; i < COUNT && i < 4; i++) { - s->cellsynth[i].freq = 60 + (60 + noise()) * i; - } + s->cellsynth[i].freq = 60 + (60 + noise()) * i; break; case 32: - for (int i = 4; i < COUNT; i++) { - s->cellsynth[i].freq = 120 + (120 + noise()) * i; - } + s->cellsynth[i].freq = 120 + (120 + noise()) * i; break; case 48: - for (int i = 0; i < COUNT && i < 4; i++) { - s->cellsynth[i].freq = 90 + (90 + noise()) * i; - } - break; + s->cellsynth[i].freq = 90 + (90 + noise()) * i; } } return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.998));
diff @ 2013-11-06 12:40:06 +0000 diff --git a/src/go.c b/src/go.c index 1b2c57a..8d0e84d 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,7 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; - int i = rand() % count; + int i = rand() % COUNT; switch(s->beat) { case 0: s->cellsynth[i].freq = 150 + (150 + noise()) * i; @@ -174,6 +174,7 @@ float go(S *s, float x) { break; case 48: s->cellsynth[i].freq = 90 + (90 + noise()) * i; + break; } } return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.998));
diff @ 2013-11-06 12:40:51 +0000 diff --git a/src/go.c b/src/go.c index 8d0e84d..c0aeb93 100644 --- a/src/go.c +++ b/src/go.c @@ -177,5 +177,5 @@ float go(S *s, float x) { break; } } - return tanhf(hears(s) + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:41:17 +0000 diff --git a/src/go.c b/src/go.c index c0aeb93..b194599 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h); + return sinf(h / 4); }
diff @ 2013-11-06 12:41:28 +0000 diff --git a/src/go.c b/src/go.c index b194599..e50869f 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(decay(s) * sinf(2 * PI * phasor(s))); + return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:41:46 +0000 diff --git a/src/go.c b/src/go.c index e50869f..ff87ed8 100644 --- a/src/go.c +++ b/src/go.c @@ -164,7 +164,7 @@ float go(S *s, float x) { int i = rand() % COUNT; switch(s->beat) { case 0: - s->cellsynth[i].freq = 150 + (150 + noise()) * i; + s->cellsynth[i].freq = 180 + (180 + noise()) * i; break; case 16: s->cellsynth[i].freq = 60 + (60 + noise()) * i;
diff @ 2013-11-06 12:42:16 +0000 diff --git a/src/go.c b/src/go.c index ff87ed8..dbfaaab 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq += noise() / 1000; + s->freq += noise() / 100; return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 12:43:00 +0000 diff --git a/src/go.c b/src/go.c index dbfaaab..fec4f81 100644 --- a/src/go.c +++ b/src/go.c @@ -162,12 +162,15 @@ float go(S *s, float x) { } s->comb.gate = 1;// - s->comb.gate; int i = rand() % COUNT; +/* switch(s->beat) { case 0: s->cellsynth[i].freq = 180 + (180 + noise()) * i; break; case 16: +*/ s->cellsynth[i].freq = 60 + (60 + noise()) * i; +/* break; case 32: s->cellsynth[i].freq = 120 + (120 + noise()) * i; @@ -176,6 +179,7 @@ float go(S *s, float x) { s->cellsynth[i].freq = 90 + (90 + noise()) * i; break; } +*/ } return tanhf(hears(s));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:43:21 +0000 diff --git a/src/go.c b/src/go.c index fec4f81..7f81608 100644 --- a/src/go.c +++ b/src/go.c @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60 + (60 + noise()) * i; +// s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:43:39 +0000 diff --git a/src/go.c b/src/go.c index 7f81608..8ee0e44 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.001 + 0.999 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:43:47 +0000 diff --git a/src/go.c b/src/go.c index 8ee0e44..3f8e93a 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.999) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:43:51 +0000 diff --git a/src/go.c b/src/go.c index 3f8e93a..15a0281 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.999) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.99999) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:01 +0000 diff --git a/src/go.c b/src/go.c index 15a0281..cff0de7 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99999) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.99999);// * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:07 +0000 diff --git a/src/go.c b/src/go.c index cff0de7..61798ca 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99999);// * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.99995);// * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:12 +0000 diff --git a/src/go.c b/src/go.c index 61798ca..851b49e 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.99995);// * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9999);// * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:24 +0000 diff --git a/src/go.c b/src/go.c index 851b49e..0f4be9a 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999);// * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.3 + 0.7 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:34 +0000 diff --git a/src/go.c b/src/go.c index 0f4be9a..fa39a01 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.3 + 0.7 * s->lop; + return s->lop = (s->env *= 0.9999) * 0.01 + 0.99 * s->lop; } float noise() {
diff @ 2013-11-06 12:44:52 +0000 diff --git a/src/go.c b/src/go.c index fa39a01..56efef9 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(2 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:45:02 +0000 diff --git a/src/go.c b/src/go.c index 56efef9..b853f4b 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i]); } - return sinf(h / 4); + return sinf(h); }
diff @ 2013-11-06 12:45:11 +0000 diff --git a/src/go.c b/src/go.c index b853f4b..1ab8da5 100644 --- a/src/go.c +++ b/src/go.c @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ -// s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:45:22 +0000 diff --git a/src/go.c b/src/go.c index 1ab8da5..b853f4b 100644 --- a/src/go.c +++ b/src/go.c @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60 + (60 + noise()) * i; +// s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:46:21 +0000 diff --git a/src/go.c b/src/go.c index b853f4b..4d02145 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, hears(s)));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:46:37 +0000 diff --git a/src/go.c b/src/go.c index 4d02145..b5c5dd6 100644 --- a/src/go.c +++ b/src/go.c @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ -// s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:47:19 +0000 diff --git a/src/go.c b/src/go.c index b5c5dd6..1bcefd1 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq += noise() / 100; + s->freq += noise() / 1000; return s->phase = fmodf(s->phase + s->freq/SR, 1); } @@ -140,7 +140,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x + tanhf(0.5 * y); + y = x - tanhf(0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; } @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60 + (60 + noise()) * i; +// s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:47:28 +0000 diff --git a/src/go.c b/src/go.c index 1bcefd1..cb7243f 100644 --- a/src/go.c +++ b/src/go.c @@ -140,7 +140,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x - tanhf(0.5 * y); + y = x - tanhf(0.7 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 12:48:14 +0000 diff --git a/src/go.c b/src/go.c index cb7243f..f372242 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,7 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; - int i = rand() % COUNT; +// int i = rand() % COUNT; /* switch(s->beat) { case 0:
diff @ 2013-11-06 12:48:39 +0000 diff --git a/src/go.c b/src/go.c index f372242..5296b0a 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, hears(s)));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s)));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:49:10 +0000 diff --git a/src/go.c b/src/go.c index 5296b0a..9bf0b9f 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s)));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s))) + kick(&s->kick);// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:49:29 +0000 diff --git a/src/go.c b/src/go.c index 9bf0b9f..9d29335 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s))) + kick(&s->kick);// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s)) + kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:49:46 +0000 diff --git a/src/go.c b/src/go.c index 9d29335..8fbd596 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, (1-s->kick.env) * hears(s)) + kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-s->kick.env, 4.0f)) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:49:51 +0000 diff --git a/src/go.c b/src/go.c index 8fbd596..25ec0a3 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-s->kick.env, 4.0f)) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-s->kick.env, 4.0f) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:50:13 +0000 diff --git a/src/go.c b/src/go.c index 25ec0a3..d9b0365 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-s->kick.env, 4.0f) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-tanhf(s->kick.env), 4.0f) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:50:30 +0000 diff --git a/src/go.c b/src/go.c index d9b0365..bb92061 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-tanhf(s->kick.env), 4.0f) * hears(s)) + 2 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-tanhf(s->kick.env), 4.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:50:46 +0000 diff --git a/src/go.c b/src/go.c index bb92061..5dc1e2c 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-tanhf(s->kick.env), 4.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-0.5 * tanhf(s->kick.env), 4.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:50:58 +0000 diff --git a/src/go.c b/src/go.c index 5dc1e2c..8973cf3 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-0.5 * tanhf(s->kick.env), 4.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, powf(1-0.5 * tanhf(s->kick.env), 1.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:51:17 +0000 diff --git a/src/go.c b/src/go.c index 8973cf3..68c09b2 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, powf(1-0.5 * tanhf(s->kick.env), 1.0f) * hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:51:23 +0000 diff --git a/src/go.c b/src/go.c index 68c09b2..1ab8e2b 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, hears(s)) + 0 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:51:35 +0000 diff --git a/src/go.c b/src/go.c index 1ab8e2b..de2c394 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(4 * kick->env * sinf((kick->env *= 0.9993) * 16 * PI)); + return tanhf(4 * kick->env * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:51:51 +0000 diff --git a/src/go.c b/src/go.c index de2c394..9751e5a 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(4 * kick->env * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:52:11 +0000 diff --git a/src/go.c b/src/go.c index 9751e5a..076b8a9 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.999) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:52:16 +0000 diff --git a/src/go.c b/src/go.c index 076b8a9..46bcd3e 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.999) * 16 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9993) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 12:52:31 +0000 diff --git a/src/go.c b/src/go.c index 46bcd3e..576c56d 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick) + snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:52:39 +0000 diff --git a/src/go.c b/src/go.c index 576c56d..0119863 100644 --- a/src/go.c +++ b/src/go.c @@ -154,7 +154,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 2); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 3); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:52:45 +0000 diff --git a/src/go.c b/src/go.c index 0119863..5db4126 100644 --- a/src/go.c +++ b/src/go.c @@ -154,7 +154,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 3); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 1); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:52:54 +0000 diff --git a/src/go.c b/src/go.c index 5db4126..0119863 100644 --- a/src/go.c +++ b/src/go.c @@ -154,7 +154,7 @@ float go(S *s, float x) { hit(s); s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); - s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 1); + s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 3); if (s->kick.beat == 0) { s->comb.beat = (s->comb.beat + 1) % 16; s->comb.delread1 = SR / (50 * (1 + s->comb.beat / 4.0));
diff @ 2013-11-06 12:53:03 +0000 diff --git a/src/go.c b/src/go.c index 0119863..79879d2 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick) + snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick) + 4 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:53:10 +0000 diff --git a/src/go.c b/src/go.c index 79879d2..24313f8 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.9996); + s->x = s->x * 0.95 + noise() * (s->env *= 0.999); s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 12:53:31 +0000 diff --git a/src/go.c b/src/go.c index 24313f8..312ca1c 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(comb(&s->comb, hears(s)) + 4 * kick(&s->kick) + 4 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + 4 * kick(&s->kick) + 4 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:53:41 +0000 diff --git a/src/go.c b/src/go.c index 312ca1c..31e84a0 100644 --- a/src/go.c +++ b/src/go.c @@ -181,5 +181,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + 4 * kick(&s->kick) + 4 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 12:53:56 +0000 diff --git a/src/go.c b/src/go.c index 31e84a0..c86d114 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 136 #define COUNT 8 -#define BEATS 5 +#define BEATS 7 struct cellsynth { int subcell;
diff @ 2013-11-06 12:54:18 +0000 diff --git a/src/go.c b/src/go.c index c86d114..815556a 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s) { - return sinf(4 * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:54:54 +0000 diff --git a/src/go.c b/src/go.c index 815556a..7c594ce 100644 --- a/src/go.c +++ b/src/go.c @@ -97,14 +97,14 @@ void hit(S *s) { } } -float hear(struct cellsynth *s) { - return sinf(6 * decay(s) * sinf(2 * PI * phasor(s))); +float hear(struct cellsynth *s, int i) { + return sinf((i + 1) * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { float h = 0; for (int i = 0; i < COUNT; ++i) { - h += hear(&s->cellsynth[i]); + h += hear(&s->cellsynth[i], i); } return sinf(h); }
diff @ 2013-11-06 12:55:03 +0000 diff --git a/src/go.c b/src/go.c index 7c594ce..fcde711 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(h); + return sinf(2 * h); }
diff @ 2013-11-06 12:55:17 +0000 diff --git a/src/go.c b/src/go.c index fcde711..9824fc8 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9999) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.9994) * 0.01 + 0.99 * s->lop; } float noise() {
diff @ 2013-11-06 12:55:26 +0000 diff --git a/src/go.c b/src/go.c index 9824fc8..432ede5 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9994) * 0.01 + 0.99 * s->lop; + return s->lop = (s->env *= 0.9994) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 12:56:01 +0000 diff --git a/src/go.c b/src/go.c index 432ede5..af8e5bf 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf((i + 1) * decay(s) * sinf(2 * PI * phasor(s))); + return sinf((COUNT - i) * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:56:19 +0000 diff --git a/src/go.c b/src/go.c index af8e5bf..67c231a 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,7 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; -// int i = rand() % COUNT; + int i = rand() % COUNT; /* switch(s->beat) { case 0: @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ -// s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:56:31 +0000 diff --git a/src/go.c b/src/go.c index 67c231a..af8e5bf 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,7 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; - int i = rand() % COUNT; +// int i = rand() % COUNT; /* switch(s->beat) { case 0: @@ -169,7 +169,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60 + (60 + noise()) * i; +// s->cellsynth[i].freq = 60 + (60 + noise()) * i; /* break; case 32:
diff @ 2013-11-06 12:56:54 +0000 diff --git a/src/go.c b/src/go.c index af8e5bf..73e1c6c 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq += noise() / 1000; + s->freq += (noise() + 0.5) / 1000; return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 12:56:59 +0000 diff --git a/src/go.c b/src/go.c index 73e1c6c..88e853d 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq += (noise() + 0.5) / 1000; + s->freq += (noise() + 0.5) / 10000; return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 12:57:21 +0000 diff --git a/src/go.c b/src/go.c index 88e853d..553f369 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,8 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; -// int i = rand() % COUNT; + if (s->beat = 0) { + int i = rand() % COUNT; /* switch(s->beat) { case 0: @@ -169,7 +170,8 @@ float go(S *s, float x) { break; case 16: */ -// s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 60 + (60 + noise()) * i; +} /* break; case 32:
diff @ 2013-11-06 12:57:28 +0000 diff --git a/src/go.c b/src/go.c index 553f369..bce439d 100644 --- a/src/go.c +++ b/src/go.c @@ -161,7 +161,7 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; - if (s->beat = 0) { + if (s->beat == 0) { int i = rand() % COUNT; /* switch(s->beat) {
diff @ 2013-11-06 12:58:10 +0000 diff --git a/src/go.c b/src/go.c index bce439d..a3ab241 100644 --- a/src/go.c +++ b/src/go.c @@ -170,7 +170,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60 + (60 + noise()) * i; + s->cellsynth[i].freq = 60; } /* break;
diff @ 2013-11-06 12:59:21 +0000 diff --git a/src/go.c b/src/go.c index a3ab241..358c389 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf((COUNT - i) * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 12:59:29 +0000 diff --git a/src/go.c b/src/go.c index 358c389..ecdd179 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.1 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:00:36 +0000 diff --git a/src/go.c b/src/go.c index ecdd179..d5ecded 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq += (noise() + 0.5) / 10000; + s->freq *= exp(noise() / 10000); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:01:27 +0000 diff --git a/src/go.c b/src/go.c index d5ecded..97a2994 100644 --- a/src/go.c +++ b/src/go.c @@ -161,8 +161,8 @@ float go(S *s, float x) { s->comb.delread2 = SR / (50 * (1 + ((s->comb.beat + 8) % 16) / 4.0)); } s->comb.gate = 1;// - s->comb.gate; - if (s->beat == 0) { - int i = rand() % COUNT; + if (s->beat % 8 == 0) { + int i = (s->beat / 8) % COUNT; /* switch(s->beat) { case 0:
diff @ 2013-11-06 13:01:50 +0000 diff --git a/src/go.c b/src/go.c index 97a2994..272cb74 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 10000); + s->freq *= exp(noise() / 1000); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:02:00 +0000 diff --git a/src/go.c b/src/go.c index 272cb74..17166e6 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 1000); + s->freq *= exp(noise() / 100); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:02:11 +0000 diff --git a/src/go.c b/src/go.c index 17166e6..4a97190 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 100); + s->freq *= exp(noise() / 1000); return s->phase = fmodf(s->phase + s->freq/SR, 1); } @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.1 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:02:23 +0000 diff --git a/src/go.c b/src/go.c index 4a97190..d70a0f8 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 1000); + s->freq *= exp(noise() / 100); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:03:07 +0000 diff --git a/src/go.c b/src/go.c index d70a0f8..ceb5724 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(2 * h); + return sinf(4 * h); }
diff @ 2013-11-06 13:03:49 +0000 diff --git a/src/go.c b/src/go.c index ceb5724..6a53b18 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.99) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:04:04 +0000 diff --git a/src/go.c b/src/go.c index 6a53b18..f9007a5 100644 --- a/src/go.c +++ b/src/go.c @@ -152,7 +152,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 0; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 3); if (s->kick.beat == 0) {
diff @ 2013-11-06 13:04:14 +0000 diff --git a/src/go.c b/src/go.c index f9007a5..5728a65 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.99) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:04:27 +0000 diff --git a/src/go.c b/src/go.c index 5728a65..59f2947 100644 --- a/src/go.c +++ b/src/go.c @@ -152,7 +152,7 @@ float go(S *s, float x) { if (beat(s)) { hit(s); - s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 0; + s->hat.env += (s->hat.beat = (s->hat.beat + 1) % 8) % 4 == 3; s->kick.env += ((s->kick.beat = (s->kick.beat + 1) % 4) == 2); s->snare.env += ((s->snare.beat = (s->snare.beat + 1) % 8) == 3); if (s->kick.beat == 0) {
diff @ 2013-11-06 13:05:25 +0000 diff --git a/src/go.c b/src/go.c index 59f2947..aaf42de 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(4 * h); + return sinf(6 * h); }
diff @ 2013-11-06 13:05:36 +0000 diff --git a/src/go.c b/src/go.c index aaf42de..5dabff7 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.03 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(6 * h); + return sinf(4 * h); }
diff @ 2013-11-06 13:05:45 +0000 diff --git a/src/go.c b/src/go.c index 5dabff7..1adfb2a 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(4 * h); + return sinf(2 * h); }
diff @ 2013-11-06 13:06:30 +0000 diff --git a/src/go.c b/src/go.c index 1adfb2a..e47d372 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.999); + s->x = s->x * 0.95 + noise() * (s->env *= 0.995); s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 13:06:38 +0000 diff --git a/src/go.c b/src/go.c index e47d372..f55846d 100644 --- a/src/go.c +++ b/src/go.c @@ -133,7 +133,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.95 + noise() * (s->env *= 0.995); - s->y = tanhf(s->x + 0.99 * s->y); + s->y = tanhf(s->x + 0.999 * s->y); return s->y; }
diff @ 2013-11-06 13:06:49 +0000 diff --git a/src/go.c b/src/go.c index f55846d..db96f09 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.95 + noise() * (s->env *= 0.995); + s->x = s->x * 0.5 + noise() * (s->env *= 0.995); s->y = tanhf(s->x + 0.999 * s->y); return s->y; }
diff @ 2013-11-06 13:06:55 +0000 diff --git a/src/go.c b/src/go.c index db96f09..4f3cca0 100644 --- a/src/go.c +++ b/src/go.c @@ -132,7 +132,7 @@ float kick(struct kick *kick) { } float snare(struct snare *s) { - s->x = s->x * 0.5 + noise() * (s->env *= 0.995); + s->x = s->x * 0.5 + noise() * (s->env *= 0.9995); s->y = tanhf(s->x + 0.999 * s->y); return s->y; }
diff @ 2013-11-06 13:07:11 +0000 diff --git a/src/go.c b/src/go.c index 4f3cca0..b1bdf4b 100644 --- a/src/go.c +++ b/src/go.c @@ -133,7 +133,7 @@ float kick(struct kick *kick) { float snare(struct snare *s) { s->x = s->x * 0.5 + noise() * (s->env *= 0.9995); - s->y = tanhf(s->x + 0.999 * s->y); + s->y = tanhf(s->x + 0.99 * s->y); return s->y; }
diff @ 2013-11-06 13:07:31 +0000 diff --git a/src/go.c b/src/go.c index b1bdf4b..27e8627 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(0*hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:07:39 +0000 diff --git a/src/go.c b/src/go.c index 27e8627..b1bdf4b 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(0*hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:08:32 +0000 diff --git a/src/go.c b/src/go.c index b1bdf4b..29a0b63 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 100); + s->freq *= exp(noise() / 10); return s->phase = fmodf(s->phase + s->freq/SR, 1); } @@ -140,7 +140,7 @@ float snare(struct snare *s) { float comb(struct comb *s, float x) { float y = s->delay[(s->delwrite - s->delread1 + SR) % SR]; y -= s->delay[(s->delwrite - s->delread2 + SR) % SR]; - y = x - tanhf(0.7 * y); + y = x - tanhf(0.5 * y); s->delay[s->delwrite = (s->delwrite + 1) % SR] = (s->lop = 0.5 * s->lop + 0.5 * y); return x + s->gate * y; }
diff @ 2013-11-06 13:08:40 +0000 diff --git a/src/go.c b/src/go.c index 29a0b63..f312d2f 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 10); + s->freq *= exp(noise() / 200); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:09:22 +0000 diff --git a/src/go.c b/src/go.c index f312d2f..cd9194c 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s));// + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:09:40 +0000 diff --git a/src/go.c b/src/go.c index cd9194c..f0da642 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s));// + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s)) + hat(&s->hat, 0.999));// + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:09:48 +0000 diff --git a/src/go.c b/src/go.c index f0da642..b42ee95 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s)) + hat(&s->hat, 0.999));// + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999));// + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:10:07 +0000 diff --git a/src/go.c b/src/go.c index b42ee95..2879f30 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999));// + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:10:27 +0000 diff --git a/src/go.c b/src/go.c index 2879f30..99e625d 100644 --- a/src/go.c +++ b/src/go.c @@ -5,7 +5,7 @@ #define SR 48000 #define BPM 136 #define COUNT 8 -#define BEATS 7 +#define BEATS 5 struct cellsynth { int subcell;
diff @ 2013-11-06 13:11:08 +0000 diff --git a/src/go.c b/src/go.c index 99e625d..c2cd32b 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9994) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9996) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 13:11:36 +0000 diff --git a/src/go.c b/src/go.c index c2cd32b..abd31c6 100644 --- a/src/go.c +++ b/src/go.c @@ -79,7 +79,7 @@ void trigger(struct cellsynth *s, float k) { } float decay(struct cellsynth *s) { - return s->lop = (s->env *= 0.9996) * 0.1 + 0.9 * s->lop; + return s->lop = (s->env *= 0.9998) * 0.1 + 0.9 * s->lop; } float noise() {
diff @ 2013-11-06 13:11:53 +0000 diff --git a/src/go.c b/src/go.c index abd31c6..60cf299 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.03 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:12:03 +0000 diff --git a/src/go.c b/src/go.c index 60cf299..ad6d568 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(2 * h); + return sinf(h); }
diff @ 2013-11-06 13:12:15 +0000 diff --git a/src/go.c b/src/go.c index ad6d568..8106e0f 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 200); + s->freq *= exp(noise() / 2000); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:12:42 +0000 diff --git a/src/go.c b/src/go.c index 8106e0f..07a2d4a 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0 / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0_;// / (i + 1)); } }
diff @ 2013-11-06 13:12:45 +0000 diff --git a/src/go.c b/src/go.c index 07a2d4a..e827627 100644 --- a/src/go.c +++ b/src/go.c @@ -93,7 +93,7 @@ float phasor(struct cellsynth *s) { void hit(S *s) { for (int i = 0; i < COUNT; ++i) { - trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0_;// / (i + 1)); + trigger(&s->cellsynth[i], cell(&s->cellsynth[i]) * 1.0);// / (i + 1)); } }
diff @ 2013-11-06 13:13:06 +0000 diff --git a/src/go.c b/src/go.c index e827627..5c22c4e 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:13:24 +0000 diff --git a/src/go.c b/src/go.c index 5c22c4e..996976f 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + 0*hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 0 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:13:39 +0000 diff --git a/src/go.c b/src/go.c index 996976f..57f2bba 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(h); + return sinf(2 * h); }
diff @ 2013-11-06 13:13:53 +0000 diff --git a/src/go.c b/src/go.c index 57f2bba..b2b56f6 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(2 * h); + return sinf(3 * h); }
diff @ 2013-11-06 13:14:07 +0000 diff --git a/src/go.c b/src/go.c index b2b56f6..a3c2681 100644 --- a/src/go.c +++ b/src/go.c @@ -170,7 +170,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 60; + s->cellsynth[i].freq = 90; } /* break;
diff @ 2013-11-06 13:14:23 +0000 diff --git a/src/go.c b/src/go.c index a3c2681..b5574ec 100644 --- a/src/go.c +++ b/src/go.c @@ -170,7 +170,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 90; + s->cellsynth[i].freq = 120; } /* break;
diff @ 2013-11-06 13:14:39 +0000 diff --git a/src/go.c b/src/go.c index b5574ec..b2b56f6 100644 --- a/src/go.c +++ b/src/go.c @@ -170,7 +170,7 @@ float go(S *s, float x) { break; case 16: */ - s->cellsynth[i].freq = 120; + s->cellsynth[i].freq = 60; } /* break;
diff @ 2013-11-06 13:15:05 +0000 diff --git a/src/go.c b/src/go.c index b2b56f6..266d073 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.005 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:15:21 +0000 diff --git a/src/go.c b/src/go.c index 266d073..086d8dd 100644 --- a/src/go.c +++ b/src/go.c @@ -87,7 +87,7 @@ float noise() { } float phasor(struct cellsynth *s) { - s->freq *= exp(noise() / 2000); + s->freq *= exp(noise() / 500); return s->phase = fmodf(s->phase + s->freq/SR, 1); }
diff @ 2013-11-06 13:15:59 +0000 diff --git a/src/go.c b/src/go.c index 086d8dd..4ccdcf4 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + 0*hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 0 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:16:35 +0000 diff --git a/src/go.c b/src/go.c index 4ccdcf4..8cf5b8b 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.005 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) { @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(3 * h); + return sinf(h); }
diff @ 2013-11-06 13:16:44 +0000 diff --git a/src/go.c b/src/go.c index 8cf5b8b..3755901 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.02 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:17:02 +0000 diff --git a/src/go.c b/src/go.c index 3755901..d153a10 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(h); + return sinf(2 * h); }
diff @ 2013-11-06 13:17:07 +0000 diff --git a/src/go.c b/src/go.c index d153a10..7bf7c27 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.02 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:17:13 +0000 diff --git a/src/go.c b/src/go.c index 7bf7c27..d2b8c8c 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(2 * h); + return sinf(3 * h); }
diff @ 2013-11-06 13:17:17 +0000 diff --git a/src/go.c b/src/go.c index d2b8c8c..4b2e3a9 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(3 * h); + return sinf(4 * h); }
diff @ 2013-11-06 13:17:39 +0000 diff --git a/src/go.c b/src/go.c index 4b2e3a9..88cf460 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return sinf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return tanhf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:17:45 +0000 diff --git a/src/go.c b/src/go.c index 88cf460..123ca01 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return tanhf(0.002 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return tanhf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:17:57 +0000 diff --git a/src/go.c b/src/go.c index 123ca01..72597c7 100644 --- a/src/go.c +++ b/src/go.c @@ -106,7 +106,7 @@ float hears(S *s) { for (int i = 0; i < COUNT; ++i) { h += hear(&s->cellsynth[i], i); } - return sinf(4 * h); + return tanhf(h); }
diff @ 2013-11-06 13:18:11 +0000 diff --git a/src/go.c b/src/go.c index 72597c7..90ed8b2 100644 --- a/src/go.c +++ b/src/go.c @@ -98,7 +98,7 @@ void hit(S *s) { } float hear(struct cellsynth *s, int i) { - return tanhf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); + return sinf(0.01 * SR / s->freq * decay(s) * sinf(2 * PI * phasor(s))); } float hears(S *s) {
diff @ 2013-11-06 13:18:32 +0000 diff --git a/src/go.c b/src/go.c index 90ed8b2..c48666b 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9993) * 16 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9993) * 12 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:18:40 +0000 diff --git a/src/go.c b/src/go.c index c48666b..9df5992 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9993) * 12 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.999) * 12 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:18:50 +0000 diff --git a/src/go.c b/src/go.c index 9df5992..705bf89 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.999) * 12 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9997) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:18:59 +0000 diff --git a/src/go.c b/src/go.c index 705bf89..77a0bf8 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9997) * 16 * PI)); + return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:14 +0000 diff --git a/src/go.c b/src/go.c index 77a0bf8..16e7475 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 1) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 * (kick->env + 0.5) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:22 +0000 diff --git a/src/go.c b/src/go.c index 16e7475..9a3bf5a 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env + 0.5) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 * (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:36 +0000 diff --git a/src/go.c b/src/go.c index 9a3bf5a..2c629f9 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 * (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf( (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:42 +0000 diff --git a/src/go.c b/src/go.c index 2c629f9..d6a126f 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf( (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(8* (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:48 +0000 diff --git a/src/go.c b/src/go.c index d6a126f..abec229 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(8* (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:19:51 +0000 diff --git a/src/go.c b/src/go.c index abec229..9a3bf5a 100644 --- a/src/go.c +++ b/src/go.c @@ -128,7 +128,7 @@ float hat(struct hat *hat, float fb) { } float kick(struct kick *kick) { - return tanhf(2 (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); + return tanhf(2 * (kick->env) * sinf((kick->env *= 0.9995) * 16 * PI)); } float snare(struct snare *s) {
diff @ 2013-11-06 13:20:06 +0000 diff --git a/src/go.c b/src/go.c index 9a3bf5a..4b5fd28 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 2 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:20:18 +0000 diff --git a/src/go.c b/src/go.c index 4b5fd28..5b55cbc 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 2 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 0 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }
diff @ 2013-11-06 13:20:24 +0000 diff --git a/src/go.c b/src/go.c index 5b55cbc..fd13619 100644 --- a/src/go.c +++ b/src/go.c @@ -183,5 +183,5 @@ float go(S *s, float x) { } */ } - return tanhf(hears(s) + hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 0 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); + return tanhf(hears(s) + 0*hat(&s->hat, 0.999) + 0 * kick(&s->kick) + 0 * snare(&s->snare));// + kick(&s->kick) + hat(&s->hat, 0.998)); }