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
104  //
105 public:
106  GxEngine(const string& plugin_dir, ParameterGroups& groups, const gx_system::CmdlineOptions& options);
107  ~GxEngine();
108  void set_jack(gx_jack::GxJack *jack) { midiaudiobuffer.set_jack(jack); }
109  void ladspaloader_update_plugins();
110  sigc::signal<void,Plugin*,PluginChange::pc>& signal_plugin_changed() { return plugin_changed; }
111 };
112 
113 /* ------------------------------------------------------------------- */
114 } /* end of gx_engine namespace */
115 #endif // SRC_HEADERS_GX_ENGINE_H_
116 
CabinetConvolver cabinet
Definition: gx_engine.h:94
OscilloscopeAdapter oscilloscope
Definition: gx_engine.h:91
TunerAdapter tuner
Definition: gx_engine.h:86
int(* uiloader)(const UiBuilder &builder, int format)
Definition: gx_plugin.h:158
void set_jack(gx_jack::GxJack *jack_)
ModuleSelectorFromList ampstack
Definition: gx_engine.h:81
MaxLevel maxlevel
Definition: gx_engine.h:90
ModuleSelectorFromList crybaby
Definition: gx_engine.h:78
Directout directout
Definition: gx_engine.h:89
ModuleSelectorFromList tonestack
Definition: gx_engine.h:80
sigc::signal< void, Plugin *, PluginChange::pc > & signal_plugin_changed()
Definition: gx_engine.h:110
smbPitchShift detune
Definition: gx_engine.h:103
ConvolverStereoAdapter stereo_convolver
Definition: gx_engine.h:93
PreampConvolver preamp
Definition: gx_engine.h:96
MidiAudioBuffer midiaudiobuffer
Definition: gx_engine.h:87
ContrastConvolver contrast
Definition: gx_engine.h:98
void set_jack(gx_jack::GxJack *jack)
Definition: gx_engine.h:108
ConvolverMonoAdapter mono_convolver
Definition: gx_engine.h:92
PluginDef *(* plugindef_creator)()
MidiControllerList controller_map
Definition: gx_engine.h:76
DrumSequencer dseq
Definition: gx_engine.h:102
ModuleSelectorFromList wah
Definition: gx_engine.h:79
MonoMute monomute
Definition: gx_engine.h:84
PreampStereoConvolver preamp_st
Definition: gx_engine.h:97
LiveLooper loop
Definition: gx_engine.h:99
NoiseGate noisegate
Definition: gx_engine.h:83
PluginChange(Plugin *pl_, pc status_)
Definition: gx_engine.h:66
CabinetStereoConvolver cabinet_st
Definition: gx_engine.h:95
SCapture record_st
Definition: gx_engine.h:101
StereoMute stereomute
Definition: gx_engine.h:85