Nyquist programming, change duration of generated signal

Hi,
i am a newbee in Audacity.
I want to write an own Nyquist plugin, and i am failing on one subtask: How to create signals in different waveforms with a specific duration.
I attempted different commands, but all of them creates a signal with duration of 1s, and i can not figure out how to change the duration.

Example: (hzosc 440 sinetable 0.0)

Does anybody know an easy solution, how to create various signals (e.g sine wave, rectangle a.s.o.) with duration > 1 seconds ?

hzosc is enough to generate a sine wave …

sine gen nyquist
https://manual.audacityteam.org/man/programming_in_nyquist.html

Thank you for your fast reply.
But in my case it does not work.
If i understand the manuals correctly, the mult expression affects the amplitude (loudness) only.
So (hzosc 440) will generate a 440 Hz sinus signal with amplitude 1
(mult 0.1 (hzosc 440) will generate a 440 Hz sinus signal with amplitude 0.1
But in both cases the DURATION is 1 second only.
I want to generate longer signals than 1 second.

Then you need to stretch it:

(stretch 10 (hzosc 440))

or

(stretch-abs 10 (hzosc 440))

This topic was automatically closed after 30 days. New replies are no longer allowed.