I feel really stupid, there must be a way to do this but I can't work it out.
I've got a timer measuring the interval between presses, this is giving me the number of k-rate samples*. I can multiply it by 16 to get the number of s-rate samples and I have the length of a delay defined as a constant elsewhere. I know what I would do to get the fraction of the total delay time if I was working with floating point, but I can't work out how to do it using axoloti's units. I need something like (64/totaldelay)*interval, but axoloti's options are somewhat limited when it comes to division.
D;
*There's a deliberate exploitation of execution order there by the way, I have that or gate acting as a 1 k-sample delay, so the button press actually stops the timer and then the gate starts it again 1 k-sample later.
I think I should be adding 1 to the resulting count to compensate, is that right?