Commit Graph

1924 Commits

Author SHA1 Message Date
James Crook a6699ed494 Bug 2283 - Crash on editing Nyquist Generator plug-in parameters in Macro
Big Thanks to Steve for finding this and writing clear steps to reproduce when logging this bug in Bugzilla.  Also thanks to Peter for confirming the same bug is present on Windows, i.e. is all platforms, not just Linux.
2020-02-17 16:31:40 +00:00
James Crook 1d9aa20a40 Bug 2261 - Graphic EQ sliders have no frequency labels 2020-02-17 14:10:37 +00:00
James Crook 4d54430c7c Bug 2270 - Graphic Eq: GUI opens too small vertically 2020-02-17 13:27:13 +00:00
James Crook 3d7cf17950 Bug 2254 - Graphic Eq: Inappropriate presets 2020-02-17 13:21:44 +00:00
James Crook 83c294c844 Bug 2237 - Equalization effects have no Import or Export for curves
This is a minimal fix for this bug, and can be improved on in time.  There is almost no error checking in the file read and write, so if you use a bad presets file, you won't be told (yet).

It does provide import and export for all effects that have presets.
2020-02-17 11:59:40 +00:00
SteveDaulton 63c7f6b722 Nyquist: Handle nyx_list return value
Required to avoid error on running Macoro Scripting commands
from Nyquist.
2020-02-15 15:28:01 +00:00
David Bailes 7ff9f1b302 Bug 2293 - Change Tempo effect fails
Problem:
Validation of the length fails, because what should be the min and max are in fact the max and min.

Introduced by commit 1d32824, which got the min and max the wrong way round.
2020-02-10 10:44:03 +00:00
SteveDaulton b85a393af4 Increase size of Nyquist string widget 2020-02-09 12:03:46 +00:00
Leland Lucius 70a67c51d2 Get rid of warning in LV2Effect.cpp
Use the wxCRT_StrdupA to use the appropriate strdup
function for the platform.
2020-02-06 23:18:48 -06:00
Leland Lucius 37f24ee3b0 Get rid of warnings
Must use the deprecated types to support older plug-ins.
2020-02-05 19:00:49 -06:00
Leland Lucius df1aeb8f3f Ensure suil can find the interface modules
Suil uses loadable modules to embed different
UI toolkits within other toolkits, so he needs
to be told where to find them.
2020-02-05 15:30:05 -06:00
Leland Lucius 703f59d709 Ensure a native window exists
Don't send a size event to a native window unless the native
window actually exists.
2020-02-05 15:26:08 -06:00
Paul Licameli 3b77af5dfc Remove TranslatableStringArray.h 2020-02-02 18:02:32 -05:00
SteveDaulton 3e94dfdca0 bug 2300: Limit number of clips in *track* clips property
Nyquist has a limit (less than 2000) for the number of arguments
which may be exceeded when creating the *track* clips property.
In the event that there are more than 1000 clips in a track,
Audacity will now only add the first 1000 clips to the *track* property
and add NIL as the 1001th.
2020-02-02 21:24:44 +00:00
Paul Licameli 4d43967add Restore commit c1d129ec98 2020-01-31 23:51:12 -05:00
Paul Licameli 2c25a37994 Revert to a465ce0046 2020-01-31 22:34:25 -05:00
Paul Licameli d9d3f95570 Several nonmodal top level window tools register their menu items...
... removing link dependencies on them from src/menus, so they are now suitable
for moving out into modules.

They are:
Mixer Board
Karaoke (also called Lyrics)
History
Contrast
Plot Spectrum

Their header files are now no longer included anywhere but in their own
implementation files!
2020-01-31 21:12:36 -05:00
Leland Lucius 6da68f2035 Remove obsolete config*.h files
These are ancient and "configunix.h" was being pulled in
via Types.h.  Nothing major, but they were generated for
a 32-bit system and "may" cause problems when used on
64-bit systems.

