Anyone have any good ideas for how to find the period of any arbitrary, complex, periodic wave?
My first idea was to find the highest points in the sample, then find the distances between them, average --and get an approximate period. This actually works quite well --except you must manually adjust the number of these “highest points” to be equal to the number of cycles in the sample… which sort of defeats the purpose… and for very dense, or complex waves may be impossible. Its also vulnerable to false readings in rare instances where a wave returns to the same “high point” multiple times in a cycle… (See attached GH file)
It would seem that a better method would maybe involve translating the entire sample along the X axis and somehow comparing the original wave to this translated wave… looking for the point where they match up again?
But surely there’s a simpler way I’m just not thinking of? Thoughts?
Wave Period Finder.gh (208.1 KB)