Browse Source

Fixed namespace std stuff for gcc3.x

master
waxfrenzy 22 years ago
parent
commit
02aa28d997
51 changed files with 392 additions and 343 deletions
  1. +2
    -1
      GUI/Widgets/SpiralGUI.C
  2. +2
    -0
      SpiralSound/Plugins/AmpPlugin/AmpPlugin.C
  3. +14
    -14
      SpiralSound/Plugins/AmpPlugin/AmpPlugin.h
  4. +189
    -187
      SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C
  5. +56
    -56
      SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h
  6. +2
    -0
      SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C
  7. +6
    -6
      SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h
  8. +2
    -0
      SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C
  9. +1
    -1
      SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h
  10. +2
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C
  11. +6
    -6
      SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h
  12. +2
    -0
      SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C
  13. +6
    -6
      SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h
  14. +2
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPlugin.C
  15. +6
    -6
      SpiralSound/Plugins/DelayPlugin/DelayPlugin.h
  16. +2
    -0
      SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C
  17. +1
    -1
      SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h
  18. +2
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPlugin.C
  19. +6
    -6
      SpiralSound/Plugins/EchoPlugin/EchoPlugin.h
  20. +2
    -0
      SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C
  21. +1
    -1
      SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h
  22. +2
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C
  23. +2
    -2
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h
  24. +2
    -0
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C
  25. +3
    -3
      SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h
  26. +2
    -0
      SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C
  27. +6
    -6
      SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h
  28. +2
    -0
      SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C
  29. +1
    -1
      SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h
  30. +2
    -0
      SpiralSound/Plugins/FilterPlugin/FilterPlugin.C
  31. +6
    -6
      SpiralSound/Plugins/FilterPlugin/FilterPlugin.h
  32. +2
    -0
      SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C
  33. +1
    -1
      SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h
  34. +2
    -0
      SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C
  35. +2
    -2
      SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h
  36. +2
    -0
      SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C
  37. +1
    -1
      SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h
  38. +2
    -0
      SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C
  39. +6
    -6
      SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h
  40. +2
    -0
      SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C
  41. +1
    -1
      SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h
  42. +2
    -0
      SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C
  43. +2
    -2
      SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h
  44. +2
    -0
      SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C
  45. +1
    -1
      SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h
  46. +2
    -0
      SpiralSound/Plugins/SpiralPlugin.C
  47. +16
    -16
      SpiralSound/Plugins/SpiralPlugin.h
  48. +2
    -0
      SpiralSound/Plugins/SpiralPluginGUI.C
  49. +2
    -2
      SpiralSound/Plugins/SpiralPluginGUI.h
  50. +1
    -1
      SpiralSound/Plugins/Widgets/Fl_Knob.cxx
  51. +1
    -1
      SpiralSound/RiffWav.h

+ 2
- 1
GUI/Widgets/SpiralGUI.C View File

@@ -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) {
}


+ 2
- 0
SpiralSound/Plugins/AmpPlugin/AmpPlugin.C View File

@@ -23,6 +23,8 @@

#define PI 3.141592654

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 14
- 14
SpiralSound/Plugins/AmpPlugin/AmpPlugin.h View File

@@ -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

+ 189
- 187
SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.C View File

@@ -1,187 +1,189 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* 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 <FL/fl_draw.h>
#include <FL/fl_draw.H>
#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 <dave@pawfal.org>
*
* 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 <FL/fl_draw.h>
#include <FL/fl_draw.H>
#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";
}

+ 56
- 56
SpiralSound/Plugins/AmpPlugin/AmpPluginGUI.h View File

