Commit Graph

62 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 c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05: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
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
Paul Licameli 91503a91f1 Amplify effect should correctly restore the saved can-clip setting...
... bug began at commit d98e41a

When not batch processing, don't overwrite mCanClip
2020-03-02 12:12:27 -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 747c35645a TranslatableString for checkbox captions 2019-12-23 19:15:34 -05:00
Paul Licameli 5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli d98e41aad1 Define and use ShuttleGui::Disable; remove EnableCtrl 2019-12-02 17:54:07 -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 b256a4fd1a Less code directly inside ShuttleGui code blocks...
... Trying to reduce that just to chained calls on S, or conditional and looping
logic for variations in layout.

Lift some declarations to higher scope; or use expressions that avoid local
variables; or even use lambdas for more complicated computation of arguments
for the member functions of S.
2019-11-29 15:16:51 -05: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
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 2e11844f6a Effect::inputTracks() now gives only const access 2018-10-01 10:59:48 -04:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
James Crook 238fa7f81f Possibly hide unused ApplyClipping parameter in Macros.
It is unused.  This hides it if the ratio has been set.
Hiding it always in Macros means changing more code.  It still will
show if it has only been picked and not set.
2018-03-25 18:18:53 +01:00
James Crook 5c4444665e Bug 1012 - Amplify: User Presets do not store Allow Clipping state. 2018-03-25 17:24:53 +01: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 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 80a958f8a4 Rewrite empty prompts to ShuttleGUI functions as {} ...
... so we might more easily redefine the type of the function argument,
some other day (not this release)
2018-01-01 22:51:25 -05:00
Steve Daulton 9735775a8d Fix bug 963 again 2017-12-11 21:58:42 +00:00
Paul Licameli d3b1ae512b Effect param keys don't need to localize; audacity.pot can shrink...
... The keys are only ever used as internal identifiers in wxConfigFile
objects.  So they are often space-less and camel-cased.

I have noticed a couple instances of translators confused by these.
2017-11-05 11:48:15 -05:00
Steve Daulton 1dd6b848c2 Enable Help button for Nyquist effects 2017-05-20 14:49:07 +01:00
Steve Daulton 469120cebd Enable help button for effects 2017-05-20 14:49:07 +01:00
Paul Licameli 70d9e4bdc7 GetMinMax, GetRMS functions take a mayThrow argument, return numbers 2017-03-21 14:19:02 -04:00
Paul Licameli 22a12c6852 Exception safety in: some effects and generators...
... Those that directly call WaveTrack functions in their Process() routines,
which might throw exceptions for disk space exhaustion.
2017-03-21 14:11:25 -04:00
Paul Licameli 004df48438 Make Effect::mTracks private 2017-03-17 17:52:25 -04:00
Paul Licameli ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... 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.
2016-09-15 21:03:17 -04:00
Paul Licameli 67cec5ad83 Make many counts of tracks and channels unsigned...
... 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.
2016-09-07 10:11:41 -04:00
Paul Licameli 79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Steve Daulton 0792eb0cb3 Fix for bug 958
Bug 958 is due to rounding that is not visible to the user.
By providing one extra decimal place to the New Peak Amplitude (dB)
the user can see if they have exceeded 0 dB by a small amount.
2015-07-28 09:01:03 +01:00
Steve Daulton df8ddde874 Added dB - linear amplitude conversion macros. 2015-07-24 21:59:34 +01:00
Steve Daulton aa54699cf4 Improve input precision for some effects.
This addresses some minor regressions that occurred as a consequence
of the improved validation in 2.1.1.
2015-07-20 16:29:44 +01:00
Paul Licameli e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Leland Lucius cdfb55ddf5 Fix for bug #1008 2015-06-03 14:11:35 -05:00
Steve Daulton 1a2486b01a Fix for bug 963
When using FloatingPointValidator and calculating the min / max
range as floats or doubles, the validated control value has been
rounded to 'n' decimal places, but the min / max range have not
been rounded. It is therefore a matter of chance whether the
rounded control value, when at the extreme limit of the range,
is within the higher precision range or not.
2015-05-20 17:52:02 +01:00
David Bailes 335ec77020 changes to try to ensure that ok and preview are enabled when amplify is opened, and peak is set to 0.0. It was working on windows but not on linux 2015-05-19 16:15:43 +01:00
Steve Daulton 4d0c7cd97b Fix for bug 930.
Calculate with doubles rather than float.
Simplify calculation of max/min peak.
Slight hack to work around limitation in FloatingPointValidator.
Allow 'close equality' in CheckClip().
Tested on Debian 8 and Release build on Ubuntu 14.10.
2015-05-18 00:21:23 +01:00
Steve Daulton d9f3c432d4 Fix for bugs 943, 942, 941, 843 and 775.
Non-linear effects now process tracks before mixing.
This will be slower when multiple tracks are selected
but the preview should now match the applied effect.
SetLinearEffectFlag(true) allows linear effects to
preview more quickly when multiple tracks selected, by
pre-mixing selected tracks.
Simple generators like Tone and Noise may be marked as
'linear' so that they only preview a few seconds.
Generators that vary over time (such as Chirp) must use
the full duration that is set. As this currently
requires calculating the full duration, preview for
'non-linear' generators are not limited to the preview
length.
2015-05-15 12:51:51 +01:00
Steve Daulton 5fd751169f Update Amplify.cpp
Fix for a rounding bug that causes the OK button to be sometimes greyed out. The bug may be Linux only (not tested on other platforms) but should not adversely affect other OS's.
2015-05-13 13:26:15 +01:00
Leland Lucius ff0cd7c347 Try fixing bug #927 again...last attempt was brain damaged. 2015-05-11 14:04:02 -05:00
Leland Lucius 0c9111608d Fix for bug #927
At least I'm pretty sure this addresses all of the example Peter
mentions.
2015-05-11 10:51:53 -05:00