Commit Graph

82 Commits

Author SHA1 Message Date
Paul Licameli 8fda526577 Simplify memory management in PluginManager 2021-06-30 21:15:19 -04:00
Paul Licameli bd6fb75886 moduleMain functions were never called but with nullptr; so simplify 2021-05-16 07:03:12 -04:00
Paul Licameli 64bbc31c54 Remove macro making extern declaration of RegisterBuiltinModule...
... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.

Does this make scripts/graph.pl show a new dependency cycle?  Happily no.  But
now we know.
2021-05-16 07:03:12 -04:00
Paul Licameli d7f643768c Bugs 2778, 2339, Issue 887: Translation of some effect names...
... Those for which the internal name and the user-visible English names differ,
or that needed disambiguating context for i18n,  were always shown as English
in the menus.

Silence and Filter Curve were the only two examples. There are others.
2021-05-14 14:27:23 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli 9360359e9d
Module manager (#549)
* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
2020-05-29 10:48:52 -05:00
Paul Licameli bbdc27b462 LoadEffects.cpp doesn't depend on individual effect classes... 2020-01-19 19:16:51 -05:00
Paul Licameli 69dab8b552 Each built-in effect class registers itself with BuiltinEffectsModule 2020-01-19 19:16:51 -05:00
Paul Licameli 4579835911 Eliminate one of the ## macro hacks in LoadEffects 2020-01-19 19:16:51 -05:00
Paul Licameli 83be5b3045 All loaded built-in effects have nullary constructors 2020-01-19 19:16:50 -05:00
Paul Licameli 1537930195 DiscoverPluginsAtPath reports error as TranslatableString 2019-12-20 22:06:18 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
SteveDaulton fe7434bc9f Merge loudness effect from mmmaise 2019-11-27 21:14:05 +00:00
Paul Licameli 15983499c8 New virtual function in ModuleInterface 2019-11-26 11:02:35 -05:00
Max Maisel 6da48db127 Start work on new Loudness effect
This is based on my old loudness effect prototype which was included
in the Normalize effect.

Create all source files and add them to all build systems.
Currently, the effect only consists of a GUI mockup.
Create Octave+mod-script-pipe based dummy unit-test as well.
2019-11-22 19:42:32 +01:00
Paul Licameli fcf4b635d3 Fix line continuation (don't leave a space after \) 2019-08-28 11:34:32 -04:00
James Crook 45ddc8c413 Rename EQ effects and lose 'extra knobs'
Team agreed on new names, and to remove redundant controls that are (mostly) just confusing.  Also retired EQ effect.
2019-08-27 19:38:32 +01:00
James Crook a1f0a70ddd EQ Tweaks for Independence
Added:
- Independent Help pages
- Independent Curves

Also tweaked for the new namings
2019-08-23 18:41:26 +01:00
James Crook 23063511d9 Bug 2031 - Equalization: presets under the Manage button do not save custom EQ curves
Further work needed, and a tidy up to bring arrays into ShuttleGui would be nice, but this gets us most of the way.
2019-08-21 17:56:31 +01:00
Paul Licameli b9399e5550 Remove some #include directives 2019-07-19 13:55:49 -04:00
Paul Licameli 6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli 74128156bf ModuleInterface::GetFileExtensions() returns const reference...
... avoiding repeated array allocation
2019-05-16 12:30:23 -04:00
James Crook ee0a438093 Bug 2088 - Graphic EQ ( and Filter Curve): Manage button does not work
Fixed, by disabling these two effects! (use Equalization instead)
2019-04-01 19:19:31 +01:00
Paul Licameli f45300f032 This is only comments, in files where USE_ macros are tested...
... following the comment convention used in the preceding commit.
2019-03-22 12:38:30 -04:00
James Crook de427da4c8 Split Equalization into GraphicEq and FilterCurve effects.
First step in https://wiki.audacityteam.org/wiki/Proposal_Equalization
We still have Equalization as an effect, but if the split works well, will remove it for 2.3.2
2019-03-22 11:11:56 +00:00
Paul Licameli 5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli 906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli 173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli dcd211affa Use type aliases PluginPath, PluginPaths...
... 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
2019-03-15 15:18:11 -04:00
Paul Licameli dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Paul Licameli dd8eb9e3d9 Less use of wxArrayString::Index() ...
... instead use the utility make_iterator_range and its index() or contains()
method.  This generic utility works with any container defining begin() and
end().

This further lessens dependency on wxWidgets container idioms.
2019-03-10 14:45:06 -04:00
Paul Licameli 2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... 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
2019-03-10 14:43:57 -04:00
James Crook 466e9c179e Create ComponentInterface
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.
2018-11-02 17:04:43 +00:00
Paul Licameli 0c99501bfb Initialize tables of effect and command names properly 2018-04-12 17:09:43 -04:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli 0394660e9e Use IdentInterfaceSymbol for vendor strings, which are used in paths 2018-04-11 11:13:41 -04:00
James Crook a5d06ff257 Fix comments needed for Doxygen. 2018-03-06 21:42:58 +00:00
andheh e6ba33c247 fixed "/*" in comment warnings 2018-03-06 21:30:33 +00:00
andheh ade7854c1d fixed "statement has no effect" warnings 2018-03-06 21:29:31 +00:00
James Crook 1c988b4e3a Automation: AudacityCommand
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
2018-02-24 14:20:22 -05:00
Paul Licameli 8a074770e8 IdentInterface::GetDescription() returns a translated string...
... See commit 3b90538b84 which removed the
only use of the untranslated strings.

Also follows better i18n guidelines for composing the VSTEffect description.
2018-01-07 21:16:26 -05:00
Paul Licameli 2e8a73bab1 Fix Windows build 2017-12-31 20:04:35 -05:00
Paul Licameli 8cfb8d2400 Change ModuleInterface for support of drag-and-drop of plug-in files 2017-12-31 18:09:36 -05:00
Paul Licameli eb3bc7e642 Minimal error messages for failing to load non-Nyquist effects 2017-12-27 15:19:43 -05:00
Paul Licameli 0f8bd45a7c ModuleInterface::RegisterPlugin can report an error message 2017-12-27 15:19:36 -05:00
Paul Licameli cdc32e2311 Remove credit of iAVC. We don't use it, and have no link for it. 2017-07-22 14:23:50 -04:00
Paul Licameli 4c6306e6d6 Fix compilation of old NoiseRemoval 2017-03-17 17:52:17 -04:00
James Crook e4260e9581 Bug 1587 - Mac: Ghost duplicate Nyquist effects after upgrade
Fix removes ghost Nyquist effects from the effects menu and generators from generate menu.
2017-02-05 20:27:56 +00:00
Steve Daulton 673aecf05d Remove Leveller effect from Linux build 2016-07-01 16:49:49 +01:00
Steve Daulton 27e46d5331 Distortion effect added 2016-06-15 10:51:46 +01:00