* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Interpolate between current set of points and next set
for(int i = 0; i < MIN(next.points.size(), points.size()); i++)
// Interpolate between current set of points and next set
for(int i = 0; i < MIN(next.points.size(), points.size()); i++)
double magnitude_db = DB::todb(magnitude);
if(magnitude_db < -MAXMAGNITUDE) magnitude_db = -MAXMAGNITUDE;
int y = (int)(center_y - magnitude_db * center_y / MAXMAGNITUDE);
double magnitude_db = DB::todb(magnitude);
if(magnitude_db < -MAXMAGNITUDE) magnitude_db = -MAXMAGNITUDE;
int y = (int)(center_y - magnitude_db * center_y / MAXMAGNITUDE);
int index = (int64_t)freq * (int64_t)frame->window_size / 2 / niquist;
if(index < frame->window_size / 2)
{
int index = (int64_t)freq * (int64_t)frame->window_size / 2 / niquist;
if(index < frame->window_size / 2)
{
int point_y = get_cursor_y() + y_diff;
CLAMP(point_x, 0, get_w());
CLAMP(point_y, 0, get_h());
int point_y = get_cursor_y() + y_diff;
CLAMP(point_x, 0, get_w());
CLAMP(point_y, 0, get_h());
int frequency = Freq::tofreq(point_x * TOTALFREQS / get_w());
double magnitude_db = (double)(center_y - point_y) * MAXMAGNITUDE / center_y;
int minfreq = Freq::tofreq(0);
int frequency = Freq::tofreq(point_x * TOTALFREQS / get_w());
double magnitude_db = (double)(center_y - point_y) * MAXMAGNITUDE / center_y;
int minfreq = Freq::tofreq(0);
draw_rectangle(x - BOX_SIZE / 2, y1 - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE);
}
draw_rectangle(x - BOX_SIZE / 2, y1 - BOX_SIZE / 2, BOX_SIZE, BOX_SIZE);
}
// GraphicWetness::GraphicWetness(GraphicGUI *window, GraphicEQ *plugin, int x, int y)
// : BC_FPot(x, y, plugin->config.wetness, INFINITYGAIN, 0)
// {
// this->plugin = plugin;
// this->window = window;
// }
// GraphicWetness::GraphicWetness(GraphicGUI *window, GraphicEQ *plugin, int x, int y)
// : BC_FPot(x, y, plugin->config.wetness, INFINITYGAIN, 0)
// {
// this->plugin = plugin;
// this->window = window;
// }
BC_TextBox::calculate_h(this, MEDIUMFONT, 1, 1) -
BC_TextBox::calculate_h(this, MEDIUMFONT, 1, 1) -
add_subwindow(reset = new GraphicReset(plugin, this, x, y));
x += reset->get_w() + margin;
add_subwindow(reset = new GraphicReset(plugin, this, x, y));
x += reset->get_w() + margin;
// add_subwindow(title = new BC_Title(x, y, "Wetness:"));
// x += title->get_w() + margin;
// add_subwindow(title = new BC_Title(x, y, "Wetness:"));
// x += title->get_w() + margin;
int difference = h - get_h();
int canvas_xdiff = get_w() - canvas->get_w();
int canvas_ydiff = get_h() - canvas->get_h();
int difference = h - get_h();
int canvas_xdiff = get_w() - canvas->get_w();
int canvas_ydiff = get_h() - canvas->get_h();
int y2 = canvas->get_y() + canvas->get_h() + LINE_W2 - 1;
int y3 = canvas->get_y() + canvas->get_h() + LINE_W3 - 1;
int y4 = canvas->get_y() + canvas->get_h() + get_text_height(SMALLFONT) + LINE_W4 - 1;
int y2 = canvas->get_y() + canvas->get_h() + LINE_W2 - 1;
int y3 = canvas->get_y() + canvas->get_h() + LINE_W3 - 1;
int y4 = canvas->get_y() + canvas->get_h() + get_text_height(SMALLFONT) + LINE_W4 - 1;
set_color(BLACK);
draw_text(x2 + 1, y4 + 1, string);
draw_line(x1 + 1, y3 + 1, x1 + 1, y1 + 1);
set_color(BLACK);
draw_text(x2 + 1, y4 + 1, string);
draw_line(x1 + 1, y3 + 1, x1 + 1, y1 + 1);
set_color(RED);
draw_text(x2, y4, string);
draw_line(x1, y3, x1, y1);
set_color(RED);
draw_text(x2, y4, string);
draw_line(x1, y3, x1, y1);
((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT)
{
((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT)
{
((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
fft->process_buffer(start_position, size, buffer, get_direction());
fft->process_buffer(start_position, size, buffer, get_direction());
if(point2->freq != point1->freq)
{
int freqslot1 = Freq::fromfreq(point1->freq);
int freqslot2 = Freq::fromfreq(point2->freq);
int freqslot = Freq::fromfreq(freq);
if(point2->freq != point1->freq)
{
int freqslot1 = Freq::fromfreq(point1->freq);
int freqslot2 = Freq::fromfreq(point2->freq);
int freqslot = Freq::fromfreq(freq);