Imagine you are downsampling a signal using a box-filter. You would sum up a bunch of samples and divide by the number of samples (averaging).itoa wrote:Neotec: could you explain?
This is exactly what I do here, only instead of summing up samples I use the mathematical equivalent, the integral and the number of samples is our time period 'step'.
Code: Select all
integral(newPhase) - integral(phase)
Dividing this by 'step' would be enough to calculate an average, but doubling the averaging interval has benefits for hard sync.
It's a bit hard to explain without a white-board and some neat drawings^^ ... hope it still helped a bit, if not, feel free to ask more specific.