@@ -1,56 +1,56 @@
/* SpiralPlugin
* Copyleft (C) 2000 David Griffiths <dave@pawfal.org>
*
* 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 <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Tabs.H>
#include <FL/Fl_Slider.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Counter.H>
#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 <dave@pawfal.org>
*
* 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 <FL/Fl.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Tabs.H>
#include <FL/Fl_Slider.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Counter.H>
#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

+ 2
- 0
SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.C View File

@@ -23,6 +23,8 @@

#define PI 3.141592654

using namespace std;

static const int GRANULARITY = 10;

extern "C" {


+ 6
- 6
SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

AnotherFilterPluginGUI::AnotherFilterPluginGUI(int w, int h,AnotherFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/AnotherFilterPlugin/AnotherFilterPluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.C View File

@@ -22,6 +22,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 6
- 6
SpiralSound/Plugins/ControllerPlugin/ControllerPlugin.h View File

@@ -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];
};


+ 2
- 0
SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.C View File

@@ -21,6 +21,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

ControllerPluginGUI::CVGUI::CVGUI(int n, ControllerPluginGUI *p, Fl_Color SelColour)


+ 6
- 6
SpiralSound/Plugins/ControllerPlugin/ControllerPluginGUI.h View File

@@ -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<CVGUI*> m_GUIVec;
std::vector<CVGUI*> 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

+ 2
- 0
SpiralSound/Plugins/DelayPlugin/DelayPlugin.C View File

@@ -20,6 +20,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

static const float MAX_DELAY=1.0f;

extern "C" {


+ 6
- 6
SpiralSound/Plugins/DelayPlugin/DelayPlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

DelayPluginGUI::DelayPluginGUI(int w, int h, DelayPlugin *o, ChannelHandler *ch, const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/DelayPlugin/DelayPluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/EchoPlugin/EchoPlugin.C View File

@@ -20,6 +20,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

static const float MAX_DELAY=1.0f;

extern "C" {


+ 6
- 6
SpiralSound/Plugins/EchoPlugin/EchoPlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

EchoPluginGUI::EchoPluginGUI(int w, int h, EchoPlugin *o, ChannelHandler *ch, const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/EchoPlugin/EchoPluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.C View File

@@ -20,6 +20,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 2
- 2
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPlugin.h View File

@@ -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; }


+ 2
- 0
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

EnvFollowerPluginGUI::EnvFollowerPluginGUI(int w, int h,EnvFollowerPlugin *o,ChannelHandler *ch,const HostInfo *Info) :


+ 3
- 3
SpiralSound/Plugins/EnvFollowerPlugin/EnvFollowerPluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.C View File

@@ -20,6 +20,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 6
- 6
SpiralSound/Plugins/EnvelopePlugin/EnvelopePlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

static const float TIMED_SLIDER_MAX = 3.0f;

////////////////////////////////////////////


+ 1
- 1
SpiralSound/Plugins/EnvelopePlugin/EnvelopePluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/FilterPlugin/FilterPlugin.C View File

@@ -20,6 +20,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

static const float MAX_RES = 10;
static const float MIN_RES = 1;
static const float MAX_CUTOFF = 3000;


+ 6
- 6
SpiralSound/Plugins/FilterPlugin/FilterPlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

FilterPluginGUI::FilterPluginGUI(int w, int h,FilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/FilterPlugin/FilterPluginGUI.h View File

@@ -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:



+ 2
- 0
SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.C View File

@@ -21,6 +21,8 @@
#include "SpiralIcon.xpm"
#include "../../NoteTable.h"

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 2
- 2
SpiralSound/Plugins/FlipflopPlugin/FlipflopPlugin.h View File

@@ -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; }


+ 2
- 0
SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

FlipflopPluginGUI::FlipflopPluginGUI(int w, int h,FlipflopPlugin *o,ChannelHandler *ch,const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/FlipflopPlugin/FlipflopPluginGUI.h View File

@@ -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;


+ 2
- 0
SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.C View File

@@ -21,6 +21,8 @@
#include <FL/Fl_Button.h>
#include "SpiralIcon.xpm"

using namespace std;

/*
Public source code by alex@smartelectronix.com
Simple example of implementation of formant filter


+ 6
- 6
SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPlugin.h View File

@@ -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

+ 2
- 0
SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.C View File

@@ -20,6 +20,8 @@
#include <FL/fl_draw.h>
#include <FL/fl_draw.H>

using namespace std;

////////////////////////////////////////////

FormantFilterPluginGUI::FormantFilterPluginGUI(int w, int h,FormantFilterPlugin *o,ChannelHandler *ch,const HostInfo *Info) :


+ 1
- 1
SpiralSound/Plugins/FormantFilterPlugin/FormantFilterPluginGUI.h View File

@@ -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:



+ 2
- 0
SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C View File

@@ -22,6 +22,8 @@
#include "../../RiffWav.h"
#include "../../NoteTable.h"

using namespace std;

extern "C" {
SpiralPlugin* SpiralPlugin_CreateInstance()
{


+ 2
- 2
SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.h View File

@@ -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; }


+ 2
- 0
SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C View File

@@ -21,6 +21,8 @@
#include <FL/fl_draw.H>
//#include <FL/fl_file_chooser.h>

using namespace std;

static const char NoteText[12][3] = {"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};

////////////////////////////////////////////


+ 1
- 1
SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.h View File

@@ -71,7 +71,7 @@ public:
virtual void Update();

protected:
const string GetHelpText(const string &loc);
const std::string GetHelpText(const std::string &loc);

private:



+ 2
- 0
SpiralSound/Plugins/SpiralPlugin.C View File

@@ -18,6 +18,8 @@

#include "SpiralPlugin.h"

using namespace std;

SpiralPlugin::SpiralPlugin()
{
m_Version=1;


+ 16
- 16
SpiralSound/Plugins/SpiralPlugin.h View File

@@ -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<string> PortTips;
vector<int> PortTypes;
std::vector<std::string> PortTips;
std::vector<int> 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<const Sample*> m_Input;
vector<Sample*> m_Output;
std::vector<const Sample*> m_Input;
std::vector<Sample*> m_Output;

void (*UpdateInfo)(int n,void *);
int m_HostID;


+ 2
- 0
SpiralSound/Plugins/SpiralPluginGUI.C View File

@@ -25,6 +25,8 @@
#include <FL/Fl_Text_Display.h>
#include <FL/Fl_Text_Buffer.h>

using namespace std;

Fl_Double_Window* SpiralPluginGUI::m_HelpWin=NULL;
Fl_Text_Display* SpiralPluginGUI::m_HelpWin_text=NULL;
SpiralPluginGUI* SpiralPluginGUI::Help_owner=NULL;


+ 2
- 2
SpiralSound/Plugins/SpiralPluginGUI.h View File

@@ -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);


+ 1
- 1
SpiralSound/Plugins/Widgets/Fl_Knob.cxx View File

@@ -3,7 +3,7 @@
#include "Fl_Knob.H"
#include <FL/fl_draw.H>
#include <math.h>
#include <iostream.h>
#include <iostream>

Fl_Knob::Fl_Knob(int xx,int yy,int ww,int hh,const char *l): Fl_Valuator(xx,yy,ww,hh,l) {
int side;


+ 1
- 1
SpiralSound/RiffWav.h View File

@@ -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);


Loading…
Cancel
Save