notes after a little sleep: - you can see that this should work by imagining the waveform defined in analytical frequency space, as a sum of sinusoids at precise frequencies. [makes a clear an accurate fourier transform via many different methods]. removes aliasing artefacts. [noise can then be added to the recording, and lengthening it shown to improve the snr] - can also see it should work given we have shown denser frequencies than needed work. we would define the unit circle as the ceiling of the max period. if the data length is cropped to be an even multiple of this, then it can be extracted normally. - using random data to test with without defining its analytical form complicates the situation, adding unneccessary extra challenges. - having the recording be an even fraction of the waveform does not mean that the subsample data is lost: because this does not imply it is a whole number of samples. this is done by setting the recording length to a wonky value, and the max_period to an even fraction of that value. for example, if recording_N is 99, and max_period is 9.9, then it fits 10 times and offsets its phase by 10% each instance. this can also work with recording_N 990 and max_period 99. - one can also see it should be workable by considering those long, stretched instances, where max_period > waveform_N * 2. considering this builds reason to test with an analytic shape such as a sine wave or a square wave. it shows how the interpolation plays out. - my sense, from past experience, is that if i want this to work right, i'll want to crop the recording length to be an even multiple of the max_period. this works if the max_period is an integer. having some difficulty simplifying the problem space to use an integral max period and an analytically-defined waveform. i don't seem to choose to do these things. still, it's nice to list out two or three ways to show that it should actually work, and that these ways have clear implementation paths. struggling with this with result helps engage my algorithmic inhibitions. most of my success yesterday was in manually making fourier and inverse fourier transforms, notably with denser frequencies than the data required. a next step could be accumulating a fourier transform over extended data -- a high pass, but such that there is still a complete unit circle. basically, the max_period would be selected so as to be a fraction of the whole thing already. the reason the high pass max_period = (tN / (tN // max_period)) works is because it is equivalent to summing individual max_period fourier transforms (where max_period is an integer, or recording_length is cropped), each one offset in phase by a constant, and each of those individual transforms would show an individual downsampled copy of the waveform. this is only the same as analogous successes if max_period is an integer fraction of the recording length.