Commit Graph

102 Commits

Author SHA1 Message Date
Paul Licameli cfbdd2d22e Type alias ManualPageID for wxString used in many places...
... eliminating many direct mentions of wxString.  A real type distinction will
be made next.
2021-07-01 13:33:04 -04:00
Paul Licameli f369b5109b Change almost all uses of WaveTrack::Get() to GetFloats() ...
... A call graph browser easily shows that the extra generality of fetching
samples in some other format is only used in Benchmark -- where the format is
always the same as what the track is constructed with.

This makes re-verification of the claims in comments two commits ago easier.
2021-05-27 11:38:10 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Leland Lucius 5bca69ca31 Fixes for bugs 2534 and 1215 2020-09-17 23:22:00 -05:00
Leland Lucius 5342d980fb Bug 2367 - Change Pitch effect may create spurious clip at end
Fixes residual mentioned in Comment #11
2020-09-06 03:37:57 -05:00
Paul Licameli e9f63d43d1 Contexts & i18n-hints suggested by Joachim Huffer (thanks!) 2020-05-28 16:34:00 -04:00
Paul Licameli 4d09705a73 Change XO to XXO in many more places, with no effects at all...
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.

This commit makes ONLY such changes, and comments in Internat.h.  It is big
but quite harmless.

The intention is to introduce a type distinction in a later release, by defining
XXO differently.  XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
2020-05-22 13:07:50 -04:00
SteveDaulton 29d1a7b7b1 Fix bug 2392
Commit 66fd95f3d6 reverted.
2020-04-20 11:26:57 +01:00
David Bailes eeeb4f3e1f Built-in effect dialogs: add access keys where necessary
Several of the dialog were missing acccess keys.
Note: access keys not added to Distortion effect as yet, due to complexity of control names changing when the Distortion type is changed.
2020-03-27 10:51:34 +00:00
James Crook f1b6843b9a Bug 2321 - Crash on editing ChangePitch parameters in a Macro
EffectChangePitch:: Don't use the inputTracks() when building the GUI
in Batch mode.

Repeat and NyquistEffect had the same problem as they could call
FindProject() which used inputTracks() on a closed project.  Fixed by a change in Effect::GetSelectionFormat().
2020-03-06 19:14:31 +00: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 66fd95f3d6 Rewrite the path through NyquistEffect, in the case that...
... you use the prompt, and you enter a complete script with control comments
that are reinterpreted to put up a second dialog.

This simplifies Effect::Delegate() and avoids mutual recursion of ShowInterface
with DoEffect.
2020-01-08 16:48:37 -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 23a0206d2a Remove CreateUI; pass dialog factory to effect client instead 2020-01-05 16:11:55 -05:00
Paul Licameli d1637c22c0 TranslatableString for explicit prompts and units in ShuttleGui 2019-12-23 19:22:03 -05:00
Paul Licameli 747c35645a TranslatableString for checkbox captions 2019-12-23 19:15:34 -05:00
Paul Licameli acd1158e1b TranslatableString for titles, and spin control and combo prompts 2019-12-23 18:53:00 -05:00
Paul Licameli 5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli b404eb7800 TranslatableString for static text box captions 2019-12-23 18:52:37 -05:00
Paul Licameli 21e7b9f2de TranslatableString for prompts of choice controls 2019-12-23 15:39:49 -05:00
Paul Licameli 75996a851c ShuttleGui::AddChoice and TieChoice take TranslatableStrings 2019-12-23 15:35:47 -05:00
Paul Licameli 86e9288bbd return pitch names as TranslatableString 2019-12-21 12:45:24 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli b5ee7676fd Rename ShuttleGui::SetSizeHints, chain-call it like other methods...
... And rewrite some other existing calls to SetMinSize
2019-12-02 19:35:06 -05:00
Paul Licameli 1bfbfb9640 ShuttleGui::Style analogous to other functions 2019-12-02 17:23:34 -05:00
Paul Licameli 9eeef4713d Define and use ShuttleGui::Name and NameSuffix...
... For radio buttons, the name will default to the same as the prompt if not
otherwise specified
2019-12-02 16:55:46 -05:00
Paul Licameli 1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli fe1be2b6a8 Revert "2096: Windows & Mac high quality Change Pitch/Tempo preview"
This reverts commit fe22b2ae22.
2019-04-20 12:37:22 -04:00
David Bailes fe22b2ae22 2096: Windows & Mac high quality Change Pitch/Tempo preview
Problem:
Preview plays the original, and removes the selection.
This appears to have been caused by the commit: 0aad028

Fix: revert that commit. Note that in the #ifdef EXPERIMENTAL_SPECTRAL_EDITING code has not been reinstated.
I have not looked at why the commit caused the problem, just reverted it.
2019-04-17 10:48:56 +01:00
Paul Licameli de60edc62f Remove wx/{app,statbmp,spinctrl,scrolbar,dynlib,dcmemory}.h from *.h 2019-03-30 07:57:37 -04:00
Paul Licameli d71a54b4e9 Remove wx/checkbox.h from headers 2019-03-28 12:55:34 -04:00
Paul Licameli 803d8b9559 Remove wx/filename.h, wx/choice.h, wxFileNameWrapper.h from headers 2019-03-28 03:12:42 -04:00
Paul Licameli 7766d9a192 AddCheckBox takes a bool for initial state, not string 2019-03-27 12:58:40 -04:00
Paul Licameli b18f825ee8 Remove wx/slider.h from headers 2019-03-27 10:35:59 -04:00
Paul Licameli 3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
Paul Licameli dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli dcd82b8ef5 ShuttleGui::AddChoice takes int to specify selection, with a default...
... This makes things brief and where non-default avoids some repetition of
literal strings
2019-03-15 23:35:13 -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
Steve Daulton e609a9dcef Fix bug 2069
Macros: Change Pitch in a Macro does not remember speed parameter setting
Also, Change Pitch did not remember settings after restart.
2019-02-17 18:44:22 +00: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
James Crook cc2c3dc2fc Bug 2016 - Multiple problems with Change Pitch 2018-10-30 12:21:24 +00:00
Paul Licameli 2e11844f6a Effect::inputTracks() now gives only const access 2018-10-01 10:59:48 -04:00
Paul Licameli 83e01fb43b Remove 8 warnings about re-#define-d names, related to SoundTouch 2018-07-23 14:27:44 -04:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli dd1ffb0390 Indicative mood for all verbs in command and effect descriptions...
... Some of them have no verb.
2018-03-10 19:07:34 -05:00
James Crook 0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -05: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 6e7d7447c1 Use an enum class for numeric validator styles 2018-02-21 19:21:08 -05:00
Paul Licameli 0aad028c9b Simplify calls to Effect::Delegate 2018-02-21 19:20:53 -05:00