diff --git a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C index 99a0ae9..1234a1f 100644 --- a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C +++ b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// AmpPluginGUI::AmpPluginGUI(int w, int h,AmpPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -33,7 +29,7 @@ SpiralPluginGUI(w,h,o,ch) m_Amp = new Fl_Slider(15, 20, 20, 70, "Amp"); m_Amp->type(4); - m_Amp->selection_color(GUI_COLOUR); + m_Amp->selection_color(Info->GUI_COLOUR); m_Amp->labelsize(10); m_Amp->maximum(4); m_Amp->step(0.0001); @@ -42,7 +38,7 @@ SpiralPluginGUI(w,h,o,ch) m_DC = new Fl_Slider(70, 20, 20, 70, "DC Offset"); m_DC->type(4); - m_DC->selection_color(GUI_COLOUR); + m_DC->selection_color(Info->GUI_COLOUR); m_DC->labelsize(10); m_DC->maximum(4); m_DC->step(0.0001); @@ -142,4 +138,4 @@ const string AmpPluginGUI::GetHelpText(const string &loc){ + "the signal's DC offset (the up or down in the range of values).\n\n" + "Handy for fine tuning CV's by hand, or modulating complex\n" + "controls."; -} \ No newline at end of file +} diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C index 6c6a43a..027c59d 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C +++ b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C @@ -14,37 +14,35 @@ * 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 "AnotherFilterPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// AnotherFilterPluginGUI::AnotherFilterPluginGUI(int w, int h,AnotherFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { Cutoff = new Fl_Slider(15, 20, 20, 70, "Cutoff"); - Cutoff->type(4); - Cutoff->selection_color(GUI_COLOUR); - Cutoff->labelsize(10); + Cutoff->type (FL_VERT_NICE_SLIDER); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->box (FL_PLASTIC_DOWN_BOX); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->labelsize(10); Cutoff->maximum(1); - Cutoff->step(0.0001); - Cutoff->value(1); - Cutoff->callback((Fl_Callback*)cb_Cutoff); + Cutoff->step(0.0001); + Cutoff->value(1); + Cutoff->callback((Fl_Callback*)cb_Cutoff); Resonance = new Fl_Knob(58, 18, 45, 45, "Emphasis"); - Resonance->color(GUI_COLOUR); + Resonance->color(Info->GUI_COLOUR); Resonance->type(Fl_Knob::DOTLIN); - Resonance->labelsize(10); - Resonance->maximum(1); - Resonance->step(0.00001); - Resonance->value(0); + Resonance->labelsize(10); + Resonance->maximum(1); + Resonance->step(0.00001); + Resonance->value(0); Resonance->callback((Fl_Callback*)cb_Resonance); end(); diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in b/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in index 59c0075..b6d9dd6 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building AnotherFilterPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: AnotherFilterPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/BeatMatchPlugin/BeatMatchPluginGUI.C b/SpiralSound/Plugins/BeatMatchPlugin/BeatMatchPluginGUI.C index 553404a..349b899 100644 --- a/SpiralSound/Plugins/BeatMatchPlugin/BeatMatchPluginGUI.C +++ b/SpiralSound/Plugins/BeatMatchPlugin/BeatMatchPluginGUI.C @@ -20,17 +20,13 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// BeatMatchPluginGUI::BeatMatchPluginGUI(int w, int h,BeatMatchPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { m_Sense = new Fl_Knob(20, 15, 50, 50, "Sensitivity"); - m_Sense->color(GUI_COLOUR); + m_Sense->color(Info->GUI_COLOUR); m_Sense->labelsize(8); m_Sense->callback((Fl_Callback*)cb_Sense); diff --git a/SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C b/SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C index e7afc71..07a7aaa 100644 --- a/SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C +++ b/SpiralSound/Plugins/ComplexEnvelopePlugin/ComplexEnvelopePluginGUI.C @@ -21,9 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; static const float TIMED_SLIDER_MAX = 3.0f; ///////////////////////////////////////////////////////////////////////// @@ -319,7 +316,7 @@ SpiralPluginGUI(w,h,o) m_Type->callback((Fl_Callback*)cb_Type); m_Length = new Fl_Knob(w-60,h-55,40,40,"Length"); - m_Length->color(GUI_COLOUR); + m_Length->color(Info->GUI_COLOUR); m_Length->labelsize(10); m_Length->maximum(5); m_Length->step(0.001); diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C index 1335cf3..894fa34 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C @@ -21,16 +21,12 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// -ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p) +ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p, Fl_Color SelColour) { m_SliderGroup = new Fl_Group(0,0,60,153,""); - m_SliderGroup->box(FL_UP_BOX); + //m_SliderGroup->box (FL_PLASTIC_UP_BOX); m_SliderGroup->user_data((void *)p); m_Title = new Fl_Input(5,2,50,15,""); @@ -50,8 +46,9 @@ ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p) m_SliderGroup->add(m_Max); m_Chan = new Fl_Slider(20, 34, 20, 100, ""); - m_Chan->type(4); - m_Chan->selection_color(GUI_COLOUR); + m_Chan->type (FL_VERT_NICE_SLIDER); + m_Chan->box (FL_PLASTIC_DOWN_BOX); + m_Chan->selection_color (SelColour); m_Chan->maximum(1); m_Chan->step(0.01); m_Chan->value(0.5); @@ -80,6 +77,7 @@ m_CVCount(0) Numbers[n]=n; } + m_GUIColour = (Fl_Color)Info->GUI_COLOUR; m_MainPack = new Fl_Pack(0,20,w,h-44); m_MainPack->type(FL_HORIZONTAL); add (m_MainPack); @@ -91,19 +89,24 @@ m_CVCount(0) AddCV(); m_Buttons = new Fl_Pack (0, h-22, 45, 20); - m_Buttons->type(FL_HORIZONTAL); + m_Buttons->type (FL_HORIZONTAL); add (m_Buttons); - m_Delete = new Fl_Button(2,0,20,20,"-"); - m_Delete->callback((Fl_Callback*)cb_Delete); - m_Buttons->add(m_Delete); - m_Add = new Fl_Button(24,0,20,20,"+"); - m_Add->callback((Fl_Callback*)cb_Add); - m_Buttons->add(m_Add); + m_Delete = new Fl_Button(2, 0, 20, 20, "-"); + m_Delete->box (FL_PLASTIC_UP_BOX); + m_Delete->color (m_GUIColour); + m_Delete->callback ((Fl_Callback*)cb_Delete); + m_Buttons->add (m_Delete); + m_Add = new Fl_Button (24, 0, 20, 20, "+"); + m_Add->box (FL_PLASTIC_UP_BOX); + m_Add->color (m_GUIColour); + m_Add->callback ((Fl_Callback*)cb_Add); + m_Buttons->add (m_Add); + } void ControllerPluginGUI::AddCV() { - CVGUI *NewCV = new CVGUI(m_CVCount,this); + CVGUI *NewCV = new CVGUI (m_CVCount, this, m_GUIColour); m_GUIVec.push_back(NewCV); m_MainPack->add(NewCV->m_SliderGroup); m_CVCount++; diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h index 5eb064c..da7f57c 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h @@ -49,11 +49,12 @@ protected: private: void Clear(); + Fl_Color m_GUIColour; class CVGUI { public: - CVGUI::CVGUI(int n, ControllerPluginGUI *p); + CVGUI::CVGUI(int n, ControllerPluginGUI *p, Fl_Color SelColour); Fl_Group *m_SliderGroup; Fl_Input *m_Title; diff --git a/SpiralSound/Plugins/ControllerPlugin/Makefile.in b/SpiralSound/Plugins/ControllerPlugin/Makefile.in index 838db75..a207f48 100644 --- a/SpiralSound/Plugins/ControllerPlugin/Makefile.in +++ b/SpiralSound/Plugins/ControllerPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building ControllerPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: ControllerPlugin -# Template: app ############################################################################# ####### Compiler, tools and options @@ -13,10 +10,10 @@ CFLAGS = @CFLAGS@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl MOC = moc -UIC = +UIC = TAR = tar -cf GZIP = gzip -9f @@ -44,7 +41,6 @@ mandir = @mandir@ HEADERS = ../SpiralPlugin.h \ ../SpiralPluginGUI.h \ ../../ChannelHandler.h \ - ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ ../../Sample.h \ ControllerPlugin.h \ @@ -52,7 +48,6 @@ HEADERS = ../SpiralPlugin.h \ SOURCES = ../SpiralPlugin.C \ ../SpiralPluginGUI.C \ ../../ChannelHandler.C \ - ../Widgets/Fl_Knob.cxx \ ../Widgets/Fl_DragBar.cxx \ ../../Sample.C \ ControllerPlugin.C \ @@ -60,14 +55,13 @@ SOURCES = ../SpiralPlugin.C \ OBJECTS = ../SpiralPlugin.o \ ../SpiralPluginGUI.o \ ../../ChannelHandler.o \ - ../Widgets/Fl_Knob.o \ ../Widgets/Fl_DragBar.o \ ../../Sample.o \ ControllerPlugin.o \ ControllerPluginGUI.o -INTERFACES = -UICDECLS = -UICIMPLS = +INTERFACES = +UICDECLS = +UICIMPLS = SRCMOC = OBJMOC = DIST = @@ -134,9 +128,6 @@ install: ../SpiralPlugin.h \ ../../Sample.h -../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \ - ../Widgets/Fl_Knob.H - ../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \ ../Widgets/Fl_DragBar.H diff --git a/SpiralSound/Plugins/CounterPlugin/CounterPluginGUI.C b/SpiralSound/Plugins/CounterPlugin/CounterPluginGUI.C index 4671984..86c629a 100644 --- a/SpiralSound/Plugins/CounterPlugin/CounterPluginGUI.C +++ b/SpiralSound/Plugins/CounterPlugin/CounterPluginGUI.C @@ -21,17 +21,13 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// CounterPluginGUI::CounterPluginGUI(int w, int h,CounterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { m_Count = new Fl_Input(5, 20, 50, 20, "Count"); - m_Count->color(GUI_COLOUR); + m_Count->color(Info->GUI_COLOUR); m_Count->labelsize(8); m_Count->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); m_Count->textsize(10); diff --git a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C index 4365ca3..dd7d72b 100644 --- a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C +++ b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C @@ -20,10 +20,6 @@ #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) : @@ -31,7 +27,7 @@ SpiralPluginGUI (w, h, o, ch) { m_TheTabs = new Fl_Tabs (2, 14, 118, 90, ""); m_TheTabs->box (FL_PLASTIC_DOWN_BOX); - m_TheTabs->color (GUI_COLOUR); + m_TheTabs->color (Info->GUI_COLOUR); add (m_TheTabs); m_CtlGroup = new Fl_Group (2, 28, 118, 66, "Control"); @@ -40,7 +36,7 @@ SpiralPluginGUI (w, h, o, ch) m_Delay = new Fl_Knob (12, 38, 45, 45, "Delay"); m_Delay->user_data ((void*)(this)); - m_Delay->color (GUI_COLOUR); + m_Delay->color (Info->GUI_COLOUR); m_Delay->type (Fl_Knob::DOTLIN); m_Delay->labelsize (10); m_Delay->minimum (0); @@ -52,7 +48,7 @@ SpiralPluginGUI (w, h, o, ch) m_Mix = new Fl_Knob (66, 38, 45, 45, "Mix"); m_Mix->user_data ((void*)(this)); - m_Mix->color (GUI_COLOUR); + m_Mix->color (Info->GUI_COLOUR); m_Mix->type (Fl_Knob::DOTLIN); m_Mix->labelsize (10); m_Mix->maximum (1); @@ -69,7 +65,7 @@ SpiralPluginGUI (w, h, o, ch) m_NumDelay->user_data ((void*)(this)); m_NumDelay->labelsize (10); m_NumDelay->box (FL_PLASTIC_UP_BOX); - m_NumDelay->color (GUI_COLOUR); + m_NumDelay->color (Info->GUI_COLOUR); m_NumDelay->maximum (m_Delay->maximum()); m_NumDelay->minimum (m_Delay->minimum()); m_NumDelay->step (m_Delay->step()); @@ -82,7 +78,7 @@ SpiralPluginGUI (w, h, o, ch) m_NumMix->user_data ((void*)(this)); m_NumMix->labelsize (10); m_NumMix->box (FL_PLASTIC_UP_BOX); - m_NumMix->color (GUI_COLOUR); + m_NumMix->color (Info->GUI_COLOUR); m_NumMix->maximum (m_Mix->maximum()); m_NumMix->minimum (m_Mix->minimum()); m_NumMix->step (m_Mix->step()); diff --git a/SpiralSound/Plugins/DelayPlugin/Makefile.in b/SpiralSound/Plugins/DelayPlugin/Makefile.in index 8a22a88..d9700af 100644 --- a/SpiralSound/Plugins/DelayPlugin/Makefile.in +++ b/SpiralSound/Plugins/DelayPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building DelayPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: DelayPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C b/SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C index 88eb8fb..54cff4b 100644 --- a/SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C +++ b/SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - DiskWriterPluginGUI::DiskWriterPluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { diff --git a/SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C b/SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C index 3da80e1..5ab62c6 100644 --- a/SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C +++ b/SpiralSound/Plugins/DistributorPlugin/DistributorPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 154; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// DistributorPluginGUI::DistributorPluginGUI(int w, int h,DistributorPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h index 71a8cc4..05af6de 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h +++ b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h @@ -40,7 +40,6 @@ class EchoPlugin : public SpiralPlugin float m_Delay, m_Feedback; bool m_Bounce; int m_HeadPos, m_Buf0, m_Buf1; - //Sample m_Buffer1, m_Buffer2; Sample m_Buffer[2]; friend istream &operator>>(istream &s, EchoPlugin &o); friend ostream &operator<<(ostream &s, EchoPlugin &o); diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C index df48fdb..540da8f 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C +++ b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// EchoPluginGUI::EchoPluginGUI(int w, int h, EchoPlugin *o, ChannelHandler *ch, const HostInfo *Info) : @@ -31,7 +27,7 @@ SpiralPluginGUI (w, h, o, ch) { m_TheTabs = new Fl_Tabs (2, 14, 118, 90, ""); m_TheTabs->box (FL_PLASTIC_DOWN_BOX); - m_TheTabs->color (GUI_COLOUR); + m_TheTabs->color (Info->GUI_COLOUR); add (m_TheTabs); m_CtlGroup = new Fl_Group (2, 28, 118, 66, "Control"); @@ -40,7 +36,7 @@ SpiralPluginGUI (w, h, o, ch) m_Delay = new Fl_Knob (12, 38, 45, 45, "Delay"); m_Delay->user_data ((void*)(this)); - m_Delay->color (GUI_COLOUR); + m_Delay->color (Info->GUI_COLOUR); m_Delay->type (Fl_Knob::DOTLIN); m_Delay->labelsize (10); m_Delay->minimum (0); @@ -52,7 +48,7 @@ SpiralPluginGUI (w, h, o, ch) m_Feedback = new Fl_Knob (66, 38, 45, 45, "Feedback"); m_Feedback->user_data ((void*)(this)); - m_Feedback->color (GUI_COLOUR); + m_Feedback->color (Info->GUI_COLOUR); m_Feedback->type (Fl_Knob::DOTLIN); m_Feedback->labelsize (10); m_Feedback->maximum (1.1); @@ -69,7 +65,7 @@ SpiralPluginGUI (w, h, o, ch) m_NumDelay->user_data ((void*)(this)); m_NumDelay->labelsize (10); m_NumDelay->box (FL_PLASTIC_UP_BOX); - m_NumDelay->color (GUI_COLOUR); + m_NumDelay->color (Info->GUI_COLOUR); m_NumDelay->maximum (m_Delay->maximum()); m_NumDelay->minimum (m_Delay->minimum()); m_NumDelay->step (m_Delay->step()); @@ -82,7 +78,7 @@ SpiralPluginGUI (w, h, o, ch) m_NumFeedback->user_data ((void*)(this)); m_NumFeedback->labelsize (10); m_NumFeedback->box (FL_PLASTIC_UP_BOX); - m_NumFeedback->color (GUI_COLOUR); + m_NumFeedback->color (Info->GUI_COLOUR); m_NumFeedback->maximum (m_Feedback->maximum()); m_NumFeedback->minimum (m_Feedback->minimum()); m_NumFeedback->step (m_Feedback->step()); diff --git a/SpiralSound/Plugins/EchoPlugin/Makefile.in b/SpiralSound/Plugins/EchoPlugin/Makefile.in index 7af8297..e2ccf5e 100644 --- a/SpiralSound/Plugins/EchoPlugin/Makefile.in +++ b/SpiralSound/Plugins/EchoPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building EchoPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: EchoPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C index ad06365..bb710f9 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C @@ -50,13 +50,13 @@ m_Decay(0.5), m_Value(0) { m_PluginInfo.Name="EnvFollower"; - m_PluginInfo.Width=140; - m_PluginInfo.Height=100; + m_PluginInfo.Width=120; + m_PluginInfo.Height=80; m_PluginInfo.NumInputs=1; m_PluginInfo.NumOutputs=1; - m_PluginInfo.PortTips.push_back("Input"); + m_PluginInfo.PortTips.push_back("Input"); m_PluginInfo.PortTips.push_back("Output"); - + m_AudioCH->Register("Attack",&m_Attack); m_AudioCH->Register("Decay",&m_Decay); } @@ -66,7 +66,7 @@ EnvFollowerPlugin::~EnvFollowerPlugin() } PluginInfo &EnvFollowerPlugin::Initialise(const HostInfo *Host) -{ +{ return SpiralPlugin::Initialise(Host); } diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C index 5a28548..985fdf3 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C @@ -14,41 +14,37 @@ * 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 "EnvFollowerPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// EnvFollowerPluginGUI::EnvFollowerPluginGUI(int w, int h,EnvFollowerPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ - m_Attack = new Fl_Knob(20, 25, 40, 40, "Attack"); - m_Attack->color(GUI_COLOUR); +{ + m_Attack = new Fl_Knob (8, 18, 40, 40, "Attack"); + m_Attack->color(Info->GUI_COLOUR); m_Attack->type(Fl_Knob::DOTLIN); m_Attack->labelsize(10); m_Attack->maximum(1); m_Attack->step(0.001); - m_Attack->value(0.5); + m_Attack->value(0.5); m_Attack->callback((Fl_Callback*)cb_Attack); add(m_Attack); - - m_Decay = new Fl_Knob(75, 25, 40, 40, "Decay"); - m_Decay->color(GUI_COLOUR); + + m_Decay = new Fl_Knob (64, 18, 40, 40, "Decay"); + m_Decay->color(Info->GUI_COLOUR); m_Decay->type(Fl_Knob::DOTLIN); m_Decay->labelsize(10); m_Decay->maximum(1); m_Decay->step(0.001); - m_Decay->value(0.5); + m_Decay->value(0.5); m_Decay->callback((Fl_Callback*)cb_Decay); add(m_Decay); - + end(); } diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in b/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in index 9467b42..e98f4dd 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in +++ b/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building EnvFollowerPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: EnvFollowerPlugin -# Template: app ############################################################################# ####### Compiler, tools and options @@ -154,7 +151,6 @@ EnvFollowerPlugin.o: EnvFollowerPlugin.C \ ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H \ SpiralIcon.xpm EnvFollowerPluginGUI.o: EnvFollowerPluginGUI.C \ @@ -166,8 +162,7 @@ EnvFollowerPluginGUI.o: EnvFollowerPluginGUI.C \ ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ - ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H + ../SpiralPluginGUI.h ../../ChannelHandler.o: ../../ChannelHandler.C \ ../../ChannelHandler.h diff --git a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C index 656813c..45e7eb9 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C +++ b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C @@ -20,9 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; static const float TIMED_SLIDER_MAX = 3.0f; //////////////////////////////////////////// @@ -32,7 +29,7 @@ SpiralPluginGUI(w,h,o,ch) { Thresh = new Fl_Slider(10, 20, 20, 70, "T"); Thresh->type(4); - Thresh->selection_color(GUI_COLOUR); + Thresh->selection_color(Info->GUI_COLOUR); Thresh->labelsize(10); Thresh->maximum(1.0); Thresh->step(0.01); @@ -42,7 +39,7 @@ SpiralPluginGUI(w,h,o,ch) Attack = new Fl_Slider(30, 20, 20, 70, "A"); Attack->type(4); - Attack->selection_color(GUI_COLOUR); + Attack->selection_color(Info->GUI_COLOUR); Attack->labelsize(10); Attack->maximum(TIMED_SLIDER_MAX); Attack->step(0.01); @@ -52,7 +49,7 @@ SpiralPluginGUI(w,h,o,ch) Decay = new Fl_Slider(50, 20, 20, 70, "D"); Decay->type(4); - Decay->selection_color(GUI_COLOUR); + Decay->selection_color(Info->GUI_COLOUR); Decay->labelsize(10); Decay->maximum(TIMED_SLIDER_MAX); Decay->step(0.01); @@ -62,7 +59,7 @@ SpiralPluginGUI(w,h,o,ch) Sustain = new Fl_Slider(70, 20, 20, 70, "S"); Sustain->type(4); - Sustain->selection_color(GUI_COLOUR); + Sustain->selection_color(Info->GUI_COLOUR); Sustain->labelsize(10); Sustain->maximum(1); Sustain->step(0.01); @@ -72,7 +69,7 @@ SpiralPluginGUI(w,h,o,ch) Release = new Fl_Slider(90, 20, 20, 70, "R"); Release->type(4); - Release->selection_color(GUI_COLOUR); + Release->selection_color(Info->GUI_COLOUR); Release->labelsize(10); Release->maximum(TIMED_SLIDER_MAX); Release->step(0.01); @@ -82,7 +79,7 @@ SpiralPluginGUI(w,h,o,ch) Volume = new Fl_Slider(110, 20, 20, 70, "V"); Volume->type(4); - Volume->selection_color(GUI_COLOUR); + Volume->selection_color(Info->GUI_COLOUR); Volume->labelsize(10); Volume->maximum(1); Volume->step(0.01); diff --git a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C index 2030648..c5122b3 100644 --- a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C +++ b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C @@ -14,58 +14,60 @@ * 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 "FilterPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// FilterPluginGUI::FilterPluginGUI(int w, int h,FilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ +{ Cutoff = new Fl_Slider(15, 20, 20, 70, "Cutoff"); - Cutoff->type(4); - Cutoff->selection_color(GUI_COLOUR); - Cutoff->labelsize(10); + Cutoff->type (FL_VERT_NICE_SLIDER); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->box (FL_PLASTIC_DOWN_BOX); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->labelsize(10); Cutoff->maximum(100); - Cutoff->step(0.01); - Cutoff->value(10); - Cutoff->callback((Fl_Callback*)cb_Cutoff); - - Resonance = new Fl_Knob(58, 28, 45, 45, "Emphasis"); - Resonance->color(GUI_COLOUR); + Cutoff->step(0.01); + Cutoff->value(10); + Cutoff->callback((Fl_Callback*)cb_Cutoff); + + Resonance = new Fl_Knob(58, 18, 45, 45, ""); + Resonance->color(Info->GUI_COLOUR); Resonance->type(Fl_Knob::DOTLIN); Resonance->labelsize(10); Resonance->maximum(10); Resonance->step(0.1); - Resonance->value(0); + Resonance->value(0); Resonance->callback((Fl_Callback*)cb_Resonance); - RevCutoff = new Fl_Button(57, 72, 50, 15, "RvCMod"); - RevCutoff->type(1); - RevCutoff->down_box(FL_DOWN_BOX); - RevCutoff->labelsize(10); - RevCutoff->callback((Fl_Callback*)cb_RevCutoff); - - RevResonance = new Fl_Button(57, 88, 50, 15, "RvRMod"); - RevResonance->type(1); - RevResonance->down_box(FL_DOWN_BOX); - RevResonance->labelsize(10); - RevResonance->callback((Fl_Callback*)cb_RevResonance); - + RevCutoff = new Fl_Button(57, 68, 50, 15, "RvCMod"); + RevCutoff->type (FL_TOGGLE_BUTTON); + RevCutoff->box (FL_PLASTIC_UP_BOX); + RevCutoff->color (Info->GUI_COLOUR); + RevCutoff->selection_color (Info->GUI_COLOUR); + RevCutoff->labelsize(10); + RevCutoff->callback((Fl_Callback*)cb_RevCutoff); + + RevResonance = new Fl_Button(57, 86, 50, 15, "RvRMod"); + RevResonance->type (FL_TOGGLE_BUTTON); + RevResonance->box (FL_PLASTIC_UP_BOX); + RevResonance->color (Info->GUI_COLOUR); + RevResonance->selection_color (Info->GUI_COLOUR); + RevResonance->labelsize(10); + RevResonance->callback((Fl_Callback*)cb_RevResonance); + end(); } void FilterPluginGUI::UpdateValues(SpiralPlugin *o) { FilterPlugin *Plugin = (FilterPlugin*)o; - + Cutoff->value(100.0f-sqrt(Plugin->GetCutoff()-10.0f)); Resonance->value(Plugin->GetResonance()-1.0f); diff --git a/SpiralSound/Plugins/FilterPlugin/Makefile.in b/SpiralSound/Plugins/FilterPlugin/Makefile.in index 7bc5e0d..b17fb60 100644 --- a/SpiralSound/Plugins/FilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/FilterPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building FilterPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: FilterPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C index 8e84eae..0e39683 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C +++ b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C @@ -20,17 +20,13 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// FlipflopPluginGUI::FlipflopPluginGUI(int w, int h,FlipflopPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { m_TriggerTime = new Fl_Knob(15, 15, 40, 40, "Trigger Time"); - m_TriggerTime->color(GUI_COLOUR); + m_TriggerTime->color(Info->GUI_COLOUR); m_TriggerTime->labelsize(8); m_TriggerTime->maximum(1.0f); m_TriggerTime->minimum(0.0f); diff --git a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C index 0f6820e..07e1750 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C +++ b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C @@ -14,45 +14,42 @@ * 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 "FormantFilterPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// FormantFilterPluginGUI::FormantFilterPluginGUI(int w, int h,FormantFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ +{ Selection = new Fl_Knob(20, 18, 45, 45, "Vowel"); - Selection->color(GUI_COLOUR); + Selection->color(Info->GUI_COLOUR); Selection->type(Fl_Knob::DOTLIN); - Selection->labelsize(10); - Selection->maximum(4); - Selection->step(0.0001); - Selection->value(0); + Selection->labelsize(10); + Selection->maximum(4); + Selection->step(0.0001); + Selection->value(0); Selection->callback((Fl_Callback*)cb_Selection); - + Display = new Fl_Output(30,80,30,20,""); - Display->color(GUI_COLOUR); + Display->box (FL_PLASTIC_UP_BOX); + Display->value ("A"); Display->set_output(); - - end(); + + end(); } void FormantFilterPluginGUI::UpdateValues(SpiralPlugin *o) { FormantFilterPlugin *Plugin = (FormantFilterPlugin*)o; - + Selection->value(Plugin->GetVowel()); - + float v=Plugin->GetVowel(); - + if (v<1) Display->value("A"); if (v>1 && v<2) Display->value("E"); if (v>2 && v<3) Display->value("I"); @@ -60,9 +57,9 @@ void FormantFilterPluginGUI::UpdateValues(SpiralPlugin *o) if (v==4) Display->value("U"); } -inline void FormantFilterPluginGUI::cb_Selection_i(Fl_Knob* o, void* v) -{ - m_GUICH->Set("Vowel",(float)o->value()); +inline void FormantFilterPluginGUI::cb_Selection_i(Fl_Knob* o, void* v) +{ + m_GUICH->Set("Vowel",(float)o->value()); float vf=o->value(); if (vf<1) Display->value("A"); @@ -71,7 +68,7 @@ inline void FormantFilterPluginGUI::cb_Selection_i(Fl_Knob* o, void* v) if (vf>3 && vf<4) Display->value("O"); if (vf==4) Display->value("U"); } -void FormantFilterPluginGUI::cb_Selection(Fl_Knob* o, void* v) +void FormantFilterPluginGUI::cb_Selection(Fl_Knob* o, void* v) { ((FormantFilterPluginGUI*)(o->parent()))->cb_Selection_i(o,v); } diff --git a/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in b/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in index d552365..7d42ab2 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building FormantFilterPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: FormantFilterPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C b/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C index cdbdc67..3ff83bb 100644 --- a/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C +++ b/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C @@ -22,10 +22,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - static int Numbers[255]; //////////////////////////////////////////////////////////////////////// diff --git a/SpiralSound/Plugins/JoystickPlugin/JoystickPluginGUI.C b/SpiralSound/Plugins/JoystickPlugin/JoystickPluginGUI.C index f0b56d4..463ece8 100644 --- a/SpiralSound/Plugins/JoystickPlugin/JoystickPluginGUI.C +++ b/SpiralSound/Plugins/JoystickPlugin/JoystickPluginGUI.C @@ -19,10 +19,6 @@ #include "JoystickPluginGUI.h" #include -static const int GUI_COLOUR = 154; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - JoystickPluginGUI::JoystickPluginGUI(int w, int h,JoystickPlugin *o,const HostInfo *Info) : SpiralPluginGUI(w,h,o) { diff --git a/SpiralSound/Plugins/KeyboardPlugin/KeyboardPluginGUI.C b/SpiralSound/Plugins/KeyboardPlugin/KeyboardPluginGUI.C index 5e0765e..5b30ee6 100644 --- a/SpiralSound/Plugins/KeyboardPlugin/KeyboardPluginGUI.C +++ b/SpiralSound/Plugins/KeyboardPlugin/KeyboardPluginGUI.C @@ -23,10 +23,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - static int NKEYS = 30; static char KEYMAP[30]={'z','s','x','d','c','v','g','b','h','n','j','m','q', '2','w','3','e','r','5','t','6','y','7','u','i','9', diff --git a/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.C b/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.C index 8faf4cb..e2bb1b3 100644 --- a/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.C +++ b/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.C @@ -30,10 +30,6 @@ #include "LADSPAPluginGUI.h" #include "LADSPAInfo.h" -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - LADSPAPluginGUI::LADSPAPluginGUI(int w, int h, LADSPAPlugin *o, ChannelHandler *ch, @@ -41,7 +37,8 @@ LADSPAPluginGUI::LADSPAPluginGUI(int w, int h, const vector &PVec) : SpiralPluginGUI(w,h,o,ch) { - m_PluginList = PVec; + m_GUIColour = (Fl_Color)Info->GUI_COLOUR; + m_PluginList = PVec; int Width=20; int Height=100; @@ -63,13 +60,13 @@ SpiralPluginGUI(w,h,o,ch) // Set up widgets m_NameLabel = new Fl_Box(10,20,480,15,"None"); m_NameLabel->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - m_NameLabel->labelcolor(GUI_COLOUR); + m_NameLabel->labelcolor(Info->GUI_COLOUR); m_NameLabel->labelsize(12); add(m_NameLabel); m_MakerLabel = new Fl_Box(10,40,480,15,"None"); m_MakerLabel->align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - m_MakerLabel->labelcolor(GUI_COLOUR); + m_MakerLabel->labelcolor(Info->GUI_COLOUR); m_MakerLabel->labelsize(12); add(m_MakerLabel); @@ -467,7 +464,7 @@ void LADSPAPluginGUI::AddPortInfo(const char *Info) Fl_Knob* NewKnob = new Fl_Knob(0,0,40,40,""); NewKnob->label(m_PortDefaultAdjustLabels[m_PortDefaultAdjustLabels.size() - 1]); NewKnob->labelsize(10); - NewKnob->color(GUI_COLOUR); + NewKnob->color(m_GUIColour); NewKnob->maximum(1.0f); NewKnob->step(0.001f); NewKnob->callback((Fl_Callback *)cb_DefaultAdjust); diff --git a/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.h b/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.h index 3a68569..e9b02f7 100644 --- a/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.h +++ b/SpiralSound/Plugins/LADSPAPlugin/LADSPAPluginGUI.h @@ -72,7 +72,8 @@ private: void ClearPlugin(void); void SelectPlugin(void); - Fl_Box *m_NameLabel; + Fl_Color m_GUIColour; + Fl_Box *m_NameLabel; Fl_Box *m_MakerLabel; Fl_Tabs *m_Tab; Fl_Group *m_ControlGroup; @@ -119,7 +120,7 @@ private: PortValues *m_InputPortValues; float *m_InputPortDefaults; - inline void cb_TabChange_i(Fl_Tabs *o); + inline void cb_TabChange_i(Fl_Tabs *o); static void cb_TabChange(Fl_Tabs *o); inline void cb_Select_i(Fl_Choice* o); static void cb_Select(Fl_Choice* o); diff --git a/SpiralSound/Plugins/LADSPAPlugin/Makefile.in b/SpiralSound/Plugins/LADSPAPlugin/Makefile.in index be397d0..ee00562 100644 --- a/SpiralSound/Plugins/LADSPAPlugin/Makefile.in +++ b/SpiralSound/Plugins/LADSPAPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building LADSPAPlugin.so -# Generated by tmake at 08:03, 2001/10/05 -# Project: LADSPAPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/LFOPlugin/LFOPluginGUI.C b/SpiralSound/Plugins/LFOPlugin/LFOPluginGUI.C index 7d09dc0..372a8df 100644 --- a/SpiralSound/Plugins/LFOPlugin/LFOPluginGUI.C +++ b/SpiralSound/Plugins/LFOPlugin/LFOPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - static unsigned char *image_Sine[] = { (unsigned char*)"20 20 2 1", (unsigned char*)" \tc None", @@ -154,7 +150,7 @@ m_PixmapSaw (image_Saw) { m_TheTabs = new Fl_Tabs (40, 14, 119, 90, ""); m_TheTabs->box (FL_PLASTIC_DOWN_BOX); - m_TheTabs->color (GUI_COLOUR); + m_TheTabs->color (Info->GUI_COLOUR); add (m_TheTabs); m_CtlGroup = new Fl_Group (40, 28, 119, 66, "Control"); @@ -163,7 +159,7 @@ m_PixmapSaw (image_Saw) { m_Perd = new Fl_Knob (70, 30, 60, 60, "Period"); m_Perd->user_data ((void*)(this)); - m_Perd->color (GUI_COLOUR); + m_Perd->color (Info->GUI_COLOUR); m_Perd->type (Fl_Knob::LINELIN); m_Perd->labelsize (10); m_Perd->scaleticks (20); @@ -183,7 +179,7 @@ m_PixmapSaw (image_Saw) { m_NumPerd->textsize (10); m_NumPerd->labelsize (10); m_NumPerd->box (FL_PLASTIC_UP_BOX); - m_NumPerd->color (GUI_COLOUR); + m_NumPerd->color (Info->GUI_COLOUR); m_NumPerd->value (m_Perd->value()); m_NumPerd->step (m_Perd->step()); m_NumPerd->lstep (0.1); @@ -197,7 +193,7 @@ m_PixmapSaw (image_Saw) { m_NumFreq->textsize (10); m_NumFreq->labelsize (10); m_NumFreq->box (FL_PLASTIC_UP_BOX); - m_NumFreq->color (GUI_COLOUR); + m_NumFreq->color (Info->GUI_COLOUR); m_NumFreq->value (1 / m_Perd->value()); m_NumFreq->step (0.001); m_NumFreq->lstep (0.1); diff --git a/SpiralSound/Plugins/LFOPlugin/Makefile.in b/SpiralSound/Plugins/LFOPlugin/Makefile.in index 662e1a4..c1aa770 100644 --- a/SpiralSound/Plugins/LFOPlugin/Makefile.in +++ b/SpiralSound/Plugins/LFOPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building LFOPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: LFOPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/LogicPlugin/LogicPlugin.h b/SpiralSound/Plugins/LogicPlugin/LogicPlugin.h index 149946d..87e4847 100644 --- a/SpiralSound/Plugins/LogicPlugin/LogicPlugin.h +++ b/SpiralSound/Plugins/LogicPlugin/LogicPlugin.h @@ -38,15 +38,11 @@ public: enum OperatorType{NONE,AND,OR,NOT,NAND,NOR,XOR,XNOR}; OperatorType GetOperator() { return m_Operator; } - // float GetConstant() { return m_Constant; } Andy Preston - this value is not used - // Andy Preston - Multiple Inputs enum GUICommands {NOCMD, SETINPUTS}; int GetInputs (void) { return m_Inputs; } private: OperatorType m_Operator; - // float m_Constant; Andy Preston - this value is not used - // Andy Preston - Multiple Inputs int m_Inputs; void SetInputs (int n); void CreatePorts (int n = 2, bool AddPorts = false); diff --git a/SpiralSound/Plugins/LogicPlugin/LogicPluginGUI.C b/SpiralSound/Plugins/LogicPlugin/LogicPluginGUI.C index 0eb90b7..aa3d5b9 100644 --- a/SpiralSound/Plugins/LogicPlugin/LogicPluginGUI.C +++ b/SpiralSound/Plugins/LogicPlugin/LogicPluginGUI.C @@ -21,10 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// LogicPluginGUI::LogicPluginGUI(int w, int h,LogicPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -36,46 +32,45 @@ SpiralPluginGUI(w,h,o,ch) m_AND->type(1); m_AND->value(1); m_AND->labelsize(10); - m_AND->selection_color(GUI_COLOUR); + m_AND->selection_color(Info->GUI_COLOUR); m_AND->callback((Fl_Callback*)cb_AND); m_OR = new Fl_Button(5, 35, Width, Depth,"OR"); m_OR->type(1); m_OR->labelsize(10); - m_OR->selection_color(GUI_COLOUR); + m_OR->selection_color(Info->GUI_COLOUR); m_OR->callback((Fl_Callback*)cb_OR); m_NOT = new Fl_Button(5, 55, Width, Depth,"NOT"); m_NOT->type(1); m_NOT->labelsize(10); - m_NOT->selection_color(GUI_COLOUR); + m_NOT->selection_color(Info->GUI_COLOUR); m_NOT->callback((Fl_Callback*)cb_NOT); m_NAND = new Fl_Button(5, 75, Width, Depth,"NAND"); m_NAND->type(1); m_NAND->labelsize(10); - m_NAND->selection_color(GUI_COLOUR); + m_NAND->selection_color(Info->GUI_COLOUR); m_NAND->callback((Fl_Callback*)cb_NAND); m_NOR = new Fl_Button(37, 15, Width, Depth,"NOR"); m_NOR->type(1); m_NOR->labelsize(10); - m_NOR->selection_color(GUI_COLOUR); + m_NOR->selection_color(Info->GUI_COLOUR); m_NOR->callback((Fl_Callback*)cb_NOR); m_XOR = new Fl_Button(37, 35, Width, Depth,"XOR"); m_XOR->type(1); m_XOR->labelsize(10); - m_XOR->selection_color(GUI_COLOUR); + m_XOR->selection_color(Info->GUI_COLOUR); m_XOR->callback((Fl_Callback*)cb_XOR); m_XNOR = new Fl_Button(37, 55, Width, Depth,"XNOR"); m_XNOR->type(1); m_XNOR->labelsize(10); - m_XNOR->selection_color(GUI_COLOUR); + m_XNOR->selection_color(Info->GUI_COLOUR); m_XNOR->callback((Fl_Callback*)cb_XNOR); - // Andy Preston - multiple inputs m_Inputs = new Fl_Counter (17, 97, 40, 20, "Inputs"); m_Inputs->labelsize (10); m_Inputs->type (FL_SIMPLE_COUNTER); @@ -111,13 +106,11 @@ void LogicPluginGUI::UpdateValues(SpiralPlugin *o) case LogicPlugin::XOR : m_XOR->value(true); break; case LogicPlugin::XNOR : m_XNOR->value(true); break; } - // Andy Preston - multiple inputs m_Inputs->value (Plugin->GetInputs()); } //// Callbacks //// -// Andy Preston - multiple inputs inline void LogicPluginGUI::cb_Inputs_i (Fl_Counter* o, void* v) { if (o->value() < 2) o->value(2); else { diff --git a/SpiralSound/Plugins/MasherPlugin/MasherPluginGUI.C b/SpiralSound/Plugins/MasherPlugin/MasherPluginGUI.C index 876d6d6..1928062 100644 --- a/SpiralSound/Plugins/MasherPlugin/MasherPluginGUI.C +++ b/SpiralSound/Plugins/MasherPlugin/MasherPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// MasherPluginGUI::MasherPluginGUI(int w, int h,MasherPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -33,7 +29,7 @@ SpiralPluginGUI(w,h,o,ch) m_Pitch = new Fl_Knob(5,15,40,40,"GrainPitch"); m_Pitch->type(Fl_Knob::DOTLIN); - m_Pitch->color(GUI_COLOUR); + m_Pitch->color(Info->GUI_COLOUR); m_Pitch->labelsize(10); m_Pitch->maximum(5); m_Pitch->step(0.001); @@ -42,7 +38,7 @@ SpiralPluginGUI(w,h,o,ch) m_Random = new Fl_Knob(70,15,40,40,"Randomness"); m_Random->type(Fl_Knob::DOTLIN); - m_Random->color(GUI_COLOUR); + m_Random->color(Info->GUI_COLOUR); m_Random->labelsize(10); m_Random->maximum(100); m_Random->step(1); @@ -51,7 +47,7 @@ SpiralPluginGUI(w,h,o,ch) m_GrainStoreSize = new Fl_Knob(5,70,40,40,"Num Grains"); m_GrainStoreSize->type(Fl_Knob::DOTLIN); - m_GrainStoreSize->color(GUI_COLOUR); + m_GrainStoreSize->color(Info->GUI_COLOUR); m_GrainStoreSize->labelsize(10); m_GrainStoreSize->maximum(MAX_GRAINSTORE_SIZE-2); m_GrainStoreSize->step(1); @@ -60,7 +56,7 @@ SpiralPluginGUI(w,h,o,ch) m_Density = new Fl_Knob(70,70,40,40,"Density"); m_Density->type(Fl_Knob::DOTLIN); - m_Density->color(GUI_COLOUR); + m_Density->color(Info->GUI_COLOUR); m_Density->labelsize(10); m_Density->maximum(MAX_GRAINSTORE_SIZE); m_Density->step(1); diff --git a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C index df3a550..077ff28 100644 --- a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C +++ b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C @@ -14,23 +14,21 @@ * 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 "MatrixPluginGUI.h" #include #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; static const char NoteText[12][3] = {"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; //////////////////////////////////////////// -Fl_MatrixButton::Fl_MatrixButton(int x, int y, int w, int h, char* n) : +Fl_MatrixButton::Fl_MatrixButton(int x, int y, int w, int h, char* n) : Fl_Button(x,y,w,h,n), m_Volume(NULL), +m_SelCol(FL_BLUE), cb_VolChange(NULL), cb_context(NULL) { @@ -42,11 +40,11 @@ int Fl_MatrixButton::handle(int event) { if (value()==true && event==FL_PUSH && Fl::event_button()==3) { - if (m_SliderHidden) + if (m_SliderHidden) { m_Volume = new Fl_Slider(x(),y()+h(),w(),50,""); m_Volume->type(4); - m_Volume->selection_color(GUI_COLOUR); + m_Volume->selection_color(m_SelCol); m_Volume->maximum(255); m_Volume->step(1); m_Volume->value(255-m_VolVal); @@ -57,7 +55,7 @@ int Fl_MatrixButton::handle(int event) parent()->redraw(); m_SliderHidden=false; } - else + else { m_Volume->hide(); m_VolVal=255-m_Volume->value(); @@ -66,10 +64,10 @@ int Fl_MatrixButton::handle(int event) m_Volume=NULL; m_SliderHidden=true; } - + return 1; } - + if (event==FL_PUSH && Fl::event_button()==1 && !m_SliderHidden) { m_Volume->hide(); @@ -79,9 +77,9 @@ int Fl_MatrixButton::handle(int event) m_Volume=NULL; m_SliderHidden=true; } - + if (Fl::event_button()!=3) return Fl_Button::handle(event); - + return 1; } @@ -90,7 +88,7 @@ inline void Fl_MatrixButton::cb_Vol_i(Fl_Slider* o, void* v) m_VolVal=255-m_Volume->value(); fl_color((char)m_VolVal,(char)m_VolVal,255); selection_color(fl_color()); - + if (cb_VolChange) cb_VolChange(this,cb_context); redraw(); } @@ -137,7 +135,7 @@ m_LastPatSeqLight(0) add(m_Length); m_Speed = new Fl_Knob (50, 60, 40, 40, "Speed"); - m_Speed->color(GUI_COLOUR); + m_Speed->color(Info->GUI_COLOUR); m_Speed->type(Fl_Knob::DOTLIN); m_Speed->labelsize(10); m_Speed->maximum(200); @@ -196,13 +194,13 @@ m_LastPatSeqLight(0) int yoff=40; int butsize=7; int n=0; - + fl_color(150,150,150); int markercol=fl_color(); fl_color(170,170,170); int blcolour=fl_color(); - + for(int x=0; xtype(1); m_Matrix[x][y]->box(FL_BORDER_BOX); + m_Matrix[x][y]->SetSelColour (Info->GUI_COLOUR); if ((x%8)==0) m_Matrix[x][y]->color(markercol); else if ((y%12)==1 || (y%12)==3 || (y%12)==6 || (y%12)==8 || (y%12)==10) m_Matrix[x][y]->color(blcolour); else m_Matrix[x][y]->color(FL_GRAY); - + m_Matrix[x][y]->selection_color(FL_WHITE); m_Matrix[x][y]->callback((Fl_Callback*)cb_Matrix,(void*)&Numbers[n]); m_Matrix[x][y]->SetVolCallback((Fl_Callback*)cb_MatVol,(void*)&Numbers[n]); add(m_Matrix[x][y]); n++; } - + yoff=37; for(int y=0; y -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - char label_buf[10]; MeterPluginGUI::MeterPluginGUI (int w, int h, MeterPlugin *o, ChannelHandler *ch, const HostInfo *Info) : @@ -37,15 +33,15 @@ m_Bypass (false) Bypass->labelsize (10); Bypass->type (FL_TOGGLE_BUTTON); Bypass->box (FL_PLASTIC_UP_BOX); - Bypass->color (GUI_COLOUR); - Bypass->selection_color (GUI_COLOUR); + Bypass->color (Info->GUI_COLOUR); + Bypass->selection_color (Info->GUI_COLOUR); Bypass->callback ((Fl_Callback*)cb_Bypass); add (Bypass); VUMode = new Fl_Button (118, 18, 54, 20, "VU"); VUMode->type (FL_RADIO_BUTTON); VUMode->box (FL_PLASTIC_UP_BOX); - VUMode->color (GUI_COLOUR); - VUMode->selection_color (GUI_COLOUR); + VUMode->color (Info->GUI_COLOUR); + VUMode->selection_color (Info->GUI_COLOUR); VUMode->labelsize (10); VUMode->callback ((Fl_Callback*)cb_Mode); VUMode->set(); @@ -53,16 +49,16 @@ m_Bypass (false) MMMode = new Fl_Button (174, 18, 54, 20, "Min/Max"); MMMode->type (FL_RADIO_BUTTON); MMMode->box (FL_PLASTIC_UP_BOX); - MMMode->color (GUI_COLOUR); - MMMode->selection_color (GUI_COLOUR); + MMMode->color (Info->GUI_COLOUR); + MMMode->selection_color (Info->GUI_COLOUR); MMMode->labelsize (10); MMMode->callback ((Fl_Callback*)cb_Mode); add (MMMode); for (int display=0; display<8; display++) { Digits[display] = new Fl_SevenSeg ((display*28)+2, 40, 28, 40); Digits[display]->bar_width (4); - Digits[display]->color (FL_BLACK); - Digits[display]->color2 (FL_GRAY); + Digits[display]->color (Info->SCOPE_FG_COLOUR); + Digits[display]->color2 (Info->SCOPE_BG_COLOUR); add (Digits[display]); } MinBox = new Fl_Output (2, 104, 84, 20); @@ -73,8 +69,8 @@ m_Bypass (false) Reset->labelsize (10); Reset->type (0); Reset->box (FL_PLASTIC_UP_BOX); - Reset->color (GUI_COLOUR); - Reset->selection_color (GUI_COLOUR); + Reset->color (Info->GUI_COLOUR); + Reset->selection_color (Info->GUI_COLOUR); Reset->callback ((Fl_Callback*)cb_Reset); add (Reset); MaxBox = new Fl_Output (144, 104, 84, 20); @@ -82,7 +78,7 @@ m_Bypass (false) MaxBox->box (FL_PLASTIC_DOWN_BOX); add (MaxBox); Meter = new Fl_VU_Meter (2, 82, 226, 20); - Meter->color (FL_BLACK); + Meter->color (Info->SCOPE_BG_COLOUR); Meter->vu_mode (true); cb_Reset_i (Reset, NULL); end (); diff --git a/SpiralSound/Plugins/MidiPlugin/MidiPluginGUI.C b/SpiralSound/Plugins/MidiPlugin/MidiPluginGUI.C index eda7edf..2e22e0e 100644 --- a/SpiralSound/Plugins/MidiPlugin/MidiPluginGUI.C +++ b/SpiralSound/Plugins/MidiPlugin/MidiPluginGUI.C @@ -22,10 +22,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////////////////////////////////// int OptionsList(const vector &List) diff --git a/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.C b/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.C index e63a297..031bb2b 100644 --- a/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.C +++ b/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.C @@ -21,11 +21,6 @@ #include "MixSwitchPluginGUI.h" #include #include -#include - -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; //////////////////////////////////////////// @@ -36,8 +31,8 @@ SpiralPluginGUI (w, h, o, ch) m_Chans->labelsize (10); m_Chans->type (FL_SIMPLE_COUNTER); m_Chans->box (FL_PLASTIC_UP_BOX); - m_Chans->color (GUI_COLOUR); - m_Chans->selection_color (GUI_COLOUR); + m_Chans->color (Info->GUI_COLOUR); + m_Chans->selection_color (Info->GUI_COLOUR); m_Chans->step (1); m_Chans->value (2); m_Chans->callback ((Fl_Callback*) cb_Chans); @@ -47,8 +42,8 @@ SpiralPluginGUI (w, h, o, ch) m_Switch->labelsize (10); m_Switch->type (FL_SIMPLE_COUNTER); m_Switch->box (FL_PLASTIC_UP_BOX); - m_Switch->color (GUI_COLOUR); - m_Switch->selection_color (GUI_COLOUR); + m_Switch->color (Info->GUI_COLOUR); + m_Switch->selection_color (Info->GUI_COLOUR); m_Switch->step (1); m_Switch->value (1); m_Switch->callback ((Fl_Callback*) cb_Switch); diff --git a/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.h b/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.h index 9479775..3868051 100644 --- a/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.h +++ b/SpiralSound/Plugins/MixSwitchPlugin/MixSwitchPluginGUI.h @@ -40,8 +40,6 @@ class MixSwitchPluginGUI : public SpiralPluginGUI { static void cb_Switch (Fl_Counter* o, void* v); inline void cb_Chans_i (Fl_Counter* o, void* v); static void cb_Chans (Fl_Counter* o, void* v); - // Andy Preston - multiple inputs - }; #endif diff --git a/SpiralSound/Plugins/MixerPlugin/Makefile.in b/SpiralSound/Plugins/MixerPlugin/Makefile.in index ad39d39..30ac50c 100644 --- a/SpiralSound/Plugins/MixerPlugin/Makefile.in +++ b/SpiralSound/Plugins/MixerPlugin/Makefile.in @@ -1,22 +1,19 @@ ############################################################################# # Makefile for building MixerPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: MixerPlugin -# Template: app ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl MOC = moc -UIC = +UIC = TAR = tar -cf GZIP = gzip -9f diff --git a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C index 57f59df..d290e7e 100644 --- a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C +++ b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.C @@ -20,15 +20,12 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// MixerPluginGUI::MixerPluginGUI(int w, int h,MixerPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { + m_GUIColour=(Fl_Color)Info->GUI_COLOUR; for (int n=0; ntype (FL_HORIZONTAL); @@ -42,22 +39,22 @@ SpiralPluginGUI(w,h,o,ch) add (m_Buttons); m_Delete = new Fl_Button (2, 0, 20, 20, "-"); m_Delete->box (FL_PLASTIC_UP_BOX); - m_Delete->color (GUI_COLOUR); - m_Delete->selection_color (GUI_COLOUR); + m_Delete->color (Info->GUI_COLOUR); + m_Delete->selection_color (Info->GUI_COLOUR); m_Delete->callback ((Fl_Callback*)cb_Delete); m_Buttons->add (m_Delete); m_Add = new Fl_Button (24, 0, 20, 20, "+"); m_Add->box (FL_PLASTIC_UP_BOX); - m_Add->color (GUI_COLOUR); - m_Add->selection_color (GUI_COLOUR); + m_Add->color (Info->GUI_COLOUR); + m_Add->selection_color (Info->GUI_COLOUR); m_Add->callback ((Fl_Callback*)cb_Add); m_Buttons->add (m_Add); } void MixerPluginGUI::AddChan (bool SendData, bool ResizeIt) { Fl_Slider *NewSlide = new Fl_Slider (0, 0, 20, 100, ""); - NewSlide->type (4); - NewSlide->selection_color (GUI_COLOUR); + NewSlide->type (FL_VERT_NICE_SLIDER); + NewSlide->selection_color (m_GUIColour); NewSlide->box (FL_PLASTIC_DOWN_BOX); NewSlide->labelsize (10); NewSlide->maximum (2); diff --git a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.h b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.h index dde5127..aff5383 100644 --- a/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.h +++ b/SpiralSound/Plugins/MixerPlugin/MixerPluginGUI.h @@ -42,6 +42,7 @@ class MixerPluginGUI : public SpiralPluginGUI { vector m_SlidVec; Fl_Pack *m_MainPack, *m_Buttons; Fl_Button *m_Add, *m_Delete; + Fl_Color m_GUIColour; //// Callbacks //// inline void cb_Chan_i (Fl_Slider* o, void* v); static void cb_Chan (Fl_Slider* o, void* v); diff --git a/SpiralSound/Plugins/MoogFilterPlugin/Makefile.in b/SpiralSound/Plugins/MoogFilterPlugin/Makefile.in index 0d822b5..27f7641 100644 --- a/SpiralSound/Plugins/MoogFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/MoogFilterPlugin/Makefile.in @@ -1,22 +1,19 @@ ############################################################################# # Makefile for building MoogFilterPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: MoogFilterPlugin -# Template: app ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl MOC = moc -UIC = +UIC = TAR = tar -cf GZIP = gzip -9f diff --git a/SpiralSound/Plugins/MoogFilterPlugin/MoogFilterPluginGUI.C b/SpiralSound/Plugins/MoogFilterPlugin/MoogFilterPluginGUI.C index 8ed7a43..a74c51a 100644 --- a/SpiralSound/Plugins/MoogFilterPlugin/MoogFilterPluginGUI.C +++ b/SpiralSound/Plugins/MoogFilterPlugin/MoogFilterPluginGUI.C @@ -14,32 +14,30 @@ * 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 "MoogFilterPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// MoogFilterPluginGUI::MoogFilterPluginGUI(int w, int h,MoogFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ +{ Cutoff = new Fl_Slider(15, 20, 20, 70, "Cutoff"); - Cutoff->type(4); - Cutoff->selection_color(GUI_COLOUR); + Cutoff->type (FL_VERT_NICE_SLIDER); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->box (FL_PLASTIC_DOWN_BOX); + Cutoff->selection_color (Info->GUI_COLOUR); Cutoff->labelsize(10); Cutoff->maximum(1); Cutoff->step(0.0001); Cutoff->value(1); Cutoff->callback((Fl_Callback*)cb_Cutoff); - - Resonance = new Fl_Knob(58, 28, 45, 45, "Emphasis"); - Resonance->color(GUI_COLOUR); + + Resonance = new Fl_Knob(58, 18, 45, 45, "Emphasis"); + Resonance->color(Info->GUI_COLOUR); Resonance->type(Fl_Knob::DOTLIN); Resonance->labelsize(10); Resonance->maximum(1); diff --git a/SpiralSound/Plugins/NoisePlugin/NoisePluginGUI.C b/SpiralSound/Plugins/NoisePlugin/NoisePluginGUI.C index dbfc3a4..29664ca 100644 --- a/SpiralSound/Plugins/NoisePlugin/NoisePluginGUI.C +++ b/SpiralSound/Plugins/NoisePlugin/NoisePluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - NoisePluginGUI::NoisePluginGUI(int w, int h,NoisePlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { diff --git a/SpiralSound/Plugins/NoteSnapPlugin/NoteSnapPluginGUI.C b/SpiralSound/Plugins/NoteSnapPlugin/NoteSnapPluginGUI.C index 3737f05..7d3d409 100644 --- a/SpiralSound/Plugins/NoteSnapPlugin/NoteSnapPluginGUI.C +++ b/SpiralSound/Plugins/NoteSnapPlugin/NoteSnapPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// NoteSnapPluginGUI::NoteSnapPluginGUI(int w, int h,NoteSnapPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/OperatorPlugin/OperatorPluginGUI.C b/SpiralSound/Plugins/OperatorPlugin/OperatorPluginGUI.C index 68ecffa..4c45282 100644 --- a/SpiralSound/Plugins/OperatorPlugin/OperatorPluginGUI.C +++ b/SpiralSound/Plugins/OperatorPlugin/OperatorPluginGUI.C @@ -21,10 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// OperatorPluginGUI::OperatorPluginGUI(int w, int h,OperatorPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -35,26 +31,26 @@ SpiralPluginGUI(w,h,o,ch) m_Add = new Fl_Button(5, 15, 15, 15,"+"); m_Add->type(1); m_Add->value(1); - m_Add->selection_color(GUI_COLOUR); + m_Add->selection_color(Info->GUI_COLOUR); m_Add->callback((Fl_Callback*)cb_Add); m_Sub = new Fl_Button(5, 30, 15, 15,"-"); m_Sub->type(1); - m_Sub->selection_color(GUI_COLOUR); + m_Sub->selection_color(Info->GUI_COLOUR); m_Sub->callback((Fl_Callback*)cb_Sub); m_Mul = new Fl_Button(5, 45, 15, 15,"*"); m_Mul->type(1); - m_Mul->selection_color(GUI_COLOUR); + m_Mul->selection_color(Info->GUI_COLOUR); m_Mul->callback((Fl_Callback*)cb_Mul); m_Div = new Fl_Button(5, 60, 15, 15,"/"); m_Div->type(1); - m_Div->selection_color(GUI_COLOUR); + m_Div->selection_color(Info->GUI_COLOUR); m_Div->callback((Fl_Callback*)cb_Div); m_Constant = new Fl_Input(25, 15, 50, 20, "Constant"); - m_Constant->color(GUI_COLOUR); + m_Constant->color(Info->GUI_COLOUR); m_Constant->labelsize(8); m_Constant->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); m_Constant->textsize(10); diff --git a/SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C b/SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C index b46609f..09b23c2 100644 --- a/SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C +++ b/SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - static unsigned char *image_Square[] = { (unsigned char*)"20 20 2 1", (unsigned char*)" \tc None", @@ -111,7 +107,7 @@ m_Octave(0) ShapeSquare = new Fl_Check_Button(5, 15, 55, 30); ShapeSquare->type(102); ShapeSquare->down_box(FL_DIAMOND_DOWN_BOX); - ShapeSquare->selection_color(GUI_COLOUR); + ShapeSquare->selection_color(Info->GUI_COLOUR); ShapeSquare->set(); pixmap_Square.label(ShapeSquare); ShapeSquare->callback((Fl_Callback*)cb_Square); @@ -119,19 +115,19 @@ m_Octave(0) ShapeNoise = new Fl_Check_Button(5, 65, 55, 30); ShapeNoise->type(102); ShapeNoise->down_box(FL_DIAMOND_DOWN_BOX); - ShapeNoise->selection_color(GUI_COLOUR); + ShapeNoise->selection_color(Info->GUI_COLOUR); pixmap_Noise.label(ShapeNoise); ShapeNoise->callback((Fl_Callback*)cb_Noise); ShapeSaw = new Fl_Check_Button(5, 40, 55, 30); ShapeSaw->type(102); ShapeSaw->down_box(FL_DIAMOND_DOWN_BOX); - ShapeSaw->selection_color(GUI_COLOUR); + ShapeSaw->selection_color(Info->GUI_COLOUR); pixmap_Saw.label(ShapeSaw); ShapeSaw->callback((Fl_Callback*)cb_Saw); Freq = new Fl_Knob(188, 2, 40, 40, "Octave"); - Freq->color(GUI_COLOUR); + Freq->color(Info->GUI_COLOUR); Freq->type(Fl_Knob::LINELIN); Freq->labelsize(10); Freq->maximum(6); @@ -142,7 +138,7 @@ m_Octave(0) Freq->callback((Fl_Callback*)cb_Freq); FineTune = new Fl_Knob(112, 22, 65, 65, "Fine Tune"); - FineTune->color(GUI_COLOUR); + FineTune->color(Info->GUI_COLOUR); FineTune->type(Fl_Knob::LINELIN); FineTune->labelsize(10); FineTune->scaleticks(20); @@ -152,7 +148,7 @@ m_Octave(0) FineTune->callback((Fl_Callback*)cb_FineTune); ModAmount = new Fl_Knob(188, 54, 40, 40, "Mod Depth"); - ModAmount->color(GUI_COLOUR); + ModAmount->color(Info->GUI_COLOUR); ModAmount->type(Fl_Knob::LINELIN); ModAmount->labelsize(10); ModAmount->maximum(2.0f); @@ -162,7 +158,7 @@ m_Octave(0) PulseWidth = new Fl_Slider(60, 20, 20, 70, "PW"); PulseWidth->type(4); - PulseWidth->selection_color(GUI_COLOUR); + PulseWidth->selection_color(Info->GUI_COLOUR); PulseWidth->labelsize(10); PulseWidth->maximum(1); PulseWidth->step(0.01); @@ -171,7 +167,7 @@ m_Octave(0) SHLen = new Fl_Slider(80, 20, 20, 70, "SH"); SHLen->type(4); - SHLen->selection_color(GUI_COLOUR); + SHLen->selection_color(Info->GUI_COLOUR); SHLen->labelsize(10); SHLen->maximum(0.2); SHLen->step(0.001); diff --git a/SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C b/SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C index 16fb9a6..9f36673 100644 --- a/SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C +++ b/SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C @@ -20,15 +20,11 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - OutputPluginGUI::OutputPluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { Volume = new Fl_Knob(30, 22, 40, 40, "Volume"); - Volume->color(GUI_COLOUR); + Volume->color(Info->GUI_COLOUR); Volume->type(Fl_Knob::DOTLIN); Volume->labelsize(10); Volume->maximum(1); diff --git a/SpiralSound/Plugins/PoshSamplerPlugin/Makefile.in b/SpiralSound/Plugins/PoshSamplerPlugin/Makefile.in index 1148c2c..481d96b 100644 --- a/SpiralSound/Plugins/PoshSamplerPlugin/Makefile.in +++ b/SpiralSound/Plugins/PoshSamplerPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building PoshSamplerPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: PoshSamplerPlugin -# Template: app ############################################################################# ####### Compiler, tools and options @@ -13,10 +10,10 @@ CFLAGS = @CFLAGS@ @FLTK_CFLAGS@ CXXFLAGS= @CXXFLAGS@ @FLTK_CXXFLAGS@ INCPATH = LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = @FLTK_LIBS@ MOC = moc -UIC = +UIC = TAR = tar -cf GZIP = gzip -9f @@ -68,12 +65,12 @@ OBJECTS = ../SpiralPlugin.o \ ../../RiffWav.o \ PoshSamplerPlugin.o \ PoshSamplerPluginGUI.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = +INTERFACES = +UICDECLS = +UICIMPLS = +SRCMOC = +OBJMOC = +DIST = TARGET = PoshSamplerPlugin.so ####### Implicit rules @@ -100,7 +97,7 @@ TARGET = PoshSamplerPlugin.so all: $(TARGET) -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) moc: $(SRCMOC) @@ -115,7 +112,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -155,7 +152,6 @@ install: PoshSamplerPlugin.o: PoshSamplerPlugin.C \ PoshSamplerPlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ PoshSamplerPluginGUI.h \ @@ -170,7 +166,6 @@ PoshSamplerPluginGUI.o: PoshSamplerPluginGUI.C \ PoshSamplerPluginGUI.h \ PoshSamplerPlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ ../SpiralPluginGUI.h \ diff --git a/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.C b/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.C index 038a22e..67ee5d8 100644 --- a/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.C +++ b/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.C @@ -14,17 +14,13 @@ * 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 "PoshSamplerPluginGUI.h" #include #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// Fl_WaveDisplay::Fl_WaveDisplay(int x,int y,int w,int h, char *Name) : @@ -42,12 +38,12 @@ m_PosMarker(true) { } -Fl_WaveDisplay::~Fl_WaveDisplay() +Fl_WaveDisplay::~Fl_WaveDisplay() { } -void Fl_WaveDisplay::SetSample(const float* s, long len) -{ +void Fl_WaveDisplay::SetSample(const float* s, long len) +{ if (m_Sample) delete m_Sample; m_Sample = new Sample(s,len); } @@ -55,83 +51,83 @@ void Fl_WaveDisplay::SetSample(const float* s, long len) void Fl_WaveDisplay::draw() { int ho=h()/2; - fl_color(GUIBG_COLOUR); + fl_color (m_BGColour); fl_rectf(x(), y(), w(), h()); if (!m_Sample || m_Sample->GetLength()==0) return; - + if (m_ViewStart<0) m_ViewStart=0; if (m_ViewEnd>m_Sample->GetLength()-1) m_ViewEnd=m_Sample->GetLength()-1; if (m_PlayStart<0) m_PlayStart=0; if (m_PlayStart>m_Sample->GetLength()-1) m_PlayStart=m_Sample->GetLength()-1; if (m_LoopStart<0) m_LoopStart=0; - if (m_LoopStart>m_Sample->GetLength()-1) m_LoopStart=m_Sample->GetLength()-1; + if (m_LoopStart>m_Sample->GetLength()-1) m_LoopStart=m_Sample->GetLength()-1; if (m_LoopEnd<0) m_LoopEnd=0; if (m_LoopEnd>m_Sample->GetLength()-1) m_LoopEnd=m_Sample->GetLength()-1; - - float Value=0,NextValue=0; + + float Value=0,NextValue=0; int pos=0; int Jump=(m_ViewEnd-m_ViewStart)/w(); if (Jump==0) Jump=1; - + for(int n=m_ViewStart; n=n && m_PlayPos=n && m_PlayStart=n && m_LoopStart=n && m_LoopEndm_StartPos && nm_StartPos && n(*m_Sample)[m]) min=(*m_Sample)[m]; } - + min*=ho; max*=ho; - + fl_line(x()+pos-1, y()+ho-(int)min, - x()+pos-1, y()+ho-(int)max); + x()+pos-1, y()+ho-(int)max); pos++; - } + } } -int Fl_WaveDisplay::handle(int event) +int Fl_WaveDisplay::handle(int event) { int xx=Fl::event_x(); int yy=Fl::event_y(); @@ -139,29 +135,29 @@ int Fl_WaveDisplay::handle(int event) static int Mousebutton=0; static int Holding=0; static int GrabDist=10; - + if (!m_Sample || m_Sample->GetLength()==0) return 1; - if (event==FL_PUSH) + if (event==FL_PUSH) { GrabDist=(int)((m_ViewEnd-m_ViewStart)*0.03f); Mousebutton=Fl::event_button(); DragX=xx; DragY=yy; - + if (Mousebutton==1) - { + { int MousePos=(xx-x())*((m_ViewEnd-m_ViewStart)/w())+m_ViewStart; - Holding=0; + Holding=0; if (abs(MousePos-m_StartPos)labelsize(10); + m_Load->labelsize(10); + m_Load->box (FL_PLASTIC_UP_BOX); + m_Load->color (Info->GUI_COLOUR); + m_Load->selection_color (Info->GUI_COLOUR); m_Load->callback((Fl_Callback*)cb_Load); add(m_Load); m_Save = new Fl_Button(5, 40, 70, 20, "Save"); - m_Save->labelsize(10); + m_Save->labelsize(10); + m_Save->box (FL_PLASTIC_UP_BOX); + m_Save->color (Info->GUI_COLOUR); + m_Save->selection_color (Info->GUI_COLOUR); m_Save->callback((Fl_Callback*)cb_Save); add(m_Save); - + m_Record = new Fl_Button(5, 60, 70, 20, "Record"); - m_Record->type(1); - m_Record->labelsize(10); - m_Record->labelcolor(FL_RED); + m_Record->type (FL_TOGGLE_BUTTON); + m_Record->box (FL_PLASTIC_UP_BOX); + m_Record->color (FL_RED); + m_Record->selection_color (FL_RED); + m_Record->labelsize (10); + //m_Record->labelcolor (FL_RED); m_Record->callback((Fl_Callback*)cb_Record); add(m_Record); m_Loop = new Fl_Button(80, 20, 70, 20, "Loop"); - m_Loop->labelsize(10); - m_Loop->type(1); + m_Loop->type (FL_TOGGLE_BUTTON); + m_Loop->labelsize(10); + m_Loop->box (FL_PLASTIC_UP_BOX); + m_Loop->color (Info->GUI_COLOUR); + m_Loop->selection_color (Info->GUI_COLOUR); m_Loop->callback((Fl_Callback*)cb_Loop); add(m_Loop); m_PingPong = new Fl_Button(80, 40, 70, 20, "PingPong"); - m_PingPong->labelsize(10); - m_PingPong->type(1); + m_PingPong->labelsize(10); + m_PingPong->type (FL_TOGGLE_BUTTON); + m_PingPong->labelsize(10); + m_PingPong->box (FL_PLASTIC_UP_BOX); + m_PingPong->color (Info->GUI_COLOUR); + m_PingPong->selection_color (Info->GUI_COLOUR); m_PingPong->callback((Fl_Callback*)cb_PingPong); add(m_PingPong); m_PosMarker = new Fl_Button(80, 60, 70, 20, "PosMarker"); - m_PosMarker->labelsize(10); - m_PosMarker->type(1); + m_PosMarker->labelsize(10); + m_PosMarker->type (FL_TOGGLE_BUTTON); + m_PosMarker->labelsize(10); + m_PosMarker->box (FL_PLASTIC_UP_BOX); + m_PosMarker->color (Info->GUI_COLOUR); + m_PosMarker->selection_color (Info->GUI_COLOUR); m_PosMarker->value(1); m_PosMarker->callback((Fl_Callback*)cb_PosMarker); add(m_PosMarker); - m_Volume = new Fl_Knob(160, 20, 50, 50, "Volume"); - m_Volume->color(GUI_COLOUR); + m_Volume->color(Info->GUI_COLOUR); m_Volume->type(Fl_Knob::LINELIN); - m_Volume->labelsize(10); - m_Volume->maximum(2); - m_Volume->step(0.001); - m_Volume->value(1); + m_Volume->labelsize(10); + m_Volume->maximum(2); + m_Volume->step(0.001); + m_Volume->value(1); m_Volume->callback((Fl_Callback*)cb_Volume); add(m_Volume); - + m_Pitch = new Fl_Knob(220, 20, 50, 50, "Pitch"); - m_Pitch->color(GUI_COLOUR); + m_Pitch->color(Info->GUI_COLOUR); m_Pitch->type(Fl_Knob::LINELIN); - m_Pitch->labelsize(10); - m_Pitch->maximum(10); - m_Pitch->step(0.001); - m_Pitch->value(1); + m_Pitch->labelsize(10); + m_Pitch->maximum(10); + m_Pitch->step(0.001); + m_Pitch->value(1); m_Pitch->callback((Fl_Callback*)cb_Pitch); add(m_Pitch); m_Octave = new Fl_Knob(280, 20, 50, 50, "Octave"); - m_Octave->color(GUI_COLOUR); + m_Octave->color(Info->GUI_COLOUR); m_Octave->type(Fl_Knob::LINELIN); - m_Octave->labelsize(10); - m_Octave->maximum(12); - m_Octave->step(1); - m_Octave->value(6); + m_Octave->labelsize(10); + m_Octave->maximum(12); + m_Octave->step(1); + m_Octave->value(6); m_Octave->callback((Fl_Callback*)cb_Octave); add(m_Octave); - - m_Note = new Fl_Counter(w-45, 50, 30, 20, "Trig Note"); - m_Note->labelsize(10); - m_Note->type(FL_SIMPLE_COUNTER); - m_Note->step(1); - m_Note->value(n); - m_Note->callback((Fl_Callback*)cb_Note); - add(m_Note); - - m_SampleNum = new Fl_Counter(w-45, 15, 30, 20, "Sample"); - m_SampleNum->labelsize(10); + + m_SampleNum = new Fl_Counter (w-60, 15, 45, 20, "Sample"); + m_SampleNum->labelsize(10); m_SampleNum->type(FL_SIMPLE_COUNTER); + m_SampleNum->box (FL_PLASTIC_UP_BOX); + m_SampleNum->color (Info->GUI_COLOUR); + m_SampleNum->selection_color (Info->GUI_COLOUR); m_SampleNum->step(1); m_SampleNum->value(n); m_SampleNum->callback((Fl_Callback*)cb_SampleNum); add(m_SampleNum); - + + m_Note = new Fl_Counter (w-60, 50, 45, 20, "Trig Note"); + m_Note->labelsize(10); + m_Note->type(FL_SIMPLE_COUNTER); + m_Note->box (FL_PLASTIC_UP_BOX); + m_Note->color (Info->GUI_COLOUR); + m_Note->selection_color (Info->GUI_COLOUR); + m_Note->step(1); + m_Note->value(n); + m_Note->callback((Fl_Callback*)cb_Note); + add(m_Note); + m_Display = new Fl_WaveDisplay(5,85,w-10,100,""); + m_Display->SetColours (Info->SCOPE_BG_COLOUR, Info->SCOPE_FG_COLOUR, + Info->SCOPE_SEL_COLOUR, Info->SCOPE_IND_COLOUR, Info->SCOPE_MRK_COLOUR); m_Display->callback((Fl_Callback*)cb_WaveDisplay); - + int bx=5,by=190,bw=w/9-2,bh=20,bs=w/9-2; n=0; - + m_Cut = new Fl_Button(bx+(n++*bs),by,bw,bh,"Cut"); m_Cut->labelsize(10); + m_Cut->box (FL_PLASTIC_UP_BOX); + m_Cut->color (Info->GUI_COLOUR); + m_Cut->selection_color (Info->GUI_COLOUR); m_Cut->callback((Fl_Callback*)cb_Cut); - + m_Copy = new Fl_Button(bx+(n++*bs),by,bw,bh,"Copy"); m_Copy->labelsize(10); + m_Copy->box (FL_PLASTIC_UP_BOX); + m_Copy->color (Info->GUI_COLOUR); + m_Copy->selection_color (Info->GUI_COLOUR); m_Copy->callback((Fl_Callback*)cb_Copy); m_Paste = new Fl_Button(bx+(n++*bs),by,bw,bh,"Paste"); m_Paste->labelsize(10); + m_Paste->box (FL_PLASTIC_UP_BOX); + m_Paste->color (Info->GUI_COLOUR); + m_Paste->selection_color (Info->GUI_COLOUR); m_Paste->callback((Fl_Callback*)cb_Paste); m_Mix = new Fl_Button(bx+(n++*bs),by,bw,bh,"Mix"); m_Mix->labelsize(10); + m_Mix->box (FL_PLASTIC_UP_BOX); + m_Mix->color (Info->GUI_COLOUR); + m_Mix->selection_color (Info->GUI_COLOUR); m_Mix->callback((Fl_Callback*)cb_Mix); m_Crop = new Fl_Button(bx+(n++*bs),by,bw,bh,"Crop"); m_Crop->labelsize(10); + m_Crop->box (FL_PLASTIC_UP_BOX); + m_Crop->color (Info->GUI_COLOUR); + m_Crop->selection_color (Info->GUI_COLOUR); m_Crop->callback((Fl_Callback*)cb_Crop); m_Reverse = new Fl_Button(bx+(n++*bs),by,bw,bh,"Reverse"); m_Reverse->labelsize(10); + m_Reverse->box (FL_PLASTIC_UP_BOX); + m_Reverse->color (Info->GUI_COLOUR); + m_Reverse->selection_color (Info->GUI_COLOUR); m_Reverse->callback((Fl_Callback*)cb_Reverse); m_Amp = new Fl_Button(bx+(n++*bs),by,bw,bh,"Amp"); m_Amp->labelsize(10); + m_Amp->box (FL_PLASTIC_UP_BOX); + m_Amp->color (Info->GUI_COLOUR); + m_Amp->selection_color (Info->GUI_COLOUR); m_Amp->callback((Fl_Callback*)cb_Amp); m_ZoomIn = new Fl_Button(bx+(n++*bs),by,bw,bh,"Zoom +"); m_ZoomIn->labelsize(10); + m_ZoomIn->box (FL_PLASTIC_UP_BOX); + m_ZoomIn->color (Info->GUI_COLOUR); + m_ZoomIn->selection_color (Info->GUI_COLOUR); //m_ZoomIn->callback((Fl_Callback*)cb_ZoomIn); m_ZoomOut = new Fl_Button(bx+(n++*bs),by,bw,bh,"Zoom -"); m_ZoomOut->labelsize(10); + m_ZoomOut->box (FL_PLASTIC_UP_BOX); + m_ZoomOut->color (Info->GUI_COLOUR); + m_ZoomOut->selection_color (Info->GUI_COLOUR); //m_ZoomOut->callback((Fl_Callback*)cb_ZoomOut); end(); - + redraw(); } diff --git a/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.h b/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.h index 689d3af..6d0e018 100644 --- a/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.h +++ b/SpiralSound/Plugins/PoshSamplerPlugin/PoshSamplerPluginGUI.h @@ -32,9 +32,9 @@ class Fl_WaveDisplay : public Fl_Widget { public: Fl_WaveDisplay(int x,int y,int w,int h, char* Name); - ~Fl_WaveDisplay(); - virtual void draw(); - virtual int handle(int event); + ~Fl_WaveDisplay(); + virtual void draw(); + virtual int handle(int event); void SetSample(const float* s, long len); long GetRangeStart() { return m_StartPos; } long GetRangeEnd() { return m_EndPos; } @@ -52,9 +52,12 @@ class Fl_WaveDisplay : public Fl_Widget void SetPosMarker(bool s) { m_PosMarker=s; } void ZoomIn(); void ZoomOut(); - - private: - + void SetColours (unsigned b, unsigned f, unsigned s, unsigned i, unsigned m) { + m_BGColour=(Fl_Color)b; m_FGColour=(Fl_Color)f; m_SelColour=(Fl_Color)s; + m_IndColour=(Fl_Color)i; m_MrkColour=(Fl_Color)m; + } + private: + Fl_Color m_BGColour, m_FGColour, m_SelColour, m_IndColour, m_MrkColour; Sample *m_Sample; long m_StartPos; long m_EndPos; diff --git a/SpiralSound/Plugins/RingModPlugin/Makefile.in b/SpiralSound/Plugins/RingModPlugin/Makefile.in index 2e1da32..bd3e588 100644 --- a/SpiralSound/Plugins/RingModPlugin/Makefile.in +++ b/SpiralSound/Plugins/RingModPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building RingModPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: RingModPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/RingModPlugin/RingModPlugin.C b/SpiralSound/Plugins/RingModPlugin/RingModPlugin.C index f33d1d2..2087541 100644 --- a/SpiralSound/Plugins/RingModPlugin/RingModPlugin.C +++ b/SpiralSound/Plugins/RingModPlugin/RingModPlugin.C @@ -49,8 +49,8 @@ RingModPlugin::RingModPlugin() : m_Amount(1.0f) { m_PluginInfo.Name="Ring Mod"; - m_PluginInfo.Width=120; - m_PluginInfo.Height=110; + m_PluginInfo.Width=90; + m_PluginInfo.Height=80; m_PluginInfo.NumInputs=2; m_PluginInfo.NumOutputs=1; m_PluginInfo.PortTips.push_back("Input 1"); diff --git a/SpiralSound/Plugins/RingModPlugin/RingModPluginGUI.C b/SpiralSound/Plugins/RingModPlugin/RingModPluginGUI.C index 6e6d8f8..5f59242 100644 --- a/SpiralSound/Plugins/RingModPlugin/RingModPluginGUI.C +++ b/SpiralSound/Plugins/RingModPlugin/RingModPluginGUI.C @@ -14,23 +14,19 @@ * 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 "RingModPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// -RingModPluginGUI::RingModPluginGUI(int w, int h,RingModPlugin *o,ChannelHandler *ch,const HostInfo *Info) : -SpiralPluginGUI(w,h,o,ch) -{ - m_Amount = new Fl_Knob(34, 24, 50, 50, "Amount"); - m_Amount->color(GUI_COLOUR); +RingModPluginGUI::RingModPluginGUI (int w, int h, RingModPlugin *o, ChannelHandler *ch, const HostInfo *Info) : +SpiralPluginGUI (w, h, o, ch) +{ + m_Amount = new Fl_Knob (20, 12, 50, 50, "Amount"); + m_Amount->color(Info->GUI_COLOUR); m_Amount->type(Fl_Knob::DOTLIN); m_Amount->labelsize(10); m_Amount->maximum(3); diff --git a/SpiralSound/Plugins/SVFilterPlugin/Makefile.in b/SpiralSound/Plugins/SVFilterPlugin/Makefile.in index 8e1e2f3..b3efc45 100644 --- a/SpiralSound/Plugins/SVFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/SVFilterPlugin/Makefile.in @@ -1,16 +1,13 @@ ############################################################################# # Makefile for building SVFilterPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: SVFilterPlugin -# Template: app ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = @@ -149,7 +146,6 @@ SVFilterPlugin.o: SVFilterPlugin.C \ ../SpiralPlugin.h \ ../../Sample.h \ ../../SpiralInfo.h \ - ../../Sample.h \ SVFilterPluginGUI.h \ ../SpiralPluginGUI.h \ ../Widgets/Fl_DragBar.H \ @@ -162,7 +158,6 @@ SVFilterPluginGUI.o: SVFilterPluginGUI.C \ ../SpiralPlugin.h \ ../../Sample.h \ ../../SpiralInfo.h \ - ../../Sample.h \ ../SpiralPluginGUI.h \ ../Widgets/Fl_DragBar.H \ ../Widgets/Fl_Knob.H diff --git a/SpiralSound/Plugins/SVFilterPlugin/SVFilterPluginGUI.C b/SpiralSound/Plugins/SVFilterPlugin/SVFilterPluginGUI.C index 60c34c5..578e9d0 100644 --- a/SpiralSound/Plugins/SVFilterPlugin/SVFilterPluginGUI.C +++ b/SpiralSound/Plugins/SVFilterPlugin/SVFilterPluginGUI.C @@ -14,32 +14,30 @@ * 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 "SVFilterPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SVFilterPluginGUI::SVFilterPluginGUI(int w, int h,SVFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { Cutoff = new Fl_Slider(15, 20, 20, 70, "Cutoff"); - Cutoff->type(4); - Cutoff->selection_color(GUI_COLOUR); - Cutoff->labelsize(10); + Cutoff->type (FL_VERT_NICE_SLIDER); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->box (FL_PLASTIC_DOWN_BOX); + Cutoff->selection_color (Info->GUI_COLOUR); + Cutoff->labelsize(10); Cutoff->maximum(1); Cutoff->step(0.0001); Cutoff->value(1); Cutoff->callback((Fl_Callback*)cb_Cutoff); Resonance = new Fl_Knob(58, 18, 45, 45, "Emphasis"); - Resonance->color(GUI_COLOUR); + Resonance->color(Info->GUI_COLOUR); Resonance->type(Fl_Knob::DOTLIN); Resonance->labelsize(10); Resonance->maximum(1); diff --git a/SpiralSound/Plugins/SampleHoldPlugin/SampleHoldPluginGUI.C b/SpiralSound/Plugins/SampleHoldPlugin/SampleHoldPluginGUI.C index e489df6..ecb78b3 100644 --- a/SpiralSound/Plugins/SampleHoldPlugin/SampleHoldPluginGUI.C +++ b/SpiralSound/Plugins/SampleHoldPlugin/SampleHoldPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SampleHoldPluginGUI::SampleHoldPluginGUI(int w, int h,SampleHoldPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/SamplerPlugin/SamplerPluginGUI.C b/SpiralSound/Plugins/SamplerPlugin/SamplerPluginGUI.C index 46da9e8..7b1fee2 100644 --- a/SpiralSound/Plugins/SamplerPlugin/SamplerPluginGUI.C +++ b/SpiralSound/Plugins/SamplerPlugin/SamplerPluginGUI.C @@ -21,10 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SamplerPluginGUI::SamplerPluginGUI(int w, int h,SamplerPlugin *o,const HostInfo *Info) : @@ -42,7 +38,7 @@ SpiralPluginGUI(w,h,o) add(m_Load[n]); m_Volume[n] = new Fl_Knob(60, 15+n*50, 38, 38, "Volume"); - m_Volume[n]->color(GUI_COLOUR); + m_Volume[n]->color(Info->GUI_COLOUR); m_Volume[n]->type(Fl_Knob::LINELIN); m_Volume[n]->labelsize(10); m_Volume[n]->maximum(2); @@ -52,7 +48,7 @@ SpiralPluginGUI(w,h,o) add(m_Volume[n]); m_Pitch[n] = new Fl_Knob(100, 15+n*50, 38, 38, "Pitch"); - m_Pitch[n]->color(GUI_COLOUR); + m_Pitch[n]->color(Info->GUI_COLOUR); m_Pitch[n]->type(Fl_Knob::LINELIN); m_Pitch[n]->labelsize(10); m_Pitch[n]->maximum(10); diff --git a/SpiralSound/Plugins/ScopePlugin/Makefile.in b/SpiralSound/Plugins/ScopePlugin/Makefile.in index b11470c..ea7a167 100644 --- a/SpiralSound/Plugins/ScopePlugin/Makefile.in +++ b/SpiralSound/Plugins/ScopePlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building ScopePlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: ScopePlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/ScopePlugin/ScopePlugin.C b/SpiralSound/Plugins/ScopePlugin/ScopePlugin.C index 3e8dcd2..6130a43 100644 --- a/SpiralSound/Plugins/ScopePlugin/ScopePlugin.C +++ b/SpiralSound/Plugins/ScopePlugin/ScopePlugin.C @@ -48,8 +48,10 @@ string SpiralPlugin_GetGroupName() ScopePlugin::ScopePlugin() { m_PluginInfo.Name="Scope"; - m_PluginInfo.Width=220; - m_PluginInfo.Height=125; + //m_PluginInfo.Width=220; + m_PluginInfo.Width=260; + //m_PluginInfo.Height=125; + m_PluginInfo.Height=115; m_PluginInfo.NumInputs=1; m_PluginInfo.NumOutputs=1; m_PluginInfo.PortTips.push_back("Input"); diff --git a/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.C b/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.C index 638defe..c12b531 100644 --- a/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.C +++ b/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.C @@ -14,21 +14,20 @@ * 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 "ScopePluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - -ScopeWidget::ScopeWidget(int x,int y,int w,int h,const char *l, int BUFSIZE) : -Fl_Widget(x,y,w,h,l), -m_Data(NULL), -m_Channels(1), -m_Bufsize(BUFSIZE) +ScopeWidget::ScopeWidget (int x, int y, int w, int h, const char *l, int BUFSIZE) : +Fl_Widget (x, y, w, h, l), +m_Data (NULL), +//m_Channels (1), +m_WaveColour (FL_WHITE), +m_Attenuation (1.0), +m_TimeBase (1.0), +m_Bufsize (BUFSIZE) { m_Data = new float[BUFSIZE]; } @@ -38,40 +37,54 @@ ScopeWidget::~ScopeWidget() delete[] m_Data; } -void ScopeWidget::draw() -{ - int ho=h()/2; - fl_color(GUIBG_COLOUR); - fl_rectf(x(), y(), w(), h()); - if (!m_Data) return; - fl_push_clip(x(), y(), w(), h()); - - float Value=0,NextValue=0; - - fl_color(FL_WHITE); - for(int n=0; n=m_Bufsize) break; + Value = NextValue; + NextValue = m_Data[p] * m_Attenuation * ho; + fl_line ((int)(x()+n-2), (int)(y()+ho-Value), (int)(x()+n-1), (int)(y()+ho-NextValue)); + } + fl_pop_clip(); } //////////////////////////////////////////// ScopePluginGUI::ScopePluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch, const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch), -m_Bypass(false) -{ - m_Scope = new ScopeWidget(5, 20, 210, 85, "Scope", Info->BUFSIZE); +m_Bypass(false) +{ + m_Scope = new ScopeWidget(5, 20, 210, 85, "Scope", Info->BUFSIZE); + m_Scope->color (Info->SCOPE_BG_COLOUR); + m_Scope->SetWaveColour (Info->SCOPE_FG_COLOUR); + m_Attenuation = new Fl_Knob (220, 10, 40, 40, "Attenuation"); + m_Attenuation->color(Info->GUI_COLOUR); + m_Attenuation->type(Fl_Knob::LINELIN); + m_Attenuation->labelsize (9); + m_Attenuation->maximum (1); + m_Attenuation->step (.001); + m_Attenuation->value (0); + m_Attenuation->callback ((Fl_Callback*)cb_Attenuation); + m_TimeBase = new Fl_Knob (220, 60, 40, 40, "Time Base"); + m_TimeBase->color(Info->GUI_COLOUR); + m_TimeBase->type(Fl_Knob::LINELIN); + m_TimeBase->labelsize (9); + m_TimeBase->minimum (0.001); + //m_TimeBase->maximum (5); // It'd be better if we could do this, but it makes the display look crummy + m_TimeBase->maximum (1); + m_TimeBase->step (.001); + m_TimeBase->value (1); + m_TimeBase->callback ((Fl_Callback*)cb_TimeBase); /*Bypass = new Fl_Button(175, 107, 40, 16, "Bypass"); Bypass->labelsize(10); - Bypass->type(1); + Bypass->type(1); Bypass->callback((Fl_Callback*)cb_Bypass);*/ end(); } @@ -99,11 +112,29 @@ void ScopePluginGUI::draw() void ScopePluginGUI::UpdateValues(SpiralPlugin* o) { } - -void ScopePluginGUI::cb_Bypass_i(Fl_Button* o, void* v) -{m_Bypass=o->value();} -void ScopePluginGUI::cb_Bypass(Fl_Button* o, void* v) -{((ScopePluginGUI*)(o->parent()))->cb_Bypass_i(o,v);} + +inline void ScopePluginGUI::cb_Attenuation_i (Fl_Knob* o, void* v) +{ + m_Scope->SetAttenuation (1.0-(o->value())); +} + +void ScopePluginGUI::cb_Attenuation (Fl_Knob* o, void* v) { + ((ScopePluginGUI*)(o->parent()))->cb_Attenuation_i (o, v); +} + +inline void ScopePluginGUI::cb_TimeBase_i (Fl_Knob* o, void* v) +{ + m_Scope->SetTimeBase (o->value()); +} + +void ScopePluginGUI::cb_TimeBase (Fl_Knob* o, void* v) { + ((ScopePluginGUI*)(o->parent()))->cb_TimeBase_i (o, v); +} + +//void ScopePluginGUI::cb_Bypass_i(Fl_Button* o, void* v) +//{m_Bypass=o->value();} +//void ScopePluginGUI::cb_Bypass(Fl_Button* o, void* v) +//{((ScopePluginGUI*)(o->parent()))->cb_Bypass_i(o,v);} const string ScopePluginGUI::GetHelpText(const string &loc){ return string("") diff --git a/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.h b/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.h index fc0519a..ae1b92d 100644 --- a/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.h +++ b/SpiralSound/Plugins/ScopePlugin/ScopePluginGUI.h @@ -29,49 +29,48 @@ #ifndef SCOPEGUI #define SCOPEGUI -class ScopeWidget : public Fl_Widget +class ScopeWidget : public Fl_Widget { -public: - ScopeWidget(int x,int y,int w,int h,const char *l, int BUFSIZE); - ~ScopeWidget(); - - void draw(); - void SetNumChannels(int s) {m_Channels=s;} - - const float *m_Data; - int m_Channels; -private: - - int m_GUIColour; - int m_GUIBGColour; - int m_Bufsize; + public: + ScopeWidget (int x, int y, int w, int h, const char *l, int BUFSIZE); + ~ScopeWidget(); + void draw(); + //void SetNumChannels (int s) { m_Channels=s; } + void SetWaveColour (unsigned c) { m_WaveColour=(Fl_Color)c; } + void SetAttenuation (float c) { m_Attenuation=c; } + void SetTimeBase (float c) { m_TimeBase=c; } + const float *m_Data; + //int m_Channels; + private: + //int m_GUIColour, m_GUIBGColour; + Fl_Color m_WaveColour; + float m_Attenuation, m_TimeBase; + int m_Bufsize; }; class ScopePluginGUI : public SpiralPluginGUI { -public: - ScopePluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch, const HostInfo *Info); - - virtual void UpdateValues(SpiralPlugin* o); - virtual void Update(); - virtual void draw(); - void Display(const float *data); - -protected: - const string GetHelpText(const string &loc); - -private: - - bool m_Bypass; - - Fl_Button *Bypass; - ScopeWidget *m_Scope; - - //// Callbacks //// - - inline void cb_Bypass_i(Fl_Button* o, void* v); - static void cb_Bypass(Fl_Button* o, void* v); + public: + ScopePluginGUI (int w, int h, SpiralPlugin *o, ChannelHandler *ch, const HostInfo *Info); + virtual void UpdateValues (SpiralPlugin* o); + virtual void Update(); + virtual void draw(); + void Display (const float *data); + protected: + const string GetHelpText (const string &loc); + private: + bool m_Bypass; + // Fl_Button *Bypass; + ScopeWidget *m_Scope; + Fl_Knob *m_Attenuation, *m_TimeBase; + //// Callbacks //// + inline void cb_Attenuation_i (Fl_Knob* o, void* v); + static void cb_Attenuation (Fl_Knob* o, void* v); + inline void cb_TimeBase_i (Fl_Knob* o, void* v); + static void cb_TimeBase (Fl_Knob* o, void* v); + // inline void cb_Bypass_i(Fl_Button* o, void* v); + // static void cb_Bypass(Fl_Button* o, void* v); }; #endif diff --git a/SpiralSound/Plugins/SeqPlugin/SeqPluginGUI.C b/SpiralSound/Plugins/SeqPlugin/SeqPluginGUI.C index 69df97d..08f98f7 100644 --- a/SpiralSound/Plugins/SeqPlugin/SeqPluginGUI.C +++ b/SpiralSound/Plugins/SeqPlugin/SeqPluginGUI.C @@ -22,10 +22,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SeqPluginGUI::SeqPluginGUI(int w, int h,SeqPlugin *o,const HostInfo *Info) : @@ -58,7 +54,7 @@ SpiralPluginGUI(w,h,o) add(m_Pattern); m_Length = new Fl_Knob(5, 60, 40, 40, "Length"); - m_Length->color(GUI_COLOUR); + m_Length->color(Info->GUI_COLOUR); m_Length->type(Fl_Knob::DOTLIN); m_Length->labelsize(10); m_Length->maximum(30); @@ -68,7 +64,7 @@ SpiralPluginGUI(w,h,o) add(m_Length); m_Speed = new Fl_Knob(5, 115, 40, 40, "Speed"); - m_Speed->color(GUI_COLOUR); + m_Speed->color(Info->GUI_COLOUR); m_Speed->type(Fl_Knob::DOTLIN); m_Speed->labelsize(10); m_Speed->maximum(4); @@ -78,7 +74,7 @@ SpiralPluginGUI(w,h,o) add(m_Speed); m_Zoom = new Fl_Knob(5,170,40,40,"Zoom"); - m_Zoom->color(GUI_COLOUR); + m_Zoom->color(Info->GUI_COLOUR); m_Zoom->type(Fl_Knob::DOTLIN); m_Zoom->labelsize(10); m_Zoom->maximum(2); diff --git a/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.C b/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.C index 0895cf2..a1d3907 100644 --- a/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.C +++ b/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.C @@ -14,34 +14,30 @@ * 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 #include "SeqSelectorPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// -CountLine::CountLine(int n) : +CountLine::CountLine (int n, Fl_Color col1, Fl_Color col2) : Fl_Group(0,0,250,14,"") { box(FL_FLAT_BOX); - if (n%4==0) color(GUIBG2_COLOUR); - if (n%8==0) color(GUI_COLOUR); + if (n%4==0) color (col1); + if (n%8==0) color (col2); m_Num=n; - + sprintf(m_Count,"%d",n); Fl_Box *Num = new Fl_Box(5,2,30,20,m_Count); Num->labelsize(10); Num->labeltype(FL_ENGRAVED_LABEL); Num->align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE); add(Num); - + m_Flasher = new Fl_LED_Button(15,-3,20,20,""); m_Flasher->selection_color(FL_BLUE); add(m_Flasher); @@ -49,11 +45,11 @@ Fl_Group(0,0,250,14,"") for (int n=0; nlabelsize(8); - m_Counter[n]->textsize(8); + m_Counter[n]->labelsize(8); + m_Counter[n]->textsize(8); m_Counter[n]->type(FL_SIMPLE_COUNTER); m_Counter[n]->step(1); - m_Counter[n]->value(0); + m_Counter[n]->value(0); add(m_Counter[n]); } end(); @@ -92,7 +88,7 @@ int CountLine::handle(int event) m_GUICH->Wait(); } } - + return temp; } @@ -100,13 +96,16 @@ int CountLine::handle(int event) SeqSelectorPluginGUI::SeqSelectorPluginGUI(int w, int h,SeqSelectorPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ - m_Scroll = new Fl_Scroll(0, 20, w, h-50, ""); +{ + m_Colour1 = (Fl_Color)Info->SCOPE_BG_COLOUR; + m_Colour2 = (Fl_Color)Info->GUI_COLOUR; + + m_Scroll = new Fl_Scroll(0, 20, w, h-50, ""); m_Scroll->type(Fl_Scroll::VERTICAL_ALWAYS); m_Scroll->box(FL_NO_BOX); m_Scroll->position(0,0); add(m_Scroll); - + m_Main = new Fl_Pack(0,20,w,h-50,""); m_Main->box(FL_NO_BOX); m_Scroll->add(m_Main); @@ -115,28 +114,28 @@ SpiralPluginGUI(w,h,o,ch) m_New->labelsize(10); m_New->callback((Fl_Callback*)cb_New); add(m_New); - + m_Delete = new Fl_Button(60,h-25,50,20,"Delete"); m_Delete->labelsize(10); m_Delete->callback((Fl_Callback*)cb_Delete); add(m_Delete); - + m_Begin = new Fl_Counter(115,h-28,50,15,"Begin"); m_Begin->labelsize(10); m_Begin->type(FL_SIMPLE_COUNTER); m_Begin->step(1); - m_Begin->value(0); + m_Begin->value(0); m_Begin->callback((Fl_Callback*)cb_Begin); add(m_Begin); - + m_End = new Fl_Counter(175,h-28,50,15,"End"); m_End->labelsize(10); m_End->type(FL_SIMPLE_COUNTER); m_End->step(1); - m_End->value(0); + m_End->value(0); m_End->callback((Fl_Callback*)cb_End); add(m_End); - + m_UseRange = new Fl_Button(230,h-25,55,20,"UseRange"); m_UseRange->labelsize(10); m_UseRange->type(1); @@ -144,7 +143,6 @@ SpiralPluginGUI(w,h,o,ch) m_UseRange->callback((Fl_Callback*)cb_UseRange); add(m_UseRange); - end(); } @@ -165,12 +163,12 @@ float SeqSelectorPluginGUI::GetVal(int l, int v) void SeqSelectorPluginGUI::AddLine(int* Val) { - CountLine *NewLine = new CountLine(m_LineVec.size()); - NewLine->m_GUICH = m_GUICH; - + CountLine *NewLine = new CountLine(m_LineVec.size(), m_Colour1, m_Colour2); + NewLine->m_GUICH = m_GUICH; + // copy the last line list::iterator i=m_LineVec.begin(); - + if (Val) { for (int n=0; nadd(NewLine); m_LineVec.push_front(NewLine); redraw(); - + Fl::check(); } diff --git a/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.h b/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.h index 8bab42d..2a26719 100644 --- a/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.h +++ b/SpiralSound/Plugins/SeqSelectorPlugin/SeqSelectorPluginGUI.h @@ -14,7 +14,7 @@ * 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 "list" #include @@ -37,17 +37,16 @@ class CountLine : public Fl_Group { public: - CountLine(int n); + CountLine (int n, Fl_Color col1, Fl_Color col2); ~CountLine(); - + void SetVal(int n, float val); float GetVal(int n); void SetLED(bool s) { m_Flasher->value(s); } - virtual int handle(int event); - + ChannelHandler *m_GUICH; - + private: Fl_LED_Button *m_Flasher; Fl_Counter *m_Counter[NUM_VALUES]; @@ -59,26 +58,26 @@ class SeqSelectorPluginGUI : public SpiralPluginGUI { public: SeqSelectorPluginGUI(int w, int h, SeqSelectorPlugin *o,ChannelHandler *ch,const HostInfo *Info); - + virtual void UpdateValues(SpiralPlugin *o); virtual void Update(); - + void AddLine(int* Val=NULL); void RemoveLine(); float GetVal(int l, int v); int GetNumLines() { return m_LineVec.size(); } void SetLED(int n); - + void StreamOut(ostream &s); void StreamIn(istream &s); - + protected: - const string GetHelpText(const string &loc); - + const string GetHelpText(const string &loc); + private: - + int m_LastLight; - + Fl_Color m_Colour1, m_Colour2; Fl_Pack *m_Main; Fl_Scroll *m_Scroll; Fl_Button *m_New; @@ -86,12 +85,12 @@ private: Fl_Counter *m_Begin; Fl_Counter *m_End; Fl_Button *m_UseRange; - + list m_LineVec; - + //// Callbacks //// inline void cb_New_i(Fl_Button* o, void* v); - static void cb_New(Fl_Button* o, void* v); + static void cb_New(Fl_Button* o, void* v); inline void cb_Delete_i(Fl_Button* o, void* v); static void cb_Delete(Fl_Button* o, void* v); inline void cb_Begin_i(Fl_Counter* o, void* v); diff --git a/SpiralSound/Plugins/SequencerPlugin/SequencerPluginGUI.C b/SpiralSound/Plugins/SequencerPlugin/SequencerPluginGUI.C index 29f8a5e..901db15 100644 --- a/SpiralSound/Plugins/SequencerPlugin/SequencerPluginGUI.C +++ b/SpiralSound/Plugins/SequencerPlugin/SequencerPluginGUI.C @@ -23,10 +23,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SequencerPluginGUI::PatternWin::PatternWin(int w,int h,const char* n) : @@ -85,7 +81,7 @@ SpiralPluginGUI(w,h,o,ch) m_ArrangementMap->SetCallbacks(cb); m_Length = new Fl_Input(12, 15, 24, 12, "LengthBars"); - m_Length->color(GUI_COLOUR); + m_Length->color(Info->GUI_COLOUR); m_Length->labelsize(8); m_Length->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); m_Length->textsize(8); @@ -94,7 +90,7 @@ SpiralPluginGUI(w,h,o,ch) add(m_Length); m_BeatsPerBar = new Fl_Input(12, 38, 24, 12, "BeatsPerBar"); - m_BeatsPerBar->color(GUI_COLOUR); + m_BeatsPerBar->color(Info->GUI_COLOUR); m_BeatsPerBar->labelsize(8); m_BeatsPerBar->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); m_BeatsPerBar->textsize(8); @@ -103,7 +99,7 @@ SpiralPluginGUI(w,h,o,ch) add(m_BeatsPerBar); m_BarLength = new Fl_Knob(5, 60, 40, 40, "BarLength"); - m_BarLength->color(GUI_COLOUR); + m_BarLength->color(Info->GUI_COLOUR); m_BarLength->type(Fl_Knob::DOTLIN); m_BarLength->labelsize(10); m_BarLength->maximum(10); @@ -113,7 +109,7 @@ SpiralPluginGUI(w,h,o,ch) add(m_BarLength); m_Speed = new Fl_Knob(5, 115, 40, 40, "Speed"); - m_Speed->color(GUI_COLOUR); + m_Speed->color(Info->GUI_COLOUR); m_Speed->type(Fl_Knob::DOTLIN); m_Speed->labelsize(10); m_Speed->maximum(4); @@ -123,7 +119,7 @@ SpiralPluginGUI(w,h,o,ch) add(m_Speed); m_Zoom = new Fl_Knob(5,170,40,40,"Zoom"); - m_Zoom->color(GUI_COLOUR); + m_Zoom->color(Info->GUI_COLOUR); m_Zoom->type(Fl_Knob::DOTLIN); m_Zoom->labelsize(10); m_Zoom->maximum(6); diff --git a/SpiralSound/Plugins/SmoothPlugin/Makefile.in b/SpiralSound/Plugins/SmoothPlugin/Makefile.in index 119a1eb..e35ca71 100644 --- a/SpiralSound/Plugins/SmoothPlugin/Makefile.in +++ b/SpiralSound/Plugins/SmoothPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building SmoothPlugin.so -# Generated by tmake at 22:13, 2001/09/17 -# Project: SmoothPlugin -# Template: app ############################################################################# ####### Compiler, tools and options @@ -70,7 +67,7 @@ UICDECLS = UICIMPLS = SRCMOC = OBJMOC = -DIST = +DIST = TARGET = SmoothPlugin.so ####### Implicit rules @@ -97,7 +94,7 @@ TARGET = SmoothPlugin.so all: $(TARGET) -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) moc: $(SRCMOC) @@ -112,7 +109,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -154,7 +151,6 @@ SmoothPlugin.o: SmoothPlugin.C \ ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H \ SpiralIcon.xpm SmoothPluginGUI.o: SmoothPluginGUI.C \ @@ -166,8 +162,7 @@ SmoothPluginGUI.o: SmoothPluginGUI.C \ ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ - ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H + ../SpiralPluginGUI.h ../../ChannelHandler.o: ../../ChannelHandler.C \ ../../ChannelHandler.h diff --git a/SpiralSound/Plugins/SmoothPlugin/SmoothPlugin.C b/SpiralSound/Plugins/SmoothPlugin/SmoothPlugin.C index 4db2f41..d1bf420 100644 --- a/SpiralSound/Plugins/SmoothPlugin/SmoothPlugin.C +++ b/SpiralSound/Plugins/SmoothPlugin/SmoothPlugin.C @@ -50,8 +50,8 @@ m_Down(0.5), m_Value(0) { m_PluginInfo.Name="Smooth"; - m_PluginInfo.Width=140; - m_PluginInfo.Height=100; + m_PluginInfo.Width=120; + m_PluginInfo.Height=80; m_PluginInfo.NumInputs=1; m_PluginInfo.NumOutputs=1; m_PluginInfo.PortTips.push_back("Input"); diff --git a/SpiralSound/Plugins/SmoothPlugin/SmoothPluginGUI.C b/SpiralSound/Plugins/SmoothPlugin/SmoothPluginGUI.C index 2082224..2f67d48 100644 --- a/SpiralSound/Plugins/SmoothPlugin/SmoothPluginGUI.C +++ b/SpiralSound/Plugins/SmoothPlugin/SmoothPluginGUI.C @@ -14,38 +14,34 @@ * 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 "SmoothPluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SmoothPluginGUI::SmoothPluginGUI(int w, int h,SmoothPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { - m_Up = new Fl_Knob(20, 25, 40, 40, "Up"); - m_Up->color(GUI_COLOUR); + m_Up = new Fl_Knob (8, 18, 40, 40, "Up"); + m_Up->color(Info->GUI_COLOUR); m_Up->type(Fl_Knob::DOTLIN); m_Up->labelsize(10); m_Up->maximum(1); m_Up->step(0.001); - m_Up->value(0.5); + m_Up->value(0.5); m_Up->callback((Fl_Callback*)cb_Up); add(m_Up); - - m_Down = new Fl_Knob(75, 25, 40, 40, "Down"); - m_Down->color(GUI_COLOUR); + + m_Down = new Fl_Knob (64, 18, 40, 40, "Down"); + m_Down->color(Info->GUI_COLOUR); m_Down->type(Fl_Knob::DOTLIN); m_Down->labelsize(10); m_Down->maximum(1); m_Down->step(0.001); - m_Down->value(0.5); + m_Down->value(0.5); m_Down->callback((Fl_Callback*)cb_Down); add(m_Down); diff --git a/SpiralSound/Plugins/SpiralLoopPlugin/Fl_Loop.C b/SpiralSound/Plugins/SpiralLoopPlugin/Fl_Loop.C index 7485b12..ac60363 100644 --- a/SpiralSound/Plugins/SpiralLoopPlugin/Fl_Loop.C +++ b/SpiralSound/Plugins/SpiralLoopPlugin/Fl_Loop.C @@ -14,7 +14,7 @@ * 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 "Fl_Loop.h" #include @@ -32,8 +32,8 @@ static const int UPDATECYCLES = 4; static const int POSMARKER_MAX = 50; -Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label) : -Fl_Group(x,y,w,h,label), +Fl_Loop::Fl_Loop(int x, int y, int w, int h, const char* label) : +Fl_Group(x,y,w,h,label), m_data(NULL), m_MainWin(NULL), m_Length(1000), @@ -59,26 +59,31 @@ m_LastMove(0), m_Snap(false), m_SnapDegrees(45), m_PosMarkerCount(0), -cb_Move(NULL) +cb_Move(NULL), +m_BGColour (FL_BLACK), +m_WaveColour (FL_GREEN), +m_SelColour (FL_WHITE), +m_IndColour (FL_BLUE), +m_MrkColour (FL_YELLOW) { box(FL_NO_BOX); m_MidX=(w/2)+x; m_MidY=(h/2)+y-20; } - + void Fl_Loop::SetData(float const *set, const int Len) { if (m_data!=NULL) delete[] m_data; m_data = new float[Len]; memcpy((void*)m_data,(void*)set,Len*sizeof(float)); - + SetLength(Len); } void Fl_Loop::SetLength(const int Len) { m_Length=Len; - + // recalc start and end points m_RangeStart=(long)(m_StartAngle*(m_Length/360.0f)); while (m_RangeStart < 0) m_RangeStart += m_Length; @@ -104,7 +109,7 @@ void Fl_Loop::DrawWav() float Sample=0; float SampleAngle=360.0f/(float)(REZ); - fl_color(100,155,100); + fl_color (m_WaveColour); while(m_Length>0 && nm_StartAngle && Angle #include @@ -27,11 +27,11 @@ class Fl_Loop : public Fl_Group { public: Fl_Loop(int x, int y, int w, int h, const char* label=0); - + virtual void draw(); virtual int handle(int event); - - void SetData(float const *set, const int Len); + + void SetData(float const *set, const int Len); void SetLength(const int Len); int GetLength() { return m_Length; } void SetPos(float p) {m_Pos=p;} @@ -44,15 +44,20 @@ public: void DrawEveryThing(); void DrawPosMarker(); void SetSnap(bool s) {m_Snap=s;} - void SetSnapAngle(int s) {m_SnapDegrees=s;} - + void SetSnapAngle(int s) { m_SnapDegrees=s; } + void SetBGColour (unsigned c) { m_BGColour=(Fl_Color)c; } + void SetWaveColour (unsigned c) { m_WaveColour=(Fl_Color)c; } + void SetSelColour (unsigned c) { m_SelColour=(Fl_Color)c; } + void SetIndColour (unsigned c) { m_IndColour=(Fl_Color)c; } + void SetMrkColour (unsigned c) { m_MrkColour=(Fl_Color)c; } + typedef void (cb)(Fl_Widget *, int); void SetMoveCallback(cb *cb_Move); - - void SelectAll(); - long GetRangeStart() { return m_RangeStart; } - long GetRangeEnd() { return m_RangeEnd; } - + + void SelectAll(); + long GetRangeStart() { return m_RangeStart; } + long GetRangeEnd() { return m_RangeEnd; } + private: float const *m_data; @@ -65,7 +70,7 @@ private: int m_BorderRad; int m_IndSX,m_IndSY,m_IndEX,m_IndEY; int m_MidX,m_MidY; - + float m_StartAngle; float m_EndAngle; float m_MoveAngle; @@ -81,9 +86,11 @@ private: bool m_Snap; int m_SnapDegrees; int m_PosMarkerCount; - + cb *cb_Move; - + + Fl_Color m_BGColour, m_WaveColour, m_SelColour, m_IndColour, m_MrkColour; + }; #endif diff --git a/SpiralSound/Plugins/SpiralLoopPlugin/Makefile.in b/SpiralSound/Plugins/SpiralLoopPlugin/Makefile.in index 1e734c4..7213956 100644 --- a/SpiralSound/Plugins/SpiralLoopPlugin/Makefile.in +++ b/SpiralSound/Plugins/SpiralLoopPlugin/Makefile.in @@ -1,22 +1,19 @@ ############################################################################# # Makefile for building SpiralLoopPlugin.so -# Generated by tmake at 22:23, 2002/02/03 -# Project: SpiralLoopPlugin -# Template: app ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl MOC = moc -UIC = +UIC = TAR = tar -cf GZIP = gzip -9f @@ -52,7 +49,7 @@ HEADERS = ../SpiralPlugin.h \ SpiralLoopPluginGUI.h \ ../Widgets/Fl_DragBar.H \ ../Widgets/Fl_Knob.H \ - ../Widgets/Fl_LED_Button.H + ../Widgets/Fl_LED_Button.H SOURCES = ../SpiralPlugin.C \ ../SpiralPluginGUI.C \ ../../ChannelHandler.C \ @@ -77,12 +74,12 @@ OBJECTS = ../SpiralPlugin.o \ ../Widgets/Fl_DragBar.o \ ../Widgets/Fl_Knob.o \ ../Widgets/Fl_LED_Button.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = +INTERFACES = +UICDECLS = +UICIMPLS = +SRCMOC = +OBJMOC = +DIST = TARGET = SpiralLoopPlugin.so ####### Implicit rules @@ -108,7 +105,7 @@ TARGET = SpiralLoopPlugin.so all: $(TARGET) -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) moc: $(SRCMOC) @@ -123,7 +120,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -158,8 +155,8 @@ install: ../../SpiralInfo.h -GUI/Widgets/Fl_Loop.o: GUI/Widgets/Fl_Loop.C \ - GUI/Widgets/Fl_Loop.h +#GUI/Widgets/Fl_Loop.o: GUI/Widgets/Fl_Loop.C \ +# GUI/Widgets/Fl_Loop.h Fl_Loop.o: Fl_Loop.C \ Fl_Loop.h diff --git a/SpiralSound/Plugins/SpiralLoopPlugin/SpiralLoopPluginGUI.C b/SpiralSound/Plugins/SpiralLoopPlugin/SpiralLoopPluginGUI.C index 755839a..f89924b 100644 --- a/SpiralSound/Plugins/SpiralLoopPlugin/SpiralLoopPluginGUI.C +++ b/SpiralSound/Plugins/SpiralLoopPlugin/SpiralLoopPluginGUI.C @@ -14,73 +14,74 @@ * 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 "SpiralLoopPluginGUI.h" #include #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SpiralLoopPluginGUI::SpiralLoopPluginGUI(int w, int h,SpiralLoopPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) -{ +{ m_LoopGUI = new Fl_Loop(0,15,w,h-15); - + m_LoopGUI->SetBGColour (Info->SCOPE_BG_COLOUR); + m_LoopGUI->SetWaveColour (Info->SCOPE_FG_COLOUR); + m_LoopGUI->SetSelColour (Info->SCOPE_SEL_COLOUR); + m_LoopGUI->SetIndColour (Info->SCOPE_IND_COLOUR); + m_LoopGUI->SetMrkColour (Info->SCOPE_MRK_COLOUR); + m_Play = new Fl_LED_Button(255, h-35, 40, 25, "Play"); - m_Play->color(GUIBG2_COLOUR); + //m_Play->color(GUIBG2_COLOUR); m_Play->type(1); m_Play->value(1); m_Play->down_box(FL_DOWN_BOX); m_Play->labelsize(10); - m_Play->callback((Fl_Callback*)cb_Play); + m_Play->callback((Fl_Callback*)cb_Play); m_LoopGUI->add(m_Play); - + m_Volume = new Fl_Knob(95, 100, 45, 45, "Volume"); - m_Volume->color(GUI_COLOUR); + m_Volume->color(Info->GUI_COLOUR); m_Volume->type(Fl_Knob::DOTLIN); m_Volume->labelsize(8); m_Volume->maximum(2); m_Volume->step(0.0001); - m_Volume->value(1); + m_Volume->value(1); m_Volume->callback((Fl_Callback*)cb_Volume); m_LoopGUI->add(m_Volume); - + m_Speed = new Fl_Knob(60, 150, 45, 45, "Speed"); - m_Speed->color(GUI_COLOUR); + m_Speed->color(Info->GUI_COLOUR); m_Speed->type(Fl_Knob::DOTLIN); m_Speed->labelsize(8); m_Speed->maximum(2); m_Speed->step(0.0001); - m_Speed->value(1); + m_Speed->value(1); m_Speed->callback((Fl_Callback*)cb_Speed); m_LoopGUI->add(m_Speed); - + m_Length = new Fl_Knob(120, 160, 45, 45, "Length"); - m_Length->color(GUI_COLOUR); + m_Length->color(Info->GUI_COLOUR); m_Length->type(Fl_Knob::DOTLIN); m_Length->labelsize(8); m_Length->maximum(1); m_Length->step(0.0001); - m_Length->value(1); + m_Length->value(1); m_Length->callback((Fl_Callback*)cb_Length); m_LoopGUI->add(m_Length); - + m_WavSize = new Fl_Knob(w-45, 15, 30, 30, "WaveSize"); - m_WavSize->color(GUI_COLOUR); + m_WavSize->color(Info->GUI_COLOUR); m_WavSize->type(Fl_Knob::DOTLIN); m_WavSize->labelsize(8); m_WavSize->maximum(3); m_WavSize->step(0.0001); - m_WavSize->value(1); + m_WavSize->value(1); m_WavSize->callback((Fl_Callback*)cb_WavSize); m_LoopGUI->add(m_WavSize); - + m_Ticks = new Fl_Counter(5,h-30,30,14,"Ticks/Loop"); m_Ticks->labelsize(8); m_Ticks->textsize(8); @@ -89,81 +90,81 @@ SpiralPluginGUI(w,h,o,ch) m_Ticks->value(64); m_Ticks->callback((Fl_Callback*)cb_Ticks); m_LoopGUI->add(m_Ticks); - + int X=w/2-30,Y=60,WIDTH=60,HEIGHT=12; int ycount=0; - + float phase=0.19f; float scale=70.0f; Fl_Boxtype boxtype=FL_THIN_UP_BOX; - + m_Rec = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Record"); m_Rec->type(1); m_Rec->box(boxtype); m_Rec->labelsize(8); - m_Rec->labelcolor(FL_RED); + m_Rec->labelcolor(FL_RED); m_Rec->callback((Fl_Callback*)cb_Rec); - m_LoopGUI->add(m_Rec); + m_LoopGUI->add(m_Rec); ycount++; - + m_OverDub = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "OverDub"); m_OverDub->type(1); m_OverDub->box(boxtype); m_OverDub->labelsize(8); - m_OverDub->labelcolor(FL_RED); + m_OverDub->labelcolor(FL_RED); m_OverDub->callback((Fl_Callback*)cb_OverDub); - m_LoopGUI->add(m_OverDub); + m_LoopGUI->add(m_OverDub); ycount++; - + m_Hold = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Keep Dub"); m_Hold->box(boxtype); m_Hold->labelsize(8); m_Hold->callback((Fl_Callback*)cb_Hold); - m_LoopGUI->add(m_Hold); + m_LoopGUI->add(m_Hold); ycount++; m_Undo = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Undo Dub"); m_Undo->box(boxtype); m_Undo->labelsize(8); m_Undo->callback((Fl_Callback*)cb_Undo); - m_LoopGUI->add(m_Undo); + m_LoopGUI->add(m_Undo); ycount++; - + m_Load = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Load"); m_Load->box(boxtype); m_Load->labelsize(8); m_Load->callback((Fl_Callback*)cb_Load); - m_LoopGUI->add(m_Load); + m_LoopGUI->add(m_Load); ycount++; - + m_Save = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Save"); m_Save->box(boxtype); m_Save->labelsize(8); m_Save->callback((Fl_Callback*)cb_Save); - m_LoopGUI->add(m_Save); + m_LoopGUI->add(m_Save); ycount++; m_Trig = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "New trigger"); m_Trig->box(boxtype); m_Trig->labelsize(8); m_Trig->callback((Fl_Callback*)cb_Trig); - m_LoopGUI->add(m_Trig); + m_LoopGUI->add(m_Trig); ycount++; - + m_Cut = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Cut"); m_Cut->box(boxtype); m_Cut->labelsize(8); m_Cut->callback((Fl_Callback*)cb_Cut); - m_LoopGUI->add(m_Trig); + m_LoopGUI->add(m_Trig); ycount++; - + m_Copy = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Copy"); m_Copy->box(boxtype); m_Copy->labelsize(8); m_Copy->callback((Fl_Callback*)cb_Copy); - m_LoopGUI->add(m_Trig); + m_LoopGUI->add(m_Trig); ycount++; - + m_Paste = new Fl_Button(X+(int)(sin(ycount*phase)*scale), Y+ycount*HEIGHT, WIDTH, HEIGHT, "Paste"); m_Paste->box(boxtype); m_Paste->labelsize(8); diff --git a/SpiralSound/Plugins/SpiralPlugin.C b/SpiralSound/Plugins/SpiralPlugin.C index 5a03aca..b8f5535 100644 --- a/SpiralSound/Plugins/SpiralPlugin.C +++ b/SpiralSound/Plugins/SpiralPlugin.C @@ -49,7 +49,7 @@ PluginInfo &SpiralPlugin::Initialise(const HostInfo *Host) { m_HostInfo=Host; - for (int n=0; nBUFSIZE)); } - + for (int n=0; n=m_Output.size()) return false; *s = m_Output[n]; - + return true; } @@ -81,7 +81,7 @@ bool SpiralPlugin::SetInput(unsigned int n, const Sample *s) m_Input[n]=s; return true; } - + void SpiralPlugin::UpdateChannelHandler() { m_AudioCH->UpdateDataNow(); @@ -90,11 +90,11 @@ void SpiralPlugin::UpdateChannelHandler() void SpiralPlugin::AddOutput() { Sample* NewSample = new Sample(m_HostInfo->BUFSIZE); - m_Output.push_back(NewSample); + m_Output.push_back(NewSample); } void SpiralPlugin::RemoveOutput() -{ +{ vector::iterator si=m_Output.end(); si--; delete *si; @@ -105,23 +105,23 @@ void SpiralPlugin::RemoveAllOutputs() { for (vector::iterator i=m_Output.begin(); i!=m_Output.end(); i++) - { + { delete *i; } - + m_Output.clear(); } void SpiralPlugin::AddInput() { - m_Input.push_back(NULL); + m_Input.push_back(NULL); } void SpiralPlugin::RemoveInput() -{ +{ vector::iterator si=m_Input.end(); si--; - m_Input.erase(si); + m_Input.erase(si); } void SpiralPlugin::RemoveAllInputs() @@ -129,19 +129,19 @@ void SpiralPlugin::RemoveAllInputs() m_Input.clear(); } -void SpiralPlugin::UpdatePluginInfoWithHost() -{ - if (UpdateInfo!=NULL) +void SpiralPlugin::UpdatePluginInfoWithHost() +{ + if (UpdateInfo!=NULL) { UpdateInfo(m_HostID,(void*)&m_PluginInfo); } } -void SpiralPlugin::SetUpdateInfoCallback(int ID, void(*s)(int, void *)) -{ - m_HostID=ID; - UpdateInfo=s; +void SpiralPlugin::SetUpdateInfoCallback(int ID, void(*s)(int, void *)) +{ + m_HostID=ID; + UpdateInfo=s; } - + void SpiralPlugin::SetInPortType(PluginInfo &pinfo, int port, Sample::SampleType type) { pinfo.PortTypes[port] = type; diff --git a/SpiralSound/Plugins/SpiralPlugin.h b/SpiralSound/Plugins/SpiralPlugin.h index bfe4a11..b3a350c 100644 --- a/SpiralSound/Plugins/SpiralPlugin.h +++ b/SpiralSound/Plugins/SpiralPlugin.h @@ -14,7 +14,7 @@ * 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 #include @@ -44,19 +44,24 @@ struct PluginInfo int NumOutputs; vector PortTips; vector PortTypes; - char BitMap[40][40][3]; + char BitMap[40][40][3]; }; struct HostInfo { - int BUFSIZE; - int FRAGSIZE; - int FRAGCOUNT; + int BUFSIZE; + int FRAGSIZE; + int FRAGCOUNT; int SAMPLERATE; string OUTPUTFILE; string MIDIFILE; int POLY; - int GUI_COLOUR; + unsigned GUI_COLOUR; + unsigned SCOPE_BG_COLOUR; + unsigned SCOPE_FG_COLOUR; + unsigned SCOPE_SEL_COLOUR; + unsigned SCOPE_IND_COLOUR; + unsigned SCOPE_MRK_COLOUR; }; ///////////////////////////////////////////////////////////////////// diff --git a/SpiralSound/Plugins/SpiralPluginGUI.C b/SpiralSound/Plugins/SpiralPluginGUI.C index 50a1a59..4e4f545 100644 --- a/SpiralSound/Plugins/SpiralPluginGUI.C +++ b/SpiralSound/Plugins/SpiralPluginGUI.C @@ -14,7 +14,7 @@ * 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 "SpiralPluginGUI.h" #include "SpiralPlugin.h" @@ -24,10 +24,6 @@ #include #include -static const int GUI_COLOUR = 154; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - Fl_Double_Window* SpiralPluginGUI::m_HelpWin=NULL; Fl_Text_Display* SpiralPluginGUI::m_HelpWin_text=NULL; SpiralPluginGUI* SpiralPluginGUI::Help_owner=NULL; diff --git a/SpiralSound/Plugins/SplitSwitchPlugin/SplitSwitchPluginGUI.C b/SpiralSound/Plugins/SplitSwitchPlugin/SplitSwitchPluginGUI.C index 47a1d61..a1b5df1 100644 --- a/SpiralSound/Plugins/SplitSwitchPlugin/SplitSwitchPluginGUI.C +++ b/SpiralSound/Plugins/SplitSwitchPlugin/SplitSwitchPluginGUI.C @@ -16,16 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - - #include "SplitSwitchPluginGUI.h" #include #include -#include - -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; //////////////////////////////////////////// @@ -36,8 +29,8 @@ SpiralPluginGUI (w, h, o, ch) m_Chans->labelsize (10); m_Chans->type (FL_SIMPLE_COUNTER); m_Chans->box (FL_PLASTIC_UP_BOX); - m_Chans->color (GUI_COLOUR); - m_Chans->selection_color (GUI_COLOUR); + m_Chans->color (Info->GUI_COLOUR); + m_Chans->selection_color (Info->GUI_COLOUR); m_Chans->step (1); m_Chans->value (2); m_Chans->callback ((Fl_Callback*) cb_Chans); @@ -47,8 +40,8 @@ SpiralPluginGUI (w, h, o, ch) m_Switch->labelsize (10); m_Switch->type (FL_SIMPLE_COUNTER); m_Switch->box (FL_PLASTIC_UP_BOX); - m_Switch->color (GUI_COLOUR); - m_Switch->selection_color (GUI_COLOUR); + m_Switch->color (Info->GUI_COLOUR); + m_Switch->selection_color (Info->GUI_COLOUR); m_Switch->step (1); m_Switch->value (1); m_Switch->callback ((Fl_Callback*) cb_Switch); diff --git a/SpiralSound/Plugins/SplitterPlugin/SplitterPluginGUI.C b/SpiralSound/Plugins/SplitterPlugin/SplitterPluginGUI.C index 44e1a4b..aafac95 100644 --- a/SpiralSound/Plugins/SplitterPlugin/SplitterPluginGUI.C +++ b/SpiralSound/Plugins/SplitterPlugin/SplitterPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SplitterPluginGUI::SplitterPluginGUI(int w, int h,SplitterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/StereoMixerPlugin/Makefile.in b/SpiralSound/Plugins/StereoMixerPlugin/Makefile.in index 884ba7c..277b75d 100644 --- a/SpiralSound/Plugins/StereoMixerPlugin/Makefile.in +++ b/SpiralSound/Plugins/StereoMixerPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building StereoMixerPlugin.so -# Generated by tmake at 22:21, 2001/09/17 -# Project: StereoMixerPlugin -# Template: app ############################################################################# ####### Compiler, tools and options diff --git a/SpiralSound/Plugins/StereoMixerPlugin/StereoMixerPluginGUI.C b/SpiralSound/Plugins/StereoMixerPlugin/StereoMixerPluginGUI.C index 31cbe68..a1c1c84 100644 --- a/SpiralSound/Plugins/StereoMixerPlugin/StereoMixerPluginGUI.C +++ b/SpiralSound/Plugins/StereoMixerPlugin/StereoMixerPluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// StereoMixerPluginGUI::StereoMixerPluginGUI(int w, int h,StereoMixerPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -38,7 +34,7 @@ SpiralPluginGUI(w,h,o,ch) { m_Chan[n] = new Fl_Slider (20 + (2 + Width * 2) * n, 22, Width, Height, ""); m_Chan[n]->type (4); - m_Chan[n]->selection_color (GUI_COLOUR); + m_Chan[n]->selection_color (Info->GUI_COLOUR); m_Chan[n]->box (FL_PLASTIC_DOWN_BOX); m_Chan[n]->labelsize (10); m_Chan[n]->maximum (2); @@ -49,7 +45,7 @@ SpiralPluginGUI(w,h,o,ch) { m_Pan[n] = new Fl_Knob (10 + (2 + Width * 2) * n, 122, 40, 40, "Pan"); m_Pan[n]->type (Fl_Knob::DOTLIN); - m_Pan[n]->color (GUI_COLOUR); + m_Pan[n]->color (Info->GUI_COLOUR); m_Pan[n]->labelsize (10); m_Pan[n]->maximum (1); m_Pan[n]->step (0.01); diff --git a/SpiralSound/Plugins/StreamPlugin/Makefile.in b/SpiralSound/Plugins/StreamPlugin/Makefile.in index 833af56..2ecf7f3 100644 --- a/SpiralSound/Plugins/StreamPlugin/Makefile.in +++ b/SpiralSound/Plugins/StreamPlugin/Makefile.in @@ -1,8 +1,5 @@ ############################################################################# # Makefile for building StreamPlugin.so -# Generated by tmake at 22:23, 2002/02/03 -# Project: StreamPlugin -# Template: app ############################################################################# ####### Compiler, tools and options @@ -117,7 +114,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -160,7 +157,6 @@ install: StreamPlugin.o: StreamPlugin.C \ StreamPlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ ../../RiffWav.h \ @@ -178,7 +174,6 @@ StreamPluginGUI.o: StreamPluginGUI.C \ ../SpiralPlugin.h \ ../../Sample.h \ ../../SpiralInfo.h \ - ../../Sample.h \ ../../RiffWav.h \ ../SpiralPluginGUI.h \ ../Widgets/Fl_DragBar.H \ diff --git a/SpiralSound/Plugins/StreamPlugin/StreamPluginGUI.C b/SpiralSound/Plugins/StreamPlugin/StreamPluginGUI.C index 0afc010..91b48a7 100644 --- a/SpiralSound/Plugins/StreamPlugin/StreamPluginGUI.C +++ b/SpiralSound/Plugins/StreamPlugin/StreamPluginGUI.C @@ -21,10 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// StreamPluginGUI::StreamPluginGUI(int w, int h,StreamPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -35,14 +31,14 @@ m_PitchValue (1.0f) for (int dis=0; dis<6; dis++) { m_Display[dis] = new Fl_SevenSeg (5 + 28*dis, 20, 28, 60); m_Display[dis] -> bar_width (4); - m_Display[dis] -> color (FL_BLACK); - m_Display[dis] -> color2 (FL_GRAY); + m_Display[dis] -> color (Info->SCOPE_FG_COLOUR); + m_Display[dis] -> color2 (Info->SCOPE_BG_COLOUR); if (dis > 0 && dis % 2 == 0) m_Display[dis] -> dp (colon); add (m_Display[dis]); } // volume control m_Volume = new Fl_Knob (180, 15, 50, 50, "Volume"); - m_Volume->color (GUI_COLOUR); + m_Volume->color (Info->GUI_COLOUR); m_Volume->type (Fl_Knob::LINELIN); m_Volume->labelsize (10); m_Volume->maximum (2); @@ -54,9 +50,9 @@ m_PitchValue (1.0f) m_Pitch = new Fl_Slider (5, 85, 235, 20, ""); m_Pitch->type (FL_HORIZONTAL); m_Pitch->labelsize (10); - m_Pitch->labelcolor (GUI_COLOUR); + m_Pitch->labelcolor (Info->GUI_COLOUR); m_Pitch->label (m_PitchLabel); - m_Pitch->selection_color (GUI_COLOUR); + m_Pitch->selection_color (Info->GUI_COLOUR); m_Pitch->box (FL_PLASTIC_DOWN_BOX); m_Pitch->maximum (20); m_Pitch->step (0.001); @@ -67,8 +63,8 @@ m_PitchValue (1.0f) m_Pos = new Fl_Slider (5, 108, 235, 20, ""); m_Pos->type (FL_HORIZONTAL); m_Pos->box (FL_PLASTIC_DOWN_BOX); - m_Pos->labelcolor (GUI_COLOUR); - m_Pos->selection_color (GUI_COLOUR); + m_Pos->labelcolor (Info->GUI_COLOUR); + m_Pos->selection_color (Info->GUI_COLOUR); m_Pos->maximum (1); m_Pos->callback ((Fl_Callback*)cb_Pos); add (m_Pos); @@ -76,8 +72,8 @@ m_PitchValue (1.0f) m_Load = new Fl_Button (2, 130, 30, 30, "Load"); m_Load->labelsize (9); m_Load->box (FL_PLASTIC_UP_BOX); - m_Load->color (GUI_COLOUR); - m_Load->selection_color (GUI_COLOUR); + m_Load->color (Info->GUI_COLOUR); + m_Load->selection_color (Info->GUI_COLOUR); m_Load->callback ((Fl_Callback*)cb_Load); add (m_Load); // reset btn @@ -85,8 +81,8 @@ m_PitchValue (1.0f) m_ToStart->labelsize (10); m_ToStart->labeltype (FL_SYMBOL_LABEL); m_ToStart->box (FL_PLASTIC_UP_BOX); - m_ToStart->color (GUI_COLOUR); - m_ToStart->selection_color (GUI_COLOUR); + m_ToStart->color (Info->GUI_COLOUR); + m_ToStart->selection_color (Info->GUI_COLOUR); m_ToStart->callback ((Fl_Callback*)cb_ToStart); add (m_ToStart); // stop btn @@ -94,8 +90,8 @@ m_PitchValue (1.0f) m_Stop->labelsize (10); m_Stop->labeltype (FL_SYMBOL_LABEL); m_Stop->box (FL_PLASTIC_UP_BOX); - m_Stop->color (GUI_COLOUR); - m_Stop->selection_color (GUI_COLOUR); + m_Stop->color (Info->GUI_COLOUR); + m_Stop->selection_color (Info->GUI_COLOUR); m_Stop->callback ((Fl_Callback*)cb_Stop); add (m_Stop); // play btn @@ -103,40 +99,40 @@ m_PitchValue (1.0f) m_Play->labelsize (10); m_Play->labeltype (FL_SYMBOL_LABEL); m_Play->box (FL_PLASTIC_UP_BOX); - m_Play->color (GUI_COLOUR); - m_Play->selection_color (GUI_COLOUR); + m_Play->color (Info->GUI_COLOUR); + m_Play->selection_color (Info->GUI_COLOUR); m_Play->callback ((Fl_Callback*)cb_Play); add (m_Play); // 1/2 speed btn m_Div = new Fl_Button (122, 130, 30, 30, "/2"); m_Div->labelsize (9); m_Div->box (FL_PLASTIC_UP_BOX); - m_Div->color (GUI_COLOUR); - m_Div->selection_color (GUI_COLOUR); + m_Div->color (Info->GUI_COLOUR); + m_Div->selection_color (Info->GUI_COLOUR); m_Div->callback ((Fl_Callback*)cb_Div); add (m_Div); // normal speed btn m_Reset = new Fl_Button (152, 130, 30, 30, "Reset"); m_Reset->labelsize (9); m_Reset->box (FL_PLASTIC_UP_BOX); - m_Reset->color (GUI_COLOUR); - m_Reset->selection_color (GUI_COLOUR); + m_Reset->color (Info->GUI_COLOUR); + m_Reset->selection_color (Info->GUI_COLOUR); m_Reset->callback ((Fl_Callback*)cb_Reset); add (m_Reset); // dbl speed btn m_Dbl = new Fl_Button (182, 130, 30, 30, "X2"); m_Dbl->labelsize (9); m_Dbl->box (FL_PLASTIC_UP_BOX); - m_Dbl->color (GUI_COLOUR); - m_Dbl->selection_color (GUI_COLOUR); + m_Dbl->color (Info->GUI_COLOUR); + m_Dbl->selection_color (Info->GUI_COLOUR); m_Dbl->callback ((Fl_Callback*)cb_Dbl); add (m_Dbl); // nudge btn m_Nudge = new Fl_Repeat_Button (212, 130, 30, 30, "Nudge"); m_Nudge->labelsize (9); m_Nudge->box (FL_PLASTIC_UP_BOX); - m_Nudge->color (GUI_COLOUR); - m_Nudge->selection_color (GUI_COLOUR); + m_Nudge->color (Info->GUI_COLOUR); + m_Nudge->selection_color (Info->GUI_COLOUR); m_Nudge->callback ((Fl_Callback*)cb_Nudge); add (m_Nudge); } diff --git a/SpiralSound/Plugins/SwitchPlugin/SwitchPluginGUI.C b/SpiralSound/Plugins/SwitchPlugin/SwitchPluginGUI.C index c458a99..d6e5553 100644 --- a/SpiralSound/Plugins/SwitchPlugin/SwitchPluginGUI.C +++ b/SpiralSound/Plugins/SwitchPlugin/SwitchPluginGUI.C @@ -20,17 +20,13 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// SwitchPluginGUI::SwitchPluginGUI(int w, int h,SwitchPlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI(w,h,o,ch) { m_Mix = new Fl_Button(20, 30, 50, 20, "Mix"); - m_Mix->selection_color(GUI_COLOUR); + m_Mix->selection_color(Info->GUI_COLOUR); m_Mix->labelsize(8); m_Mix->type(1); m_Mix->callback((Fl_Callback*)cb_Mix); diff --git a/SpiralSound/Plugins/TransposePlugin/TransposePluginGUI.C b/SpiralSound/Plugins/TransposePlugin/TransposePluginGUI.C index 459fbdc..0e7b12b 100644 --- a/SpiralSound/Plugins/TransposePlugin/TransposePluginGUI.C +++ b/SpiralSound/Plugins/TransposePlugin/TransposePluginGUI.C @@ -19,20 +19,16 @@ #include "TransposePluginGUI.h" #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// TransposePluginGUI::TransposePluginGUI (int w, int h,TransposePlugin *o,ChannelHandler *ch,const HostInfo *Info) : SpiralPluginGUI (w, h, o, ch) { m_Amount = new Fl_Counter (10, 20, 50, 20, "Amount"); - m_Amount->color (GUI_COLOUR); + m_Amount->color (Info->GUI_COLOUR); m_Amount->type (FL_SIMPLE_COUNTER); m_Amount->box (FL_PLASTIC_UP_BOX); - m_Amount->color (GUI_COLOUR); + m_Amount->color (Info->GUI_COLOUR); m_Amount->textsize (10); m_Amount->labelsize (10); m_Amount->step (1); diff --git a/SpiralSound/Plugins/TrigPlugin/TrigPluginGUI.C b/SpiralSound/Plugins/TrigPlugin/TrigPluginGUI.C index 5cc1ef3..fdbca03 100644 --- a/SpiralSound/Plugins/TrigPlugin/TrigPluginGUI.C +++ b/SpiralSound/Plugins/TrigPlugin/TrigPluginGUI.C @@ -21,10 +21,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// TrigPluginGUI::TrigPluginGUI(int w, int h,TrigPlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -36,19 +32,19 @@ SpiralPluginGUI(w,h,o,ch) m_Sin->labelsize(8); m_Sin->type(1); m_Sin->value(1); - m_Sin->selection_color(GUI_COLOUR); + m_Sin->selection_color(Info->GUI_COLOUR); m_Sin->callback((Fl_Callback*)cb_Sin); m_Cos = new Fl_Button(5, 30, 50, 15,"Cos"); m_Cos->labelsize(8); m_Cos->type(1); - m_Cos->selection_color(GUI_COLOUR); + m_Cos->selection_color(Info->GUI_COLOUR); m_Cos->callback((Fl_Callback*)cb_Cos); m_Tan = new Fl_Button(5, 45, 50, 15,"Tan"); m_Tan->labelsize(8); m_Tan->type(1); - m_Tan->selection_color(GUI_COLOUR); + m_Tan->selection_color(Info->GUI_COLOUR); m_Tan->callback((Fl_Callback*)cb_Tan); end(); diff --git a/SpiralSound/Plugins/WaveShaperPlugin/Makefile.in b/SpiralSound/Plugins/WaveShaperPlugin/Makefile.in index 92825d7..68f6b74 100644 --- a/SpiralSound/Plugins/WaveShaperPlugin/Makefile.in +++ b/SpiralSound/Plugins/WaveShaperPlugin/Makefile.in @@ -43,6 +43,7 @@ HEADERS = ../SpiralPlugin.h \ ../../ChannelHandler.h \ ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ + ../Widgets/Fl_LED_Button.H \ ../../Sample.h \ WaveShaperPlugin.h \ WaveShaperPluginGUI.h @@ -51,6 +52,7 @@ SOURCES = ../SpiralPlugin.C \ ../../ChannelHandler.C \ ../Widgets/Fl_Knob.cxx \ ../Widgets/Fl_DragBar.cxx \ + ../Widgets/Fl_LED_Button.cxx \ ../../Sample.C \ WaveShaperPlugin.C \ WaveShaperPluginGUI.C @@ -59,6 +61,7 @@ OBJECTS = ../SpiralPlugin.o \ ../../ChannelHandler.o \ ../Widgets/Fl_Knob.o \ ../Widgets/Fl_DragBar.o \ + ../Widgets/Fl_LED_Button.o \ ../../Sample.o \ WaveShaperPlugin.o \ WaveShaperPluginGUI.o @@ -94,7 +97,7 @@ TARGET = WaveShaperPlugin.so all: $(TARGET) -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) moc: $(SRCMOC) @@ -109,7 +112,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -128,12 +131,17 @@ install: ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ ../SpiralPluginGUI.h \ ../Widgets/Fl_DragBar.H \ + ../Widgets/Fl_Knob.H \ + ../Widgets/Fl_LED_Button.H \ ../SpiralPlugin.h \ ../../Sample.h ../Widgets/Fl_Knob.o: ../Widgets/Fl_Knob.cxx \ ../Widgets/Fl_Knob.H +../Widgets/Fl_LED_Button.o: ../Widgets/Fl_LED_Button.cxx \ + ../Widgets/Fl_LED_Button.H + ../Widgets/Fl_DragBar.o: ../Widgets/Fl_DragBar.cxx \ ../Widgets/Fl_DragBar.H @@ -144,27 +152,25 @@ install: WaveShaperPlugin.o: WaveShaperPlugin.C \ WaveShaperPlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ WaveShaperPluginGUI.h \ ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ + ../Widgets/Fl_LED_Button.H \ ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H \ SpiralIcon.xpm WaveShaperPluginGUI.o: WaveShaperPluginGUI.C \ WaveShaperPluginGUI.h \ ../Widgets/Fl_Knob.H \ ../Widgets/Fl_DragBar.H \ + ../Widgets/Fl_LED_Button.H \ WaveShaperPlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ - ../SpiralPluginGUI.h \ - ../Widgets/Fl_DragBar.H + ../SpiralPluginGUI.h ../../ChannelHandler.o: ../../ChannelHandler.C \ ../../ChannelHandler.h diff --git a/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.C b/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.C index 4572807..cd1d501 100644 --- a/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.C +++ b/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.C @@ -1,6 +1,6 @@ /* WaveShaper Plugin Copyleft (C) 2001 Yves Usson * for SpiralSynthModular -/ * Copyleft (C) 2000 David Griffiths + * 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 @@ -21,11 +21,12 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - -FunctionPlot::FunctionPlot(int ox, int oy, int ww, int hh) : Fl_Widget (ox, oy, ww, hh) { +FunctionPlot::FunctionPlot(int ox, int oy, int ww, int hh) : +Fl_Widget (ox, oy, ww, hh), +m_IndColour(FL_YELLOW), +m_MrkColour(FL_BLUE), +m_FGColour(FL_GREEN) +{ fval = new float[256]; for (int i=0;i<256;i++) fval[i] = i / 128.0 - 1.0; } @@ -45,17 +46,19 @@ void FunctionPlot::draw() { fl_clip(ox,oy,ww,hh); coefx = ww / 256.0; coefy = hh / 2.0; - for (int i = -5; i < 5; i++) + for (int i = -5; i <= 5; i++) { - if (i==0) fl_color(FL_BLUE); else fl_color(FL_CYAN); + if (i==0) fl_color (m_IndColour); + else fl_color (m_MrkColour); fl_line(ox,oy+hh/2+i*hh/10,ox+ww,oy+hh/2+i*hh/10); } - for (int i = -5; i < 5; i++) + for (int i = -5; i <= 5; i++) { - if (i==0) fl_color(FL_BLUE); else fl_color(FL_CYAN); + if (i==0) fl_color (m_IndColour); + else fl_color (m_MrkColour); fl_line(ox+i*ww/10+ww/2,oy,ox+i*ww/10+ww/2,oy+hh); } - fl_color(FL_RED); + fl_color (m_FGColour); float y1 = oy+hh/2-coefy*fval[0]; for (int i = 0; i < 255; i++) { @@ -63,7 +66,7 @@ void FunctionPlot::draw() { fl_line((int)(ox+i*coefx),(int)y1,(int)(ox+(i+1)*coefx),(int)y2); y1 = y2; } - fl_color(FL_BLACK); + fl_color (FL_BLACK); fl_pop_clip(); } @@ -90,10 +93,11 @@ WaveShaperPluginGUI::WaveShaperPluginGUI (int w, int h, WaveShaperPlugin *o, Cha SpiralPluginGUI(w, h, o, ch) { fplot = new FunctionPlot(3, 20, 268, 195); - fplot->box(FL_ENGRAVED_BOX); - fplot->color(7); + fplot->box (FL_UP_BOX); + fplot->color (Info->SCOPE_BG_COLOUR); + fplot->SetColours (Info->SCOPE_IND_COLOUR, Info->SCOPE_MRK_COLOUR, Info->SCOPE_FG_COLOUR); - radio_polynomial = new Fl_Round_Button(3, 218, 30, 20, "S"); + radio_polynomial = new Fl_LED_Button(3, 218, 30, 20, "S"); radio_polynomial->down_box(FL_ROUND_DOWN_BOX); radio_polynomial->value(1); radio_polynomial->type(102); @@ -101,7 +105,7 @@ SpiralPluginGUI(w, h, o, ch) radio_polynomial->labelsize(12); radio_polynomial->callback((Fl_Callback*)cb_radio); - radio_sines = new Fl_Round_Button(3, 238, 30, 20, "S"); + radio_sines = new Fl_LED_Button(3, 238, 30, 20, "S"); radio_sines->down_box(FL_ROUND_DOWN_BOX); radio_sines->value(0); radio_sines->type(102); @@ -132,7 +136,7 @@ SpiralPluginGUI(w, h, o, ch) for (int i=0; i<6; i++) { knob[i] = new Fl_Knob (70+i*35, 220, 30, 30, ""); - knob[i]->color (GUI_COLOUR); + knob[i]->color (Info->GUI_COLOUR); knob[i]->type (Fl_Knob::DOTLIN); knob[i]->labelsize (10); knob[i]->maximum (1); @@ -162,12 +166,12 @@ void WaveShaperPluginGUI::Update () { fplot->redraw (); } -inline void WaveShaperPluginGUI::cb_radio_i (Fl_Round_Button*, void*) { +inline void WaveShaperPluginGUI::cb_radio_i (Fl_LED_Button*, void*) { m_GUICH->Set ("WaveType", (int)radio_polynomial->value ()); m_GUICH->SetCommand (WaveShaperPlugin::SETWAVETYPE); } -void WaveShaperPluginGUI::cb_radio (Fl_Round_Button* o, void* v) { +void WaveShaperPluginGUI::cb_radio (Fl_LED_Button* o, void* v) { ((WaveShaperPluginGUI*)(o->parent()))->cb_radio_i (o, v); } diff --git a/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.h b/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.h index d8cb572..388afe8 100644 --- a/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.h +++ b/SpiralSound/Plugins/WaveShaperPlugin/WaveShaperPluginGUI.h @@ -18,14 +18,12 @@ */ #include -#include #include -#include #include -#include - #include "../Widgets/Fl_Knob.H" #include "../Widgets/Fl_DragBar.H" +#include "../Widgets/Fl_LED_Button.H" + #include "WaveShaperPlugin.h" #include "../SpiralPluginGUI.h" @@ -40,7 +38,11 @@ class FunctionPlot : public Fl_Widget { float *fval; void draw (); int handle (int event); + Fl_Color m_IndColour, m_MrkColour, m_FGColour; public: + void SetColours (unsigned i, unsigned m, unsigned f) { + m_IndColour=(Fl_Color)i; m_MrkColour=(Fl_Color)m; m_FGColour=(Fl_Color)f; + } void set (const int index, const float v); float get (const int index) const; }; @@ -54,12 +56,11 @@ class WaveShaperPluginGUI : public SpiralPluginGUI { const string GetHelpText (const string &loc); private: FunctionPlot *fplot; - Fl_Round_Button *radio_polynomial; - Fl_Round_Button *radio_sines; + Fl_LED_Button *radio_polynomial, *radio_sines; Fl_Knob *knob[6]; //// Callbacks //// - inline void cb_radio_i (Fl_Round_Button*, void*); - static void cb_radio (Fl_Round_Button* o, void* v); + inline void cb_radio_i (Fl_LED_Button*, void*); + static void cb_radio (Fl_LED_Button* o, void* v); inline void cb_knob_i (Fl_Knob*, void*); static void cb_knob (Fl_Knob* o, void* v); }; diff --git a/SpiralSound/Plugins/WaveTablePlugin/WaveTablePluginGUI.C b/SpiralSound/Plugins/WaveTablePlugin/WaveTablePluginGUI.C index 775e3aa..578ba94 100644 --- a/SpiralSound/Plugins/WaveTablePlugin/WaveTablePluginGUI.C +++ b/SpiralSound/Plugins/WaveTablePlugin/WaveTablePluginGUI.C @@ -20,10 +20,6 @@ #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - static unsigned char *image_Square[] = { (unsigned char*)"20 20 2 1", (unsigned char*)" \tc None", @@ -240,7 +236,7 @@ m_Octave(0) ShapeSine = new Fl_Check_Button(5, 15, 55, 30); ShapeSine->type(102); ShapeSine->down_box(FL_DIAMOND_DOWN_BOX); - ShapeSine->selection_color(GUI_COLOUR); + ShapeSine->selection_color(Info->GUI_COLOUR); pixmap_Sine.label(ShapeSine); ShapeSine->set(); ShapeSine->callback((Fl_Callback*)cb_Sine); @@ -248,56 +244,56 @@ m_Octave(0) ShapeSquare = new Fl_Check_Button(5, 35, 55, 30); ShapeSquare->type(102); ShapeSquare->down_box(FL_DIAMOND_DOWN_BOX); - ShapeSquare->selection_color(GUI_COLOUR); + ShapeSquare->selection_color(Info->GUI_COLOUR); pixmap_Square.label(ShapeSquare); ShapeSquare->callback((Fl_Callback*)cb_Square); ShapeSaw = new Fl_Check_Button(5, 55, 55, 30); ShapeSaw->type(102); ShapeSaw->down_box(FL_DIAMOND_DOWN_BOX); - ShapeSaw->selection_color(GUI_COLOUR); + ShapeSaw->selection_color(Info->GUI_COLOUR); pixmap_Saw.label(ShapeSaw); ShapeSaw->callback((Fl_Callback*)cb_Saw); ShapeRevSaw = new Fl_Check_Button(5, 75, 55, 30); ShapeRevSaw->type(102); ShapeRevSaw->down_box(FL_DIAMOND_DOWN_BOX); - ShapeRevSaw->selection_color(GUI_COLOUR); + ShapeRevSaw->selection_color(Info->GUI_COLOUR); pixmap_RevSaw.label(ShapeRevSaw); ShapeRevSaw->callback((Fl_Callback*)cb_RevSaw); ShapeTri = new Fl_Check_Button(55, 15, 55, 30); ShapeTri->type(102); ShapeTri->down_box(FL_DIAMOND_DOWN_BOX); - ShapeTri->selection_color(GUI_COLOUR); + ShapeTri->selection_color(Info->GUI_COLOUR); pixmap_Tri.label(ShapeTri); ShapeTri->callback((Fl_Callback*)cb_Tri); Pulse1 = new Fl_Check_Button(55, 35, 55, 30); Pulse1->type(102); Pulse1->down_box(FL_DIAMOND_DOWN_BOX); - Pulse1->selection_color(GUI_COLOUR); + Pulse1->selection_color(Info->GUI_COLOUR); pixmap_Pulse1.label(Pulse1); Pulse1->callback((Fl_Callback*)cb_Pulse1); Pulse2 = new Fl_Check_Button(55, 55, 55, 30); Pulse2->type(102); Pulse2->down_box(FL_DIAMOND_DOWN_BOX); - Pulse2->selection_color(GUI_COLOUR); + Pulse2->selection_color(Info->GUI_COLOUR); pixmap_Pulse2.label(Pulse2); Pulse2->callback((Fl_Callback*)cb_Pulse2); ShapeInvSine = new Fl_Check_Button(55, 75, 55, 30); ShapeInvSine->type(102); ShapeInvSine->down_box(FL_DIAMOND_DOWN_BOX); - ShapeInvSine->selection_color(GUI_COLOUR); + ShapeInvSine->selection_color(Info->GUI_COLOUR); pixmap_InvSine.label(ShapeInvSine); ShapeInvSine->callback((Fl_Callback*)cb_InvSine); Freq = new Fl_Knob(188, 2, 40, 40, "Octave"); - Freq->color(GUI_COLOUR); + Freq->color(Info->GUI_COLOUR); Freq->type(Fl_Knob::LINELIN); Freq->labelsize(10); Freq->maximum(6); @@ -308,7 +304,7 @@ m_Octave(0) Freq->callback((Fl_Callback*)cb_Freq); FineTune = new Fl_Knob(112, 22, 65, 65, "Fine Tune"); - FineTune->color(GUI_COLOUR); + FineTune->color(Info->GUI_COLOUR); FineTune->type(Fl_Knob::LINELIN); FineTune->labelsize(10); FineTune->scaleticks(20); @@ -318,7 +314,7 @@ m_Octave(0) FineTune->callback((Fl_Callback*)cb_FineTune); ModAmount = new Fl_Knob(188, 54, 40, 40, "Mod Depth"); - ModAmount->color(GUI_COLOUR); + ModAmount->color(Info->GUI_COLOUR); ModAmount->type(Fl_Knob::LINELIN); ModAmount->labelsize(10); ModAmount->maximum(2.0f); diff --git a/SpiralSound/Plugins/Widgets/Fl_SevenSeg.cxx b/SpiralSound/Plugins/Widgets/Fl_SevenSeg.cxx index 9cd648b..2b4912c 100644 --- a/SpiralSound/Plugins/Widgets/Fl_SevenSeg.cxx +++ b/SpiralSound/Plugins/Widgets/Fl_SevenSeg.cxx @@ -2,9 +2,6 @@ #include "Fl_SevenSeg.H" -// Andy Preston changed -// Fl_SevenSeg::Fl_SevenSeg(int x,int y,int w,int h):Fl_Widget(x,y,w,h) { -// to Fl_SevenSeg::Fl_SevenSeg(int x, int y, int w, int h) : Fl_Widget (x, y, w, h), decpt (off) { @@ -20,16 +17,6 @@ decpt (off) { Fl_SevenSeg::~Fl_SevenSeg(void) { } -// Andy Preston changed -//void Fl_SevenSeg::value(int v) { -// if (v <0) digit = -1; -// else -// if (v>9) digit = 9; -// else -// digit = v; -// if (active()) redraw(); -//} -// to void Fl_SevenSeg::value (int v) { if (v>9) digit = 9; else digit = v; @@ -45,18 +32,10 @@ const int Fl_SevenSeg::value(void) { return digit; } -// Andy Preston changed -// void Fl_SevenSeg::dp(int onoff) { -// decpt =(onoff!=0); -// } -// to void Fl_SevenSeg::dp (dp_type state) { decpt = state; } -// Andy Preston changed -// const int Fl_SevenSeg::dp(void) { -// to const dp_type Fl_SevenSeg::dp(void) { return decpt; } @@ -77,28 +56,14 @@ int val; draw_box(); - // andy preston fl_color (color2()); fl_rectf (x(), y(), w(), h()); - // Andy Preston Changed - // int xx = x()+4; - // int ww = w()-8; - // int yy = y()+4; - // int hh = h()-8; - // to int xx = x()+2; int ww = w()-4; int yy = y()+2; int hh = h()-4; - // Andy Preston removed - // fl_clip(xx,yy,ww,hh); - // fl_color(color2()); - // fl_rectf(xx,yy,ww,hh); - - // Andy Preston changed - // if (digit == -1) return; if (digit < -1) return; Fl::get_color(color(),r,g,b); @@ -114,7 +79,6 @@ int val; switch(digit) { - // Andy Preston case -1: draw_seg_g (xx, yy, ww, hh); break; @@ -191,10 +155,6 @@ int val; break; } - // Andy Preston changed (naughty, naughty, who missed out the dp drawing code then?) - // fl_line_style(FL_SOLID,1); - // if (decpt) { } - // to if (decpt==point) draw_seg_dp (xx, yy, ww, hh); else if (decpt==colon) draw_seg_col (xx, yy, ww, hh); fl_line_style(FL_SOLID,1); @@ -203,7 +163,6 @@ int val; } -// Andy Preston void Fl_SevenSeg::draw_seg_dp (int xx, int yy, int ww, int hh) { int x1 = xx - segwidth / 2; int y1 = yy + hh - segwidth; @@ -211,7 +170,6 @@ void Fl_SevenSeg::draw_seg_dp (int xx, int yy, int ww, int hh) { fl_line (x1, y1, x2, y1); } -// Andy Preston void Fl_SevenSeg::draw_seg_col (int xx, int yy, int ww, int hh) { int x1 = xx - segwidth/2; int x2 = x1 + segwidth/3; diff --git a/SpiralSound/Plugins/XFadePlugin/Makefile.in b/SpiralSound/Plugins/XFadePlugin/Makefile.in index 38c2038..56cdeda 100644 --- a/SpiralSound/Plugins/XFadePlugin/Makefile.in +++ b/SpiralSound/Plugins/XFadePlugin/Makefile.in @@ -1,19 +1,16 @@ ############################################################################# # Makefile for building XFadePlugin.so -# Generated by tmake at 22:23, 2002/02/03 -# Project: XFadePlugin -# Template: app ############################################################################# ####### Compiler, tools and options CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = +LFLAGS = LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl MOC = moc UIC = @@ -65,12 +62,12 @@ OBJECTS = ../SpiralPlugin.o \ ../../Sample.o \ XFadePlugin.o \ XFadePluginGUI.o -INTERFACES = -UICDECLS = -UICIMPLS = -SRCMOC = -OBJMOC = -DIST = +INTERFACES = +UICDECLS = +UICIMPLS = +SRCMOC = +OBJMOC = +DIST = TARGET = XFadePlugin.so ####### Implicit rules @@ -96,7 +93,7 @@ TARGET = XFadePlugin.so all: $(TARGET) -$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) +$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) moc: $(SRCMOC) @@ -111,7 +108,7 @@ dist: clean: -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) -rm -f *~ core - + install: $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins @@ -146,7 +143,6 @@ install: XFadePlugin.o: XFadePlugin.C \ XFadePlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ XFadePluginGUI.h \ @@ -158,7 +154,6 @@ XFadePluginGUI.o: XFadePluginGUI.C \ XFadePluginGUI.h \ XFadePlugin.h \ ../SpiralPlugin.h \ - ../../Sample.h \ ../../SpiralInfo.h \ ../../Sample.h \ ../SpiralPluginGUI.h \ diff --git a/SpiralSound/Plugins/XFadePlugin/XFadePluginGUI.C b/SpiralSound/Plugins/XFadePlugin/XFadePluginGUI.C index 6f399fa..8679980 100644 --- a/SpiralSound/Plugins/XFadePlugin/XFadePluginGUI.C +++ b/SpiralSound/Plugins/XFadePlugin/XFadePluginGUI.C @@ -14,16 +14,12 @@ * 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 "XFadePluginGUI.h" #include #include -static const int GUI_COLOUR = 179; -static const int GUIBG_COLOUR = 144; -static const int GUIBG2_COLOUR = 145; - //////////////////////////////////////////// XFadePluginGUI::XFadePluginGUI(int w, int h,XFadePlugin *o,ChannelHandler *ch,const HostInfo *Info) : @@ -32,7 +28,7 @@ SpiralPluginGUI(w,h,o,ch) m_Mix = new Fl_Slider(5, 20, 200, 20, ""); m_Mix->type(FL_HOR_NICE_SLIDER); m_Mix->box (FL_PLASTIC_DOWN_BOX); - m_Mix->selection_color(GUI_COLOUR); + m_Mix->selection_color(Info->GUI_COLOUR); m_Mix->labelsize(10); m_Mix->maximum(1); m_Mix->step(0.0001); diff --git a/SpiralSound/SpiralInfo.C b/SpiralSound/SpiralInfo.C index ba8554d..0884d8f 100644 --- a/SpiralSound/SpiralInfo.C +++ b/SpiralSound/SpiralInfo.C @@ -33,64 +33,72 @@ void SpiralInfo::LoadPrefs() { string rcfn(m_HomeDir+"/"+GetResFileName()); ifstream i(rcfn.c_str()); - + if (!i) { cerr<<"Creating "<>temp>>temp>>temp; - s>>temp>>temp>>m_Version; - s>>temp>>temp>>LOCALE; - s>>temp>>temp>>BUFSIZE; - s>>temp>>temp>>FRAGSIZE; - s>>temp>>temp>>FRAGCOUNT; - s>>temp>>temp>>SAMPLERATE; - s>>temp>>temp>>WANTMIDI; - s>>temp>>temp>>FILTERGRAN; - s>>temp>>temp>>OUTPUTFILE; - s>>temp>>temp>>MIDIFILE; - s>>temp>>temp>>USEPLUGINLIST; - s>>temp>>temp>>POLY; - //s>>temp>>temp>>GUI_COLOUR; - //s>>temp>>temp>>GUIBG_COLOUR; - //s>>temp>>temp>>GUIBG2_COLOUR; + s >> temp >> temp >> temp; + s >> temp >> temp >> m_Version; + s >> temp >> temp >> LOCALE; + s >> temp >> temp >> BUFSIZE; + s >> temp >> temp >> FRAGSIZE; + s >> temp >> temp >> FRAGCOUNT; + s >> temp >> temp >> SAMPLERATE; + s >> temp >> temp >> WANTMIDI; + s >> temp >> temp >> FILTERGRAN; + s >> temp >> temp >> OUTPUTFILE; + s >> temp >> temp >> MIDIFILE; + s >> temp >> temp >> USEPLUGINLIST; + s >> temp >> temp >> POLY; + if (m_Version>0) { + s >> temp >> temp >> GUI_COLOUR; + s >> temp >> temp >> SCOPE_BG_COLOUR; + s >> temp >> temp >> SCOPE_FG_COLOUR; + s >> temp >> temp >> SCOPE_SEL_COLOUR; + s >> temp >> temp >> SCOPE_IND_COLOUR; + s >> temp >> temp >> SCOPE_MRK_COLOUR; + } } void SpiralInfo::StreamOutPrefs(ostream &s) { - s<<"SpiralSound resource file"<redraw(); - m_NextPluginButton++; +// m_NextPluginButton++; Fl::check(); } } @@ -701,30 +708,30 @@ void SynthModular::AddComment(int n) ////////////////////////////////////////////////////////// void SynthModular::UpdateHostInfo() -{ - // used to use string streams, but this seems to cause a compiler bug - // at the moment, so fall back to using a temporary file - +{ + // used to use string streams, but this seems to cause a compiler bug + // at the moment, so fall back to using a temporary file + //std::stringstream str; - fstream ofs("___temp.ssmtmp",ios::out); + fstream ofs("___temp.ssmtmp",ios::out); //str<<*this; ofs<<*this; - + ClearUp(); - + // update the settings m_Info.BUFSIZE = SpiralInfo::BUFSIZE; m_Info.FRAGSIZE = SpiralInfo::FRAGSIZE; - m_Info.FRAGCOUNT = SpiralInfo::FRAGCOUNT; + m_Info.FRAGCOUNT = SpiralInfo::FRAGCOUNT; m_Info.SAMPLERATE = SpiralInfo::SAMPLERATE; m_Info.OUTPUTFILE = SpiralInfo::OUTPUTFILE; - m_Info.MIDIFILE = SpiralInfo::MIDIFILE; + m_Info.MIDIFILE = SpiralInfo::MIDIFILE; m_Info.POLY = SpiralInfo::POLY; - fstream ifs("___temp.ssmtmp",ios::in); + fstream ifs("___temp.ssmtmp",ios::in); //str>>*this; ifs>>*this; - + system("rm -f ___temp.ssmtmp"); } @@ -1102,15 +1109,9 @@ void SynthModular::cb_NewComment(Fl_Button* o, void* v) ////////////////////////////////////////////////////////// -// andy preston inline void SynthModular::cb_GroupTab_i(Fl_Tabs* o, void* v) { m_GroupTab->redraw(); - //m_CurrentGroup->second->GetToolPack()->hide(); - //m_CurrentGroup = o->value(); - // if (m_CurrentGroup==m_PluginGroupMap.end()) m_CurrentGroup=m_PluginGroupMap.begin(); - // m_CurrentGroup->second->GetToolPack()->show(); - // m_GroupName->label(m_CurrentGroup->first.c_str()); } void SynthModular::cb_GroupTab(Fl_Tabs* o, void* v) diff --git a/SpiralSynthModular.h b/SpiralSynthModular.h index c4d467d..c5ebdcb 100644 --- a/SpiralSynthModular.h +++ b/SpiralSynthModular.h @@ -114,10 +114,10 @@ private: // cb_UpdatePluginInfo to access the map. static map m_DeviceWinMap; - int m_NextID; - int m_NextPluginButton; - int m_NextPluginButtonXPos; - int m_NextPluginButtonYPos; + int m_NextID; +// int m_NextPluginButton; +// int m_NextPluginButtonXPos; +// int m_NextPluginButtonYPos; static bool m_CallbackUpdateMode; static bool m_BlockingOutputPluginIsReady; @@ -127,11 +127,10 @@ private: void CreateGUI(int xoff=0, int yoff=0, char *name=""); Fl_Pack *m_Topbar, *m_ToolbarPanel, *m_Toolbar; - Fl_Group *m_ToolbarFiller, *m_GroupFiller; + Fl_Group *m_GroupFiller; Fl_Button *m_Load; Fl_Button *m_Save; Fl_Button *m_New; - Fl_Button *m_OpenEditor; Fl_Button *m_Options; Fl_Button *m_NewComment; Fl_Tabs *m_GroupTab; diff --git a/SpiralSynthModularInfo.C b/SpiralSynthModularInfo.C index 37b4304..07ed6bc 100644 --- a/SpiralSynthModularInfo.C +++ b/SpiralSynthModularInfo.C @@ -33,6 +33,12 @@ string SpiralInfo::OUTPUTFILE = "/dev/dsp"; string SpiralInfo::MIDIFILE = "/dev/midi"; int SpiralInfo::POLY = 1; bool SpiralInfo::USEPLUGINLIST = false; +unsigned SpiralInfo::GUI_COLOUR = 179; +unsigned SpiralInfo::SCOPE_BG_COLOUR = fl_rgb_color (20, 60, 20); +unsigned SpiralInfo::SCOPE_FG_COLOUR = fl_rgb_color (100, 200, 100); +unsigned SpiralInfo::SCOPE_SEL_COLOUR = FL_WHITE; +unsigned SpiralInfo::SCOPE_IND_COLOUR = fl_rgb_color (203, 255, 0); +unsigned SpiralInfo::SCOPE_MRK_COLOUR = fl_rgb_color (155, 155, 50); /*int SpiralSynthModularInfo::GUICOL_Tool=179; int SpiralSynthModularInfo::GUICOL_Button=181;