PLUG-IN: ODD ECHO5

<>

but perhaps not such a good idea to use it in public plug-ins.

(snd-time sound)
Returns the start time of the sound. This will probably go away in a future version, so use snd-t0 instead.

http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/part6.html#index178

Audacity and Nyquist are free as in freedom. You are quite at liberty to do what you like with them (within the licensing terms of course). You could write your plug-ins backward if you wanted to :smiley: My previous comments were with regard to making your plug-ins useful to others, not to restrict your enjoyment in creating them.

<>

A handy “big number” is NY:ALL
The default value of NY:ALL is 1000000000

Other than for “artistic” value, 44100.000000 is identical to 44100.0
but 44100.0 is not the same as 44100
(44100.0 is a floating point value, but 44100 is an integer).

So

 (SETQ NoS (SND-LENGTH SMP 99999999999))
(SETQ SL (/ NoS 44100.000000))

may be written as

(setq SL (/ (snd-length SMP NY:ALL) 44100.0))

which in turn is the same as

(setq SL (/ LEN *sound-srate*))

or

(setq SL (get-duration 1))

There are no plans to deprecate SND-LENGTH