Commit Graph

44 Commits

Author SHA1 Message Date
Leland Lucius 9d749fef14 AUP3: Fix macro path handling
Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
2020-08-10 17:48:59 -05:00
Leland Lucius 52b15ce03f Bug 2296 - There is no Import or Export for Macros 2020-08-08 21:17:14 -05:00
Paul Licameli bb26b2f2c4 Require a ProjectWindow as ancestor of effect dialog...
... by passing parent as reference, not pointer, and testing in the dialog
factory function.

This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
2020-01-06 11:30:47 -05:00
Paul Licameli c39718fa1f MacroCommands remembers a reference to project...
... Eliminating several GetActiveProject calls, notably including those where
we construct a CommandContext for executing commands.
2020-01-02 13:58:49 -05:00
Paul Licameli d23569ca10 Construct Exporter with project pointer, fewer GetActiveProject calls 2020-01-02 13:13:48 -05:00
Paul Licameli a325247525 TranslatableString for macro command category 2019-12-21 11:27:53 -05:00
Paul Licameli 2214b5ff3b Pass friendly macro command names as TranslatableString 2019-12-20 21:36:11 -05:00
Paul Licameli 54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli 691eee681c Move DoAudacityCommand out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli b84f5b66f0 CommandManager.cpp does not depend on EffectManager...
... some code lifted into BatchCommands.cpp to realize this.

It also doesn't depend on PluginManager, but that is not important for breaking
cycles.
2019-06-16 01:24:29 -04:00
Paul Licameli 40b4361732 Remove wx/arrstr.h from headers 2019-03-26 12:41:44 -04:00
Paul Licameli 1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli 5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -04:00
Paul Licameli a30000cf74 Use type aliases FilePath, FilePaths...
... 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)
2019-03-15 15:18:11 -04:00
Paul Licameli 485b6bb425 Use type aliases FileExtension, FileExtensions...
... 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
2019-03-15 15:18:11 -04:00
Paul Licameli 135c2a71ce Replace "" and wxEmptyString with {} in default argument values 2019-03-15 15:18:11 -04:00
Paul Licameli 6d5bc21d50 Define and use wxArrayStringEx...
reducing verbosity where there were repeated calls of Add(), and defining
move construction and assignment for efficient returns from functions
2019-03-10 16:23:44 -04:00
James Crook c94df54157 Bug 1856 - Applying Macros to Files is no longer a batch process
This restores the 2.2.2 behaviour, with a subdirectory called 'cleaned'.  The problem was that 2.2.2 used special cases for MP3 Ogg and WAV exports, which were stripped out in favour of using the built-in Export command.  However, the differences in behaviour (prompting) between batch and non batch mode were not taken into account.
2018-08-04 19:16:32 +01:00
James Crook 205b7d6a02 Rename 'chain' to 'macro' in history and comments. 2018-03-16 18:47:39 +00:00
Paul Licameli d258385e3a Use TranslatedInternalString in MacroCommandsCatalog 2018-03-15 19:53:38 -04:00
Paul Licameli cc7bf5c328 Migrate old chains...
... Copy old Chains files to Macros, once only per session, never overwriting.

Leave old files in place in case the user downgrades their Audacity.

When removing a Macro, remove also any like-named legacy chain.
2018-03-15 05:21:04 -04:00
Paul Licameli 77f720b0c8 Show friendly names of commands in message boxes...
... With spaces in the English; maybe later they will localize
2018-03-07 23:55:19 -05:00
Paul Licameli ffadd64a56 Define MacroCommandsCatalog to associate friendly and internal names...
... friendly names are still English only.  Not yet localized, but ought to be.
2018-03-06 18:47:56 -05:00
James Crook 153da3a94d Fix Fade-Ends MacroCommands
- Split parameters from command name.
- Improve test for 'fixed Macros'.
2018-03-04 18:41:16 +00:00
James Crook 6e40d6d969 Add Fade-Ends macro. (a new item in Tools menu) 2018-03-03 20:36:13 +00:00
James Crook c0dcba66dd Rename Chains to Macros.
Lots of renaming.
Did not rename the containing files (yet) since that will require makefile updates.
2018-03-03 19:17:18 +00:00
Paul Licameli 29b214367d Make std::tuple known in Mac build 2018-03-01 22:21:55 -05:00
James Crook bf03fd874b Add details box to BatchCommandDialog
It is now populated with the CommandID and the command type.
Later we can add the command help string.

Std::pair changed to std::tuple to accommodate the extra information.
2018-03-01 19:55:34 +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 0319d6ea68 Friendlier command names in the Edit Chains dialogs...
... Both the pane that lists the steps of the chain, and the selection dialog
for adding a new step.

NOT translating command names yet, though.
2018-01-10 09:09:05 -05:00
James Crook 27d2b7c51b Add AutomationCommands class
- AutomationCommands replaces GetAllMenuCommands, and can provide
information about menus, buttons and toolbars to a script.
- BatchCommands can now return textual results to a script.
- There's a new GUID for mod-script-pipe and it is included in the .sln.
2018-01-06 19:27:45 +00:00
Paul Licameli 7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... 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.
2016-02-24 20:58:30 -05:00
Paul Licameli 9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Leland Lucius 7407243e25 Save/restore effect state during batch processing 2015-04-27 09:22:47 -05:00
Leland Lucius e41db0e4b4 Preload the "Select Preset" with current setting
Also, loads the command parameters box with the default preset if
the selected effect doesn't expose any automation parameters.
2015-04-27 05:02:56 -05:00
Leland Lucius 4f4acffad1 Allow chains to use current/factory presets/settings
Also gives builtin effects a mean to determine if batch processing
is active, IsBatchProcessing() returns true if so.
2015-04-26 16:41:05 -05:00
Daniel Winzen 759ff8cd0d Performance improvements 2015-04-23 16:07:25 +02:00
Leland Lucius 8fbfa460c4 Migrating the remaining effects
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.
2015-04-16 23:36:28 -05:00
lllucius 1eeb4d979a The fabled realtime effects...
I've made it where you can enable and disable via experimentals:

EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK

You will notice that, as of now, the only effects currently set up for
realtime are VSTs.  Now that this is in, I will start converting the
rest.

As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects.  This isolates the effects from changes in Audacity and makes
it much easier to add new ones.

Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too.  There are quite a few VSTs for Linux if
you search for them.

The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me.  I'm not really sure it should
stay in as-is.  I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects.  It should probably
revert back to that idea.

You may notice that this DOES include the API work I did.  The realtime effects
were too tied to it and I didn't want to redo the whole thing.  As I mentioned
elsewhere, the API stuff may or may not be very future proof.

So, let the critter complaints commence.  I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly.  ;-))
2014-10-26 03:24:10 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99 4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
martynshaw99 1af35d4168 Removal of all the stuff marked as 'Experimental CLEANSPEECH' about a year ago. 2013-04-29 23:23:14 +00:00
martynshaw99 758a8f65e6 Inserting CLEANSPEECH ifdef's around anything CleanSpeech so that CleanSpeech can be removed easily in the (not to distant) future. The idea is never to turn CLEANSPEECH on, but fix any (unexpected) differences this may make. 2012-04-26 22:57:04 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00