Commit Graph

61 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
Paul Licameli 4668e351a5 Rename enum value to eWinFuncHann 2021-01-17 12:24:38 -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
Yuri Chornoivan d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli 61abb87a77 Reviewed all i18n-hint comments...
... Moved many misplaced ones, which msgfmt would not have extracted into
audacity.pot.

Duplicated some of them, to appear with related but distinct msgids.

Added a few new comments.

Deleted one that was no longer needed in ProjectManager.cpp.
2020-04-05 09:00:00 -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 c2feee6cea Bug2346: Complete fix...
... without making undesirable dependency cycles.

Eliminate calls to NewWaveTrack in effects, but in Edit>Copy too, which was
not mentioned in the bug report.  (Copying a track, deselecting all, and pasting
preserved CLIP colors, but not the TRACK color setting which applies to newly
generated clips.)

Instead, always use the new function WaveTrack::EmptyCopy from the track to be
later replaced, getting color information.

NewWaveTrack is still used in benchmark test, import, the Track menu
commands that make new tracks, recording to new tracks, and generators without
a selection, where there is no track to copy from.

Also when deserializing tracks from the .aup file, in which case the saved
color is later retrieved from the file.

Also, in mix-and-render, where other logic decides whether to copy colors
afterward.

See commit a9658e6ef7
2020-03-10 22:32:23 -04: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 5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli d8c2610d88 TranslatableString in AudacityCommand::MessageBox, Effect::MessageBox 2019-12-20 21:32:47 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli 1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli 3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
James Crook b5d4a828d1 More doxygen 2018-11-04 14:21:00 +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
Paul Licameli aee4005044 Rewrite many iterations over tracks and channels in src/effects 2018-10-01 11:24:04 -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
andheh c6de7d6095 fixed initialization order warning in src/effects/Paulstretch.cpp 2018-03-06 21:29:53 +00: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 ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
Paul Licameli 378c96fda1 Consistently use translated effect name in titles of message boxes...
... For built-in and Nyquist effects.
2018-01-01 17:50:01 -05: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 e7a9c37745 Add help buttons for normal built-in effects 2017-05-20 14:49:07 +01:00
Paul Licameli e1473dfe76 void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.

It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change.  No matter now.
2017-03-31 18:26:52 -04:00
Paul Licameli 6ca89c28ff Remove naked new[] in: builtin effects 2017-03-17 17:52:49 -04:00
Paul Licameli 78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
Paul Licameli 6403031ff7 correct mistake in Paulstretch 2016-09-12 07:51:58 -04:00
James Crook 4eeef25191 More unused parameters and local variables. 2016-09-12 12:33:44 +01:00
Paul Licameli b910bf63da Style changes and use of unsigned types in PaulStretch effect 2016-09-11 20:28:13 -04:00
Paul Licameli 36ddd98757 Bug1501: Fix bad_alloc crash for some effects with extreme inputs 2016-08-28 12:30:43 -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
Paul Licameli e599cfa6fa Effect::mOutputTracks is managed by smart pointer 2016-08-13 10:37:51 -04:00
Paul Licameli 5ef4dd46a5 TrackFactory functions return std::unique_ptr, although some callers...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli 990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... for functions in final classes.

override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.

There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
2016-02-26 12:35:38 -05:00
Paul Licameli dbaa811577 Stack-allocate where possible! ...
... Removed many unnecessary naked news and deletes.
2016-02-17 18:15:57 -05:00
Paul Licameli 7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli 97e8fe3864 include <algorithm> to fix Windows build 2016-01-21 10:41:03 -05:00
Steve Daulton 46055cde25 Fix effect preview issues
Fixes bug 1274 and unblocks bug 995.
2016-01-20 18:19:11 +00:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04: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
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