Bugzilla – Bug 542
Updated Tremolo.ny
Last modified: 2018-08-20 11:51:52 UTC
Created attachment 278 [details] Replacement for tremolo.ny GUI elements updated in line with plug-in conventions. GPL v2 licence details added in comments. Text link added to http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference Code rewritten in line with LISP/Nyquist conventions. Functional changes: Old behaviour: "Frequency (Hz)" <= 0 generates an error message (may appear to fail if set too close to 0 Hz). No upper frequency limit (will cause aliasing if set too high) New behaviour "Frequency (Hz)" is now limited to a 'sensible' range. Minimum frequency = 1 period across the selection. Maximum frequency = 1 kHz As there is virtually nothing left of the original code, the attachment is the complete .ny file rather than a patch
Created attachment 279 [details] Diff of changes for attached tremolo.ny
AFAICT it tests OK based on Steve's information and the former ;info line text. But for an "audiot" like me, I am not sure behaviour of starting phase of sine type is intuitive (it's the same in David's current version too): 1 Generate 30 seconds sine tone, 440 Hz, 1.0 amplitude 2 Zoom in five times, press HOME 3 Waveform type: sine, Phase 0, Wet 100, Frequency 4 4 Why doesn't the "sweep" of the first audible "pulse" start from silence? To have the first pulse appear to start at silence and be as "long" as the others, I have to set "Phase" to -90. I get the "expected" result with the other waveform types (Phase=0 gives me the first "pulse" as long as the others). Perhaps the explanation should be in the Manual?
(In reply to comment #2) Gale wrote: But for an "audiot" like me, I am not sure behaviour of starting phase of sine type is intuitive (it's the same in David's current version too): I agree. Regardless of the waveform, "Phase" is relative to an essentially arbitrary point in the wave cycle. The modulation wave is created from a wave-table (looping through a single cycle waveform). It is almost coincidental (though logical because it shows the expected form in the first 1 cycle) that the other waveforms appear to start at the "same" point. Actually, the square wave starts at the beginning of the highest point, but I agree that it is the Sine wave that "looks wrong". I kept the functionality of this version as close as possible to the original, though personally I think that it would "look nicer" if the Sine wave had it's 0 degree point at the lowest point. Technically, the reason for the current phase position is because it is the first quadrant of a cycle as it passes upward across its median line (the same as the sine wave tone generator in Audacity). Mathematically it is correct, but I would personally prefer to go with what intuitively "looks right" and define 0 degrees as the lowest point. Should I create a new patch? What do we need for consensus, three +1's and no -1's? I'm not overly concerned either way but for now I'll go +1 for starting the Sine wave at the lowest point. Steve
Created attachment 280 [details] updates start phase Replacement plug-in file. 0 degree start phase is as the waveform starts to rise from the lowest point for all waveforms.
Created attachment 281 [details] Patch for new version of tremolo.ny Patch for new version of tremolo.ny 0 degree start phase is as the waveform starts to rise from the lowest point for all waveforms.
Thanks, Steve. I tested the phase for the different waveforms and randomly retested some operations. Seems fine. Moved to "patch_ready".
Patch committed.