2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
EffectManager.h
|
|
|
|
|
|
|
|
Audacity(R) is copyright (c) 1999-2008 Audacity Team.
|
|
|
|
License: GPL v2. See License.txt.
|
|
|
|
|
|
|
|
******************************************************************//**
|
|
|
|
|
|
|
|
\class EffectManager
|
|
|
|
\brief EffectManager is the class that handles effects and effect categories.
|
|
|
|
|
2014-06-03 20:30:19 +00:00
|
|
|
It maintains a graph of effect categories and subcategories,
|
2010-01-23 19:44:49 +00:00
|
|
|
registers and unregisters effects and can return filtered lists of
|
|
|
|
effects.
|
|
|
|
|
|
|
|
*//*******************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_EFFECTMANAGER__
|
|
|
|
#define __AUDACITY_EFFECTMANAGER__
|
|
|
|
|
2015-08-31 21:21:50 +00:00
|
|
|
#include "../Experimental.h"
|
|
|
|
|
2016-04-14 16:34:59 +00:00
|
|
|
#include <vector>
|
2015-04-26 21:41:05 +00:00
|
|
|
#include <wx/choice.h>
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/event.h>
|
|
|
|
#include <wx/listbox.h>
|
|
|
|
#include <wx/string.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 "audacity/EffectInterface.h"
|
|
|
|
#include "../PluginManager.h"
|
2010-01-23 19:44:49 +00:00
|
|
|
#include "Effect.h"
|
|
|
|
|
2016-04-14 16:34:59 +00:00
|
|
|
using EffectArray = std::vector <Effect*> ;
|
2014-11-14 03:03:17 +00:00
|
|
|
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(Effect *, EffectMap, class AUDACITY_DLL_API);
|
2016-04-08 08:32:11 +00:00
|
|
|
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(std::shared_ptr<Effect>, EffectOwnerMap, class AUDACITY_DLL_API);
|
2010-01-23 19:44:49 +00:00
|
|
|
|
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
|
|
|
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
|
|
|
class EffectRack;
|
|
|
|
#endif
|
2010-01-23 19:44:49 +00:00
|
|
|
|
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
|
|
|
class AUDACITY_DLL_API EffectManager
|
|
|
|
{
|
2015-04-17 03:53:42 +00:00
|
|
|
public:
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
/** Get the singleton instance of the EffectManager. Probably not safe
|
|
|
|
for multi-thread use. */
|
2015-04-17 03:53:42 +00:00
|
|
|
static EffectManager & Get();
|
|
|
|
|
|
|
|
//
|
|
|
|
// public methods
|
|
|
|
//
|
|
|
|
// Used by the outside program to register the list of effects and retrieve
|
|
|
|
// them by index number, usually when the user selects one from a menu.
|
|
|
|
//
|
|
|
|
public:
|
2010-01-23 19:44:49 +00:00
|
|
|
EffectManager();
|
2015-04-17 03:53:42 +00:00
|
|
|
virtual ~EffectManager();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-05-28 14:57:59 +00:00
|
|
|
/** (Un)Register an effect so it can be executed. */
|
2015-04-17 03:53:42 +00:00
|
|
|
// Here solely for the purpose of Nyquist Workbench until
|
|
|
|
// a better solution is devised.
|
2015-05-28 14:57:59 +00:00
|
|
|
const PluginID & RegisterEffect(Effect *f);
|
|
|
|
void UnregisterEffect(const PluginID & ID);
|
2014-06-03 20:30:19 +00:00
|
|
|
|
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
|
|
|
/** Run an effect given the plugin ID */
|
|
|
|
// Returns true on success. Will only operate on tracks that
|
|
|
|
// have the "selected" flag set to true, which is consistent with
|
|
|
|
// Audacity's standard UI.
|
|
|
|
bool DoEffect(const PluginID & ID,
|
|
|
|
wxWindow *parent,
|
|
|
|
double projectRate,
|
|
|
|
TrackList *list,
|
|
|
|
TrackFactory *factory,
|
|
|
|
SelectedRegion *selectedRegion,
|
2015-04-27 14:22:47 +00:00
|
|
|
bool shouldPrompt = true);
|
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
|
|
|
|
|
|
|
wxString GetEffectName(const PluginID & ID);
|
|
|
|
wxString GetEffectIdentifier(const PluginID & ID);
|
|
|
|
wxString GetEffectDescription(const PluginID & ID);
|
2015-05-17 03:10:09 +00:00
|
|
|
bool IsHidden(const PluginID & ID);
|
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
|
|
|
|
|
|
|
/** Support for batch commands */
|
2014-11-14 03:03:17 +00:00
|
|
|
bool SupportsAutomation(const PluginID & ID);
|
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
|
|
|
wxString GetEffectParameters(const PluginID & ID);
|
|
|
|
bool SetEffectParameters(const PluginID & ID, const wxString & params);
|
|
|
|
bool PromptUser(const PluginID & ID, wxWindow *parent);
|
2015-04-26 21:41:05 +00:00
|
|
|
bool HasPresets(const PluginID & ID);
|
2015-04-27 10:02:56 +00:00
|
|
|
wxString GetPreset(const PluginID & ID, const wxString & params, wxWindow * parent);
|
|
|
|
wxString GetDefaultPreset(const PluginID & ID);
|
2016-12-03 19:33:10 +00:00
|
|
|
|
|
|
|
private:
|
2015-04-27 14:22:47 +00:00
|
|
|
void SetBatchProcessing(const PluginID & ID, bool start);
|
2016-12-03 19:33:10 +00:00
|
|
|
struct UnsetBatchProcessing {
|
|
|
|
PluginID mID;
|
|
|
|
void operator () (EffectManager *p) const
|
|
|
|
{ if(p) p->SetBatchProcessing(mID, false); }
|
|
|
|
};
|
|
|
|
using BatchProcessingScope =
|
|
|
|
std::unique_ptr< EffectManager, UnsetBatchProcessing >;
|
|
|
|
public:
|
|
|
|
// RAII for the function above
|
|
|
|
BatchProcessingScope SetBatchProcessing(const PluginID &ID)
|
|
|
|
{
|
|
|
|
SetBatchProcessing(ID, true); return BatchProcessingScope{ this, {ID} };
|
|
|
|
}
|
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
|
|
|
|
2015-12-30 16:56:30 +00:00
|
|
|
/** Allow effects to disable saving the state at run time */
|
|
|
|
void SetSkipStateFlag(bool flag);
|
|
|
|
bool GetSkipStateFlag();
|
|
|
|
|
|
|
|
// Realtime effect processing
|
2014-11-29 23:17:03 +00:00
|
|
|
bool RealtimeIsActive();
|
2014-12-02 08:55:02 +00:00
|
|
|
bool RealtimeIsSuspended();
|
2014-11-27 12:22:41 +00:00
|
|
|
void RealtimeAddEffect(Effect *effect);
|
|
|
|
void RealtimeRemoveEffect(Effect *effect);
|
2014-11-03 06:48:54 +00:00
|
|
|
void RealtimeSetEffects(const EffectArray & mActive);
|
2017-07-24 18:19:44 +00:00
|
|
|
void RealtimeInitialize(double rate);
|
2016-09-02 19:53:09 +00:00
|
|
|
void RealtimeAddProcessor(int group, unsigned chans, float rate);
|
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
|
|
|
void RealtimeFinalize();
|
|
|
|
void RealtimeSuspend();
|
|
|
|
void RealtimeResume();
|
2015-01-02 05:24:43 +00:00
|
|
|
void RealtimeProcessStart();
|
2016-09-06 13:19:27 +00:00
|
|
|
size_t RealtimeProcess(int group, unsigned chans, float **buffers, size_t numSamples);
|
2015-01-02 05:24:43 +00:00
|
|
|
void RealtimeProcessEnd();
|
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
|
|
|
int GetRealtimeLatency();
|
2010-01-23 19:44:49 +00:00
|
|
|
|
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
|
|
|
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
|
|
|
void ShowRack();
|
|
|
|
#endif
|
2014-06-03 20:30:19 +00:00
|
|
|
|
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
|
|
|
const PluginID & GetEffectByIdentifier(const wxString & strTarget);
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
private:
|
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
|
|
|
/** Return an effect by its ID. */
|
|
|
|
Effect *GetEffect(const PluginID & ID);
|
|
|
|
|
|
|
|
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
|
|
|
EffectRack *GetRack();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
private:
|
2014-11-14 03:03:17 +00:00
|
|
|
EffectMap mEffects;
|
2016-04-08 08:32:11 +00:00
|
|
|
EffectOwnerMap mHostEffects;
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
int mNumEffects;
|
|
|
|
|
2014-11-03 06:48:54 +00:00
|
|
|
wxCriticalSection mRealtimeLock;
|
2014-11-27 12:22:41 +00:00
|
|
|
EffectArray mRealtimeEffects;
|
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
|
|
|
int mRealtimeLatency;
|
|
|
|
bool mRealtimeSuspended;
|
2014-11-05 07:06:38 +00:00
|
|
|
bool mRealtimeActive;
|
2016-09-02 19:53:09 +00:00
|
|
|
std::vector<unsigned> mRealtimeChans;
|
2015-01-02 05:24:43 +00:00
|
|
|
wxArrayDouble mRealtimeRates;
|
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
|
|
|
|
2015-12-30 16:56:30 +00:00
|
|
|
// Set true if we want to skip pushing state
|
|
|
|
// after processing at effect run time.
|
|
|
|
bool mSkipStateFlag;
|
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
|
|
|
EffectRack *mRack;
|
2014-06-03 20:30:19 +00:00
|
|
|
|
2015-04-17 03:53:42 +00:00
|
|
|
friend class EffectRack;
|
2010-01-23 19:44:49 +00:00
|
|
|
#endif
|
2015-04-26 21:41:05 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|