Hello im trying to make my first plugin for audacity, for experimental uses im trying to create a sweep tone ( 180 Seconds ) from 150Hz to 30Hz and after do a fade Out to the tone generated
(setq TONE
(scale-db 0 (fmosc 0 (pwev 150 180 30))));
(mult TONE (diff (const 1) (mult (ramp 1) (ramp 1))));
The problem is this code only create 1 second of sound and i need the seconds in pwev 150 180 30 function
Thank you for your help, a dont know what im doing wrong
If PWEV has a duration of 180 seconds (and therefore also FMOSC and TONE), then also CONST and RAMP must have durations of 180 seconds, because otherwise MULT and DIFF (in the second line) will stop computing after the end of CONST or RAMP:
Audacity Nyquist āgenerateā and āprocessā plugins have a different notion of WARP. In a āgenerateā plugin the default duration is 1.0 seconds, while in a āprocessā plugin (and also in the Audacity āNyquist Promptā window) the default duration is equal to the length of the Audacity selection. This means that in a āgenerateā plugin (OSC 60 2.0) produces a sinewave of two seconds, while in a āprocessā plugin (OSC 60 2.0) produces a sinewave two times as long as the selected part of the Audacity track. This is also true for all other Nyquist functions with an optional ādurationā argument.
Tested with Audacity_1.3.14-alpha on Debian Linux.
Perhaps also worth mentioning that if you want to use ārealā time in a āprocessā plug-in you can force the behaviour to be calculated in the default environment using (abs-env beh)
Using your code as an example, to run the code in the Nyquist Prompt you could write:
Thank you!!!
Now i see the problem, i dont know what it was wrong because in a process plugin the fadeout function work good but in my generate pluging donāt