author Ken Brant Tue, 30 May 2017 15:37:31 +0000 (11:37 -0400) committer GitHub Tue, 30 May 2017 15:37:31 +0000 (11:37 -0400)
 step_ratio_calculator.scd [new file with mode: 0644] patch | blob

diff --git a/step_ratio_calculator.scd b/step_ratio_calculator.scd
new file mode 100644 (file)
index 0000000..7c99634
--- /dev/null
@@ -0,0 +1,116 @@
+(
+//To find out the ratio per step for note increments in the inlcine/decline of the King Wen sequence.
+//For example, I want the note increment ratio for a KW sequence that has 64 steps(numsteps) and a starting(n1) and ending(n2)
+//note ratio difference of 1.6180339887499.
+
+a=1;
+Routine({var n1 = 1, n2 = 1.6180339887499, numsteps = 64;
+        x=1000.do({n = n1; (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.01},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.0001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.0000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.00000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.0000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.00000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.0000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.00000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.000000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.0000000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n <= n2,
+                       {a=a+0.00000000000000001},{x.stop});
+
+       });
+        x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.000000000000000001},{x.stop});
+
+       });
+       x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a+0.0000000000000000001},{x.stop});
+
+       });
+       x=1000.do({n = n1;
+               (numsteps.do({(n = n*a)}));
+               if(n >= n2,
+                       {a=a-0.00000000000000000001},{x.stop});
+       });
+       a.postln;
+}).play;
+);