4 * Copyright (C) 2008-2019 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
27 #include "pluginaclient.h"
35 #define TOTAL_WAVEFORMS 5
43 int equivalent(TremoloConfig &that);
44 void copy_from(TremoloConfig &that);
45 void interpolate(TremoloConfig &prev,
49 int64_t current_frame);
53 // starting phase offset in ms
55 // how much the phase oscillates in ms
57 // rate of phase oscillation in Hz
65 class Tremolo : public PluginAClient
68 Tremolo(PluginServer *server);
75 // required for all realtime/multichannel plugins
76 PLUGIN_CLASS_MEMBERS(TremoloConfig);
77 int process_buffer(int64_t size,
79 int64_t start_position,
81 void reallocate_dsp(int new_dsp_allocated);
82 void reallocate_history(int new_allocation);
86 int is_multichannel();
87 void save_data(KeyFrame *keyframe);
88 void read_data(KeyFrame *keyframe);
94 int64_t last_position;
100 class TremoloWaveForm;
101 class TremoloWindow : public PluginClientWindow
104 TremoloWindow(Tremolo *plugin);
107 void create_objects();
109 static char* waveform_to_text(char *text, int waveform);
110 void param_updated();
116 TremoloWaveForm *waveform;
120 class TremoloWaveForm : public BC_PopupMenu
123 TremoloWaveForm(Tremolo *plugin, int x, int y, char *text);
126 void create_objects();
130 class TremoloWaveFormItem : public BC_MenuItem
133 TremoloWaveFormItem(Tremolo *plugin, char *text, int value);
134 ~TremoloWaveFormItem();