4 * Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 // Originally from the following:
26 LADSPA Unique ID: 1441
29 Added support for changing bands in real time 2003-12-09
32 Adapted to LADSPA by Josh Green <jgreen@users.sourceforge.net>
33 15.6.2001 (for the LinuxTag 2001!)
35 Original program can be found at:
36 http://www.sirlab.de/linux/
37 Author: Achim Settelmeier <settel-linux@sirlab.de>
48 #include "pluginaclient.h"
68 int equivalent(VocoderConfig &that);
69 void copy_from(VocoderConfig &that);
70 void interpolate(VocoderConfig &prev,
74 int64_t current_frame);
87 class VocoderWetness : public BC_FPot
90 VocoderWetness(Vocoder *plugin, int x, int y);
98 class VocoderLevel : public BC_FPot
101 VocoderLevel(Vocoder *plugin, int x, int y);
109 class VocoderCarrier : public BC_TumbleTextBox
112 VocoderCarrier(Vocoder *plugin,
113 VocoderWindow *window,
121 class VocoderBands : public BC_TumbleTextBox
124 VocoderBands(Vocoder *plugin,
125 VocoderWindow *window,
136 class VocoderWindow : public PluginClientWindow
139 VocoderWindow(Vocoder *plugin);
142 void create_objects();
145 VocoderCarrier *output;
147 VocoderWetness *wetness;
157 void copy_from(VocoderBand *src);
176 double level; /* 0.0 - 1.0 level of this output band */
179 class Vocoder : public PluginAClient
182 Vocoder(PluginServer *server);
186 int is_multichannel();
187 void read_data(KeyFrame *keyframe);
188 void save_data(KeyFrame *keyframe);
189 int process_buffer(int64_t size,
191 int64_t start_position,
198 void do_bandpasses(VocoderBand *bands, double sample);
199 VocoderBand formant_bands[MAX_BANDS];
200 VocoderBand carrier_bands[MAX_BANDS];
201 VocoderOut output_bands[MAX_BANDS];
204 int need_reconfigure;
205 PLUGIN_CLASS_MEMBERS2(VocoderConfig)