(That's unlikely though since they haven't all this time.)
2020-01-31 09:29:15 -06:00
Paul Licameli 9093364b8c Fix other problems since commit f6e5696...
... Problem with static initialization order of ReservedCommandFlags, caused
wrong enablement of menu items (at least on Mac), such as Plot Spectrum or
Contrast enabled when there was no selection
2020-01-28 17:49:07 -05:00
Leland Lucius d28009c93e Remove unneeded include 2020-01-24 22:25:52 -06:00
Max Maisel 17ef5b1c75 Fix two bugs in loudness effect (#410)
* Calculate loudness for short or silent selections as well.

In case of selections shorter than 400ms (one momentary loudness block),
take what we have got and divide only be the actual length.

Abort loudness normalization silently if the selected audio is all
silent.

* Fix loudness effect bug when selection includes a gap.

If the selected audio in a track contained a gap between two clips,
an incorrect amount of samples was processed.
2020-01-24 18:04:19 +00:00
Paul Licameli 921d7f28ef Correct a naked new 2020-01-24 10:25:51 -05:00
Paul Licameli b5b9ab6ecd EffectUIHost::BuildButtonBar uses ShuttleGui 2020-01-23 19:06:23 -05:00
Paul Licameli c28c170cc0 EffectUIHost::Initialize uses ShuttleGui 2020-01-23 19:06:23 -05:00
Paul Licameli eb3e5d8f6f Factor EffectUIHost::Initialize 2020-01-23 19:06:23 -05:00
Paul Licameli 1c84932dfa EffectUIClientInterface::PopulateUI takes ShuttleGui & 2020-01-23 19:06:23 -05:00
Paul Licameli eff5b2ef92 Make Effect::PopulateUI final (no special case for Equalization) 2020-01-23 19:06:23 -05:00
Paul Licameli 46e99bb038 Move EffectPresetsDialog out of Effect.cpp 2020-01-23 15:23:46 -05:00
Paul Licameli 808d4accfd Remove some friends from Effect 2020-01-23 15:23:46 -05:00
Paul Licameli e5625bfb89 Move EffectDialog out of Effect.cpp 2020-01-23 15:23:43 -05:00
SteveDaulton 9a0ee24c5c bug 2290: Add error message
See https://bugzilla.audacityteam.org/show_bug.cgi?id=2290#c9
2020-01-23 12:59:53 +00:00
SteveDaulton 32a60103b4 bug 2290: Bail if no DTMF sequence 2020-01-20 21:29:50 +00:00
Paul Licameli bbdc27b462 LoadEffects.cpp doesn't depend on individual effect classes... 2020-01-19 19:16:51 -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 83be5b3045 All loaded built-in effects have nullary constructors 2020-01-19 19:16:50 -05:00
Paul Licameli f2ed21f9e5 Fix some comments 2020-01-19 13:23:30 -05:00
Paul Licameli 2570b56176 Rename Maybe and its members more like std::optional of C++17 2020-01-19 11:38:12 -05:00
Paul Licameli d2ccde77e7 Remove another exhaustive switch on view sub-types, in Nyquist.cpp 2020-01-18 20:28:53 -05:00
Paul Licameli 7cff170cf7 Sub-view objects report their complete type, not just an enum value 2020-01-18 20:28:53 -05:00
Paul Licameli d9ddb41410 Un-fix smart single quotes in Nyquist prompt too; see commit 45a0ce1 2020-01-18 19:34:40 -05:00
Paul Licameli 73fd60543d Amending commit 1176b61 to avoid compatiblity break in macros using EQ 2020-01-18 11:14:41 -05:00
Paul Licameli 705d4a26a5 Don't supply "Waveform (dB)" to the 'VIEW property in Nyquist...
... consistently with the drop-down menu, and now the Tracks Preferences too.

Only distinguish Waveform and Spectrogram and nil.

See also commit e3d9fd9.
2020-01-17 22:48:23 -05:00
James Crook 1176b61953 Wording changes, per wiki:
https://wiki.audacityteam.org/wiki/Wording
2020-01-10 17:02:31 +00: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 e8c8db8b33 Parent and dialog factory arguments of Effect::DoEffect are optional 2020-01-08 16:47:21 -05:00
Paul Licameli 4385326e9d Fewer calls to Effect::FindProject when only rate is needed 2020-01-07 18:38:56 -05:00
SteveDaulton 8b1ecf03a4 Fix bug 2280 2020-01-07 16:47:50 +00:00
Paul Licameli 6a0aed3884 Eliminate uses of GetActiveProject in src/effects 2020-01-06 14:14:21 -05:00
Paul Licameli a93c4472f5 TrackList has back-pointer to project...
... and Track::GetOwner() is publicized, so that now you can find the
the AudacityProject, if any, that owns a given Track; this will help eliminate
some uses of GetActiveProject
2020-01-06 14:14:21 -05:00
Paul Licameli c7984a2c83 Fix mistaken usage of ProjectSettings 2020-01-06 13:48:51 -05:00
Paul Licameli ed9871d6b5 Eliminate GetActiveProject in EffectUI.cpp...
... This changes visible behavior.

If a realtime effect was open (say, AUGraphicEQ on Mac), and there were multiple
projects, then the window was associated with one of the projects.

But the "Apply" button could apply the effect to the active project, even if
that was not the associated one.  But the associated project was queried for
the existence of a selection.

Now, EffectUIHost::OnApply consistently examines and changes only the associated
project, even if it is not active.

You have to close the window and reopen it with the other project if you really
want to change the other.

You can't have two realtime effects open at once, even if for different
projects.  To overcome that limitation, we would have to make
RealtimeEffectsManager store state per-project, not globally.
2020-01-06 11:30:48 -05:00
Paul Licameli 723c5256c0 Don't call GetActiveProject when constructing EffectUIHost...
... relying on guarantees in the previous commit
2020-01-06 11:30:47 -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
Leland Lucius 2803bc30a6 Fix Windows build
2>c:\users\yam\documents\aud\audacity\src\effects\effectui.h(215): warning C4099: 'CommandContext': type name first seen using 'class' now seen using 'struct'

...

2>BatchCommands.obj : error LNK2019: unresolved external symbol "bool __cdecl EffectUI::DoEffect(class wxString const &,class CommandContext const &,unsigned int)" (?DoEffect@EffectUI@@YA_NABVwxString@@ABVCommandContext@@I@Z) referenced in function "public: bool __thiscall MacroCommands::ApplyEffectCommand(class wxString const &,class TranslatableString const &,class TaggedIdentifier<struct CommandIdTag,0> const &,class wxString const &,class CommandContext const &)" (?ApplyEffectCommand@MacroCommands@@QAE_NABVwxString@@ABVTranslatableString@@ABV?$TaggedIdentifier@UCommandIdTag@@$0A@@@0ABVCommandContext@@@Z)

2>PluginMenus.obj : error LNK2001: unresolved external symbol "bool __cdecl EffectUI::DoEffect(class wxString const &,class CommandContext const &,unsigned int)" (?DoEffect@EffectUI@@YA_NABVwxString@@ABVCommandContext@@I@Z)

2>TrackMenus.obj : error LNK2001: unresolved external symbol "bool __cdecl EffectUI::DoEffect(class wxString const &,class CommandContext const &,unsigned int)" (?DoEffect@EffectUI@@YA_NABVwxString@@ABVCommandContext@@I@Z)
2>C:\Users\Yam\Documents\aud\audacity\win\Debug\Audacity.exe : fatal error LNK1120: 1 unresolved externals
2020-01-06 00:00:14 -06:00
Paul Licameli 91515520bc Remove the nullary override of Effect::Preview 2020-01-05 19:59:30 -05:00
Paul Licameli 8bbc22e47a Cut and paste; EffectManager doesn't need EffectUI; cycle of 3 broken! 2020-01-05 16:11:55 -05:00
Paul Licameli 91c45dd32a Move static EffectManager::DoEffect into new namespace 2020-01-05 16:11:55 -05:00
Paul Licameli 23a0206d2a Remove CreateUI; pass dialog factory to effect client instead 2020-01-05 16:11:55 -05:00
Paul Licameli 738c5c5e90 Remove Effect::PromptUser...
... it was only a thin wrapper of ShowInterface when not overridden, not
clearly serving a distinct purpose.
2020-01-05 16:11:55 -05:00
Paul Licameli fb678c0eb8 Remove EffectHostInterface::Apply so Effect doesn't use EffectManager 2020-01-05 16:11:54 -05:00
Paul Licameli 8c4d8db133 Move classes EffectUIHost and EffectPanel to EffectUI.cpp 2020-01-05 16:11:54 -05:00
Paul Licameli 91536d734f Rename EffectRack.* as EffectUI 2020-01-05 16:11:54 -05:00
Paul Licameli 129c9deb99 Remove GetActiveProject from EffectRack...
... and make one EffectRack window per project
2020-01-04 16:36:55 -05:00
Paul Licameli 275797bbb4 Fewer uses of ::GetActiveProject()...
... where we have a window, ascend the chain of parent pointers instead to
find the project window.
2020-01-04 12:59:37 -05:00
Leland Lucius 04dcc8994d Remove leftover debugging code 2020-01-04 00:43:52 -06:00
Paul Licameli 914bb1dc95 Remove some uses of GetActiveProject in src/effects 2020-01-02 13:32:04 -05:00
Paul Licameli 45a0ce1819 Bug2268: should be able to use " in Nyquist Prompt for Mac...
... We need to un-correct the smart quote characters back to dumb quotes
before passing the input to the Lisp interpreter.

The smart quote correction is a consequence of the move to the MacOS 10.9 SDK.
Stopping the correction at the source would require objective-C hacks in a
custom build of wxWidgets, and just not worth the effort.

This fix only corrects the text input at one wxTextCtrl.  Should we reexamine
other uses of that class?
2019-12-31 15:31:45 -05:00
Paul Licameli de4edb0424 Nyquist output dialog uses ShuttleGui 2019-12-29 17:46:02 -05:00
Paul Licameli aa39f9ade2 Rewrite FileNames::SelectFile using FileTypes...
... And more uniformity in the descriptions of file types used in more than
one place

Also fixes missing translations in VSTEffect.cpp
2019-12-29 15:35:04 -05:00
Paul Licameli c64b3cb31f Rewrite FileDialogWrapper using FileNames::FileTypes...
... also removing some repeated code and using the config keys /DefaultOpenType
and /LastOpenType only in Import.cpp
2019-12-29 15:35:03 -05:00
Paul Licameli 0704f6919a EffectPresetsDialog::SetPrefix takes TranslatableString 2019-12-29 00:01:57 -05:00
Paul Licameli 6e14d2e56c RulerPanel uses TranslatableString for units string...
... also fixing missed translation of "k" in spectrum vertical ruler
2019-12-28 23:49:18 -05:00
Paul Licameli 3b9442a000 Fewer uses of macro _ in Nyquist.cpp 2019-12-28 23:49:18 -05:00
Paul Licameli 956e0813c4 SliderAx uses TranslatableString 2019-12-28 23:49:17 -05:00
Paul Licameli 18942d9909 Rename a function in Distortion.cpp 2019-12-28 19:56:59 -05:00
Paul Licameli d6cd48cde1 Eliminate uses of macro _ in Distortion 2019-12-28 19:56:59 -05:00
Paul Licameli cf5c18b9b3 Rewrite export of data in Contrast.cpp 2019-12-26 22:11:44 -05:00
Paul Licameli 23cd7f40f3 Fix export of Contrast data on Mac 2019-12-26 20:36:34 -05:00
Paul Licameli d396472c9f Rewrite overload of TieChoice that took wxString& instead of int& ...
... let it take TranslatableString& instead.

It was used only in AudioUnitEffect.cpp.
2019-12-26 15:33:47 -05:00
Paul Licameli 744f4b626c Fix unreported bug in AudioUnit effects...
... When locale is not English (and translation is complete enough, as in
French) then the switching from Generic to Full interface in Options... did not
work.

(Locales lacking translations of the strings "Full" and "Generic" didn't have
this problem.)

(AudioUnit effects still don't implement a "Basic" interface distinct from
"Generic" regardless of locale.  That's another matter.)
2019-12-26 15:31:17 -05:00
Paul Licameli 57350ff104 Rewrite conditionally compiled Add/TieCheckBox calls 2019-12-24 00:31:06 -05:00
Paul Licameli 2d3cea1d2c Keep advanced options of NoiseReduction compilable 2019-12-24 00:00:08 -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 c23451af9d TranslatableString for prompts of radio buttons 2019-12-23 19:02:21 -05:00
Paul Licameli 455d3185a8 TranslatableString for list control column headers, menus 2019-12-23 19:02:21 -05:00
Paul Licameli 6b235bdec5 TranslatableString for captions of sliders 2019-12-23 19:02:21 -05:00
Paul Licameli 13417b6d5b ShuttleGui::AddFixedText takes TranslatableString 2019-12-23 19:02:19 -05:00
Paul Licameli acd1158e1b TranslatableString for titles, and spin control and combo prompts 2019-12-23 18:53:00 -05:00
Paul Licameli 707a069712 ShuttleGui::AddVariableText takes TranslatableString 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 1944ac2040 TranslatableString for labels of ShuttleGui buttons 2019-12-23 15:35:48 -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 89a3771730 TranslatableString for AudacityTextEntryDialog message and caption 2019-12-21 11:23:32 -05:00
Paul Licameli 99c3c29158 Some compilation fixes for EXPERIMENTAL_SCOREALIGN 2019-12-21 00:34:59 -05:00
Paul Licameli 1537930195 DiscoverPluginsAtPath reports error as TranslatableString 2019-12-20 22:06:18 -05:00
Paul Licameli 2007346551 Pass TranslatableString to help, warning, and error dialogs 2019-12-20 21:48:21 -05:00
Paul Licameli 5909f67fdb NumericTextCtrl::SetName takes TranslatableString 2019-12-20 21:38:05 -05:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli d8c2610d88 TranslatableString in AudacityCommand::MessageBox, Effect::MessageBox 2019-12-20 21:32:47 -05:00
Paul Licameli ae42397d64 FileNames::SelectFile takes TranslatableString for message 2019-12-20 13:40:20 -05:00
Paul Licameli 71e9e38083 AudacityMessageDialog takes TranslatableString message and caption 2019-12-20 13:40:20 -05:00
Paul Licameli 1b726f4f09 More TranslatableString in dialog wrapper classes...
... All of the dialog names, and the messages for File and directory dialog
wrappers
2019-12-20 13:40:20 -05:00
Paul Licameli e3ea93a624 Define and use function Verbatim...
... in cases of "TranslatableString" that are not really translated.

This makes it easier to scan the code for such unusual constructions of
TranslatableString, distinct from mere mentions of the TranslatableString type.
2019-12-19 22:49:23 -05:00
Paul Licameli 3a633e4fd8 XMLFileWriter takes TranslatableString caption 2019-12-19 16:41:48 -05:00
Paul Licameli 092033b284 Just one accessor for the name of a ComponentInterface...
... Translate it explicitly where needed.
2019-12-19 11:47:37 -05:00
Paul Licameli 16e66a1e7e Keep EffectNoiseRemoval compilable 2019-12-19 11:31:55 -05:00
Paul Licameli 027a5ca32e ShuttleGui static boxes can wrap long text 2019-12-18 10:43:15 -05:00
Paul Licameli 826e50b366 Mac build band-aid 2019-12-17 14:30:04 -05:00
Leland Lucius ccfd2f1c80 Update LV2 host
This greatly improves the LV2 host to the point where all
(non-midi) plugins distributed with Ubuntu 18.04 and Fedora
30 are supported.
2019-12-17 12:54:30 -06:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 1f86a77569 TranslatableString for effect command names and descriptions 2019-12-16 10:58:05 -05:00
Paul Licameli 89df7a3ffc Use TranslatableString in XMLFileReader & move the help URL logic 2019-12-16 10:58:05 -05:00
Paul Licameli 681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
Paul Licameli 53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
Paul Licameli 5639f834c8 CommandManager stores labels as TranslatableString 2019-12-16 10:58:05 -05:00
Paul Licameli 9a609fe1fe TranslatableString in ProgressDialog 2019-12-14 01:48:15 -05:00
Paul Licameli aac50ae36e EffectManager returns TranslatableString for family and vendor 2019-12-12 15:30:36 -05:00
Paul Licameli 0cf90d65e6 S.GetParent() for all windows passed to ShuttleGui::AddWindow()...
... Verified that this makes no real change.
2019-12-10 09:58:38 -05:00
James Crook 5a3e9cd063 Fix dialog naming
For nicer Doxygen results, we need consistency in naming of classes.
Dialag classes are now called SomethingDialog.
2019-12-06 10:39:07 +00:00
SteveDaulton c2d4b5616e Add Noise Gate plug-in 2019-12-05 21:13:24 +00:00
Paul Licameli 15260c2c95 TranslatableString can store a context and format arguments...
... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change).  This allows TranslatableString with arguments to be constructed
at static initialization time.

There is also a special "verbatim" or null context which makes no translations
of msgids.

There is not yet any use of other contexts besides default or null.
2019-12-05 11:34:06 -05:00
Paul Licameli ca70cc940f Don't concatenate ":" onto user-visible strings...
... include it in the msgid intead, to get appropriate translations.  For
instance some locales use the same character but prefer to insert a space
before it.
2019-12-04 16:19:07 -05:00
Paul Licameli 930c21dc2a Define and use ShuttleGui::Size 2019-12-02 22:02:46 -05:00
Paul Licameli dd954247d3 More uses of Position(); don't fiddle with sizer items directly 2019-12-02 22:01:55 -05:00
Paul Licameli 3aef0f4eef Don't directly create wxPanel in Equalization 2019-12-02 22:01:27 -05:00
Paul Licameli 96291c5476 Remove second argument of AddWindow(), use Position() instead 2019-12-02 22:01:22 -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 64a96e6f01 Define and use ShuttleGui::ConnectRoot...
... And corrected improper connections in HistoryWindow and ContrastDialog,
improper because they got called with the wrong this pointer, to
the control instead of the dialog.  But that was harmless anyway because the
handlers did not use this.
2019-12-02 19:35:01 -05:00
Paul Licameli d98e41aad1 Define and use ShuttleGui::Disable; remove EnableCtrl 2019-12-02 17:54:07 -05:00
Paul Licameli c72dbf5b51 Define and use ShuttleGui::Focus 2019-12-02 17:26:40 -05:00
Paul Licameli 30d375d6fa Remove style argument from ShuttleGui::AddCombo & AddListBox...
... use the Style() chain-call instead, as needed
2019-12-02 17:26:38 -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 3ea0209e5c Define and use ShuttleGui::ToolTip 2019-12-02 11:41:51 -05:00
Paul Licameli 1d32824e02 Define and use ShuttleGui::Validator 2019-12-02 11:21:40 -05:00
Paul Licameli 72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00
Paul Licameli b351eabf47 ComponentInterfaceSymbol contains TranslatableString 2019-12-01 18:08:56 -05:00
Paul Licameli e4a7c9ba5b Uses of TranslatableString as value of XO macro...
... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
2019-12-01 18:05:20 -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 f846c25806 Rewrite AddChoice and TieChoice calls...
... either lifting or inlining array-of-string computations, so fewer statements
are mixed among ShuttleGui method calls
2019-11-29 15:16:48 -05:00
Paul Licameli ae353fe61f Specify list control columns and styles all in one call 2019-11-28 14:24:44 -05:00
Paul Licameli 17ee2478bc An overload of AddChoice specifying selected as string value 2019-11-28 14:24:44 -05:00
Paul Licameli 089b46ab64 Specify initial radio button state in ShuttleGui method arguments 2019-11-28 14:24:44 -05:00
Paul Licameli fab756562e Use AddSlider arguments, not SetRange() 2019-11-28 14:24:43 -05:00
Paul Licameli 7ccd35d219 wxWidgets docs recommend: don't SetSizeHints on non-top-level windows 2019-11-28 14:24:43 -05:00
Paul Licameli 08a9e7246f Use the proper type alias for ComponentInterfaceSymbol 2019-11-27 22:03:25 -05:00
Paul Licameli 1add6f3930 Fix warning treated as error in Mac build 2019-11-27 21:38:59 -05:00
SteveDaulton fe7434bc9f Merge loudness effect from mmmaise 2019-11-27 21:14:05 +00:00
Paul Licameli 15983499c8 New virtual function in ModuleInterface 2019-11-26 11:02:35 -05:00
David Bailes 14b53e6736 Bug 2251 - Windows: NVDA sometimes reads the name of the track twice
Problem:
Currently calling Track::EnsureVisible() also sets the track as focus.
In Audacity 2.3.3 the timing of the code to set the focus was changed. Rather than a direct call, an event is queued, and then the focus is set. This has changed the timing of the focus event which is sent with respect to other focus and name change events. In particular in the case of toggling the selectness of the focused track, this moved the focus event to be after the name change event.
These changes only had an effect on NVDA - Jaws and Narrator were unaffected.

The introduction of this bug has highlighted an existing problem.
1. There are a small number of existing cases where a track needs to be visible, but where it is already the focus, and so setting the focus is unnecessary. For example, pressing Enter to toggle whether a track is selected.
2. Some of the Audacity code which calls EnsureVisible() is written with the assumption that EnsureVisible() doesn't set the focus, and so there are unnecessary focus events. Whilst other code which calls EnsureVisible() assumes that it also sets the focus. Confusion.

The Fix:
Remove the setting of focus from within Track::EnsureVisible(), and so remove the unnecessary focus events.
Calls to set the focus were added before calls to EnsureVisible where the code was relying on EnsureVisible to set the focus. In TrackPanel::ProcessUIHandleResult, and TrackPanel::OnMouseEvent, I wasn't sure if the focus needed to be set, so called it anyway to ensure that the behaviour did not change.

So I would like to remove the setting of focus from within Track::EnsureVisible(), and add explicit calls to set the focus where necessary.
I think this would make the code clearer, remove unnecessary calls to set the focus, and make it easier to keep NVDA happy.
2019-11-26 14:43:25 +00:00
Geoffrey McRae b3ade99a58 Fix loading of LV2 effects that have Event ports (Calf Plugins)
The Calf plugin suite exposes Event ports which is currently not supported or defined in `liblilv`, so instead of flat rejecting the filter, test the port name for `Events` and allow them to load.
2019-11-24 21:33:25 +00:00
Paul Licameli e3d9fd95ab If track has multiple views, pass a list in 'VIEW property to Nyquist...
... this makes no difference to any of the .ny plug-ins now in the project,
which only ever test whether the view type is NIL, signifying preview
2019-11-23 15:24:16 -05:00
Max Maisel f911bdb46c Include ProgressDialog.h in Loudness effect. 2019-11-22 19:42:33 +01:00
Max Maisel b4821228df Rename Loudness effect to "Loudness Normalization". 2019-11-22 19:42:33 +01:00
Max Maisel ed1e7ee37a Implement RMS normalization in new Loudness effect. 2019-11-22 19:42:33 +01:00
Max Maisel d9608cddea Implement perceived loudness normalization in new Loudness effect. 2019-11-22 19:42:33 +01:00
Max Maisel 8555018bd4 Implement EBUR128 integrative loudness class. 2019-11-22 19:42:33 +01:00
Max Maisel a94cda94ae Create empty EBUR128 class.
This class will contain all EBU-R128 related analysis code.
Add all new files to all build systems as well.
2019-11-22 19:42:33 +01:00
Max Maisel d8424755d1 Add buffer handling and flow control code to new Loudness effect.
Currently, the effect still does nothing.
2019-11-22 19:42:33 +01:00
Max Maisel c002165952 Add EBU R128 k-weighting filter implementation to Biquad. 2019-11-22 19:42:33 +01:00
Max Maisel c3d25cfb44 Remove all Loudness related code from Normalize effect. 2019-11-22 19:42:33 +01:00
Max Maisel e439e8f4c7 Consistently use double within Biquad filter coefficient calcultations.
This avoids catastrophic rounding errors which can even lead to filter
instability in some cases. This is a real problem in the coming IIR envelope
detector.
2019-11-22 19:42:33 +01:00
Max Maisel 86ae0460c9 More Biquad refactoring. 2019-11-22 19:42:32 +01:00
Max Maisel 064ddb5a54 Refactored filter calculation out of ScienFilter into Biquad.
This allows easy code reuse in other effects.
2019-11-22 19:42:32 +01:00
Max Maisel 6da48db127 Start work on new Loudness effect
This is based on my old loudness effect prototype which was included
in the Normalize effect.

Create all source files and add them to all build systems.
Currently, the effect only consists of a GUI mockup.
Create Octave+mod-script-pipe based dummy unit-test as well.
2019-11-22 19:42:32 +01:00
Paul Licameli eb2161d3aa Fix (again) TAB key navigation to graphic EQ sliders on Mac...
... original fix was at c8d95e1

regression was at 3e98a10
2019-11-14 23:28:15 +00:00
James Crook eb00470042 Bug 2231 - Graphic Eq may create wrong effect 2019-11-08 20:12:13 +00:00
Leland Lucius 5955dbc752 Possible fix for bug #590
This change reduces the risk of LADSPA plugins referencing
Audacity symbols by using the RTLD_DEEPBIND flag when loading
the plugins.

It also addresses an issue specific to the "blop" plugins where
they load their own libraries (without RTLD_DEEPBIND).

A much better solution would be to change Audacity's default
symbol visibility to "hidden" which would expose ONLY symbols
specificially marked as visible.
2019-10-02 10:17:00 -05:00
SteveDaulton 5d4c884764 Fix bug 1824
Generate effect preview fails when no selection
2019-09-05 21:01:46 +01:00
James Crook a3eaf7d46e Fix Graphic EQ slider height tiny on Linux.
Thanks to Steve for alerting to the problem.
2019-09-04 20:07:26 +01:00
Paul Licameli fcf4b635d3 Fix line continuation (don't leave a space after \) 2019-08-28 11:34:32 -04:00
James Crook 45ddc8c413 Rename EQ effects and lose 'extra knobs'
Team agreed on new names, and to remove redundant controls that are (mostly) just confusing.  Also retired EQ effect.
2019-08-27 19:38:32 +01:00
James Crook 569028268d Bug 2207 - Filter Curve and Graphic EQ have no factory presets (available in 2.3.2 and earlier) 2019-08-24 13:55:54 +01:00
James Crook 83ddabc895 Bug 1750 - Equalization: EQ control points can disappear if the points are at the same frequency 2019-08-23 19:28:35 +01:00
James Crook a1f0a70ddd EQ Tweaks for Independence
Added:
- Independent Help pages
- Independent Curves

Also tweaked for the new namings
2019-08-23 18:41:26 +01:00
James Crook 8031bf7c14 Bug 2206 - Filter Curve (and Graphic EQ) corrupt saved curves (on the right)
Frequency range was set too narrow.
2019-08-23 16:39:05 +01:00
James Crook bbc202807f EQ: Don't Load XML data any more
Also abolished use of nPoints, making parameters easier to set up.
This also fixes an issue where more points than are there could be read, if cfg file bad.
2019-08-23 12:12:07 +01:00
David Bailes 889bf7c191 Graphic equalization: fix accessibility name
Overlooked this change which should have been done when we moved to wxWidgets 3.1.1
2019-08-23 11:10:15 +01:00
James Crook 3e98a109c9 Make Graphic EQ vertically stretchable
Drag to enlarge the window, and the length of the graphic sliders.
This was part of splitting EQ.  The split effect would look strange if we did not do this.

Graphic EQ sliders are now in a sizer, and so we no longer lay them out 'by hand' in the way we previously did.
2019-08-22 20:08:52 +01:00
James Crook c9fbd283b7 Fix release build EQ functions.
Uninitialized variable was 0 in debug builds, but could be very high value in release.
2019-08-21 23:46:31 +01:00
James Crook c1c7d5f0a0 Graphic EQ / Filter Curve mods
This is part of the work of fixing Equalization by splitting it into two effects.

The Graphic EQ effect now does not show the curve or 'grid on/off' checkbox.
Screenshot Commands now include Graphic EQ and Filter Curve in the captures (and not EQ anymore).
Menu items now have a space in them.
2019-08-21 22:22:13 +01:00
James Crook 23063511d9 Bug 2031 - Equalization: presets under the Manage button do not save custom EQ curves
Further work needed, and a tidy up to bring arrays into ShuttleGui would be nice, but this gets us most of the way.
2019-08-21 17:56:31 +01:00
James Crook ce5884a1f9 Wording fixes for 2.3.3
Per https://wiki.audacityteam.org/wiki/Wording
2019-08-12 10:39:20 +01:00
Paul Licameli b9399e5550 Remove some #include directives 2019-07-19 13:55:49 -04:00
Paul Licameli 33f3d4b82d Heavyweight version of SelectedRegion stored in ViewInfo emits events 2019-07-17 12:43:39 -04:00
James Crook 5726d49e15 Bug 1341 - ENH: Vocal Remover effect should be removed - misleading and duplicated effectively
Updated vocal reduction and isolation by merging bug 1341 attachment into current version.
2019-07-17 12:25:07 +01:00
James Crook 20772c995d Bug 2137 - Nyquist: Assert when receiving multibyte characters 2019-07-16 13:59:59 +01:00
Paul Licameli 5797637528 Bug2112: Crash opening Equalization settings for Macro...
... It was introduced at 2e11844f6a, so since
2.3.1

A null check on inputTracks() was needed.

This appears to be the only effect where inputTracks() was called while
populating its dialog, so there should not be any similar crashes with other
effects.
2019-07-14 11:24:30 -04:00
Paul Licameli fa6b5dea88 Generalize WaveTrackView::GetDisplay to return multiple values...
... something better might be done in Nyquist Lisp, where we still pass a
single value
2019-07-10 10:19:04 -04:00
Paul Licameli 6ccca16a75 Move display type from WaveTrack to WaveTrackView 2019-07-09 20:09:59 -04:00
Paul Licameli 7e1c469d7f Remove some unnecessary #include directives 2019-07-09 12:45:50 -04:00
Paul Licameli 2c840a75c5 Remove short functions from namespace TransportActions 2019-07-03 16:52:19 -04:00
Paul Licameli 13c2e4de0f Move members from ControlToolBar into class ProjectAudioManager...
... and ControlToolBar is included in fewer places
2019-07-03 16:52:16 -04:00
Paul Licameli a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli 770ea8fe15 All idle event handlers should skip 2019-07-01 11:43:02 -04:00
Paul Licameli 6aba4a3fc7 Bug2129: Effect preview button should work...
... mistake was introduced at 8506282
2019-06-28 10:51:41 -04:00
Paul Licameli 2257fa642a Remove TrackPanel::EnsureVisible; TrackList sends an event instead 2019-06-25 10:54:55 -04:00
Paul Licameli 7fc3c5e7a7 Move namespace TransportMenus into ProjectAudioManager.cpp ...
... not the best thing for the long term, but hidden dependencies on
TransportMenus.cpp are eliminated

Tying CommonCommandFlags again into the big component, which is now 26
2019-06-25 00:14:53 -04:00
Paul Licameli c6478f43af Lower ViewActions as member functions of ProjectWindow 2019-06-25 00:14:53 -04:00
Paul Licameli ff2cf496cd Move DoEffect out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli 1c588fa014 Move enum into EffectManager...
... tying Effect into a cycle of 3 with EffectManager and EffectRack, which is
only revealing the true dependencies
2019-06-25 00:12:45 -04:00
Paul Licameli f1dcc156a0 Remove unnecessary inclusions of Menus.h 2019-06-24 22:45:33 -04:00
Paul Licameli cd9e4e3987 RealtimeEffectState into RealtimeEffectManager...
... which doesn't need Effect.h then.

Freeing Effect and RealtimeEffectManager from cycles, leaving 25 in the big
s.c.c.
2019-06-24 01:04:03 -04:00
Paul Licameli 5caeaf520b RealtimeEffectState needs only EffectClientInterface, not Effect 2019-06-24 00:49:14 -04:00
Paul Licameli 867e6a8d9e Move fields out of Effect, into new class RealtimeEffectState...
... and simplify, using a std::atomic instead of a critical section.

(But did this before, and does this now, correctly synchronize across threads?
I defer that question.)
2019-06-24 00:49:14 -04:00
Paul Licameli 0f62046313 Define EffectClientInterface::GetBlockSize() 2019-06-24 00:49:14 -04:00
Paul Licameli ab5a98003a Free EffectManager and EffectRack from the big s.c.c. ...
... though in a small cycle with each other, by moving RealtimeEffectManager to
new files, which remain in the big component.

Net loss of 1, the big component now has 27 files
2019-06-24 00:49:12 -04:00
Paul Licameli 04a3ed9d04 Separate class RealtimeEffectManager 2019-06-24 00:37:02 -04:00
Paul Licameli 9935b035c5 Remove Effect.h from EffectManager.h and EffectRack.h 2019-06-24 00:36:59 -04:00
Paul Licameli dee27e052f Free Nyquist.cpp from cycles...
... Very easily, just by demoting two macros from Nyquist.h to Effect.h.

The graph improvement is worth this bit of preprocessor namespace pollution.
2019-06-23 23:20:03 -04:00
Paul Licameli 86320838de WaveTrack.cpp does not depend on ODManager.cpp ...
... Breaking up an s.c.c. of 6 into 3 components:
ODManager, ODTask, ODWaveTrackTaskQueue
UndoManager
WaveClip, WaveTrack

Rewrite the OD tasks and queues to hold weak pointers to tracks, so the
track destructor need not notify them.
2019-06-22 21:46:35 -04:00
Paul Licameli 71250b1dc3 WaveTrack.cpp does not depend on ODDecodeBlockFile.cpp...
... cutting off ODDecodeBlockFile and ODDecodeTask into a small cycle of 2
2019-06-22 21:46:34 -04:00
Paul Licameli a6e2ca0aa8 Move some enums into new files WaveTrackViewConstants.* ...
... freeing TracksPrefs from the second largest s.c.c. which is now only 20
2019-06-22 21:46:32 -04:00
Paul Licameli aa5f9550bd LabelTrackView, not LabelTrack, handles focus changes when adding 2019-06-20 10:47:25 -04:00
Paul Licameli c0adb35839 Command flag functions out of Menus.cpp, reducing its dependencies...
... Mostly into CommonCommandFlags.cpp, but some elsewhere, to avoid giving
that new file problematic dependencies on LabelTrack, ControlToolBar, and
EffectManager.

Note that CutCopyAvailableFlag is critically ordered, for message purposes,
only with AudioIONotAvailableFlag, the only flag with a message that it combines
with in menu item definitions.

The dependency on LabelTrack.cpp might not be a bad one later, if the track and
its view can be separated, and that would allow CutCopyAvailableFlag to be
put with the others.  But much other work on LabelTrack must happen first.
2019-06-16 01:21:05 -04:00
Paul Licameli e5a786c420 4th arg of ReportIfActionNotAllowed always == 3rd; eliminate it 2019-06-14 10:12:45 -04:00
Paul Licameli 36e3a03c7f Redo CommandFlags as std::bitset, allow registration of values 2019-06-14 00:31:15 -04:00
Paul Licameli ef8c100cee MenuManager holds a back-reference to project; simplifies calls 2019-06-12 11:08:50 -04:00
Paul Licameli 42a4f55ffe Prepare to split AudioIOBase from AudioIO...
... New files, but (almost) empty; don't use the global variable gAudioIO,
but use one of two accessor function names (which are the same function for
now).

AudioIOBase will have fewer dependencies than AudioIO -- in particular, no
dependency on tracks.

It won't include StartStream.  It will contain functions to query the
present state of streams, and device capabilities.
2019-06-10 20:48:38 -04:00
Paul Licameli 7ed99c6e8f Split EnvelopeEditor.cpp from Envelope.cpp...
... Envelope drops down out of the big strongly connected component, the new
piece stays behind
2019-06-10 20:48:38 -04:00
Steve Daulton c5a1dad275 Fix bug 387
Mac and Linux (correctly) allow files to be saved with an arbitrary
file extension, or no file extension at all. For the exported file
to be visible in the export dialog, the dialog must include an optional
wildcard for "All files".
2019-06-09 19:25:59 +01:00
Paul Licameli f03684db4f New class ProjectHistory split from ProjectManager for undo, etc...
... And yet fewer inclusions of Projectmanager.h, though it's still not yet
free of cycles
2019-06-09 12:10:48 -04:00
Paul Licameli d979a8959b New files for ProjectAudioManager...
... This eliminates some inclusions of ProjectManager, helping to free it from
cycles into a higher level
2019-06-09 12:10:47 -04:00
Paul Licameli 63b93fd2d1 Play region and its lock are stored together in ViewInfo 2019-06-03 01:43:27 -04:00
Paul Licameli fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00
Paul Licameli 4274d44ab7 New attached structure ProjectManager handles project lifetime...
... that is, a factory function, open, close, import, undo/redo/rollback.

Also the callbacks from AudioIO, which need to invoke undo history push when
recording stops.

It is meant as a high-level class using several of the other things attached
to the project, while AudacityProject will be a low level class acting mostly
as just the container of the attached structures.
2019-06-03 01:18:12 -04:00
Paul Licameli 850628275b AudioIO.cpp does not depend on ProjectAudioIO.h and GetActiveProject 2019-06-03 01:18:11 -04:00
Paul Licameli 05efeeb5bd New files for ProjectSettings 2019-06-03 01:13:13 -04:00
Paul Licameli dd10e00a2d New attached structure ProjectSettings stores rate, snap-to, et al. 2019-06-02 14:42:00 -04:00
Paul Licameli 327845b0ee Remove unneeded things from Project.h 2019-06-02 14:41:47 -04:00
Paul Licameli b25d3ad344 Limit access to global array of open projects & simplify iterations 2019-05-30 01:55:25 -04:00
Paul Licameli 82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -04:00
Paul Licameli ae18f2f220 Construction of default play options moved out of AudacityProject 2019-05-28 19:33:21 -04:00
Paul Licameli 37e176dc82 Don't set color index of temp tracks only pasted into other tracks 2019-05-26 11:29:12 -04:00
Paul Licameli 3416b5bad6 Toolbars accessed by static Get() functions, not through AudacityProject 2019-05-24 16:08:29 -04:00
Paul Licameli 0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli 116ff70756 static TrackFactory::Get()...
... not member functions of AudacityProject
2019-05-23 13:55:14 -04:00
Paul Licameli 72b7c776a8 static UndoManager::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli 14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli d5b2507af9 Remove unneeded inclusions of Project.h, no cycles broken 2019-05-22 10:02:24 -04:00
Paul Licameli af3e7a09d5 Compilability of old Noise Removal 2019-05-22 10:00:30 -04:00
Paul Licameli e09c17d0c5 Some compilability fixes for Equalization48x.cpp 2019-05-21 19:03:42 -04:00
Paul Licameli dccb716f39 enum PlayMode tells whether there's cut preview; out of Project.h 2019-05-20 21:38:12 -04:00