Guitarix
gx_engine.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
3  * Copyright (C) 2011 Pete Shorthose
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  * --------------------------------------------------------------------------
19  */
20 
21 /* ------- This is the guitarix Engine namespace ------- */
22 
23 #pragma once
24 
25 #ifndef SRC_HEADERS_GX_ENGINE_H_
26 #define SRC_HEADERS_GX_ENGINE_H_
27 
28 namespace gx_jack { class GxJack; }
29 
30 namespace gx_engine {
31 
32 /* -- guitarix main engine -- */
33 
34 /****************************************************************
35  ** class ModuleSelectorFromList
36  */
37 
39 private:
40  int selector;
41  const char* select_id;
42  const char* select_name;
43  Plugin* current_plugin;
44  PluginDef **modules;
45  unsigned int size;
46  static int static_register(const ParamReg& reg);
47  int register_parameter(const ParamReg& reg);
48 public:
51  EngineControl& seq, const char* id, const char* name,
52  const char *category, plugindef_creator module_ids[], const char* select_id,
53  const char* select_name, uiloader loader, const char** groups = 0, int flags = 0);
55  void set_module();
56 };
57 
58 
59 /****************************************************************
60  ** class GxEngine
61  */
62 
63 struct PluginChange {
65  enum pc { remove, update, update_category, add } status;
66  PluginChange(Plugin *pl_, pc status_): pl(pl_), status(status_) {}
67 };
68 
69 class GxEngine: public ModuleSequencer {
70 private:
72  sigc::signal<void,Plugin*,PluginChange::pc> plugin_changed;
73  LadspaLoader ladspaloader;
74  void load_static_plugins();
75 public:
77  // ModuleSelector's
82  // internal audio modules
101  //
102 public:
103  GxEngine(const string& plugin_dir, ParameterGroups& groups, const gx_system::CmdlineOptions& options);
104  ~GxEngine();
105  void set_jack(gx_jack::GxJack *jack) { midiaudiobuffer.set_jack(jack); }
106  void ladspaloader_update_plugins();
107  sigc::signal<void,Plugin*,PluginChange::pc>& signal_plugin_changed() { return plugin_changed; }
108 };
109 
110 /* ------------------------------------------------------------------- */
111 } /* end of gx_engine namespace */
112 #endif // SRC_HEADERS_GX_ENGINE_H_
113 
CabinetConvolver cabinet
Definition: gx_engine.h:92
OscilloscopeAdapter oscilloscope
Definition: gx_engine.h:89
TunerAdapter tuner
Definition: gx_engine.h:86
int(* uiloader)(const UiBuilder &builder, int format)
Definition: gx_plugin.h:156
void set_jack(gx_jack::GxJack *jack_)
ModuleSelectorFromList ampstack
Definition: gx_engine.h:81
MaxLevel maxlevel
Definition: gx_engine.h:88
ModuleSelectorFromList crybaby
Definition: gx_engine.h:78
ModuleSelectorFromList tonestack
Definition: gx_engine.h:80
sigc::signal< void, Plugin *, PluginChange::pc > & signal_plugin_changed()
Definition: gx_engine.h:107
smbPitchShift detune
Definition: gx_engine.h:100
ConvolverStereoAdapter stereo_convolver
Definition: gx_engine.h:91
PreampConvolver preamp
Definition: gx_engine.h:94
MidiAudioBuffer midiaudiobuffer
Definition: gx_engine.h:87
ContrastConvolver contrast
Definition: gx_engine.h:95
void set_jack(gx_jack::GxJack *jack)
Definition: gx_engine.h:105
ConvolverMonoAdapter mono_convolver
Definition: gx_engine.h:90
PluginDef *(* plugindef_creator)()
MidiControllerList controller_map
Definition: gx_engine.h:76
DrumSequencer dseq
Definition: gx_engine.h:99
ModuleSelectorFromList wah
Definition: gx_engine.h:79
MonoMute monomute
Definition: gx_engine.h:84
LiveLooper loop
Definition: gx_engine.h:96
NoiseGate noisegate
Definition: gx_engine.h:83
PluginChange(Plugin *pl_, pc status_)
Definition: gx_engine.h:66
CabinetStereoConvolver cabinet_st
Definition: gx_engine.h:93
SCapture record_st
Definition: gx_engine.h:98
StereoMute stereomute
Definition: gx_engine.h:85