After much discussion, this is hopefully close to the final version (though some improvements can probably be made to the Help screens - please post your suggestions).
I have attempted to bring together the best features and compromises from all previous versions, and the code has been almost completely rewritten.
Main features in this version:
- Decimal values must use a dot as the decimal separator. This is in keeping with the current behaviour of all other Nyquist plug-ins.
- Recommended version of Audacity: 1.3.14 (or later) *1
- Minimum version of Audacity: 1.3.8
- Control Point amplification settings may be entered as dB or percentage.
- Control Point time settings may be entered as milliseconds, seconds, minutes or as a percentage of the selection.
- Control Point time positions can be specified as distance from the start and/or the end of the selection - positive values are the time after the starting point of the selection. negative values are the time before the end of the selection.
- Almost any characters can be used as delimiters between control point values.*2
- Comprehensive error checking of user input.
- Extensive error reporting of invalid user input *3
- Help screens and examples included *4
- GPL v2.
*1) Due to limitations in Audacity Nyquist prior to version 1.3.14, several non-numerical characters will cause errors in this plug-in that cannot be captured by the Nyquist code. For Audacity versions between 1.3.8 and 1.3.13 inclusive, it is recommended to enter values for the Intermediate Control Points (if used) as pairs of numbers separated by spaces, brackets or colons.
*2) For Audacity 1.3.14 (and later), text handling has been much improved in Nyquist plug-ins and almost any characters may be used. For example, and Intermediate Control Point pair could be entered in any of the following ways:
10,-6
10 -6
(10 : -6)
/10 & -6/
10 seconds -6 dB
*3) Some errors caused by invalid user input cannot be captured by the code in Audacity versions less than 1.3.14
*4) The following Help and Example screens are available:
HELP (overview):
This plug-in simulates the behaviour or the Envelope tool
using text input rather than mouse / pointer control.
‘Select Function’ allows applying the effect or viewing a
help menu.
Time units may be in milliseconds, seconds, minutes or as a
percentage of the selection (default = seconds).
Amplification units may be in dB or as % (default = dB).
The initial and final amplification levels for the selection
have their own controls, allowing easy linear fading from one
level to another.
Intermediate Control Points are entered as Time/Value pairs.
Example: 2.5,-6 : 5.0,-12 : 10,-48
If Units are seconds and dB, the example above would mean:
at 2.5 seconds, amplify by -6 dB
at 5 seconds, amplify by -12 dB
at 10 seconds, amplify by -48 dB.
Values can be separated by spaces or other non-number character
such as comma, colon or bracket.
Non-numerical text is stripped from the input.
EXAMPLES:
For a linear fade out, set:
Initial Amplification = 100 (%)
Final Amplification = 0 (%)
and no Intermediate Control Points.
For a smooth fade to half volume, try setting:
Time Units = %
Initial Amplification = 100 (%)
Final Amplification = 50 (%)
17 97 : 33 88 : 50 75 : 68 63 : 83 53
or for the same effect using a dB scale:
Time Units = %
Initial Amplification = 0 (dB)
Final Amplification = -6 (dB)
Intermediate Control Points:
17 -0.3 : 33 -1.1 : 50 -2.5 : 68 -4 : 83 -5.4
TIPS:
100% amplification is equivalent to 0 dB amplification.
50% amplification is equivalent to -6 dB amplification.
25% amplification is equivalent to -12 dB amplification.
0% amplification is equivalent to -inf dB amplification.
Positive time values are from the start of the selection.
Negative time values are from the end of the selection.
Example, to set 50% amplification 1 second after the start
and 50% amplification 1 second before the end of the selection
you could set control points to:
1 50 : -1 50
Time/value pairs are automatically sorted into time order, so
to add an extra time value pair it may be added to the end of
the Control Point list.
‘1 50 : 2 20’ has the same effect as ‘2 20 : 1 50’.
It is often easiest to first apply the effect with only the
initial and final settings. Use Ctrl+Z to undo and reapply
the effect with additional Intermediate Control Point pairs
as required.
[UPDATE:] Click at end of selection when processing part of an audio track is now fixed.
TextEnvelope.ny (10.2 KB)