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_engine {
29 
30 /* -- guitarix main engine -- */
31 
32 /****************************************************************
33  ** class ModuleSelectorFromList
34  */
35 
37 private:
38  int selector;
39  const char* select_id;
40  const char* select_name;
43  unsigned int size;
45 
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;
74  void load_static_plugins();
75 public:
77  // ModuleSelector's
83  // internal audio modules
104  //
105 public:
106  GxEngine(const string& plugin_dir, ParameterGroups& groups, const gx_system::CmdlineOptions& options);
107  ~GxEngine();
108  void ladspaloader_update_plugins();
109  sigc::signal<void,Plugin*,PluginChange::pc>& signal_plugin_changed() { return plugin_changed; }
110 };
111 
112 /* ------------------------------------------------------------------- */
113 } /* end of gx_engine namespace */
114 #endif // SRC_HEADERS_GX_ENGINE_H_
115 
CabinetConvolver cabinet
Definition: gx_engine.h:94
LadspaLoader ladspaloader
Definition: gx_engine.h:73
OscilloscopeAdapter oscilloscope
Definition: gx_engine.h:91
TunerAdapter tuner
Definition: gx_engine.h:87
int(* uiloader)(const UiBuilder &builder, int format)
Definition: gx_plugin.h:170
ModuleSelectorFromList ampstack
Definition: gx_engine.h:81
const char * name
Definition: gx_plugin.h:200
MaxLevel maxlevel
Definition: gx_engine.h:90
ModuleSelectorFromList crybaby
Definition: gx_engine.h:78
Directout directout
Definition: gx_engine.h:89
const char ** groups
Definition: gx_plugin.h:201
ModuleSelectorFromList tonestack
Definition: gx_engine.h:80
gx_resample::BufferResampler resamp
Definition: gx_engine.h:71
const char * category
Definition: gx_plugin.h:204
sigc::signal< void, Plugin *, PluginChange::pc > & signal_plugin_changed()
Definition: gx_engine.h:109
smbPitchShift detune
Definition: gx_engine.h:103
ConvolverStereoAdapter stereo_convolver
Definition: gx_engine.h:93
PreampConvolver preamp
Definition: gx_engine.h:96
Parameter registration function pointers.
Definition: gx_plugin.h:141
ContrastConvolver contrast
Definition: gx_engine.h:98
ConvolverMonoAdapter mono_convolver
Definition: gx_engine.h:92
int flags
Definition: gx_plugin.h:197
PluginDef *(* plugindef_creator)()
MidiControllerList controller_map
Definition: gx_engine.h:76
static int static_register(const ParamReg &reg)
sigc::signal< void, Plugin *, PluginChange::pc > plugin_changed
Definition: gx_engine.h:72
DrumSequencer dseq
Definition: gx_engine.h:102
ModuleSelectorFromList wah
Definition: gx_engine.h:79
MonoMute monomute
Definition: gx_engine.h:85
PreampStereoConvolver preamp_st
Definition: gx_engine.h:97
LiveLooper loop
Definition: gx_engine.h:99
NoiseGate noisegate
Definition: gx_engine.h:84
PluginChange(Plugin *pl_, pc status_)
Definition: gx_engine.h:66
ModuleSelectorFromList(EngineControl &seq, const char *id, const char *name, const char *category, plugindef_creator module_ids[], const char *select_id, const char *select_name, uiloader loader, const char **groups=0, int flags=0)
CabinetStereoConvolver cabinet_st
Definition: gx_engine.h:95
SCapture record_st
Definition: gx_engine.h:101
StereoMute stereomute
Definition: gx_engine.h:86
ModuleSelectorFromList poweramps
Definition: gx_engine.h:82
int register_parameter(const ParamReg &reg)