2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
EffectsPrefs.cpp
|
|
|
|
|
|
|
|
Brian Gunlogson
|
|
|
|
Joshua Haberman
|
|
|
|
Dominic Mazzoni
|
|
|
|
James Crook
|
|
|
|
|
|
|
|
|
|
|
|
*******************************************************************//**
|
|
|
|
|
|
|
|
\class EffectsPrefs
|
|
|
|
\brief A PrefsPanel for general GUI prefernces.
|
|
|
|
|
|
|
|
*//*******************************************************************/
|
|
|
|
|
|
|
|
#include "../Audacity.h"
|
|
|
|
|
2016-11-22 18:16:03 +00:00
|
|
|
#include <wx/choice.h>
|
2010-01-23 19:44:49 +00:00
|
|
|
#include <wx/defs.h>
|
|
|
|
|
|
|
|
#include "../Languages.h"
|
The fabled realtime effects...
I've made it where you can enable and disable via experimentals:
EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK
You will notice that, as of now, the only effects currently set up for
realtime are VSTs. Now that this is in, I will start converting the
rest.
As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects. This isolates the effects from changes in Audacity and makes
it much easier to add new ones.
Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too. There are quite a few VSTs for Linux if
you search for them.
The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me. I'm not really sure it should
stay in as-is. I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects. It should probably
revert back to that idea.
You may notice that this DOES include the API work I did. The realtime effects
were too tied to it and I didn't want to redo the whole thing. As I mentioned
elsewhere, the API stuff may or may not be very future proof.
So, let the critter complaints commence. I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly. ;-))
2014-10-26 03:24:10 +00:00
|
|
|
#include "../PluginManager.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "../Prefs.h"
|
|
|
|
#include "../ShuttleGui.h"
|
|
|
|
|
|
|
|
#include "EffectsPrefs.h"
|
|
|
|
|
2015-08-31 19:50:50 +00:00
|
|
|
#include "../Experimental.h"
|
2017-09-25 18:07:23 +00:00
|
|
|
#include "../Internat.h"
|
2015-08-31 19:50:50 +00:00
|
|
|
|
2017-10-28 00:35:52 +00:00
|
|
|
EffectsPrefs::EffectsPrefs(wxWindow * parent, wxWindowID winid)
|
|
|
|
: PrefsPanel(parent, winid, _("Effects"))
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
Populate();
|
|
|
|
}
|
|
|
|
|
|
|
|
EffectsPrefs::~EffectsPrefs()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void EffectsPrefs::Populate()
|
|
|
|
{
|
|
|
|
//------------------------- Main section --------------------
|
|
|
|
// Now construct the GUI itself.
|
2014-06-03 20:30:19 +00:00
|
|
|
// Use 'eIsCreatingFromPrefs' so that the GUI is
|
2010-01-23 19:44:49 +00:00
|
|
|
// initialised with values from gPrefs.
|
|
|
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
|
|
|
PopulateOrExchange(S);
|
|
|
|
// ----------------------- End of main section --------------
|
|
|
|
}
|
|
|
|
|
|
|
|
void EffectsPrefs::PopulateOrExchange(ShuttleGui & S)
|
|
|
|
{
|
|
|
|
S.SetBorder(2);
|
2018-01-15 22:02:37 +00:00
|
|
|
S.StartScroller();
|
2018-01-17 20:41:40 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
S.StartStatic(_("Enable Effects"));
|
|
|
|
{
|
|
|
|
|
|
|
|
#if USE_AUDIO_UNITS
|
|
|
|
S.TieCheckBox(_("Audio Unit"),
|
2014-11-25 08:08:15 +00:00
|
|
|
wxT("/AudioUnit/Enable"),
|
2010-01-23 19:44:49 +00:00
|
|
|
true);
|
|
|
|
#endif
|
|
|
|
|
2013-10-30 02:51:38 +00:00
|
|
|
// JKC: LADSPA, LV2, Nyquist, VST, VAMP should not be translated.
|
2010-01-23 19:44:49 +00:00
|
|
|
#if USE_LADSPA
|
2012-03-20 16:17:37 +00:00
|
|
|
S.TieCheckBox(wxT("&LADSPA"),
|
2010-01-23 19:44:49 +00:00
|
|
|
wxT("/Ladspa/Enable"),
|
|
|
|
true);
|
|
|
|
#endif
|
|
|
|
|
2013-10-30 02:51:38 +00:00
|
|
|
#if USE_LV2
|
|
|
|
S.TieCheckBox(wxT("LV&2"),
|
|
|
|
wxT("/LV2/Enable"),
|
|
|
|
true);
|
|
|
|
#endif
|
2010-01-23 19:44:49 +00:00
|
|
|
#if USE_NYQUIST
|
2012-03-20 16:17:37 +00:00
|
|
|
S.TieCheckBox(wxT("N&yquist"),
|
2010-01-23 19:44:49 +00:00
|
|
|
wxT("/Nyquist/Enable"),
|
|
|
|
true);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if USE_VAMP
|
2018-01-16 17:11:40 +00:00
|
|
|
S.TieCheckBox(wxT("&Vamp"),
|
2010-01-23 19:44:49 +00:00
|
|
|
wxT("/VAMP/Enable"),
|
|
|
|
true);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if USE_VST
|
2012-03-20 16:17:37 +00:00
|
|
|
S.TieCheckBox(wxT("V&ST"),
|
2010-01-23 19:44:49 +00:00
|
|
|
wxT("/VST/Enable"),
|
|
|
|
true);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
S.EndStatic();
|
|
|
|
|
2014-11-04 01:38:13 +00:00
|
|
|
S.StartStatic(_("Effect Options"));
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2014-11-04 01:38:13 +00:00
|
|
|
S.StartMultiColumn(2);
|
|
|
|
{
|
2019-02-12 21:30:22 +00:00
|
|
|
wxArrayStringEx visualgroups{
|
|
|
|
_("Sorted by Effect Name") ,
|
|
|
|
_("Sorted by Publisher and Effect Name") ,
|
|
|
|
_("Sorted by Type and Effect Name") ,
|
|
|
|
_("Grouped by Publisher") ,
|
|
|
|
_("Grouped by Type") ,
|
|
|
|
};
|
|
|
|
|
|
|
|
wxArrayStringEx prefsgroups{
|
|
|
|
wxT("sortby:name") ,
|
|
|
|
wxT("sortby:publisher:name") ,
|
|
|
|
wxT("sortby:type:name") ,
|
|
|
|
wxT("groupby:publisher") ,
|
|
|
|
wxT("groupby:type") ,
|
|
|
|
};
|
2014-11-04 01:38:13 +00:00
|
|
|
|
2017-06-04 05:49:39 +00:00
|
|
|
wxChoice *c = S.TieChoice(_("S&ort or Group:"),
|
2014-11-15 18:13:50 +00:00
|
|
|
wxT("/Effects/GroupBy"),
|
|
|
|
wxT("name"),
|
|
|
|
visualgroups,
|
|
|
|
prefsgroups);
|
2018-02-24 19:39:58 +00:00
|
|
|
if( c ) c->SetMinSize(c->GetBestSize());
|
2018-01-16 00:25:03 +00:00
|
|
|
|
2017-06-04 05:49:39 +00:00
|
|
|
S.TieNumericTextBox(_("&Maximum effects per group (0 to disable):"),
|
2014-11-04 01:38:13 +00:00
|
|
|
wxT("/Effects/MaxPerGroup"),
|
2014-12-14 16:02:41 +00:00
|
|
|
#if defined(__WXGTK__)
|
|
|
|
15,
|
|
|
|
#else
|
2014-11-04 01:38:13 +00:00
|
|
|
0,
|
2014-12-14 16:02:41 +00:00
|
|
|
#endif
|
2014-11-04 01:38:13 +00:00
|
|
|
5);
|
|
|
|
}
|
|
|
|
S.EndMultiColumn();
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
S.EndStatic();
|
|
|
|
|
2015-05-15 21:33:35 +00:00
|
|
|
#ifndef EXPERIMENTAL_EFFECT_MANAGEMENT
|
2014-11-04 01:38:13 +00:00
|
|
|
S.StartStatic(_("Plugin Options"));
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
2014-11-04 01:38:13 +00:00
|
|
|
S.TieCheckBox(_("Check for updated plugins when Audacity starts"),
|
|
|
|
wxT("/Plugins/CheckForUpdates"),
|
|
|
|
true);
|
|
|
|
S.TieCheckBox(_("Rescan plugins next time Audacity is started"),
|
|
|
|
wxT("/Plugins/Rescan"),
|
|
|
|
false);
|
2010-01-23 19:44:49 +00:00
|
|
|
}
|
|
|
|
S.EndStatic();
|
2015-05-15 21:33:35 +00:00
|
|
|
#endif
|
2014-01-16 17:55:35 +00:00
|
|
|
|
|
|
|
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
|
|
|
S.StartStatic(_("Instruction Set"));
|
|
|
|
{
|
2014-06-03 20:30:19 +00:00
|
|
|
S.TieCheckBox(_("&Use SSE/SSE2/.../AVX"),
|
2014-01-16 17:55:35 +00:00
|
|
|
wxT("/SSE/GUI"),
|
|
|
|
true);
|
|
|
|
}
|
|
|
|
S.EndStatic();
|
|
|
|
#endif
|
2018-01-17 20:41:40 +00:00
|
|
|
S.EndScroller();
|
The fabled realtime effects...
I've made it where you can enable and disable via experimentals:
EXPERIMENTAL_REALTIME_EFFECTS
EXPERIMENTAL_EFFECTS_RACK
You will notice that, as of now, the only effects currently set up for
realtime are VSTs. Now that this is in, I will start converting the
rest.
As I start to convert the effects, the astute of you may notice that
they no longer directly access tracks or any "internal" Audacity
objects. This isolates the effects from changes in Audacity and makes
it much easier to add new ones.
Anyway, all 3 platforms can now display VST effects in graphical mode.
Yes, that means Linux too. There are quite a few VSTs for Linux if
you search for them.
The so-called "rack" definitely needs some discussion, work, and attention
from someone much better at graphics than me. I'm not really sure it should
stay in as-is. I'd originally planned for it to be simply a utility window
where you can store your (preconfigured) favorite effects. It should probably
revert back to that idea.
You may notice that this DOES include the API work I did. The realtime effects
were too tied to it and I didn't want to redo the whole thing. As I mentioned
elsewhere, the API stuff may or may not be very future proof.
So, let the critter complaints commence. I absolute KNOW there will be some.
(I know I'll be hearing from the Linux peeps pretty darn quickly. ;-))
2014-10-26 03:24:10 +00:00
|
|
|
}
|
|
|
|
|
2017-06-25 14:57:26 +00:00
|
|
|
bool EffectsPrefs::Commit()
|
2010-01-23 19:44:49 +00:00
|
|
|
{
|
|
|
|
ShuttleGui S(this, eIsSavingToPrefs);
|
|
|
|
PopulateOrExchange(S);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2015-06-13 21:59:47 +00:00
|
|
|
|
2017-05-14 15:19:54 +00:00
|
|
|
wxString EffectsPrefs::HelpPageName()
|
|
|
|
{
|
|
|
|
return "Effects_Preferences";
|
|
|
|
}
|
|
|
|
|
2017-10-28 00:35:52 +00:00
|
|
|
PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
2015-06-13 21:59:47 +00:00
|
|
|
{
|
2016-02-14 07:54:25 +00:00
|
|
|
wxASSERT(parent); // to justify safenew
|
2017-10-28 00:35:52 +00:00
|
|
|
return safenew EffectsPrefs(parent, winid);
|
2015-06-13 21:59:47 +00:00
|
|
|
}
|