Attached is a Nyquist FM tone generator script that Steve wrote in 2013. I am using 2.4.2 on Windows 7.
FMToneGen.ny (3.95 KB)
I’ve used this to get some perfectly anti-aliased tones many times throughout late 2019 and early 2020, but suddenly when I use any waveform setting besides a standard sine, It prints this error:
error: In BUILD-HARMONIC, 1st argument (n) must be an integer, got 3, a FLONUM
Function: #<Subr-ERROR: #f19dd78>
I should mention that I know only a little about nyquist and lisp programming, but I know enough to be able to change the code where it generates the square wavetable to use integers instead of floating numbers like so:
((i 3 (setq i (+ 2 i))))
While this fixed the error, It generates a standard sine wave instead of a square wave, and I can’t interpret the code enough to understand exactly what’s going on.
I’m worried this issue might be that I’m using windows 7 since that is no longer supported and this issue suddenly sprung up a little after that time, but I really hope that is not the case.