NY:ALL [Update in Audacity 3.0.0]

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
steve
Site Admin
Posts: 81357
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

NY:ALL [Update in Audacity 3.0.0]

Post by steve » Mon Mar 22, 2021 10:28 am

In the past it has been common to use NY:ALL when a big integer is required. For example, when a command requires a limit for the number of samples.

Code: Select all

(snd-length sound maxlen)
In Audacity 3.0.0, the Nyquist library has been updated, and NY:ALL is now a much bigger number than previously.

Audacity 2.4.2
NY:ALL = 1000000000

Audacity 3.0.0
NY:ALL = 576460752303423488 (2^59)

The reason for the maxlen / limit parameter in Nyquist functions is usually to avoid memory exhaustion. Now that NY:ALL is such a big number, it is no longer safe to use NY:ALL because it is so large.

In some cases using NY:ALL as the limit may cause a fatal problem.
One such example is the function SND-SAMPLES. On 32-bit Windows builds, NY:ALL overflows in SND-SAMPLES and results in an empty array. On other platforms using NY:ALL is still unsuitable in SND-SAMPLES as the size of the array could be up to 10^19 bytes.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply