The main operational difference is that for v4 effect onward, the
sound name will now be *TRACK*. This will not affect existing
effects since they use version number 3 or less.
This also provides the Nyquist effect with much more information about
the current processing:
Variable Property What
*AUDACITY* VERSION current Audacity version number
*SYSTEM-DIR* BASE Audacity install path
*SYSTEM-DIR* DATA Audacity data path
*SYSTEM-DIR* HELP Audacity help path
*SYSTEM-DIR* TEMP Audacity temp file path
*SYSTEM-DIR* PLUGIN Audacity search path for Nyquist plugins
*PROJECT* RATE current project sample rate
*PROJECT* TRACKS total number of tracks in the project
*PROJECT* WAVETRACKS number of wave tracks in the project
*PROJECT* LABELTRACKS number of label tracks in the project
*PROJECT* MIDITRACKS number of midi tracks in the project
*PROJECT* TIMETRACKS number of time tracks in the project
*SELECTION* START start time of current selection
*SELECTION* END end time of current selection
*SELECTION* TRACKS number of tracks in the current selection
*SELECTION* CHANNELS number of channels in the current selection
*SELECTION* LOW-HZ low frequency from spectrogram (if available, else nil)
*SELECTION* CENTER-HZ center frequence (calculated) (if available, else nil)
*SELECTION* HIGH-HZ high frequence from spectrogram (if available, else nil)
*SELECTION* BANDWIDTH bandwidth in octaves (calculated) (if available, else nil)
*SELECTION* PEAK-LEVEL peak amplitude for the current selection
*TRACK* INDEX 1-based index of track being processed
*TRACK* NAME name of track
*TRACK* TYPE type of track: wave, midi, label, time
*TRACK* VIEW track view: Waveform, Waveform (dB), etc.
*TRACK* CHANNELS number of channels in the track
*TRACK* START-TIME start time of track
*TRACK* END-TIME end time of track
*TRACK* GAIN track gain
*TRACK* PAN track pan
*TRACK* RATE sample rate of track
*TRACK* FORMAT sample format: 16 (int), 24 (int), 32.0 (float)
*TRACK* CLIPS list of start/end times for clips for each channel
This relies on three new nyquist scripts to actually do the editing. The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
With the addition of the preview button, it became evident
that if an effect were to return text instead of audio, the
processing loop would not stop properly.
And he also found a case where the debug state wasn't reset
after using the debug button. If this was following by the
preview button the next time the effect was used, the debug
window would reappear before the preview.
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX. You can get Windows to build, but there's
still some display issues.
These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
He also added a new Nyquist control header that gives each
effect the ability to control the presentation of the Preview
button. This will be used by effects are time based and, therefore,
do not produce the same results in preview as they do when applied.
I expect Steve will be committing changes to the effects that can
take advantage of this shortly.
Testing of this can be accomplished by adding:
;preview enabled
to the "tremelo.ny" effect, just after the ";action" line.
Adding that line will cause the "Preview" button to be shown and
you will then be able to preview, adjust, preview, apply...
This change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
The are pretty darn slick. There's an integer one and a floating point
one. They support automatic range limiting (ex., you can't even type a
number outside of the range), proper number formats (ex., you can't
enter a decimal point in an integer field), you can't enter bogus
numbers like "0.3-.2", thousands separators are supported, decimal
precision may be specified and proper number formatting for string
values (or automatic conversion to int, double, float, etc.).