How are calculations of my Nyquist script reflected in the progress indicator? How can I make its progress more smooth?
I have inferred that progress through the first half reflects what portion of the input sound has been examined at least once. I am not sure how to interpret the other half. Sometimes the indicator disappears soon after reaching halfway: total time was overestimated throughout by twofold. Sometimes there is a long stall at halfway and a rapid filling up just before completion.
I understand that if my calculations make multiple passes over the sound, communicating intermediate results in lists, then progress will only indicate the first pass and stall during the others. Calling (snd-length s ny:all) early is the simplest example. If instead I reorganize them as interleaved, communicating by “streams” (lazy lists, generators, iterators, whatever you prefer to call the technique), then behavior of the bar is better.
The progress indicator for Nyquist effects is an approximation but Audacity is not really aware of what Nyquist is doing. For effects, Audacity looks at the length in samples and guesses how long Nyquist will take. Depending on what Nyquist is doing Audacity may be able to check the progress part way through and adjust the progress bar accordingly. It should be possible to make the progress bar more accurate and smoother in version 4 plug-ins, but that is still in an early experimental stage.