2 terminatorX - realtime audio scratching software
3 Copyright (C) 1999-2003 Alexander König
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.
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.
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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 Description: Header to tX_vttfx.cc - see there for more info
29 #include "tX_seqpar.h"
30 #include "tX_ladspa.h"
36 /* Ids to guarantee positioning of builtin */
37 #define TX_FX_BUILTINCUTOFF 1
38 #define TX_FX_BUILTINECHO 2
39 #define TX_FX_LADSPA 3
41 #include <libxml/xmlmemory.h>
42 #include <libxml/parser.h>
44 /* abstract super class vtt_fx */
56 GtkWidget *panel_widget;
60 vtt_fx() { vtt=NULL; }
62 void set_vtt(void *v) { vtt=v;}
63 void *get_vtt() { return vtt; }
65 virtual void activate()=NULL;
66 virtual void deactivate()=NULL;
67 virtual void run()=NULL;
68 virtual int isEnabled()=NULL;
69 virtual void reconnect_buffer();
70 virtual void toggle_drywet();
71 virtual bool is_stereo();
72 virtual tX_drywet_type has_drywet_feature();
74 virtual const char *get_info_string()=NULL;
76 virtual void save(FILE *rc, gzFile rz, char *indent)=NULL;
78 GtkWidget* get_panel_widget() { return panel_widget; }
79 void set_panel_widget(GtkWidget *widget) { panel_widget=widget; }
81 void set_panel(tX_panel *p) { panel = p; }
82 tX_panel* get_panel() { return panel; }
85 /*********************************/
89 class vtt_fx_lp : public vtt_fx
92 virtual void activate();
93 virtual void deactivate();
95 virtual int isEnabled();
97 virtual void save(FILE *rc, gzFile rz, char *indent);
98 virtual const char *get_info_string();
102 class vtt_fx_ec : public vtt_fx
105 virtual void activate();
106 virtual void deactivate();
108 virtual int isEnabled();
110 virtual void save(FILE *rc, gzFile rz, char *indent);
111 virtual const char *get_info_string();
114 /********************************/
115 /* LADSPA plugin fx */
117 class vtt_fx_ladspa : public vtt_fx
120 list <tX_seqpar_vttfx *> controls;
122 tX_seqpar_vttfx *sp_enable;
123 tX_seqpar_vttfx *sp_wet;
125 int input_port, output_port;
126 LADSPA_Handle *instance;
127 LADSPA_Plugin *plugin;
130 vtt_fx_ladspa(LADSPA_Plugin *, void *);
131 virtual ~vtt_fx_ladspa();
134 virtual void activate();
135 virtual void deactivate();
137 virtual int isEnabled();
138 virtual void reconnect_buffer();
139 virtual const char *get_info_string();
140 virtual void realloc_drywet();
141 virtual void free_drywet();
142 virtual void toggle_drywet();
144 void remove_drywet();
145 virtual tX_drywet_type has_drywet_feature();
147 virtual void save(FILE *rc, gzFile rz, char *indent);
148 #ifdef ENABLE_TX_LEGACY
149 virtual void load(FILE *);
151 virtual void load(xmlDocPtr, xmlNodePtr);
154 class vtt_fx_stereo_ladspa : public vtt_fx_ladspa {
157 int input2_port, output2_port;
160 virtual void reconnect_buffer();
161 virtual void realloc_drywet();
162 virtual void free_drywet();
165 vtt_fx_stereo_ladspa(LADSPA_Stereo_Plugin *, void *);
166 virtual bool is_stereo();
168 virtual ~vtt_fx_stereo_ladspa();