Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 542 - Updated Tremolo.ny
Updated Tremolo.ny
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Nyquist
unspecified
PC All
: P4 Enhancement
Assigned To: Default Assignee for New Bugs
: nyquist, patch_ready
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-03 18:54 UTC by Steve Daulton
Modified: 2018-08-20 11:51 UTC (History)
4 users (show)

See Also:
Steps To Reproduce:
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
Replacement for tremolo.ny (1.50 KB, application/octet-stream)
2012-07-03 18:54 UTC, Steve Daulton
Details
Diff of changes for attached tremolo.ny (3.03 KB, patch)
2012-07-04 13:20 UTC, Gale Andrews
Details | Diff
updates start phase (1.46 KB, application/octet-stream)
2012-07-06 12:17 UTC, Steve Daulton
Details
Patch for new version of tremolo.ny (3.02 KB, patch)
2012-07-06 12:19 UTC, Steve Daulton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2012-07-03 18:54:07 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
Comment 1 Gale Andrews 2012-07-04 13:20:17 UTC
Created attachment 279 [details]
Diff of changes for attached tremolo.ny
Comment 2 Gale Andrews 2012-07-04 18:40:48 UTC
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?
Comment 3 Steve Daulton 2012-07-04 19:20:50 UTC
(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
Comment 4 Steve Daulton 2012-07-06 12:17:13 UTC
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.
Comment 5 Steve Daulton 2012-07-06 12:19:45 UTC
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.
Comment 6 Gale Andrews 2012-07-07 00:14:30 UTC
Thanks, Steve. I tested the phase for the different waveforms and randomly retested some operations. Seems fine. Moved to "patch_ready".
Comment 7 Vaughan Johnson 2012-07-16 22:09:01 UTC
Patch committed.