EuroPi
EuroPi copied to clipboard
Master clock
Initial PR for the master clock script. Includes adding the script to the main menu. Also includes minor CV Recorder changes as these are not yet merged into the main upstream branch.
Note that in addition to changes mentioned in the comments above I implemented a change to allow pulse width percentages up to 80% of the total clock cycle of output 1 (fixed at /1).
Sorry it's been so long since I looked at this. Just tested again and found a few things:
In lcm() there is a chance of a divide by zero, I'm not sure exactly how it happens but it halted the code during my test. An easy fix would just be to add this max() calculation so it's never lower than 1 before dividing, but that is a bit of a bodge so there might be a better way to do it.
lcm = lcm*item//max(self.computeGcd(lcm, item), 1)
The other much more important thing, is that if you set any of the outputs to random (0) they break all the other outputs, I'm not sure why this is but tbh it could be worth just removing the random functionality and make 0 be 'off', and then add it in at a later date if it can be made to work as it's a great script without it.
The percentage:millisecond display is potentially a little confusing; even once I read what it was showing at a glance I'd forget which number was which. I think it might be more intuitive to just pick one (percentage would be clearer to most eurorack users I'd imagine) and just display that, and then maybe have a constant in the code if people really wanted to change it.
Suggested changes made and merge conflicts resolved - let's merge ASAP!
It looks like the Turing machine has been accidentally removed and master clock not imported from the contrib folder, I think that's the only thing failing now!
Awesome work everyone! I think this script is an awesome addition to the EuroPi ecosystem!