- Edited
new patch i hope some of you might like..
https://patchstorage.com/kollatz-0-1/
this one is based on the Collatz conjecture.
basically: if a positive number n is even, divide it by two.
if it is odd, then 3n+1.
iterate until n=1.
let me illustrate that:
for n = 6, you get 6 3 10 5 16 8 4 2 1.
for n = 7, you get 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1.
for n = 8, you just get 8 4 2 1.
for n = 27, you get the lovely series 27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288 3644 1822 911 2734 1367 4102 2051 6154 3077 9232 4616 2308 1154 577 1732 866 433 1300 650 325 976 488 244 122 61 184 92 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1.
you see that for different starting values, this gives number strings of unexpected length, with values wavering up and down but always moving towards 1 in the end.
now bear with me here... LOTS of info coming up.
drumroll.. the connections!
input 0: voltage to be sampled.
0-10v input mapped to n=1 to n=250.
(this gives a maximum output number in some strings of 9232, so plenty of range.)
button 1/ trigger input 6: samples the 1-250 value. so press or trigger this to load n.
button 2/ trigger input 7: clock. iterates the value once.
output 0: master output, where Collatz output values 1 - 9232 are mapped to 0 - 1 (=full voltage.)
outputs 2-7: parallel binary outputs. the same Collatz value is remapped from 0 to 127, then translated to 7-bit binary. with every tick, values here read either 0 or 1.
then, the fun bits.
input 1: ramp time. this will not only slew the master output (think portamento between calculated values),
but can also slew the binary outputs.
input 2: clock mode. divides pot rotation over 4 possible modes:
expects external clock (or pushing the button.) outputs move to their values over ramp time.
note that when ramp time is slower than clock, outputs will not reach their target values, so e.g. the binaries can also be used as unpredictable envelopes, not quite reaching 0 or 1.same as 1, but when collatz value reaches 1, patch auto-samples the input so a new number series is automatically started.
when using an LFO or noise as input, this will be a new number string.
when using a steady DC voltage as input, you will get the same string, so repeated strings are possible.values move over ramp time, and end of ramp triggers new clock tick.
clock speed and ramp time are no longer independent, but there is no more need for an external clock.
ramp time can still reach 0, but retrigger minimum is set to 30ms so as not to cause underruns/dropouts.same as 3, but when collatz value reaches 1, patch auto-samples the input so a new number series is started.
in both 3 and 4, external clock will still step the string, so it gets added to the end-of-ramp ticks.
input 3: binary output modes.
divides pot rotation over 3 possible modes:
- binaries slewed w/ ramp time.
- binaries set to gate outputs. high as long as value is 1.
- binaries set to trigger outputs. 20ms triggers when value is 1.
this makes for a nice pseudo-random rhythm generator.
if you want repeatable patterns, same rule applies i guess: you could resample a fixed DC voltage every 8 or 16 steps to restart the same sequence.