diff --git a/GUI/Widgets/SpiralGUI.C b/GUI/Widgets/SpiralGUI.C index da40c6c..81dd9d5 100644 --- a/GUI/Widgets/SpiralGUI.C +++ b/GUI/Widgets/SpiralGUI.C @@ -17,7 +17,8 @@ #include "SpiralGUI.H" -SpiralGUIType::SpiralGUIType (int x, int y, int w, int h, const char *label = 0) : +// Default label = 0 +SpiralGUIType::SpiralGUIType (int x, int y, int w, int h, const char *label) : Fl_Group (x, y, w, h, label), m_NeedsResize (false) { } diff --git a/SpiralSound/Plugins/AmpPlugin/AmpPlugin.C b/SpiralSound/Plugins/AmpPlugin/AmpPlugin.C index acf34c5..488df3e 100644 --- a/SpiralSound/Plugins/AmpPlugin/AmpPlugin.C +++ b/SpiralSound/Plugins/AmpPlugin/AmpPlugin.C @@ -23,6 +23,8 @@ #define PI 3.141592654 +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/AmpPlugin/AmpPlugin.h b/SpiralSound/Plugins/AmpPlugin/AmpPlugin.h index a194b60..431128e 100644 --- a/SpiralSound/Plugins/AmpPlugin/AmpPlugin.h +++ b/SpiralSound/Plugins/AmpPlugin/AmpPlugin.h @@ -27,29 +27,29 @@ class AmpPlugin : public SpiralPlugin public: AmpPlugin(); virtual ~AmpPlugin(); - + virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); - - // has to be defined in the plugin + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); + + // has to be defined in the plugin virtual void UpdateGUI() { Fl::check(); } - + float GetGain() { return m_Gain; } - float GetDC() { return m_DC; } - + float GetDC() { return m_DC; } + void Randomise(); -private: +private: float m_Gain; float m_DC; - - friend istream &operator>>(istream &s, AmpPlugin &o); - friend ostream &operator<<(ostream &s, AmpPlugin &o); + + friend std::istream &operator>>(std::istream &s, AmpPlugin &o); + friend std::ostream &operator<<(std::ostream &s, AmpPlugin &o); }; -istream &operator>>(istream &s, AmpPlugin &o); -ostream &operator<<(ostream &s, AmpPlugin &o); +std::istream &operator>>(std::istream &s, AmpPlugin &o); +std::ostream &operator<<(std::ostream &s, AmpPlugin &o); #endif diff --git a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C index 4e012d3..dd4a9a1 100644 --- a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C +++ b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C @@ -1,187 +1,189 @@ -/* SpiralPlugin - * Copyleft (C) 2000 David Griffiths - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include "AmpPluginGUI.h" - -//////////////////////////////////////////// - -AmpPluginGUI::AmpPluginGUI(int w, int h,AmpPlugin *o,ChannelHandler *ch,const HostInfo *Info) : -SpiralPluginGUI(w,h,o,ch) -{ - m_TheTabs = new Fl_Tabs (2, 14, 118, 104, ""); - m_TheTabs->box (FL_PLASTIC_DOWN_BOX); - m_TheTabs->color (Info->GUI_COLOUR); - add (m_TheTabs); - - m_CtlGroup = new Fl_Group (2, 28, 118, 80, "Control"); - m_CtlGroup->labelsize (10); - m_TheTabs->add (m_CtlGroup); - - m_Gain = new Fl_Slider (24, 32, 20, 70, "Gain"); - m_Gain->user_data ((void*)(this)); - m_Gain->type (FL_VERT_NICE_SLIDER); - m_Gain->selection_color (Info->GUI_COLOUR); - m_Gain->box (FL_PLASTIC_DOWN_BOX); - m_Gain->labelsize(10); - m_Gain->maximum (4.0); - m_Gain->minimum (0.0); - m_Gain->step (0.0001); - m_Gain->value (1.0); - m_Gain->callback((Fl_Callback*)cb_Gain); - m_CtlGroup->add (m_Gain); - - m_DC = new Fl_Slider (74, 32, 20, 70, "DC Offset"); - m_DC->user_data ((void*)(this)); - m_DC->type (FL_VERT_NICE_SLIDER); - m_DC->selection_color (Info->GUI_COLOUR); - m_DC->box (FL_PLASTIC_DOWN_BOX); - m_DC->labelsize(10); - m_DC->maximum (4.0); - m_DC->minimum (0.0); - m_DC->step (0.0001); - m_DC->value (2.0); - m_DC->callback((Fl_Callback*)cb_DC); - m_CtlGroup->add (m_DC); - - m_NumGroup = new Fl_Group (2, 28, 118, 66, "Numbers"); - m_NumGroup->labelsize (10); - m_TheTabs->add (m_NumGroup); - - m_NumGain = new Fl_Counter (6, 40, 110, 20, "Gain"); - m_NumGain->user_data ((void*)(this)); - m_NumGain->labelsize (10); - m_NumGain->box (FL_PLASTIC_UP_BOX); - m_NumGain->color (Info->GUI_COLOUR); - m_NumGain->maximum (2.0); - m_NumGain->minimum (-2.0); - m_NumGain->step (0.001); - m_NumGain->lstep (0.1); - m_NumGain->value (1.0); - m_NumGain->callback ((Fl_Callback*)cb_NumGain); - m_NumGroup->add (m_NumGain); - - m_NumDC = new Fl_Counter (6, 78, 110, 20, "DC Offset"); - m_NumDC->user_data ((void*)(this)); - m_NumDC->labelsize (10); - m_NumDC->box (FL_PLASTIC_UP_BOX); - m_NumDC->color (Info->GUI_COLOUR); - m_NumDC->maximum (2.0); - m_NumDC->minimum (-2.0); - m_NumDC->step (0.001); - m_NumDC->lstep (0.1); - m_NumDC->value (0.0); - m_NumDC->callback ((Fl_Callback*)cb_NumDC); - m_NumGroup->add (m_NumDC); - - m_Reset = new Fl_Button (64, 119, 56, 18, "Reset"); - m_Reset->user_data ((void*)(this)); - m_Reset->labelsize (10); - m_Reset->box (FL_PLASTIC_UP_BOX); - m_Reset->color (Info->GUI_COLOUR); - m_Reset->selection_color (Info->GUI_COLOUR); - m_Reset->callback ((Fl_Callback*)cb_Reset); - add (m_Reset); - - end(); -} - -void AmpPluginGUI::UpdateValues (SpiralPlugin *o) { - float value; - AmpPlugin* Plugin = (AmpPlugin*)o; - - value = Plugin->GetGain(); - m_NumGain->value (value); - m_Gain->value (2.0f - value); - - value = Plugin->GetDC(); - m_NumDC->value (value); - m_DC->value (2.0f - value); -} - -// control callbacks - -inline void AmpPluginGUI::cb_Gain_i (Fl_Slider* o, void* v) { - float value = 2.0f - o->value(); - m_GUICH->Set ("Gain", value); - m_NumGain->value (value); -} - -void AmpPluginGUI::cb_Gain (Fl_Slider* o, void* v) { - ((AmpPluginGUI*)(o->user_data()))->cb_Gain_i (o, v); -} - -inline void AmpPluginGUI::cb_DC_i (Fl_Slider* o, void* v) { - float value = 2.0f - o->value(); - m_GUICH->Set ("DC", value); - m_NumDC->value (value); -} - -void AmpPluginGUI::cb_DC (Fl_Slider* o, void* v) { - ((AmpPluginGUI*)(o->user_data()))->cb_DC_i (o, v); -} - -// numeric callbacks - -inline void AmpPluginGUI::cb_NumGain_i (Fl_Counter* o, void* v) { - float value = o->value(); - m_GUICH->Set ("Gain", value); - m_Gain->value (2.0f - value); -} - -void AmpPluginGUI::cb_NumGain (Fl_Counter* o, void* v) { - ((AmpPluginGUI*)(o->user_data()))->cb_NumGain_i (o, v); -} - -inline void AmpPluginGUI::cb_NumDC_i (Fl_Counter* o, void* v) { - float value = o->value(); - m_GUICH->Set ("DC", value); - m_DC->value (2.0f - value); -} - -void AmpPluginGUI::cb_NumDC (Fl_Counter* o, void* v) { - ((AmpPluginGUI*)(o->user_data()))->cb_NumDC_i (o, v); -} - -// button callbacks - -inline void AmpPluginGUI::cb_Reset_i (Fl_Button* o, void* v) { - m_NumGain->value (1.0); - m_Gain->value (1.0); - m_GUICH->Set ("Gain", 0); - m_NumDC->value (0.0); - m_DC->value (2.0); - m_GUICH->Set ("DC", 0); -} - -void AmpPluginGUI::cb_Reset (Fl_Button* o, void* v) { - ((AmpPluginGUI*)(o->user_data()))->cb_Reset_i (o, v); -} - -// help text - -const string AmpPluginGUI::GetHelpText(const string &loc){ - return string("") - + "A CV controlled amplifer. You also can use this device to modify\n" - + "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.\n\n" - + "The reset button quickly resets the gain back to 1 and the\n" - + "offset back to 0\n"; -} +/* SpiralPlugin + * Copyleft (C) 2000 David Griffiths + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include "AmpPluginGUI.h" + +using namespace std; + +//////////////////////////////////////////// + +AmpPluginGUI::AmpPluginGUI(int w, int h,AmpPlugin *o,ChannelHandler *ch,const HostInfo *Info) : +SpiralPluginGUI(w,h,o,ch) +{ + m_TheTabs = new Fl_Tabs (2, 14, 118, 104, ""); + m_TheTabs->box (FL_PLASTIC_DOWN_BOX); + m_TheTabs->color (Info->GUI_COLOUR); + add (m_TheTabs); + + m_CtlGroup = new Fl_Group (2, 28, 118, 80, "Control"); + m_CtlGroup->labelsize (10); + m_TheTabs->add (m_CtlGroup); + + m_Gain = new Fl_Slider (24, 32, 20, 70, "Gain"); + m_Gain->user_data ((void*)(this)); + m_Gain->type (FL_VERT_NICE_SLIDER); + m_Gain->selection_color (Info->GUI_COLOUR); + m_Gain->box (FL_PLASTIC_DOWN_BOX); + m_Gain->labelsize(10); + m_Gain->maximum (4.0); + m_Gain->minimum (0.0); + m_Gain->step (0.0001); + m_Gain->value (1.0); + m_Gain->callback((Fl_Callback*)cb_Gain); + m_CtlGroup->add (m_Gain); + + m_DC = new Fl_Slider (74, 32, 20, 70, "DC Offset"); + m_DC->user_data ((void*)(this)); + m_DC->type (FL_VERT_NICE_SLIDER); + m_DC->selection_color (Info->GUI_COLOUR); + m_DC->box (FL_PLASTIC_DOWN_BOX); + m_DC->labelsize(10); + m_DC->maximum (4.0); + m_DC->minimum (0.0); + m_DC->step (0.0001); + m_DC->value (2.0); + m_DC->callback((Fl_Callback*)cb_DC); + m_CtlGroup->add (m_DC); + + m_NumGroup = new Fl_Group (2, 28, 118, 66, "Numbers"); + m_NumGroup->labelsize (10); + m_TheTabs->add (m_NumGroup); + + m_NumGain = new Fl_Counter (6, 40, 110, 20, "Gain"); + m_NumGain->user_data ((void*)(this)); + m_NumGain->labelsize (10); + m_NumGain->box (FL_PLASTIC_UP_BOX); + m_NumGain->color (Info->GUI_COLOUR); + m_NumGain->maximum (2.0); + m_NumGain->minimum (-2.0); + m_NumGain->step (0.001); + m_NumGain->lstep (0.1); + m_NumGain->value (1.0); + m_NumGain->callback ((Fl_Callback*)cb_NumGain); + m_NumGroup->add (m_NumGain); + + m_NumDC = new Fl_Counter (6, 78, 110, 20, "DC Offset"); + m_NumDC->user_data ((void*)(this)); + m_NumDC->labelsize (10); + m_NumDC->box (FL_PLASTIC_UP_BOX); + m_NumDC->color (Info->GUI_COLOUR); + m_NumDC->maximum (2.0); + m_NumDC->minimum (-2.0); + m_NumDC->step (0.001); + m_NumDC->lstep (0.1); + m_NumDC->value (0.0); + m_NumDC->callback ((Fl_Callback*)cb_NumDC); + m_NumGroup->add (m_NumDC); + + m_Reset = new Fl_Button (64, 119, 56, 18, "Reset"); + m_Reset->user_data ((void*)(this)); + m_Reset->labelsize (10); + m_Reset->box (FL_PLASTIC_UP_BOX); + m_Reset->color (Info->GUI_COLOUR); + m_Reset->selection_color (Info->GUI_COLOUR); + m_Reset->callback ((Fl_Callback*)cb_Reset); + add (m_Reset); + + end(); +} + +void AmpPluginGUI::UpdateValues (SpiralPlugin *o) { + float value; + AmpPlugin* Plugin = (AmpPlugin*)o; + + value = Plugin->GetGain(); + m_NumGain->value (value); + m_Gain->value (2.0f - value); + + value = Plugin->GetDC(); + m_NumDC->value (value); + m_DC->value (2.0f - value); +} + +// control callbacks + +inline void AmpPluginGUI::cb_Gain_i (Fl_Slider* o, void* v) { + float value = 2.0f - o->value(); + m_GUICH->Set ("Gain", value); + m_NumGain->value (value); +} + +void AmpPluginGUI::cb_Gain (Fl_Slider* o, void* v) { + ((AmpPluginGUI*)(o->user_data()))->cb_Gain_i (o, v); +} + +inline void AmpPluginGUI::cb_DC_i (Fl_Slider* o, void* v) { + float value = 2.0f - o->value(); + m_GUICH->Set ("DC", value); + m_NumDC->value (value); +} + +void AmpPluginGUI::cb_DC (Fl_Slider* o, void* v) { + ((AmpPluginGUI*)(o->user_data()))->cb_DC_i (o, v); +} + +// numeric callbacks + +inline void AmpPluginGUI::cb_NumGain_i (Fl_Counter* o, void* v) { + float value = o->value(); + m_GUICH->Set ("Gain", value); + m_Gain->value (2.0f - value); +} + +void AmpPluginGUI::cb_NumGain (Fl_Counter* o, void* v) { + ((AmpPluginGUI*)(o->user_data()))->cb_NumGain_i (o, v); +} + +inline void AmpPluginGUI::cb_NumDC_i (Fl_Counter* o, void* v) { + float value = o->value(); + m_GUICH->Set ("DC", value); + m_DC->value (2.0f - value); +} + +void AmpPluginGUI::cb_NumDC (Fl_Counter* o, void* v) { + ((AmpPluginGUI*)(o->user_data()))->cb_NumDC_i (o, v); +} + +// button callbacks + +inline void AmpPluginGUI::cb_Reset_i (Fl_Button* o, void* v) { + m_NumGain->value (1.0); + m_Gain->value (1.0); + m_GUICH->Set ("Gain", 0); + m_NumDC->value (0.0); + m_DC->value (2.0); + m_GUICH->Set ("DC", 0); +} + +void AmpPluginGUI::cb_Reset (Fl_Button* o, void* v) { + ((AmpPluginGUI*)(o->user_data()))->cb_Reset_i (o, v); +} + +// help text + +const string AmpPluginGUI::GetHelpText(const string &loc){ + return string("") + + "A CV controlled amplifer. You also can use this device to modify\n" + + "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.\n\n" + + "The reset button quickly resets the gain back to 1 and the\n" + + "offset back to 0\n"; +} diff --git a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h index 1b7f83a..3853430 100644 --- a/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h +++ b/SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h @@ -1,56 +1,56 @@ -/* SpiralPlugin - * Copyleft (C) 2000 David Griffiths - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include "../SpiralPluginGUI.h" -#include "AmpPlugin.h" - -#ifndef AmpGUI -#define AmpGUI - -class AmpPluginGUI : public SpiralPluginGUI { - public: - AmpPluginGUI(int w, int h, AmpPlugin *o,ChannelHandler *ch,const HostInfo *Info); - virtual void UpdateValues(SpiralPlugin *o); - protected: - const string GetHelpText(const string &loc); - private: - Fl_Tabs *m_TheTabs; - Fl_Group *m_CtlGroup, *m_NumGroup; - Fl_Slider *m_Gain, *m_DC; - Fl_Counter *m_NumGain, *m_NumDC; - Fl_Button *m_Reset; - //// Callbacks //// - inline void cb_Gain_i (Fl_Slider* o, void* v); - static void cb_Gain (Fl_Slider* o, void* v); - inline void cb_DC_i (Fl_Slider* o, void* v); - static void cb_DC (Fl_Slider* o, void* v); - inline void cb_NumGain_i (Fl_Counter* o, void* v); - static void cb_NumGain (Fl_Counter* o, void* v); - inline void cb_NumDC_i (Fl_Counter* o, void* v); - static void cb_NumDC (Fl_Counter* o, void* v); - inline void cb_Reset_i (Fl_Button* o, void* v); - static void cb_Reset (Fl_Button* o, void* v); -}; - -#endif +/* SpiralPlugin + * Copyleft (C) 2000 David Griffiths + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include "../SpiralPluginGUI.h" +#include "AmpPlugin.h" + +#ifndef AmpGUI +#define AmpGUI + +class AmpPluginGUI : public SpiralPluginGUI { + public: + AmpPluginGUI(int w, int h, AmpPlugin *o,ChannelHandler *ch,const HostInfo *Info); + virtual void UpdateValues(SpiralPlugin *o); + protected: + const std::string GetHelpText(const std::string &loc); + private: + Fl_Tabs *m_TheTabs; + Fl_Group *m_CtlGroup, *m_NumGroup; + Fl_Slider *m_Gain, *m_DC; + Fl_Counter *m_NumGain, *m_NumDC; + Fl_Button *m_Reset; + //// Callbacks //// + inline void cb_Gain_i (Fl_Slider* o, void* v); + static void cb_Gain (Fl_Slider* o, void* v); + inline void cb_DC_i (Fl_Slider* o, void* v); + static void cb_DC (Fl_Slider* o, void* v); + inline void cb_NumGain_i (Fl_Counter* o, void* v); + static void cb_NumGain (Fl_Counter* o, void* v); + inline void cb_NumDC_i (Fl_Counter* o, void* v); + static void cb_NumDC (Fl_Counter* o, void* v); + inline void cb_Reset_i (Fl_Button* o, void* v); + static void cb_Reset (Fl_Button* o, void* v); +}; + +#endif diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C index a1e5607..887265e 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C +++ b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C @@ -23,6 +23,8 @@ #define PI 3.141592654 +using namespace std; + static const int GRANULARITY = 10; extern "C" { diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h index 974db61..9db123b 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h +++ b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h @@ -34,8 +34,8 @@ public: virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); float GetCutoff() { return Cutoff; } float GetResonance() { return Resonance; } @@ -49,10 +49,10 @@ private: // Calculation double w,q,r,c,vibrapos,vibraspeed; - friend istream &operator>>(istream &s, AnotherFilterPlugin &o); - friend ostream &operator<<(ostream &s, AnotherFilterPlugin &o); + friend std::istream &operator>>(std::istream &s, AnotherFilterPlugin &o); + friend std::ostream &operator<<(std::ostream &s, AnotherFilterPlugin &o); }; -istream &operator>>(istream &s, AnotherFilterPlugin &o); -ostream &operator<<(ostream &s, AnotherFilterPlugin &o); +std::istream &operator>>(std::istream &s, AnotherFilterPlugin &o); +std::ostream &operator<<(std::ostream &s, AnotherFilterPlugin &o); #endif diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C index 027c59d..3d184c3 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C +++ b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// AnotherFilterPluginGUI::AnotherFilterPluginGUI(int w, int h,AnotherFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h index 5f4835b..3a24ab9 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h +++ b/SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h @@ -33,7 +33,7 @@ public: virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: Fl_Slider *Cutoff; diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C b/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C index 5021946..b924e68 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C @@ -22,6 +22,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h b/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h index a9f3ccb..5a79b37 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h @@ -34,10 +34,10 @@ public: virtual SpiralGUIType *CreateGUI(); virtual void Execute(); virtual void ExecuteCommands(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); - - string GetName(int n) { return m_Names[n]; } + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); + + std::string GetName(int n) { return m_Names[n]; } int GetNum() { return m_Num; } float GetVal(int n) { return m_ChannelVal[n]; } float GetMin(int n) { return m_MinVal[n]; } @@ -52,7 +52,7 @@ public: float Max; char Name[256]; }; - + private: GUIArgs m_GUIArgs; @@ -71,7 +71,7 @@ private: int m_Num; float m_ChannelVal[MAX_CHANNELS]; - string m_Names[MAX_CHANNELS]; + std::string m_Names[MAX_CHANNELS]; float m_MinVal[MAX_CHANNELS]; float m_MaxVal[MAX_CHANNELS]; }; diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C index 4df7bbc..6755bcd 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C @@ -21,6 +21,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p, Fl_Color SelColour) diff --git a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h index c98c907..a2f8d8f 100644 --- a/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h +++ b/SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h @@ -38,11 +38,11 @@ public: virtual void UpdateValues(SpiralPlugin *o); - void StreamIn(istream &s); - void StreamOut(ostream &s); + void StreamIn(std::istream &s); + void StreamOut(std::ostream &s); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: @@ -66,7 +66,7 @@ private: Fl_Pack *m_MainPack, *m_Buttons; Fl_Button *m_Add, *m_Delete; - vector m_GUIVec; + std::vector m_GUIVec; void AddCV(); void DeleteCV(); int m_CVCount; @@ -85,9 +85,9 @@ private: inline void cb_Delete_i(Fl_Button* o, void* v); static void cb_Delete(Fl_Button* o, void* v); - friend istream &operator>>(istream &s, ControllerPluginGUI &o); + friend std::istream &operator>>(std::istream &s, ControllerPluginGUI &o); }; -istream &operator>>(istream &s, ControllerPluginGUI &o); +std::istream &operator>>(std::istream &s, ControllerPluginGUI &o); #endif diff --git a/SpiralSound/Plugins/DelayPlugin/DelayPlugin.C b/SpiralSound/Plugins/DelayPlugin/DelayPlugin.C index 108de34..0003a8a 100644 --- a/SpiralSound/Plugins/DelayPlugin/DelayPlugin.C +++ b/SpiralSound/Plugins/DelayPlugin/DelayPlugin.C @@ -20,6 +20,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + static const float MAX_DELAY=1.0f; extern "C" { diff --git a/SpiralSound/Plugins/DelayPlugin/DelayPlugin.h b/SpiralSound/Plugins/DelayPlugin/DelayPlugin.h index ecd8d3d..d8d2d99 100644 --- a/SpiralSound/Plugins/DelayPlugin/DelayPlugin.h +++ b/SpiralSound/Plugins/DelayPlugin/DelayPlugin.h @@ -31,8 +31,8 @@ public: virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); float GetDelay() { return m_Delay; } float GetMix() { return m_Mix; } @@ -48,10 +48,10 @@ private: Sample m_Buffer; - friend istream &operator>>(istream &s, DelayPlugin &o); - friend ostream &operator<<(ostream &s, DelayPlugin &o); + friend std::istream &operator>>(std::istream &s, DelayPlugin &o); + friend std::ostream &operator<<(std::ostream &s, DelayPlugin &o); }; -istream &operator>>(istream &s, DelayPlugin &o); -ostream &operator<<(ostream &s, DelayPlugin &o); +std::istream &operator>>(std::istream &s, DelayPlugin &o); +std::ostream &operator<<(std::ostream &s, DelayPlugin &o); #endif diff --git a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C index dd7d72b..ccc64bf 100644 --- a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C +++ b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// DelayPluginGUI::DelayPluginGUI(int w, int h, DelayPlugin *o, ChannelHandler *ch, const HostInfo *Info) : diff --git a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h index 1239e6f..8983ae4 100644 --- a/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h +++ b/SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h @@ -33,7 +33,7 @@ class DelayPluginGUI : public SpiralPluginGUI DelayPluginGUI (int w, int h, DelayPlugin *o, ChannelHandler *ch, const HostInfo *Info); virtual void UpdateValues (SpiralPlugin *o); protected: - const string GetHelpText (const string &loc); + const std::string GetHelpText (const std::string &loc); private: Fl_Tabs *m_TheTabs; Fl_Group *m_CtlGroup, *m_NumGroup; diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.C b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.C index 9f2a1eb..99de91e 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.C +++ b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.C @@ -20,6 +20,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + static const float MAX_DELAY=1.0f; extern "C" { diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h index 05af6de..acd6207 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h +++ b/SpiralSound/Plugins/EchoPlugin/EchoPlugin.h @@ -30,8 +30,8 @@ class EchoPlugin : public SpiralPlugin virtual PluginInfo &Initialise (const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut (ostream &s); - virtual void StreamIn (istream &s); + virtual void StreamOut (std::ostream &s); + virtual void StreamIn (std::istream &s); float GetDelay() { return m_Delay; } float GetFeedback() { return m_Feedback; } bool GetBounce () { return m_Bounce; } @@ -41,11 +41,11 @@ class EchoPlugin : public SpiralPlugin bool m_Bounce; int m_HeadPos, m_Buf0, m_Buf1; Sample m_Buffer[2]; - friend istream &operator>>(istream &s, EchoPlugin &o); - friend ostream &operator<<(ostream &s, EchoPlugin &o); + friend std::istream &operator>>(std::istream &s, EchoPlugin &o); + friend std::ostream &operator<<(std::ostream &s, EchoPlugin &o); }; -istream &operator>>(istream &s, EchoPlugin &o); -ostream &operator<<(ostream &s, EchoPlugin &o); +std::istream &operator>>(std::istream &s, EchoPlugin &o); +std::ostream &operator<<(std::ostream &s, EchoPlugin &o); #endif diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C index a62a18c..c232624 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C +++ b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// EchoPluginGUI::EchoPluginGUI(int w, int h, EchoPlugin *o, ChannelHandler *ch, const HostInfo *Info) : diff --git a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h index 310c479..03b25ee 100644 --- a/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h +++ b/SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h @@ -34,7 +34,7 @@ class EchoPluginGUI : public SpiralPluginGUI EchoPluginGUI (int w, int h, EchoPlugin *o, ChannelHandler *ch, const HostInfo *Info); virtual void UpdateValues (SpiralPlugin *o); protected: - const string GetHelpText (const string &loc); + const std::string GetHelpText (const std::string &loc); private: Fl_Tabs *m_TheTabs; Fl_Group *m_CtlGroup, *m_NumGroup; diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C index bb710f9..2311cdc 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C @@ -20,6 +20,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h index 44a822e..d91a7d2 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h @@ -31,8 +31,8 @@ public: virtual PluginInfo& Initialise(const HostInfo *Host); virtual SpiralGUIType* CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); float GetAttack() { return m_Attack; } float GetDecay() { return m_Decay; } diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C index 985fdf3..0b87c91 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// EnvFollowerPluginGUI::EnvFollowerPluginGUI(int w, int h,EnvFollowerPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h index 9593de8..ecb1290 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h +++ b/SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h @@ -28,12 +28,12 @@ class EnvFollowerPluginGUI : public SpiralPluginGUI { public: EnvFollowerPluginGUI(int w, int h, EnvFollowerPlugin *o,ChannelHandler *ch,const HostInfo *Info); - + virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); - + const std::string GetHelpText(const std::string &loc); + private: Fl_Knob* m_Attack; diff --git a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C index 78a64f0..9770b39 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C +++ b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C @@ -20,6 +20,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h index 67b9735..9abc36c 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h +++ b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h @@ -33,8 +33,8 @@ public: virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); float GetAttack() { return m_Attack; } float GetDecay() { return m_Decay; } @@ -57,10 +57,10 @@ private: float m_TrigThresh; float m_SampleTime; - friend istream &operator>>(istream &s, EnvelopePlugin &o); - friend ostream &operator<<(ostream &s, EnvelopePlugin &o); + friend std::istream &operator>>(std::istream &s, EnvelopePlugin &o); + friend std::ostream &operator<<(std::ostream &s, EnvelopePlugin &o); }; -istream &operator>>(istream &s, EnvelopePlugin &o); -ostream &operator<<(ostream &s, EnvelopePlugin &o); +std::istream &operator>>(std::istream &s, EnvelopePlugin &o); +std::ostream &operator<<(std::ostream &s, EnvelopePlugin &o); #endif diff --git a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C index 868e4c0..11a58da 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C +++ b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + static const float TIMED_SLIDER_MAX = 3.0f; //////////////////////////////////////////// diff --git a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h index c18b47a..7eccac3 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h +++ b/SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h @@ -32,7 +32,7 @@ class EnvelopePluginGUI : public SpiralPluginGUI { EnvelopePluginGUI(int w, int h, EnvelopePlugin *o,ChannelHandler *ch,const HostInfo *Info); virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: Fl_Tabs *m_Tabs; Fl_Group *m_CtlGroup, *m_NumGroup; diff --git a/SpiralSound/Plugins/FilterPlugin/FilterPlugin.C b/SpiralSound/Plugins/FilterPlugin/FilterPlugin.C index 7d7bc13..ad1835b 100644 --- a/SpiralSound/Plugins/FilterPlugin/FilterPlugin.C +++ b/SpiralSound/Plugins/FilterPlugin/FilterPlugin.C @@ -20,6 +20,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + static const float MAX_RES = 10; static const float MIN_RES = 1; static const float MAX_CUTOFF = 3000; diff --git a/SpiralSound/Plugins/FilterPlugin/FilterPlugin.h b/SpiralSound/Plugins/FilterPlugin/FilterPlugin.h index 13f2d6e..b4165a7 100644 --- a/SpiralSound/Plugins/FilterPlugin/FilterPlugin.h +++ b/SpiralSound/Plugins/FilterPlugin/FilterPlugin.h @@ -34,8 +34,8 @@ public: virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); void Reset(); void SetupCoeffs(); @@ -61,10 +61,10 @@ private: bool m_RevCutoffMod; bool m_RevResonanceMod; - friend istream &operator>>(istream &s, FilterPlugin &o); - friend ostream &operator<<(ostream &s, FilterPlugin &o); + friend std::istream &operator>>(std::istream &s, FilterPlugin &o); + friend std::ostream &operator<<(std::ostream &s, FilterPlugin &o); }; -istream &operator>>(istream &s, FilterPlugin &o); -ostream &operator<<(ostream &s, FilterPlugin &o); +std::istream &operator>>(std::istream &s, FilterPlugin &o); +std::ostream &operator<<(std::ostream &s, FilterPlugin &o); #endif diff --git a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C index e91557e..3191e8f 100644 --- a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C +++ b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// FilterPluginGUI::FilterPluginGUI(int w, int h,FilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h index 23bbefd..eabd0ec 100644 --- a/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h +++ b/SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h @@ -34,7 +34,7 @@ public: virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: diff --git a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C index 7a16e50..ceca9b1 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C +++ b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C @@ -21,6 +21,8 @@ #include "SpiralIcon.xpm" #include "../../NoteTable.h" +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h index 2181c0e..55e2503 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h +++ b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h @@ -32,8 +32,8 @@ public: virtual SpiralGUIType* CreateGUI(); virtual void Execute(); virtual void ExecuteCommands(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); float GetTriggerTime() { return m_TriggerTime; } bool GetMonostable() { return m_Monostable; } diff --git a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C index 739450c..0cd6fd8 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C +++ b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// FlipflopPluginGUI::FlipflopPluginGUI(int w, int h,FlipflopPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h index 68a19da..d7e4eef 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h +++ b/SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h @@ -33,7 +33,7 @@ public: virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: Fl_Knob *m_TriggerTime; diff --git a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C index 311c813..5c5bd35 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C +++ b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C @@ -21,6 +21,8 @@ #include #include "SpiralIcon.xpm" +using namespace std; + /* Public source code by alex@smartelectronix.com Simple example of implementation of formant filter diff --git a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h index 640c142..c1f53ca 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h +++ b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h @@ -31,8 +31,8 @@ public: virtual PluginInfo &Initialise(const HostInfo *Host); virtual SpiralGUIType *CreateGUI(); virtual void Execute(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); void Randomise(); void Clear(); @@ -41,10 +41,10 @@ public: private: float m_Vowel; - friend istream &operator>>(istream &s, FormantFilterPlugin &o); - friend ostream &operator<<(ostream &s, FormantFilterPlugin &o); + friend std::istream &operator>>(std::istream &s, FormantFilterPlugin &o); + friend std::ostream &operator<<(std::ostream &s, FormantFilterPlugin &o); }; -istream &operator>>(istream &s, FormantFilterPlugin &o); -ostream &operator<<(ostream &s, FormantFilterPlugin &o); +std::istream &operator>>(std::istream &s, FormantFilterPlugin &o); +std::ostream &operator<<(std::ostream &s, FormantFilterPlugin &o); #endif diff --git a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C index 07e1750..a2ca0d2 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C +++ b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C @@ -20,6 +20,8 @@ #include #include +using namespace std; + //////////////////////////////////////////// FormantFilterPluginGUI::FormantFilterPluginGUI(int w, int h,FormantFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) : diff --git a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h index fe84bfb..95205b3 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h +++ b/SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h @@ -33,7 +33,7 @@ public: virtual void UpdateValues(SpiralPlugin *o); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: diff --git a/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C b/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C index 0a3d743..bb96d63 100644 --- a/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C +++ b/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C @@ -22,6 +22,8 @@ #include "../../RiffWav.h" #include "../../NoteTable.h" +using namespace std; + extern "C" { SpiralPlugin* SpiralPlugin_CreateInstance() { diff --git a/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h b/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h index 937b970..4cfe8e0 100644 --- a/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h +++ b/SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h @@ -46,8 +46,8 @@ public: virtual SpiralGUIType *CreateGUI(); virtual void Execute(); virtual void ExecuteCommands(); - virtual void StreamOut(ostream &s); - virtual void StreamIn(istream &s); + virtual void StreamOut(std::ostream &s); + virtual void StreamIn(std::istream &s); bool GetNoteCut() { return m_NoteCut; } int GetCurrent() { return m_Current; } diff --git a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C index 931070d..e7baf22 100644 --- a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C +++ b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C @@ -21,6 +21,8 @@ #include //#include +using namespace std; + static const char NoteText[12][3] = {"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; //////////////////////////////////////////// diff --git a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h index 0097c50..3b90f80 100644 --- a/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h +++ b/SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h @@ -71,7 +71,7 @@ public: virtual void Update(); protected: - const string GetHelpText(const string &loc); + const std::string GetHelpText(const std::string &loc); private: diff --git a/SpiralSound/Plugins/SpiralPlugin.C b/SpiralSound/Plugins/SpiralPlugin.C index b8f5535..063d37d 100644 --- a/SpiralSound/Plugins/SpiralPlugin.C +++ b/SpiralSound/Plugins/SpiralPlugin.C @@ -18,6 +18,8 @@ #include "SpiralPlugin.h" +using namespace std; + SpiralPlugin::SpiralPlugin() { m_Version=1; diff --git a/SpiralSound/Plugins/SpiralPlugin.h b/SpiralSound/Plugins/SpiralPlugin.h index 6a4c47f..2e2caf5 100644 --- a/SpiralSound/Plugins/SpiralPlugin.h +++ b/SpiralSound/Plugins/SpiralPlugin.h @@ -34,13 +34,13 @@ static const float MAX_FREQ = 13000; struct PluginInfo { - string Name; + std::string Name; int Width; int Height; int NumInputs; int NumOutputs; - vector PortTips; - vector PortTypes; + std::vector PortTips; + std::vector PortTypes; char BitMap[40][40][3]; }; @@ -50,8 +50,8 @@ struct HostInfo int FRAGSIZE; int FRAGCOUNT; int SAMPLERATE; - string OUTPUTFILE; - string MIDIFILE; + std::string OUTPUTFILE; + std::string MIDIFILE; int POLY; unsigned GUI_COLOUR; unsigned SCOPE_BG_COLOUR; @@ -83,19 +83,19 @@ public: virtual SpiralGUIType* CreateGUI()=0; // stream the plugins state - virtual void StreamOut(ostream &s)=0; - virtual void StreamIn(istream &s)=0; - + virtual void StreamOut(std::ostream &s)=0; + virtual void StreamIn(std::istream &s)=0; + // stuff here gets saved in filename_files directory // you must return true if this feature is used. - virtual bool SaveExternalFiles(const string &Dir) { return false; } - virtual void LoadExternalFiles(const string &Dir) {} + virtual bool SaveExternalFiles(const std::string &Dir) { return false; } + virtual void LoadExternalFiles(const std::string &Dir) {} const HostInfo* GetHostInfo() { return m_HostInfo; } bool GetOutput(unsigned int n, Sample **s); bool SetInput(unsigned int n, const Sample *s); const Sample* GetInput(unsigned int n) { return m_Input[n]; } - string GetName() { return m_PluginInfo.Name; } + std::string GetName() { return m_PluginInfo.Name; } void UpdatePluginInfoWithHost(); void SetInPortType(PluginInfo &pinfo, int port, Sample::SampleType type); @@ -129,7 +129,7 @@ protected: float GetInputPitch(int n,int p) { if (m_Input[n]) return ((*m_Input[n])[p]+1.0f)*MAX_FREQ/2; else return 0.0; } - void MixOutput(int n,int p, float s) + void MixOutput(int n,int p, float s) { if (m_Output[n]) m_Output[n]->Set(p,s+(*m_Output[n])[p]); } bool InputExists(int n) { return m_Input[n]!=NULL; } @@ -151,21 +151,21 @@ protected: const HostInfo *m_HostInfo; PluginInfo m_PluginInfo; int m_Version; - + // needed for jack void (*cb_Update)(void*o ,bool m); void *m_Parent; // tell the engine that we are taking control of the // timing for output. - void (*cb_Blocking)(void*o ,bool m); + void (*cb_Blocking)(void*o ,bool m); bool m_IsTerminal; private: - vector m_Input; - vector m_Output; + std::vector m_Input; + std::vector m_Output; void (*UpdateInfo)(int n,void *); int m_HostID; diff --git a/SpiralSound/Plugins/SpiralPluginGUI.C b/SpiralSound/Plugins/SpiralPluginGUI.C index 8f3cbfc..652a2ac 100644 --- a/SpiralSound/Plugins/SpiralPluginGUI.C +++ b/SpiralSound/Plugins/SpiralPluginGUI.C @@ -25,6 +25,8 @@ #include #include +using namespace std; + 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/SpiralPluginGUI.h b/SpiralSound/Plugins/SpiralPluginGUI.h index 6249023..a306307 100644 --- a/SpiralSound/Plugins/SpiralPluginGUI.h +++ b/SpiralSound/Plugins/SpiralPluginGUI.h @@ -43,7 +43,7 @@ public: protected: ChannelHandler *m_GUICH; - virtual const string GetHelpText(const string &loc); + virtual const std::string GetHelpText(const std::string &loc); private: Fl_Button* m_Hide; @@ -53,7 +53,7 @@ private: static Fl_Text_Display* m_HelpWin_text; static SpiralPluginGUI* Help_owner; - string m_Title; + std::string m_Title; //// Callbacks //// inline void cb_Hide_i(Fl_Button* o, void* v); diff --git a/SpiralSound/Plugins/Widgets/Fl_Knob.cxx b/SpiralSound/Plugins/Widgets/Fl_Knob.cxx index cd7e747..515b310 100644 --- a/SpiralSound/Plugins/Widgets/Fl_Knob.cxx +++ b/SpiralSound/Plugins/Widgets/Fl_Knob.cxx @@ -3,7 +3,7 @@ #include "Fl_Knob.H" #include #include -#include +#include Fl_Knob::Fl_Knob(int xx,int yy,int ww,int hh,const char *l): Fl_Valuator(xx,yy,ww,hh,l) { int side; diff --git a/SpiralSound/RiffWav.h b/SpiralSound/RiffWav.h index d993d1e..cfd85b5 100644 --- a/SpiralSound/RiffWav.h +++ b/SpiralSound/RiffWav.h @@ -65,7 +65,7 @@ public: enum Mode{READ,WRITE}; enum Channels{MONO,STEREO}; - int Open(string FileName, Mode mode, Channels channels=MONO); + int Open(std::string FileName, Mode mode, Channels channels=MONO); int Close(); int Save(Sample &data); int Load(Sample &data);