Commit Graph

58 Commits

Author SHA1 Message Date
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
Paul Licameli
29ec921c8b Revert parts of e1b6091 involving effects, for .cfg file compatibility 2018-07-05 09:57:17 -04:00
Paul Licameli
b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli
e1b60916b7 More consistent naming conventions for choice control items...
... This commit leaves at least a comment for all choice controls of all
built-in effects and commands.

Use CamelCase with no spaces for the internal identifiers, given in
wxT("...")

Use more idiomatic English with spaces in the user-visible names, given in
XO("..."); these strings go to the message catalog for internationalization

Do not use underscores

In case these strings are the same, give it just once in XO("..."), but if in
a future version it is decided to change the name in XO("..."), then the
original should be kept also in a distinct wxT("...") string, so that
saved configuration or plugin settings or macro files don't become gratuitously
incompatible just because of that user-visible name change.

Left TruncateSilence alone for now -- I think that choice demands a rewrite
as a slider instead.
2018-03-27 15:57:48 -04:00
Paul Licameli
2065eebff6 IdentInterfaceSymbol to distinguish internal vs visible enum settings 2018-03-27 07:51:44 -04:00
Paul Licameli
595cf05d42 More uses if LocalizedStrings 2018-03-27 07:51:44 -04:00
Paul Licameli
81dd580c57 Pass array and count separately to read/write/define enum 2018-03-27 07:51:43 -04:00
James Crook
0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -05:00
James Crook
1d9477a455 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-24 14:20:24 -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
97a8cf52d4 More constructor arguments for EffectScienFilter 2018-02-21 19:21:06 -05:00
Paul Licameli
151cbb1305 Follow wxWidgets argument conventions for other ctors 2018-02-21 19:21:03 -05:00
Paul Licameli
ab5ff9060b More constructor arguments for RulerPanel 2018-02-21 19:21:03 -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
def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -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
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
e99b54e525 Add help button for Classic Filter 2017-05-21 12:04:15 +01:00
Paul Licameli
6ca89c28ff Remove naked new[] in: builtin effects 2017-03-17 17:52:49 -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
fbfee42a00 Remove another C style cast, and an unnecessary track kind test 2016-09-15 16:10:18 -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
6fec00149b Remove some naked new amd delete in: Built-in Effects 2016-08-08 07:51:25 -04:00
Paul Licameli
4739f3e27b Compensate for wxW 3 tab navigation deficiencies on Mac...
... using char hook event handlers.  We don't need to go the extreme length
of patching wxWidgets source.
2016-06-25 19:14:05 -04:00
Paul Licameli
db137ddf76 wxWindow takes ownership of its wxAccessible, so we can use safenew. 2016-05-06 21:03:37 -04:00
Paul Licameli
df6a7c5464 More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent
windows
2016-02-14 20:39:28 -05:00
David Bailes
13f13490e6 Fix for Bug 1267 - Accessibility: some panels used for graphics are included in tab traversal
Bug due to update and wxWidgets bug 1267.
Fix is to add the override of AcceptsFocusFromKeyboard().
2015-11-26 15:21:48 +00:00
Leland Lucius
1e195ecea6 Fix many wx3.1.0 assertions now to prevent double testing 2015-07-30 02:05:23 -05:00
Steve Daulton
df8ddde874 Added dB - linear amplitude conversion macros. 2015-07-24 21:59:34 +01:00
Paul Licameli
e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Leland Lucius
97ea29cd8c Fix missing frequency ruler on OSX 2015-05-19 02:38:12 -05: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
James Crook
ccc71c31b6 Some effect descriptions (for Doxygen). 2015-05-09 17:36:54 +01:00
Leland Lucius
7a0aa43a82 Convert all wxTRANSLATE() to XO()
XO() can be used anywhere a string must be extracted for translation
but not automatically translated at runtime.
2015-04-18 23:03:49 -05: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
Leland Lucius
a03d65ef4d Cleanup lib-src
Removing:

id3lib
libresample
libsamplerate
taglib
2015-04-16 14:41:41 -05:00
martynshaw99
7f34f9c1ff More accurate control text (thanks to Steve).
Layout when required.
Remove commented out old code.
2014-01-28 23:36:52 +00:00
windinthew
ba68f731d0 Make the effect dialogue read "Classic Filters" too. 2014-01-09 14:45:24 +00:00
martynshaw99
3f1ebbe3dd Don't allow 'Classic Filters' to be applied to mixed sample-rate tracks, as we don't support that.
Fix a typo in the name of 'Classic Filters'.
Improve consistency layout as we switch filter types.
Remove a win warning in EQ.
Improve some code readability / change styles (please don't shoot me for that!).   OK, possibly increased the inconsistency.
2014-01-09 00:13:34 +00:00
windinthew
4dd1aa50ad Missed this - can't use "C" access key either on Linux - used for "Cancel". 2014-01-08 12:29:40 +00:00
windinthew
a2dbc06869 Shouldn't use "O" for access key as it's already used as the key for OK button on Linux. 2014-01-07 14:52:38 +00:00
martynshaw99
b6160db1b7 Rename 'Scinentific' filter as 'Classific Filters' 2014-01-07 01:25:16 +00:00
martynshaw99
287fc58951 Improved text for passband and stopband attenuations.
Improved (?) display of controls for different filter types.
The various variables that have 'ripple' in their names really need changing too.
2014-01-03 00:58:30 +00:00
martynshaw99
f4dbcb3188 A little tidying up, and fix a layout problem with the vertical Ruler.
Plus saving the prefs sooner.
2014-01-02 23:33:24 +00:00
martynshaw99
f33993316d David Bailes patch on bug 659. The layout of the controls is much better and the accessibility is much improved. 2013-11-27 00:11:55 +00:00
lllucius
51cb9d9196 Be a bit more careful about CRLF to LF changes. 2013-11-03 02:03:19 +00:00
lllucius
b4ba110811 Reverting r12850...hopefully
Never removed one before, but I'm pretty sure it is correct.
2013-11-03 01:54:50 +00:00