1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 17:13:37 +02:00

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
This commit is contained in:
James Crook
2018-01-14 18:51:41 +00:00
committed by Paul Licameli
parent b7b01d48e0
commit 1c988b4e3a
191 changed files with 4659 additions and 2768 deletions

View File

@@ -137,6 +137,10 @@
<ClCompile Include="..\..\..\src\Benchmark.cpp" />
<ClCompile Include="..\..\..\src\BlockFile.cpp" />
<ClCompile Include="..\..\..\src\blockfile\NotYetAvailableException.cpp" />
<ClCompile Include="..\..\..\src\commands\AudacityCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\CommandContext.cpp" />
<ClCompile Include="..\..\..\src\commands\Demo.cpp" />
<ClCompile Include="..\..\..\src\commands\LoadCommands.cpp" />
<ClCompile Include="..\..\..\src\commands\OpenSaveCommands.cpp" />
<ClCompile Include="..\..\..\src\Dependencies.cpp" />
<ClCompile Include="..\..\..\src\DeviceChange.cpp" />
@@ -400,9 +404,7 @@
<ClCompile Include="..\..\..\src\commands\CommandSignature.cpp" />
<ClCompile Include="..\..\..\src\commands\CommandType.cpp" />
<ClCompile Include="..\..\..\src\commands\CompareAudioCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\ExecMenuCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\AutomationCommands.cpp" />
<ClCompile Include="..\..\..\src\commands\GetProjectInfoCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\GetInfoCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\GetTrackInfoCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\HelpCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\ImportExportCommands.cpp" />
@@ -413,7 +415,6 @@
<ClCompile Include="..\..\..\src\commands\ScreenshotCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\ScriptCommandRelay.cpp" />
<ClCompile Include="..\..\..\src\commands\SelectCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\SetProjectInfoCommand.cpp" />
<ClCompile Include="..\..\..\src\commands\SetTrackInfoCommand.cpp" />
<ClCompile Include="..\..\..\src\blockfile\LegacyAliasBlockFile.cpp" />
<ClCompile Include="..\..\..\src\blockfile\LegacyBlockFile.cpp" />
@@ -473,8 +474,12 @@
<ClInclude Include="..\..\..\src\Benchmark.h" />
<ClInclude Include="..\..\..\src\BlockFile.h" />
<ClInclude Include="..\..\..\src\blockfile\NotYetAvailableException.h" />
<ClInclude Include="..\..\..\src\commands\AudacityCommand.h" />
<ClInclude Include="..\..\..\src\commands\CommandContext.h" />
<ClInclude Include="..\..\..\src\commands\CommandFlag.h" />
<ClInclude Include="..\..\..\src\commands\CommandFunctors.h" />
<ClInclude Include="..\..\..\src\commands\Demo.h" />
<ClInclude Include="..\..\..\src\commands\LoadCommands.h" />
<ClInclude Include="..\..\..\src\commands\OpenSaveCommands.h" />
<ClInclude Include="..\..\..\src\DeviceChange.h" />
<ClInclude Include="..\..\..\src\Diags.h" />
@@ -501,6 +506,7 @@
<ClInclude Include="..\..\..\src\prefs\WaveformSettings.h" />
<ClInclude Include="..\..\..\src\RealFFTf48x.h" />
<ClInclude Include="..\..\..\src\RefreshCode.h" />
<ClInclude Include="..\..\..\src\Registrar.h" />
<ClInclude Include="..\..\..\src\RevisionIdent.h" />
<ClInclude Include="..\..\..\src\SelectedRegion.h" />
<ClInclude Include="..\..\..\src\SelectionState.h" />
@@ -750,9 +756,7 @@
<ClInclude Include="..\..\..\src\commands\CommandTargets.h" />
<ClInclude Include="..\..\..\src\commands\CommandType.h" />
<ClInclude Include="..\..\..\src\commands\CompareAudioCommand.h" />
<ClInclude Include="..\..\..\src\commands\ExecMenuCommand.h" />
<ClInclude Include="..\..\..\src\commands\AutomationCommands.h" />
<ClInclude Include="..\..\..\src\commands\GetProjectInfoCommand.h" />
<ClInclude Include="..\..\..\src\commands\GetInfoCommand.h" />
<ClInclude Include="..\..\..\src\commands\GetTrackInfoCommand.h" />
<ClInclude Include="..\..\..\src\commands\HelpCommand.h" />
<ClInclude Include="..\..\..\src\commands\ImportExportCommands.h" />
@@ -763,7 +767,6 @@
<ClInclude Include="..\..\..\src\commands\ScreenshotCommand.h" />
<ClInclude Include="..\..\..\src\commands\ScriptCommandRelay.h" />
<ClInclude Include="..\..\..\src\commands\SelectCommand.h" />
<ClInclude Include="..\..\..\src\commands\SetProjectInfoCommand.h" />
<ClInclude Include="..\..\..\src\commands\SetTrackInfoCommand.h" />
<ClInclude Include="..\..\..\src\commands\Validators.h" />
<ClInclude Include="..\..\..\src\blockfile\LegacyAliasBlockFile.h" />

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
@@ -677,51 +677,15 @@
<ClCompile Include="..\..\..\src\commands\CommandType.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\CompareAudioCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ExecMenuCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\GetProjectInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\GetTrackInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\HelpCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ImportExportCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\Keyboard.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\MessageCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\PreferenceCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ResponseQueue.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ScreenshotCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ScriptCommandRelay.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\SelectCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\SetProjectInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\SetTrackInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\blockfile\LegacyAliasBlockFile.cpp">
<Filter>src\blockfile</Filter>
</ClCompile>
@@ -818,9 +782,6 @@
<ClCompile Include="..\..\..\src\SseMathFuncs.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\OpenSaveCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\import\ImportGStreamer.cpp">
<Filter>src\import</Filter>
</ClCompile>
@@ -1058,7 +1019,49 @@
<ClCompile Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.cpp">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\AutomationCommands.cpp">
<ClCompile Include="..\..\..\src\commands\ScriptCommandRelay.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\CommandContext.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\AudacityCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\CompareAudioCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\Demo.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\GetInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\GetTrackInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\HelpCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ImportExportCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\LoadCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\OpenSaveCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\PreferenceCommands.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\ScreenshotCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\SelectCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\commands\SetTrackInfoCommand.cpp">
<Filter>src\commands</Filter>
</ClCompile>
</ItemGroup>
@@ -1663,51 +1666,15 @@
<ClInclude Include="..\..\..\src\commands\CommandType.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\CompareAudioCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ExecMenuCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\GetProjectInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\GetTrackInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\HelpCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ImportExportCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\Keyboard.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\MessageCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\PreferenceCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ResponseQueue.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ScreenshotCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ScriptCommandRelay.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\SelectCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\SetProjectInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\SetTrackInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\Validators.h">
<Filter>src\commands</Filter>
</ClInclude>
@@ -1810,9 +1777,6 @@
<ClInclude Include="..\..\..\src\SseMathFuncs.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\OpenSaveCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\import\ImportGStreamer.h">
<Filter>src\import</Filter>
</ClInclude>
@@ -2113,7 +2077,52 @@
<ClInclude Include="..\..\..\src\tracks\playabletrack\notetrack\ui\NoteTrackSliderHandles.h">
<Filter>src\tracks\playabletrack\notetrack\ui</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\AutomationCommands.h">
<ClInclude Include="..\..\..\src\commands\ScriptCommandRelay.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\CommandContext.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\AudacityCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\CompareAudioCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\Demo.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\GetInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\GetTrackInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\HelpCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ImportExportCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\LoadCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\OpenSaveCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\PreferenceCommands.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\Registrar.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\ScreenshotCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\SelectCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\src\commands\SetTrackInfoCommand.h">
<Filter>src\commands</Filter>
</ClInclude>
</ItemGroup>
@@ -2344,4 +2353,4 @@
<Filter>Resources</Filter>
</Manifest>
</ItemGroup>
</Project>
</Project>