eh2k / squares-and-circles

squares-and-circles is an alternate firmware for the Eurorack module O_C, targeting Teensy 4.
https://eh2k.github.io/□●/
167 stars 12 forks source link

Missing reset in the turing modulation 🥺 #100

Open eh2k opened 1 day ago

eh2k commented 1 day ago

@koswir - https://github.com/eh2k/squares-and-circles/issues/99#issue-2619831547

I tried to implement it exactly as described in the manual - https://www.musicthing.co.uk/collateral/TuringRev1Docs.pdf There is actually no reset - The only thing I can think of is to set the shift register to 0 when resetting. Or did you have something else in mind?

koswir commented 1 day ago

ah right - I didnt know that! I am used to the VCV version where is the reset! It resets shift register's position to it's step 1 so the locked sequence can be easly synced with other sequencers. TuringMachine

eh2k commented 16 hours ago

@koswir,

I have tried to understand the reset in the vcv rack - and to be honest, I have no idea what's going on with the reset trigger...

Technically speaking, the Turing machine has two states. One is the 16-bit shift register and the other is the seed for the random function.

Currently at startup, the shift register is initialized with 0 and an random seed (system ticks) is set for each turing machine, i.e. the random sequence is different for each turing machine.

Since with each clock the last bit is randomly flipped and set as the first bit again, you cannot actually play back the sequence (without remembering all the random numbers and the prob values etc).

Logically, you can perform only a reset by setting the shift register to 0 combined with a fixed seed value. Consequently, the random sequence would repeat exactly the same.

Unfortunately, I cannot introduce a new parameter for the seed, so I would hardcode a const value. As the propability param only goes from 0..9 - you would then have a maximum of 10 different start sequences which are infinitely long and change depending on the step parameter...

To summarize, there are cases where a reset is useful so I would implement this as described. I.e. if you leave the reset at ‘-’ you would have the old behavior... (like the real tm)