/* SpiralPlugin * Copyleft (C) 2000 David Griffiths * * 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. * * 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. */ #include "DelayPluginGUI.h" #include #include static const int GUI_COLOUR = 179; static const int GUIBG_COLOUR = 144; static const int GUIBG2_COLOUR = 145; //////////////////////////////////////////// DelayPluginGUI::DelayPluginGUI(int w, int h,DelayPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { m_Delay = new Fl_Slider(15, 20, 20, 70, "Delay"); m_Delay->type(4); m_Delay->selection_color(GUI_COLOUR); m_Delay->labelsize(10); m_Delay->maximum(1); m_Delay->step(0.001); m_Delay->value(0.5); m_Delay->callback((Fl_Callback*)cb_Delay); m_Mix = new Fl_Knob(58, 28, 45, 45, "Mix"); m_Mix->color(GUI_COLOUR); m_Mix->type(Fl_Knob::DOTLIN); m_Mix->labelsize(10); m_Mix->maximum(1); m_Mix->step(0.01); m_Mix->value(0); m_Mix->callback((Fl_Callback*)cb_Mix); end(); } void DelayPluginGUI::UpdateValues(SpiralPlugin *o) { DelayPlugin *Plugin = (DelayPlugin*)o; m_Delay->value(Plugin->GetDelay()-5.0f); m_Mix->value(Plugin->GetMix()); } inline void DelayPluginGUI::cb_Delay_i(Fl_Slider* o, void* v) { float value=1.0f-o->value(); m_GUICH->Set("Delay",value); } void DelayPluginGUI::cb_Delay(Fl_Slider* o, void* v) { ((DelayPluginGUI*)(o->parent()))->cb_Delay_i(o,v); } inline void DelayPluginGUI::cb_Mix_i(Fl_Knob* o, void* v) { m_GUICH->Set("Mix",(float)o->value()); } void DelayPluginGUI::cb_Mix(Fl_Knob* o, void* v) { ((DelayPluginGUI*)(o->parent()))->cb_Mix_i(o,v); } const string DelayPluginGUI::GetHelpText(const string &loc){ return string("") + "The delay plugins delays the input signal, and can\n" + "mix the current signal into the output, the amount\n" + "is set by the dial in the plugin window.\n" + "\n" + "The delay time and read head position can be modified\n" + "by input CV's. The read head is the place in the buffer\n" + "the output sample is taken from, relative to the write\n" + "head.\n" + "\n" + "This plugin can be used as the base of a number of effects,\n" + "such as phasers, flangers and complex echos. If the output\n" + "is fed back into the input, you get a similar effect\n" + "to the echo, but you can add cool effects by routing\n" + "the signal back through a lowpass filter (for example).\n"; }