Analyzing single waveform for frequency over time?

I have sample data that consists of a single waveform - effectively a square wave of varying frequency.

I’d like to analyze it and export the frequency value over time as another waveform that can be plotted.

I have reviewed the Plot Spectrum that works over the currently selected samples.
Possibly my overall objective could be accomplished by using the Audacity Scripting to select a region of samples (short in comparison with the variation in frequency), Plot Spectrum, Identify peak/fundamental, export that value, increment the selection region, and repeat.

I’ve never used the scripting plugin in Audacity, so that would take some study.

Another way to accomplish the goal would be to measure the time (in samples) between successive rising edge zero crossings in the waveform, and calculate the instantaneous frequency.
Does Audacity have any analysis features (or are the plugins) that work in this manner?

Or is there a different approach that would be more easily accomplished?

What’s the purpose?
If you want to “see” the change in frequencies over time, then that’s what the track spectrogram view does: https://manual.audacityteam.org/man/spectrogram_view.html

If you need to do some numeric analysis, then you will need a different solution, which begs the question, what exactly do you need? What is “the goal”?

@steve, thanks - I was unaware of the track spectrogram function - I only explored the menus.

The application is troubleshooting a 40 year old analog/digital hybrid synthesizer. There is a mailing list but it is apparently email-only. I cannot find a web view that I could link to my posts.

In summary, the instrument has a “self test” that is failing voice boards that appear to work properly when tested separately (in an external test jig). The waveform is a indirect indication of the activity of the self test that is conducted by the embedded CPU. Comparing differences in the frequency changes between passing and failing boards is hoped to reveal the operation (and more importantly mis-operation) of the self test, and narrow down the specific aspects that are causing the test failure.

I think the track spectrogram view is a great place to start. Depending on what I learn, I may want to look at deriving a single frequency per unit time type of measurement. Maybe there is a plugin that implements a differential function (dv/dt) that will convert the positive edges to positive values and then measure the difference in time between the positive values to get the period, and thus the frequency?

I think there’s a plug-in somewhere that counts zero crossings (when the waveform crosses zero). If not, it would be fairly simple to make one using Nyquist (See: Nyquist - Audacity Manual). Give a shout if you need to go down that route.