... Perhaps it should be in Internat.h (which is at the lowest level of the
dependency graph), but later ComponentInterface.h will need to include it, and
I don't want includes/ to depend on src/.
Though there is still a linkage dependency on src if
TranslatableString::Translation() is used.
wxWidgets does special things with %.
It uses % to tell it of environment variables.
Rather than escaping %, it is simpler to disable the environment variables thing.
... Identifier holds strings used for internal purposes and not shown to users;
TaggedIdentifier generates subclasses of Identifier for different purposes,
which won't implicitly (that is, inadvertently) interconvert as function
arguments.
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
And simplify some constructions of arrays
... for wxString and vector thereof, when holding plugin paths (which may or
may not be interpreted as file paths, depending on the module); to be replaced
later with different types
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
Also adds the options
;type tool
;type tool process
;type tool generator
;type tool analyze
These tools will appear in the Tools menu, but behave as their second argument (if any)
This is a squash of 50 commits.
This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class. AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.
- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
- Tested with Zoom Toggle.
- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.
We abuse EffectsManager. It handles both Effects and
AudacityCommands now. In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.
- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.
This way we can search for related types at the same time.
- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason. They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.
- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
which are now better handled by other commands.
- JSONify "GetInfo: Commands" output, i.e. commas in the right places.
- General work on better Doxygen.
- Lyrics -> LyricsPanel
- Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
... and the distinction makes a difference only for built-in effects.
"Id" is meant to persist in pluginregistry.cfg, and is constrained by how
previous versions of Audacity were written.
"Name" is not persistent, so we have the liberty to change it, as done here
for the built-ins.
... See commit 3b90538b84 which removed the
only use of the untranslated strings.
Also follows better i18n guidelines for composing the VSTEffect description.
... including titles of dialogs,
messages,
About sub-menu of the Manage button,
long-form names of Undo items (in history view),
message for why command is not allowed when there is no selection
Also one place in Effect Rack code but it's commented out
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
... with run-time assertions.
I examined each place and reasoned that the narrowing was safe, and commented
why so.
Again, there are places where the sampleCount variable will later be changed
to have a different type, and they are not changed here.
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.
Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.
Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
... Define lots of operators for disambiguation, but they will go away after
all conversions from sampleCount to built-in numerical types are forced
to be explicit.
... And in some places where a library uses signed types, assert that
the reported number is not negative.
What led me to this, is that there are many places where a size_t value for
an allocation is the product of a number of channels and some other number.
These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented. Changed to auto.
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls. Mostly useful as documentation of design intent.
Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
Create WaveTrackCache as a utility class but don't use it anywhere yet.
The possible minor performance problem with effects is fixed by changes
in WaveTrack::GetBestBlockSize().
As usual, I started out intending to do as little as possible
to this to get it working and wound up going overboard.
However, I believe it does allow easy management of the effects
and this will provide a basis for the full blown plugin manager
dialog.
Based on Robert's and Steve's suggestions, I removed the "Clear"
button, replaced FileDialog usage with wxFileDialog to restore
extension suffixing, and escaped newlines in save settings so
that chains work properly.
I also attempted to locate the issue where code isn't being
parsed and made a couple of changes, but I doubt I got it.
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects. All effects now share
a common UI.
This gives all effects (though not implemented for all):
User and factory preset capability
Preset import/export capability
Shared or private configuration options
Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.
It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect. Keep
a sharp eye (or two) open.
1) Shell VSTs were completely unrecognized...that is no longer the case
2) All VSTs will now ALWAYS be initialized and cleaned up from the main
GUI thread. I found that some Waves VSTs would freeze Audacity when
initialized in the audio thread and closed in the GUI thread.
3) While realtime previewing, it was possible that the wrong slave
could be used to process new blocks of audio.
4) I found that the Waves AUs don't crash on a real Mac (instead of a
virtual machine), so I removed the "black list" I'd put in just for
them. (Something to do with needing full 3D support I think.)
Anyway, #2 and #3 were quite intrusive, so as much RTP testing as possible
would be a good thing.
This bit the textual mode plain old text based buttons
and retains the bitmap buttons for graphical mode.
It also allowed me to remove the manual accelerator table
building (no access keys in GUI mode) which was a good
thing as I really didn't know if the was gonna work for
non-English keyboards anyway.
If you can believe it, this whole big mess is
just to get localized effect labels back into
the menus.
I sure wish I'd had a little bit more time to
finish up all of the effects. It sure would
be a lot cleaner (code wise).
All:
Export/Import now disabled if the Effect (family) doesn't support it
Options disabled if the Effect (family) doesn't support it
Standarized on "Latency compensation" instead of "Buffer delay compensation"
Correct loading/saving of factory default settings
Fixed "Mannage" to be "Manage"
Removed conditional code since we're keeping the transport buttons
Play bases state on actual playback status
Play no longer monkeys with selection
Play will now start from where it left off IF:
The user stops the playback via the Effect Stop button
If the user wants to restart from the beginning of the selection
then the user can click Rewind while stopped.
Rewind will not go past start of selection (sorry Steve ;-))
If Rewind is clicked while not playing, playback will next
start at beginning of selection.
Fast Forward will stop at end of selection
However, if FFwd is clicked while not playing, it will
put playback at the end of selection and the next time
the user clicks the Effect play button, playback will
continue from the end of selection to the end of track.
Deleting a preset now prompts user to confirm
Button faces should now look a little better
Bypass (should we rename that???) button now grays when disabled
Audio Units:
Corrected all user visible "AudioUnit" strings to be "Audio Unit"
Removed unneeded "Buffer Size" in settings dialog
Only uses latency if user said it was okay
Ladspa:
Added settings dialog to allow control of latency usage
Removed unused "user selectable" buffer size
Only use latency if user wants it
Refresh controls when presets are loaded
VST:
Removed unused "Rescan at startup" setting
Propogate parameter loads to slave effects