Sorry to bother you, but some of my 2014-ish plug-ins no longer work correctly in Audacity 2.4.2 on my macOS Mohave or High Sierra Macs. I have looked in the Audacity doumentation, and on this forum, but I have not found any guide to updating old Nyquist to the current form. Is there any guide to this process?
If the plug-ins came from the Audacity wiki (Missing features - Audacity Support) then there may be a newer version there already - in which case you can just replace the old version “.ny” file with the new “.ny” file.
If the plug-ins came from the Audacity wiki and the version that is currently there does not work, please let us know exactly which plug-ins they are and I will update them.
In Audacity 2.4.2, the Nyquist library was updated. This has introduced some subtle differences that I’m still figuring out. Many of the changes relate to increased error checks.
One that I’ve encountered a few times is that holding on to samples in RAM is now limited to about 1 GB. If this limit is exceeded then it will throw an error (in the Debug window):
The maximum number of sample blocks has been
reached, so audio computation must be terminated.
Probably, your program should not be retaining
so many samples in memory. You can get and set
the maximum using SND-SET-MAX-AUDIO-MEM.
error: audio memory exhausted
In most cases, the best way to fix this is to change the code so that the plug-in does not hold onto the samples. If that is too difficult, then you could simply add an error check in the plug-in to display a meaningful error if the selection is too long.
;; Temporarily set SND-SET-MAX-AUDIO-MEM to an
;; arbitrary value so that we can get its current value.
;; 32-bit samples have 4 bytes per sample.
(defun max-samples (&aux (old (SND-SET-MAX-AUDIO-MEM 10000)))
(SND-SET-MAX-AUDIO-MEM old) (/ old 4))
;; Uncomment to test
(if (> len (max-samples))
I’ve updated the code example at the end of my previous post.
Note that the assumption in that example is that the program only holds samples from one audio channel in memory. If the program holds samples from both channels of a stereo track, then it will be necessary to divide (max-samples) by two.
If you find that a plug-in fails on selections greater than about 45 mins stereo (90 mins mono), then the problem is likely to be due to the code hanging onto samples.
When it should say: A single line of text to be displayed at the top border of the plug-in window. For multiple lines of text, a two-character sequence “\n” bay be used within “text” to create a line break.