| @@ -68,6 +68,14 @@ PluginID PluginManager::LoadPlugin(const char *PluginName) | |||
| NewPlugin->GetID = (int(*)()) dlsym(NewPlugin->Handle, "GetID"); | |||
| if ((error = dlerror()) != NULL) | |||
| { | |||
| SpiralInfo::Alert("Error linking to plugin "+string(PluginName)+"\n"+string(error)); | |||
| return PluginError; | |||
| } | |||
| NewPlugin->GetGroupName = (string(*)()) dlsym(NewPlugin->Handle, "GetGroupName"); | |||
| if ((error = dlerror()) != NULL) | |||
| { | |||
| SpiralInfo::Alert("Error linking to plugin "+string(PluginName)+"\n"+string(error)); | |||
| @@ -29,6 +29,7 @@ struct HostsideInfo | |||
| char **(*GetIcon)(void); | |||
| SpiralPlugin *(*CreateInstance)(void); | |||
| int (*GetID)(void); | |||
| string (*GetGroupName)(void); | |||
| }; | |||
| ////////////////////////////////////////////////////////// | |||
| @@ -38,6 +38,11 @@ int GetID() | |||
| { | |||
| return 0x0009; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 43; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,146 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "BeatMatchPlugin.h" | |||
| #include "BeatMatchPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new BeatMatchPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 48; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| BeatMatchPlugin::BeatMatchPlugin() : | |||
| m_Triggered(false), | |||
| m_EstimatedDuration(100), | |||
| m_BeatTime(100), | |||
| m_NextBeat(100), | |||
| m_OutputLevel(1.0f), | |||
| m_Sensitivity(0.5f) | |||
| { | |||
| m_PluginInfo.Name="BeatMatch"; | |||
| m_PluginInfo.Width=90; | |||
| m_PluginInfo.Height=80; | |||
| m_PluginInfo.NumInputs=1; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Sensitivity",&m_Sensitivity); | |||
| } | |||
| BeatMatchPlugin::~BeatMatchPlugin() | |||
| { | |||
| } | |||
| PluginInfo &BeatMatchPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *BeatMatchPlugin::CreateGUI() | |||
| { | |||
| return new BeatMatchPluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void BeatMatchPlugin::Execute() | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| bool Triggered=false; | |||
| if (GetInput(0,n)>0) | |||
| { | |||
| if(!m_Triggered) | |||
| { | |||
| m_Triggered=true; | |||
| Triggered=true; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| if (m_Triggered) | |||
| { | |||
| m_Triggered=false; | |||
| Triggered=true; | |||
| } | |||
| } | |||
| if (Triggered) | |||
| { | |||
| // adjust estimated duration | |||
| // error = m_BeatTime | |||
| m_EstimatedDuration-=(int)(m_BeatTime*m_Sensitivity); | |||
| m_BeatTime=m_EstimatedDuration; | |||
| // push the sync closer | |||
| int HalfBeat = m_EstimatedDuration/2; | |||
| if (m_NextBeat<HalfBeat) m_NextBeat-=(int)(HalfBeat*m_Sensitivity); | |||
| else m_NextBeat+=(int)(HalfBeat*m_Sensitivity); | |||
| } | |||
| if (m_NextBeat<=0) | |||
| { | |||
| m_NextBeat=m_EstimatedDuration; | |||
| m_OutputLevel=-m_OutputLevel; | |||
| } | |||
| m_NextBeat--; | |||
| m_BeatTime--; | |||
| SetOutput(0,n,m_OutputLevel); | |||
| } | |||
| } | |||
| void BeatMatchPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void BeatMatchPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| s<<m_Sensitivity<<" "; | |||
| } | |||
| void BeatMatchPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| s>>m_Sensitivity; | |||
| } | |||
| @@ -0,0 +1,49 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class BeatMatchPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| BeatMatchPlugin(); | |||
| virtual ~BeatMatchPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| float GetSensitivity() { return m_Sensitivity; } | |||
| private: | |||
| bool m_Triggered; | |||
| int m_EstimatedDuration; | |||
| int m_BeatTime; | |||
| int m_NextBeat; | |||
| float m_OutputLevel; | |||
| float m_Sensitivity; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,62 @@ | |||
| /* 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 "BeatMatchPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| 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->labelsize(8); | |||
| m_Sense->callback((Fl_Callback*)cb_Sense); | |||
| end(); | |||
| } | |||
| void BeatMatchPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| BeatMatchPlugin* Plugin = (BeatMatchPlugin*)o; | |||
| m_Sense->value(Plugin->GetSensitivity()); | |||
| } | |||
| //// Callbacks //// | |||
| inline void BeatMatchPluginGUI::cb_Sense_i(Fl_Knob* o, void* v) | |||
| { | |||
| m_GUICH->Set("Sensitivity",(float)o->value()); | |||
| } | |||
| void BeatMatchPluginGUI::cb_Sense(Fl_Knob* o, void* v) | |||
| { ((BeatMatchPluginGUI*)(o->parent()))->cb_Sense_i(o,v);} | |||
| const string BeatMatchPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Produces an output pulse that slowly syncs to the input pulses,\n" | |||
| + "the sensitivity sets the time it takes to sync up.\n" | |||
| + "Can be used to transition between different tempo speeds and\n" | |||
| + "other stuff"; | |||
| } | |||
| @@ -0,0 +1,52 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "BeatMatchPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| class BeatMatchPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| BeatMatchPluginGUI(int w, int h, BeatMatchPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Knob* m_Sense; | |||
| //// Callbacks //// | |||
| inline void cb_Sense_i(Fl_Knob* o, void* v); | |||
| static void cb_Sense(Fl_Knob* o, void* v); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building BeatMatchPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: BeatMatchPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| BeatMatchPlugin.h \ | |||
| BeatMatchPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| BeatMatchPlugin.C \ | |||
| BeatMatchPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| BeatMatchPlugin.o \ | |||
| BeatMatchPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = BeatMatchPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| BeatMatchPlugin.o: BeatMatchPlugin.C \ | |||
| BeatMatchPlugin.h \ | |||
| BeatMatchPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| BeatMatchPluginGUI.o: BeatMatchPluginGUI.C \ | |||
| BeatMatchPlugin.h \ | |||
| BeatMatchPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + + + + + + + + + + + + + + 6 7 + 8 ", | |||
| " 9 $ + + + + + + + + + + + + + + + + + + + + + 0 a ", | |||
| " ) + b + + + + + + + + + + + + + + + + + + + + + c d e ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + + f g ", | |||
| " h + + + + + + + + + + + + + + + + + + + + + + + i j k l ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + m + n o ", | |||
| " p + + + + ' + + ' + + ' + + ' + + ' + + ' + + + q r s ' ", | |||
| " ( + + + + ' + + ' + + ' + + ' + + ' + + ' + + + t ' = u ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + + + + v ' ", | |||
| " + + + + + + + + ' + + + + + ' + + + + ' + + ' + + + w x ", | |||
| " $ y z + + + + + ' + + + + + ' + + + + ' + + ' + + + + + A B ", | |||
| " C + + + + + + + + + + + + + + + + + + + + + + + D E F ' ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + G H I J ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + K ' L ", | |||
| " 5 + + + + + + + + + + + + + + + + + + + + + + + + M ", | |||
| " > + + + + + + + + + + + + + + + + + + + + + + + + + N ", | |||
| " O P Q + + + + + + + + + + + + + + + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 33; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -37,6 +37,11 @@ int GetID() | |||
| { | |||
| return 0x0003; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,129 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "CounterPlugin.h" | |||
| #include "CounterPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new CounterPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 45; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| CounterPlugin::CounterPlugin() : | |||
| m_Count(4), | |||
| m_Current(0), | |||
| m_Triggered(false), | |||
| m_CurrentLevel(1.0f) | |||
| { | |||
| m_PluginInfo.Name="Counter"; | |||
| m_PluginInfo.Width=90; | |||
| m_PluginInfo.Height=80; | |||
| m_PluginInfo.NumInputs=1; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Count",&m_Count); | |||
| } | |||
| CounterPlugin::~CounterPlugin() | |||
| { | |||
| } | |||
| PluginInfo &CounterPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *CounterPlugin::CreateGUI() | |||
| { | |||
| return new CounterPluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void CounterPlugin::Execute() | |||
| { | |||
| bool Triggered; | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(0,n)>0) | |||
| { | |||
| if(!m_Triggered) | |||
| { | |||
| m_Triggered=true; | |||
| m_Current++; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| if (m_Triggered) | |||
| { | |||
| m_Triggered=false; | |||
| m_Current++; | |||
| } | |||
| } | |||
| if (m_Current>=m_Count) | |||
| { | |||
| m_CurrentLevel=-m_CurrentLevel; | |||
| m_Current=0; | |||
| } | |||
| SetOutput(0,n,m_CurrentLevel); | |||
| } | |||
| } | |||
| void CounterPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void CounterPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| s<<m_Count<<" "<<m_Current<<" "; | |||
| } | |||
| void CounterPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| s>>m_Count>>m_Current; | |||
| } | |||
| @@ -0,0 +1,47 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class CounterPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| CounterPlugin(); | |||
| virtual ~CounterPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| int GetCount() { return m_Count; } | |||
| private: | |||
| int m_Count; | |||
| int m_Current; | |||
| bool m_Triggered; | |||
| float m_CurrentLevel; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,68 @@ | |||
| /* 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 "CounterPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| #include <stdio.h> | |||
| 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(20, 30, 50, 20, "Count"); | |||
| m_Count->color(GUI_COLOUR); | |||
| m_Count->labelsize(8); | |||
| m_Count->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); | |||
| m_Count->textsize(10); | |||
| m_Count->value("4"); | |||
| m_Count->when(FL_WHEN_ENTER_KEY); | |||
| m_Count->callback((Fl_Callback*)cb_Count); | |||
| end(); | |||
| } | |||
| void CounterPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| CounterPlugin* Plugin = (CounterPlugin*)o; | |||
| char t[256]; | |||
| sprintf(t,"%d",Plugin->GetCount()); | |||
| m_Count->value(t); | |||
| } | |||
| //// Callbacks //// | |||
| inline void CounterPluginGUI::cb_Count_i(Fl_Input* o, void* v) | |||
| { | |||
| m_GUICH->Set("Count",(int)strtod(o->value(),NULL)); | |||
| } | |||
| void CounterPluginGUI::cb_Count(Fl_Input* o, void* v) | |||
| { ((CounterPluginGUI*)(o->parent()))->cb_Count_i(o,v);} | |||
| const string CounterPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Counts input pulses (zero crossings) and flips the output\n" | |||
| + "CV every time the count is reached."; | |||
| } | |||
| @@ -0,0 +1,52 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "CounterPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| class CounterPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| CounterPluginGUI(int w, int h, CounterPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Input* m_Count; | |||
| //// Callbacks //// | |||
| inline void cb_Count_i(Fl_Input* o, void* v); | |||
| static void cb_Count(Fl_Input* o, void* v); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building CounterPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: CounterPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| CounterPlugin.h \ | |||
| CounterPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| CounterPlugin.C \ | |||
| CounterPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| CounterPlugin.o \ | |||
| CounterPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = CounterPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| CounterPlugin.o: CounterPlugin.C \ | |||
| CounterPlugin.h \ | |||
| CounterPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| CounterPluginGUI.o: CounterPluginGUI.C \ | |||
| CounterPlugin.h \ | |||
| CounterPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + + + + + + + + + + + + + + 6 7 + 8 ", | |||
| " 9 $ + + + + + + + + + + + + + + + + + + + + + 0 a ", | |||
| " ) + b + + + + + + + + + + + + + + + + + + + + + c d e ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + + f g ", | |||
| " h + + + + + + ' ' + ' ' + + + + + + ' ' + + + + i j k l ", | |||
| " + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + m + n o ", | |||
| " p + + + + + ' ' + ' ' + + + + + + ' ' + + + + + q r s ' ", | |||
| " ( + + + + + + + + + + + + + + + + + + + + + + + t ' = u ", | |||
| " + + + + + + + + + + + + + + + + ' ' + ' ' + + + + + v ' ", | |||
| " + + + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + w x ", | |||
| " $ y z + + + + + + + + + + + + + ' ' + ' ' + + + + + + + A B ", | |||
| " C + + + + + + + + + + + + + + + + + + + + + + + D E F ' ", | |||
| " + + + + + + + + ' ' + + + ' ' + ' ' + + + + + G H I J ", | |||
| " + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' + + + K ' L ", | |||
| " 5 + + + + + + + + + ' ' + + + ' ' + ' ' + + + + + M ", | |||
| " > + + + + + + + + + + + + + + + + + + + + + + + + + N ", | |||
| " O P Q + + + + + + + + + + + + + + + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -37,6 +37,11 @@ int GetID() | |||
| { | |||
| return 0x000f; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -59,6 +59,11 @@ int GetID() | |||
| { | |||
| return 41; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0056; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -37,6 +37,11 @@ int GetID() | |||
| { | |||
| return 0x000e; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -4,6 +4,7 @@ for file in `cat PluginList.txt` | |||
| do | |||
| echo $file | |||
| cd $file/ | |||
| nedit Makefile.in | |||
| chmod +w $file.C | |||
| nedit $file.C | |||
| cd .. | |||
| done | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0013; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0005; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -41,6 +41,11 @@ int GetID() | |||
| { | |||
| return 0x000b; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,118 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "FlipflopPlugin.h" | |||
| #include "FlipflopPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new FlipflopPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 46; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| FlipflopPlugin::FlipflopPlugin() : | |||
| m_Count(4), | |||
| m_Current(0), | |||
| m_Triggered(false), | |||
| m_CurrentLevel(1.0f) | |||
| { | |||
| m_PluginInfo.Name="Flipflop"; | |||
| m_PluginInfo.Width=90; | |||
| m_PluginInfo.Height=80; | |||
| m_PluginInfo.NumInputs=1; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Count",&m_Count); | |||
| } | |||
| FlipflopPlugin::~FlipflopPlugin() | |||
| { | |||
| } | |||
| PluginInfo &FlipflopPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *FlipflopPlugin::CreateGUI() | |||
| { | |||
| return NULL; | |||
| } | |||
| void FlipflopPlugin::Execute() | |||
| { | |||
| bool Triggered; | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(0,n)>0) | |||
| { | |||
| if(!m_Triggered) | |||
| { | |||
| m_Triggered=true; | |||
| m_CurrentLevel=-m_CurrentLevel; | |||
| } | |||
| } | |||
| else | |||
| { | |||
| if (m_Triggered) | |||
| { | |||
| m_Triggered=false; | |||
| } | |||
| } | |||
| SetOutput(0,n,m_CurrentLevel); | |||
| } | |||
| } | |||
| void FlipflopPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void FlipflopPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| } | |||
| void FlipflopPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| } | |||
| @@ -0,0 +1,47 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class FlipflopPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| FlipflopPlugin(); | |||
| virtual ~FlipflopPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| int GetCount() { return m_Count; } | |||
| private: | |||
| int m_Count; | |||
| int m_Current; | |||
| bool m_Triggered; | |||
| float m_CurrentLevel; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,45 @@ | |||
| /* 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 "FlipflopPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| 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) | |||
| { | |||
| end(); | |||
| } | |||
| void FlipflopPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| } | |||
| //// Callbacks //// | |||
| const string FlipflopPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Converts a momentary pulse into a sustained one."; | |||
| } | |||
| @@ -0,0 +1,49 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "FlipflopPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| class FlipflopPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| FlipflopPluginGUI(int w, int h, FlipflopPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| //// Callbacks //// | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building FlipflopPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: FlipflopPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| FlipflopPlugin.h \ | |||
| FlipflopPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| FlipflopPlugin.C \ | |||
| FlipflopPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| FlipflopPlugin.o \ | |||
| FlipflopPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = FlipflopPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| FlipflopPlugin.o: FlipflopPlugin.C \ | |||
| FlipflopPlugin.h \ | |||
| FlipflopPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| FlipflopPluginGUI.o: FlipflopPluginGUI.C \ | |||
| FlipflopPlugin.h \ | |||
| FlipflopPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + + + + + + + + + + + + + + 6 7 + 8 ", | |||
| " 9 $ + + + + + + + + + + + + + + + + + + + + + 0 a ", | |||
| " ) + b + + + + + + + + + + + + + + + + + + + + + c d e ", | |||
| " + + + + + + + ' ' ' + + + + + + + ' ' ' ' ' + + f g ", | |||
| " h + + + + + + ' + ' + + + + + + + ' + + + + + + i j k l ", | |||
| " + + + + + ' + ' + + + + + + + ' + + + + + + + m + n o ", | |||
| " p + + + + + ' + ' + + + ' + + + ' + + + + + + + q r s ' ", | |||
| " ( + + + + + ' + ' + + + + ' + + ' + + + + + + + t ' = u ", | |||
| " + + + + + + + + ' + ' + ' ' ' ' ' + ' + + + + + + + v ' ", | |||
| " + + + + + + + + ' + ' + + + + ' + + ' + + + + + + + w x ", | |||
| " $ y z + + + + + ' + ' + + + ' + + + ' + + + + + + + + + A B ", | |||
| " C + + + + + ' + ' + + + + + + + ' + + + + + + + D E F ' ", | |||
| " + + + + + ' + ' + + + + + + + ' + + + + + + + G H I J ", | |||
| " + + + + + ' + ' + + + + + + + ' + + + + + + K ' L ", | |||
| " 5 + + + + + ' ' + ' ' ' + + + + ' ' + + + + + + + M ", | |||
| " > + + + + + + + + + + + + + + + + + + + + + + + + + N ", | |||
| " O P Q + + + + + + + + + + + + + + + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -74,6 +74,11 @@ int GetID() | |||
| { | |||
| return 42; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -335,6 +335,11 @@ int GetID() | |||
| { | |||
| return 31; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -48,6 +48,11 @@ int GetID() | |||
| { | |||
| return 0x0070; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -36,6 +36,11 @@ int GetID() | |||
| { | |||
| return 40; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -42,6 +42,11 @@ int GetID() | |||
| { | |||
| return 0x0016; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -27,6 +27,11 @@ SpiralPlugin* CreateInstance() { return new LFOPlugin; } | |||
| char** GetIcon() { return SpiralIcon_xpm; } | |||
| int GetID() { return 124; } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,156 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "LogicPlugin.h" | |||
| #include "LogicPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new LogicPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 50; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| LogicPlugin::LogicPlugin() : | |||
| m_Operator(AND), | |||
| m_Constant(0) | |||
| { | |||
| m_PluginInfo.Name="Logic"; | |||
| m_PluginInfo.Width=75; | |||
| m_PluginInfo.Height=100; | |||
| m_PluginInfo.NumInputs=2; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input 1"); | |||
| m_PluginInfo.PortTips.push_back("Input 2"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Operator",(int*)&m_Operator); | |||
| m_AudioCH->Register("Constant",&m_Constant); | |||
| } | |||
| LogicPlugin::~LogicPlugin() | |||
| { | |||
| } | |||
| PluginInfo &LogicPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *LogicPlugin::CreateGUI() | |||
| { | |||
| return new LogicPluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void LogicPlugin::Execute() | |||
| { | |||
| float Freq=0, OldFreq=0; | |||
| switch (m_Operator) | |||
| { | |||
| case AND : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(0,n)>0 && GetInput(1,n)>0) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| case OR : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(0,n)>0 || GetInput(1,n)>0) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| case NOT : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(0,n)>0) SetOutput(0,n,-1.0f); | |||
| else SetOutput(0,n,1.0f); | |||
| } | |||
| break; | |||
| case NAND : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (!(GetInput(0,n)>0 && GetInput(1,n)>0)) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| case NOR : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (!(GetInput(0,n)>0) && !(GetInput(1,n)>0)) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| case XOR : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if ((GetInput(0,n)>0 || GetInput(1,n)>0) && | |||
| !(GetInput(0,n)>0 && GetInput(1,n)>0)) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| case XNOR : | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if ((GetInput(0,n)>0 && GetInput(1,n)>0) || | |||
| (!(GetInput(0,n)>0) && !(GetInput(1,n)>0))) SetOutput(0,n,1.0f); | |||
| else SetOutput(0,n,-1.0f); | |||
| } | |||
| break; | |||
| } | |||
| } | |||
| void LogicPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void LogicPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| s<<m_Constant<<" "; | |||
| } | |||
| void LogicPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| s>>m_Constant; | |||
| } | |||
| @@ -0,0 +1,48 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class LogicPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| LogicPlugin(); | |||
| virtual ~LogicPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| enum OperatorType{NONE,AND,OR,NOT,NAND,NOR,XOR,XNOR}; | |||
| OperatorType GetOperator() { return m_Operator; } | |||
| float GetConstant() { return m_Constant; } | |||
| private: | |||
| OperatorType m_Operator; | |||
| float m_Constant; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,227 @@ | |||
| /* 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 "LogicPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| #include <stdio.h> | |||
| 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) : | |||
| SpiralPluginGUI(w,h,o,ch) | |||
| { | |||
| int Width=32,Depth=20,Pos=0,Count=0; | |||
| m_AND = new Fl_Button(5, 15, Width, Depth, "AND"); | |||
| m_AND->type(1); | |||
| m_AND->value(1); | |||
| m_AND->labelsize(10); | |||
| m_AND->selection_color(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->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->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->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->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->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->callback((Fl_Callback*)cb_XNOR); | |||
| end(); | |||
| } | |||
| void LogicPluginGUI::ClearButtons() | |||
| { | |||
| m_AND->value(false); | |||
| m_OR->value(false); | |||
| m_NOT->value(false); | |||
| m_NAND->value(false); | |||
| m_NOR->value(false); | |||
| m_XOR->value(false); | |||
| m_XNOR->value(false); | |||
| } | |||
| void LogicPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| LogicPlugin* Plugin = (LogicPlugin*)o; | |||
| ClearButtons(); | |||
| switch (Plugin->GetOperator()) | |||
| { | |||
| case LogicPlugin::AND : m_AND->value(true); break; | |||
| case LogicPlugin::OR : m_OR->value(true); break; | |||
| case LogicPlugin::NOT : m_NOT->value(true); break; | |||
| case LogicPlugin::NAND : m_NAND->value(true); break; | |||
| case LogicPlugin::NOR : m_NOR->value(true); break; | |||
| case LogicPlugin::XOR : m_XOR->value(true); break; | |||
| case LogicPlugin::XNOR : m_XNOR->value(true); break; | |||
| } | |||
| } | |||
| //// Callbacks //// | |||
| inline void LogicPluginGUI::cb_AND_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::AND); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_AND(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_AND_i(o,v);} | |||
| inline void LogicPluginGUI::cb_OR_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::OR); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_OR(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_OR_i(o,v);} | |||
| inline void LogicPluginGUI::cb_NOT_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::NOT); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_NOT(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_NOT_i(o,v);} | |||
| inline void LogicPluginGUI::cb_NAND_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::NAND); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_NAND(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_NAND_i(o,v);} | |||
| inline void LogicPluginGUI::cb_NOR_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::NOR); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_NOR(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_NOR_i(o,v);} | |||
| inline void LogicPluginGUI::cb_XOR_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::XOR); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_XOR(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_XOR_i(o,v);} | |||
| inline void LogicPluginGUI::cb_XNOR_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| ClearButtons(); | |||
| o->value(true); | |||
| m_GUICH->Set("Operator",(int)LogicPlugin::XNOR); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void LogicPluginGUI::cb_XNOR(Fl_Button* o, void* v) | |||
| { ((LogicPluginGUI*)(o->parent()))->cb_XNOR_i(o,v);} | |||
| const string LogicPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "1001010111010101101111101010100101010101010100010100100101\n" | |||
| + "0010101010111010010010101010001010011110001010101000101010\n" | |||
| + "1110111101101001000010101010111110101010101010101111010101\n" | |||
| + "0011011111010101101000001010101010001010100001100111010111"; | |||
| } | |||
| @@ -0,0 +1,67 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "LogicPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| static const int NUM_KEYS = 12; | |||
| class LogicPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| LogicPluginGUI(int w, int h, LogicPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Button *m_AND,*m_OR,*m_NOT,*m_NAND,*m_NOR,*m_XOR,*m_XNOR; | |||
| void ClearButtons(); | |||
| //// Callbacks //// | |||
| inline void cb_AND_i(Fl_Button* o, void* v); | |||
| static void cb_AND(Fl_Button* o, void* v); | |||
| inline void cb_OR_i(Fl_Button* o, void* v); | |||
| static void cb_OR(Fl_Button* o, void* v); | |||
| inline void cb_NOT_i(Fl_Button* o, void* v); | |||
| static void cb_NOT(Fl_Button* o, void* v); | |||
| inline void cb_NAND_i(Fl_Button* o, void* v); | |||
| static void cb_NAND(Fl_Button* o, void* v); | |||
| inline void cb_NOR_i(Fl_Button* o, void* v); | |||
| static void cb_NOR(Fl_Button* o, void* v); | |||
| inline void cb_XOR_i(Fl_Button* o, void* v); | |||
| static void cb_XOR(Fl_Button* o, void* v); | |||
| inline void cb_XNOR_i(Fl_Button* o, void* v); | |||
| static void cb_XNOR(Fl_Button* o, void* v); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building LogicPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: LogicPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| LogicPlugin.h \ | |||
| LogicPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| LogicPlugin.C \ | |||
| LogicPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| LogicPlugin.o \ | |||
| LogicPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = LogicPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| LogicPlugin.o: LogicPlugin.C \ | |||
| LogicPlugin.h \ | |||
| LogicPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| LogicPluginGUI.o: LogicPluginGUI.C \ | |||
| LogicPlugin.h \ | |||
| LogicPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + ' ' ' ' ' ' ' ' ' + + + + 6 7 + 8 ", | |||
| " 9 $ + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + 0 a ", | |||
| " ) + b + + + + ' + ' ' ' ' ' ' ' ' ' + ' + + + + c d e ", | |||
| " + + + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + f g ", | |||
| " h + + + + + + + + ' ' ' ' ' ' ' ' ' + + + + + + i j k l ", | |||
| " + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + m + n o ", | |||
| " p + + + + + ' + ' ' ' ' ' ' ' ' ' + ' + + + + + q r s ' ", | |||
| " ( + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + t ' = u ", | |||
| " + + + + + + + + + + ' ' ' ' ' ' ' ' ' + + + + + + + v ' ", | |||
| " + + + + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + w x ", | |||
| " $ y z + + + + + ' + ' ' ' ' ' ' ' ' ' + ' + + + + + + + A B ", | |||
| " C + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + D E F ' ", | |||
| " + + + + + + + ' ' ' ' ' ' ' ' ' + + + + + + + G H I J ", | |||
| " + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + K ' L ", | |||
| " 5 + + + + + + ' + ' ' ' ' ' ' ' ' ' + ' + + + + + M ", | |||
| " > + + + + + + ' ' ' ' ' ' ' ' ' ' ' ' ' + + + + + + N ", | |||
| " O P Q + + + + + ' ' ' ' ' ' ' ' ' + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -37,6 +37,11 @@ int GetID() | |||
| { | |||
| return 0x0012; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -27,6 +27,10 @@ char** GetIcon() { return SpiralIcon_xpm; } | |||
| int GetID() { return 123; } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| MeterPlugin::MeterPlugin() { | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x0002; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0007; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x000d; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,171 @@ | |||
| ############################################################################# | |||
| # Makefile for building NoisePlugin.so | |||
| # Generated by tmake at 22:13, 2001/09/17 | |||
| # Project: NoisePlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| NoisePlugin.h \ | |||
| NoisePluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| NoisePlugin.C \ | |||
| NoisePluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| NoisePlugin.o \ | |||
| NoisePluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = NoisePlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| tmake: | |||
| tmake NoisePlugin.pro | |||
| dist: | |||
| $(TAR) NoisePlugin.tar NoisePlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST) | |||
| $(GZIP) NoisePlugin.tar | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| NoisePlugin.o: NoisePlugin.C \ | |||
| NoisePlugin.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h \ | |||
| ../../Sample.h \ | |||
| NoisePluginGUI.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| SpiralIcon.xpm | |||
| NoisePluginGUI.o: NoisePluginGUI.C \ | |||
| NoisePluginGUI.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| NoisePlugin.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h \ | |||
| ../../Sample.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,120 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "NoisePlugin.h" | |||
| #include "NoisePluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include <limits.h> | |||
| #include "SpiralIcon.xpm" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new NoisePlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 49; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| NoisePlugin::NoisePlugin() : | |||
| m_Type(WHITE) | |||
| { | |||
| m_PluginInfo.Name="Noise"; | |||
| m_PluginInfo.Width=80; | |||
| m_PluginInfo.Height=60; | |||
| m_PluginInfo.NumInputs=0; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| b0=b1=b2=b3=b4=b5=b6=0; | |||
| m_AudioCH->Register("Type",(char*)&m_Type); | |||
| } | |||
| NoisePlugin::~NoisePlugin() | |||
| { | |||
| } | |||
| PluginInfo &NoisePlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *NoisePlugin::CreateGUI() | |||
| { | |||
| return new NoisePluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void NoisePlugin::Execute() | |||
| { | |||
| float White,Pink; | |||
| if (m_Type==PINK) | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| White=(1.0f-((rand()%INT_MAX)/(float)INT_MAX)*2.0)*0.2f; | |||
| b0 = 0.99886f * b0 + White * 0.0555179f; | |||
| b1 = 0.99332f * b1 + White * 0.0750759f; | |||
| b2 = 0.96900f * b2 + White * 0.1538520f; | |||
| b3 = 0.86650f * b3 + White * 0.3104856f; | |||
| b4 = 0.55000f * b4 + White * 0.5329522f; | |||
| b5 = -0.7616f * b5 - White * 0.0168980f; | |||
| Pink = b0 + b1 + b2 + b3 + b4 + b5 + b6 + White * 0.5362f; | |||
| b6 = White * 0.115926f; | |||
| SetOutput(0,n,Pink); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,1.0f-((rand()%INT_MAX)/(float)INT_MAX)*2.0); | |||
| } | |||
| } | |||
| } | |||
| void NoisePlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<" "<<(char)m_Type; | |||
| } | |||
| void NoisePlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| char t; | |||
| s>>version>>t; | |||
| m_Type=(Type)t; | |||
| } | |||
| @@ -0,0 +1,44 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class NoisePlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| NoisePlugin(); | |||
| virtual ~NoisePlugin(); | |||
| virtual PluginInfo &Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType *CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| enum Type {WHITE,PINK}; | |||
| Type GetType() {return m_Type;} | |||
| private: | |||
| float b0,b1,b2,b3,b4,b5,b6; | |||
| Type m_Type; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,76 @@ | |||
| /* 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 "NoisePluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| 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) | |||
| { | |||
| White = new Fl_Check_Button(15, 15, 55, 30, "White"); | |||
| White->type(102); | |||
| White->labelsize(10); | |||
| White->down_box(FL_DIAMOND_DOWN_BOX); | |||
| White->selection_color(GUI_COLOUR); | |||
| White->set(); | |||
| White->callback((Fl_Callback*)cb_White); | |||
| Pink = new Fl_Check_Button(15, 35, 55, 30, "Pink"); | |||
| Pink->type(102); | |||
| Pink->labelsize(10); | |||
| Pink->down_box(FL_DIAMOND_DOWN_BOX); | |||
| Pink->selection_color(GUI_COLOUR); | |||
| Pink->callback((Fl_Callback*)cb_Pink); | |||
| end(); | |||
| } | |||
| void NoisePluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| NoisePlugin *Plugin = (NoisePlugin*)o; | |||
| switch (Plugin->GetType()) | |||
| { | |||
| case NoisePlugin::WHITE : White->value(1); break; | |||
| case NoisePlugin::PINK : Pink->value(1); break; | |||
| } | |||
| } | |||
| //// Callbacks //// | |||
| inline void NoisePluginGUI::cb_White_i(Fl_Check_Button* o, void* v) | |||
| { m_GUICH->Set("Type",(char)NoisePlugin::WHITE); } | |||
| void NoisePluginGUI::cb_White(Fl_Check_Button* o, void* v) | |||
| { ((NoisePluginGUI*)(o->parent()))->cb_White_i(o,v); } | |||
| inline void NoisePluginGUI::cb_Pink_i(Fl_Check_Button* o, void* v) | |||
| { m_GUICH->Set("Type",(char)NoisePlugin::PINK); } | |||
| void NoisePluginGUI::cb_Pink(Fl_Check_Button* o, void* v) | |||
| { ((NoisePluginGUI*)(o->parent()))->cb_Pink_i(o,v); } | |||
| const string NoisePluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Makes noise, white noise is just raw randomness, pink noise\n" | |||
| + "is white noise filtered to contain equal amounts of each\n" | |||
| + "frequency, it should sound more natural and be more useful\n" | |||
| + "for synthesis uses"; | |||
| } | |||
| @@ -0,0 +1,51 @@ | |||
| /* 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_Check_Button.H> | |||
| #include <FL/Fl_Box.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include "../SpiralPluginGUI.h" | |||
| #include "NoisePlugin.h" | |||
| #ifndef PLUGINGUI | |||
| #define PLUGINGUI | |||
| class NoisePluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| NoisePluginGUI(int w, int h, NoisePlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Check_Button *White; | |||
| Fl_Check_Button *Pink; | |||
| //// Callbacks //// | |||
| inline void cb_White_i(Fl_Check_Button* o, void* v); | |||
| static void cb_White(Fl_Check_Button*, void*); | |||
| inline void cb_Pink_i(Fl_Check_Button* o, void* v); | |||
| static void cb_Pink(Fl_Check_Button*, void*); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,309 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 270 2", | |||
| " c None", | |||
| ". c #8B889B", | |||
| "+ c #9C99AA", | |||
| "@ c #ADAAB9", | |||
| "# c #837F94", | |||
| "$ c #7D7990", | |||
| "% c #9995A7", | |||
| "& c #67627C", | |||
| "* c #CDCBD4", | |||
| "= c #FCFCFC", | |||
| "- c #D1D0D8", | |||
| "; c #FFFFFF", | |||
| "> c #F1F1F3", | |||
| ", c #848095", | |||
| "' c #2A2248", | |||
| ") c #CFCED6", | |||
| "! c #68637D", | |||
| "~ c #ABA8B6", | |||
| "{ c #D5D3DB", | |||
| "] c #9490A2", | |||
| "^ c #C4C4C4", | |||
| "/ c #1D1C1D", | |||
| "( c #313134", | |||
| "_ c #EEEFEE", | |||
| ": c #FBFBFB", | |||
| "< c #EFEFEF", | |||
| "[ c #7B768D", | |||
| "} c #464060", | |||
| "| c #DEDEE1", | |||
| "1 c #CBCACC", | |||
| "2 c #EEEEF1", | |||
| "3 c #79758C", | |||
| "4 c #FBFBFC", | |||
| "5 c #A2A2A2", | |||
| "6 c #000000", | |||
| "7 c #F5F6F5", | |||
| "8 c #747474", | |||
| "9 c #2A2A2B", | |||
| "0 c #403958", | |||
| "a c #7D788F", | |||
| "b c #C0BEC8", | |||
| "c c #BCBAC6", | |||
| "d c #BCBAC5", | |||
| "e c #625C79", | |||
| "f c #2B2932", | |||
| "g c #191919", | |||
| "h c #CCCCCC", | |||
| "i c #807B91", | |||
| "j c #3B3556", | |||
| "k c #F2F2F4", | |||
| "l c #929292", | |||
| "m c #0E0E0E", | |||
| "n c #BFBFBF", | |||
| "o c #111111", | |||
| "p c #100E15", | |||
| "q c #868689", | |||
| "r c #FEFDFE", | |||
| "s c #D9D7DE", | |||
| "t c #9C98AA", | |||
| "u c #FDFCFD", | |||
| "v c #DDDDDD", | |||
| "w c #575755", | |||
| "x c #5E5E5E", | |||
| "y c #C4C2CD", | |||
| "z c #423C5C", | |||
| "A c #F0F0F2", | |||
| "B c #939393", | |||
| "C c #555555", | |||
| "D c #4A4A4A", | |||
| "E c #010101", | |||
| "F c #282828", | |||
| "G c #C2C2C2", | |||
| "H c #DBDAE0", | |||
| "I c #615C78", | |||
| "J c #F6F6F7", | |||
| "K c #DADADA", | |||
| "L c #545454", | |||
| "M c #0F0F0F", | |||
| "N c #B8B8B8", | |||
| "O c #48445C", | |||
| "P c #2B2B2C", | |||
| "Q c #D3D3D3", | |||
| "R c #C1BEC9", | |||
| "S c #474060", | |||
| "T c #31294D", | |||
| "U c #716C85", | |||
| "V c #65607A", | |||
| "W c #625D78", | |||
| "X c #D5D4DB", | |||
| "Y c #F7F7F7", | |||
| "Z c #8B8B8B", | |||
| "` c #161616", | |||
| " . c #0C0C0C", | |||
| ".. c #060606", | |||
| "+. c #393643", | |||
| "@. c #47415F", | |||
| "#. c #9692A4", | |||
| "$. c #D9D8DE", | |||
| "%. c #F7F7F8", | |||
| "&. c #918DA0", | |||
| "*. c #B8B5C1", | |||
| "=. c #D1D1D1", | |||
| "-. c #252525", | |||
| ";. c #727175", | |||
| ">. c #FEFEFF", | |||
| ",. c #9D99AA", | |||
| "'. c #DBD9E0", | |||
| "). c #E9E9E9", | |||
| "!. c #CBCBCB", | |||
| "~. c #E0E0E0", | |||
| "{. c #6C6C6C", | |||
| "]. c #515151", | |||
| "^. c #A6A6A7", | |||
| "/. c #827E93", | |||
| "(. c #615C77", | |||
| "_. c #EAEAED", | |||
| ":. c #DFDFE1", | |||
| "<. c #F5FE00", | |||
| "[. c #1E1D24", | |||
| "}. c #9894A7", | |||
| "|. c #B1AEBB", | |||
| "1. c #69686F", | |||
| "2. c #000001", | |||
| "3. c #615C76", | |||
| "4. c #5F5A75", | |||
| "5. c #413E4D", | |||
| "6. c #020203", | |||
| "7. c #1A1A1C", | |||
| "8. c #C3C1CB", | |||
| "9. c #9D9D9D", | |||
| "0. c #202020", | |||
| "a. c #383838", | |||
| "b. c #4C4C4C", | |||
| "c. c #111112", | |||
| "d. c #C9C7D0", | |||
| "e. c #F1F1F1", | |||
| "f. c #F8F8F8", | |||
| "g. c #232323", | |||
| "h. c #050408", | |||
| "i. c #AEACB9", | |||
| "j. c #FEFEFE", | |||
| "k. c #1D1D1D", | |||
| "l. c #B7B5C1", | |||
| "m. c #9390A2", | |||
| "n. c #BBBBBB", | |||
| "o. c #414141", | |||
| "p. c #030303", | |||
| "q. c #28272A", | |||
| "r. c #F4F4F6", | |||
| "s. c #605B76", | |||
| "t. c #736E86", | |||
| "u. c #D8D8D8", | |||
| "v. c #727272", | |||
| "w. c #101010", | |||
| "x. c #848486", | |||
| "y. c #CCCBD3", | |||
| "z. c #747087", | |||
| "A. c #6D6881", | |||
| "B. c #1C1C1C", | |||
| "C. c #242424", | |||
| "D. c #656566", | |||
| "E. c #F6F6F6", | |||
| "F. c #E8E6EA", | |||
| "G. c #706B84", | |||
| "H. c #E3E1E6", | |||
| "I. c #474746", | |||
| "J. c #151515", | |||
| "K. c #C8C8C8", | |||
| "L. c #AEAEAE", | |||
| "M. c #080808", | |||
| "N. c #373639", | |||
| "O. c #FDFCFE", | |||
| "P. c #ABA8B7", | |||
| "Q. c #F1F0F3", | |||
| "R. c #6D6980", | |||
| "S. c #0A090E", | |||
| "T. c #95929E", | |||
| "U. c #0A0810", | |||
| "V. c #050505", | |||
| "W. c #5B5A5C", | |||
| "X. c #F7F6F7", | |||
| "Y. c #F4F3F5", | |||
| "Z. c #908C9F", | |||
| "`. c #C8C6D0", | |||
| " + c #837E96", | |||
| ".+ c #86868A", | |||
| "++ c #070608", | |||
| "@+ c #ECEBEE", | |||
| "#+ c #5B5571", | |||
| "$+ c #646078", | |||
| "%+ c #AFAFB0", | |||
| "&+ c #454545", | |||
| "*+ c #363636", | |||
| "=+ c #7A7A7A", | |||
| "-+ c #C8C8C9", | |||
| ";+ c #212025", | |||
| ">+ c #060607", | |||
| ",+ c #969699", | |||
| "'+ c #FAFAFA", | |||
| ")+ c #F8F8F9", | |||
| "!+ c #A29EAF", | |||
| "~+ c #F7F6F8", | |||
| "{+ c #F0F0F1", | |||
| "]+ c #B8B7B9", | |||
| "^+ c #E4E4E4", | |||
| "/+ c #FDFDFD", | |||
| "(+ c #A5A2B2", | |||
| "_+ c #3B3456", | |||
| ":+ c #A8A5B4", | |||
| "<+ c #525252", | |||
| "[+ c #848387", | |||
| "}+ c #CDCDCD", | |||
| "|+ c #8D899C", | |||
| "1+ c #494262", | |||
| "2+ c #68627C", | |||
| "3+ c #40395A", | |||
| "4+ c #ECECEC", | |||
| "5+ c #020202", | |||
| "6+ c #B4B5B5", | |||
| "7+ c #0B0B0B", | |||
| "8+ c #313232", | |||
| "9+ c #E3E3E3", | |||
| "0+ c #B1AEBC", | |||
| "a+ c #BDBBC6", | |||
| "b+ c #3C3556", | |||
| "c+ c #898599", | |||
| "d+ c #EDEDED", | |||
| "e+ c #39393A", | |||
| "f+ c #040404", | |||
| "g+ c #333333", | |||
| "h+ c #F5F5F5", | |||
| "i+ c #2B2B2B", | |||
| "j+ c #2D2A3D", | |||
| "k+ c #B6B4C1", | |||
| "l+ c #F5F5F6", | |||
| "m+ c #605A76", | |||
| "n+ c #DAD8DF", | |||
| "o+ c #F5F4F6", | |||
| "p+ c #615B76", | |||
| "q+ c #524D6A", | |||
| "r+ c #E4E3E8", | |||
| "s+ c #D5D5D5", | |||
| "t+ c #1B1B1B", | |||
| "u+ c #303030", | |||
| "v+ c #AAABAB", | |||
| "w+ c #585464", | |||
| "x+ c #B0AEBB", | |||
| "y+ c #A29FAF", | |||
| "z+ c #E9E8E9", | |||
| "A+ c #787779", | |||
| "B+ c #0F0E15", | |||
| "C+ c #2D2D2E", | |||
| "D+ c #595959", | |||
| "E+ c #FAFAFB", | |||
| "F+ c #807B92", | |||
| "G+ c #B0ADBB", | |||
| "H+ c #E8E7EB", | |||
| "I+ c #3A3258", | |||
| "J+ c #E6E5EA", | |||
| "K+ c #DFDEE3", | |||
| "L+ c #443E5E", | |||
| "M+ c #BAB8C4", | |||
| "N+ c #C1BFCA", | |||
| "O+ c #E0E0E5", | |||
| "P+ c #D0CED6", | |||
| "Q+ c #362F52", | |||
| "R+ c #CECCD5", | |||
| "S+ c #413A5B", | |||
| "T+ c #6A657F", | |||
| "U+ c #9793A6", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + @ # $ % ", | |||
| " & * = * - ; > , ' ; ; ; ) ! ", | |||
| " ~ ; ; { ] ; ^ / ( _ ; : < [ ", | |||
| " } | 1 2 3 4 5 6 6 7 : 8 9 0 a b ", | |||
| " c : d e f g h i j k l 6 m ; n o 6 p q r s ", | |||
| " t u ; v w 6 6 x y z A B 6 C ; D E 6 F G ; H ", | |||
| " I J ; ; K L 6 6 M N O P E 6 6 6 6 6 M Q R S T U V ", | |||
| " W X ; ; ; ; Y Z ` 6 .6 6 6 6 6 6 6 6 ..+.@.#.$.%.&. ", | |||
| " *.; ; ; ; ; ; = =.-.6 6 6 6 6 6 6 6 6 6 E ;.>.; ; ,. ", | |||
| " '.; ; ).Q h !.~.{.6 6 6 6 6 6 6 6 6 6 6 6 E ].^.4 /. ", | |||
| " (._.; :. .6 6 6 6 6 6 6 <.6 6 6 6 <.6 6 6 6 6 6 [.}. ", | |||
| " U @ |.1.2.6 6 6 6 6 6 6 <.6 6 <.6 <.6 6 <.6 6 6 ", | |||
| " 3.4.5.6 6.6 6 6 6 6 <.6 <.6 <.6 <.6 6 <.6 6 6 7. ", | |||
| " 8.; ; 9.0.0.a.b.0.6 6 <.6 <.6 <.<.6 <.6 <.<.6 6 c. ", | |||
| " d.; ; e.f.; ; ; g.6 6 <.6 6 <.6 <.6 <.<.<.<.6 6 h. ", | |||
| " i.; ; ; ; j.; ; k.6 6 <.6 6 <.6 <.6 6 <.6 <.6 6 6 l., ", | |||
| " m.; ; j.; : n.o.p.6 6 6 6 6 6 6 6 6 6 <.6 6 6 6 q.j.r.s. ", | |||
| " t.; ; ; u.v.w.6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 x.; ; y.z. ", | |||
| " A.J ; : B.6 6 6 6 C. .6 6 6 6 6 6 6 6 6 6 6 6 6 D.E.; ; F.G. ", | |||
| " H.; ; I.6 E 6 J.K.L.M.6 6 6 6 6 6 6 6 6 6 6 6 6 N.O.; ; > G. ", | |||
| " P.; Q.R.S.6 6 L.j.; T.U.6 6 6 6 6 6 6 6 m V.6 6 6 W.X.; ; Y.Z. ", | |||
| " G.`.! +.+++x ; ; @+#+$+%+l &+6 6 6 *+=+-+;+6 6 6 >+,+'+; ; )+@ ", | |||
| " !+~+{+]+^+/+; (+_+:+; E.&+6 6 E <+; ; [+6 6 E 6 o }+; ; = |+ ", | |||
| " 1+> ; ; ; ; ; ; 2+3+; ; 4+a.6 6 5+D ; ; 6+7+6 6 6 8+9+; ; 0+ ", | |||
| " > ; ; ; ; a+b+c+; ; d+e+6 6 f+g+; ; h+i+6 6 j+k+; l+3 ", | |||
| " m+n+= ; o+p+q+r+; ; s+t+6 6 5+u+; ; ; v+<+w+ ", | |||
| " x+4 y+ W ; ; ; z+A+u+B+C+D+; ; ; j.E+F+ ", | |||
| " G+; ; ; ; ; H+I+J+; ; ; ; = K+L+ ", | |||
| " M+N+O+4 ; ; P+Q+R+; ; ; s c+S ", | |||
| " S+ T+U+c+ ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -36,6 +36,11 @@ int GetID() | |||
| { | |||
| return 0x0018; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building OperatorPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: OperatorPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| OperatorPlugin.h \ | |||
| OperatorPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| OperatorPlugin.C \ | |||
| OperatorPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| OperatorPlugin.o \ | |||
| OperatorPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = OperatorPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| OperatorPlugin.o: OperatorPlugin.C \ | |||
| OperatorPlugin.h \ | |||
| OperatorPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| OperatorPluginGUI.o: OperatorPluginGUI.C \ | |||
| OperatorPlugin.h \ | |||
| OperatorPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,171 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "OperatorPlugin.h" | |||
| #include "OperatorPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new OperatorPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 44; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| OperatorPlugin::OperatorPlugin() : | |||
| m_Operator(ADD), | |||
| m_Constant(0) | |||
| { | |||
| m_PluginInfo.Name="Operator"; | |||
| m_PluginInfo.Width=90; | |||
| m_PluginInfo.Height=80; | |||
| m_PluginInfo.NumInputs=2; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input 1"); | |||
| m_PluginInfo.PortTips.push_back("Input 2"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Operator",(int*)&m_Operator); | |||
| m_AudioCH->Register("Constant",&m_Constant); | |||
| } | |||
| OperatorPlugin::~OperatorPlugin() | |||
| { | |||
| } | |||
| PluginInfo &OperatorPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *OperatorPlugin::CreateGUI() | |||
| { | |||
| return new OperatorPluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void OperatorPlugin::Execute() | |||
| { | |||
| float Freq=0, OldFreq=0; | |||
| switch (m_Operator) | |||
| { | |||
| case ADD : | |||
| if (InputExists(1)) | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)+GetInput(1,n)); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)+m_Constant); | |||
| } | |||
| } | |||
| break; | |||
| case SUB : | |||
| if (InputExists(1)) | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)-GetInput(1,n)); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)-m_Constant); | |||
| } | |||
| } | |||
| break; | |||
| case DIV : | |||
| if (InputExists(1)) | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (GetInput(1,n)==0) SetOutput(0,n,0); | |||
| else SetOutput(0,n,GetInput(0,n)/GetInput(1,n)); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (m_Constant==0) SetOutput(0,n,0); | |||
| else SetOutput(0,n,GetInput(0,n)/m_Constant); | |||
| } | |||
| } | |||
| break; | |||
| case MUL : | |||
| if (InputExists(1)) | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)*GetInput(1,n)); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)*m_Constant); | |||
| } | |||
| } | |||
| break; | |||
| } | |||
| } | |||
| void OperatorPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void OperatorPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| s<<m_Constant<<" "; | |||
| } | |||
| void OperatorPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| s>>m_Constant; | |||
| } | |||
| @@ -0,0 +1,48 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class OperatorPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| OperatorPlugin(); | |||
| virtual ~OperatorPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| enum OperatorType{NONE,ADD,SUB,DIV,MUL}; | |||
| OperatorType GetOperator() { return m_Operator; } | |||
| float GetConstant() { return m_Constant; } | |||
| private: | |||
| OperatorType m_Operator; | |||
| float m_Constant; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,169 @@ | |||
| /* 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 "OperatorPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| #include <stdio.h> | |||
| 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) : | |||
| SpiralPluginGUI(w,h,o,ch) | |||
| { | |||
| int KeyWidth=10,Note,Pos=0,Count=0; | |||
| 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->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->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->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->callback((Fl_Callback*)cb_Div); | |||
| m_Constant = new Fl_Input(25, 15, 50, 20, "Constant"); | |||
| m_Constant->color(GUI_COLOUR); | |||
| m_Constant->labelsize(8); | |||
| m_Constant->align(FL_ALIGN_BOTTOM|FL_ALIGN_CENTER); | |||
| m_Constant->textsize(10); | |||
| m_Constant->value("0"); | |||
| m_Constant->when(FL_WHEN_ENTER_KEY); | |||
| m_Constant->callback((Fl_Callback*)cb_Constant); | |||
| end(); | |||
| } | |||
| void OperatorPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| OperatorPlugin* Plugin = (OperatorPlugin*)o; | |||
| m_Add->value(false); | |||
| m_Sub->value(false); | |||
| m_Mul->value(false); | |||
| m_Div->value(false); | |||
| switch (Plugin->GetOperator()) | |||
| { | |||
| case OperatorPlugin::ADD : m_Add->value(true); break; | |||
| case OperatorPlugin::SUB : m_Sub->value(true); break; | |||
| case OperatorPlugin::MUL : m_Mul->value(true); break; | |||
| case OperatorPlugin::DIV : m_Div->value(true); break; | |||
| } | |||
| char t[256]; | |||
| sprintf(t,"%f",Plugin->GetConstant()); | |||
| m_Constant->value(t); | |||
| } | |||
| //// Callbacks //// | |||
| inline void OperatorPluginGUI::cb_Add_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| m_Sub->value(false); | |||
| m_Mul->value(false); | |||
| m_Div->value(false); | |||
| m_GUICH->Set("Operator",(int)OperatorPlugin::ADD); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void OperatorPluginGUI::cb_Add(Fl_Button* o, void* v) | |||
| { ((OperatorPluginGUI*)(o->parent()))->cb_Add_i(o,v);} | |||
| inline void OperatorPluginGUI::cb_Sub_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| m_Add->value(false); | |||
| m_Mul->value(false); | |||
| m_Div->value(false); | |||
| m_GUICH->Set("Operator",(int)OperatorPlugin::SUB); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void OperatorPluginGUI::cb_Sub(Fl_Button* o, void* v) | |||
| { ((OperatorPluginGUI*)(o->parent()))->cb_Sub_i(o,v);} | |||
| inline void OperatorPluginGUI::cb_Mul_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| m_Add->value(false); | |||
| m_Sub->value(false); | |||
| m_Div->value(false); | |||
| m_GUICH->Set("Operator",(int)OperatorPlugin::MUL); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void OperatorPluginGUI::cb_Mul(Fl_Button* o, void* v) | |||
| { ((OperatorPluginGUI*)(o->parent()))->cb_Mul_i(o,v);} | |||
| inline void OperatorPluginGUI::cb_Div_i(Fl_Button* o, void* v) | |||
| { | |||
| if (o->value()) | |||
| { | |||
| m_Add->value(false); | |||
| m_Sub->value(false); | |||
| m_Mul->value(false); | |||
| m_GUICH->Set("Operator",(int)OperatorPlugin::DIV); | |||
| } | |||
| else | |||
| { | |||
| o->value(true); | |||
| } | |||
| } | |||
| void OperatorPluginGUI::cb_Div(Fl_Button* o, void* v) | |||
| { ((OperatorPluginGUI*)(o->parent()))->cb_Div_i(o,v);} | |||
| inline void OperatorPluginGUI::cb_Constant_i(Fl_Input* o, void* v) | |||
| { | |||
| m_GUICH->Set("Constant",(float)strtod(o->value(),NULL)); | |||
| } | |||
| void OperatorPluginGUI::cb_Constant(Fl_Input* o, void* v) | |||
| { ((OperatorPluginGUI*)(o->parent()))->cb_Constant_i(o,v);} | |||
| const string OperatorPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Simply performs the operation on the input data,\n" | |||
| + "if there is only one input, it uses the constant."; | |||
| } | |||
| @@ -0,0 +1,63 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "OperatorPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| static const int NUM_KEYS = 12; | |||
| class OperatorPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| OperatorPluginGUI(int w, int h, OperatorPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Button *m_Add,*m_Sub,*m_Mul,*m_Div; | |||
| Fl_Input* m_Constant; | |||
| //// Callbacks //// | |||
| inline void cb_Add_i(Fl_Button* o, void* v); | |||
| static void cb_Add(Fl_Button* o, void* v); | |||
| inline void cb_Sub_i(Fl_Button* o, void* v); | |||
| static void cb_Sub(Fl_Button* o, void* v); | |||
| inline void cb_Mul_i(Fl_Button* o, void* v); | |||
| static void cb_Mul(Fl_Button* o, void* v); | |||
| inline void cb_Div_i(Fl_Button* o, void* v); | |||
| static void cb_Div(Fl_Button* o, void* v); | |||
| inline void cb_Constant_i(Fl_Input* o, void* v); | |||
| static void cb_Constant(Fl_Input* o, void* v); | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + + + + + + + + + + + + + + 6 7 + 8 ", | |||
| " 9 $ + + + + + + + + + + + + + + + + + + + + + 0 a ", | |||
| " ) + b + + + + + + + + + + + + + + + + + + + + + c d e ", | |||
| " + + + + + + + + + ' + + + + + + + + + + + + + + f g ", | |||
| " h + + + + + + + + ' + + + + + + + + + + + + + + i j k l ", | |||
| " + + + + + ' ' ' ' ' + + + ' ' ' ' ' + + + + + m + n o ", | |||
| " p + + + + + + + ' + + + + + + + + + + + + + + + q r s ' ", | |||
| " ( + + + + + + + ' + + + + + + + + + + + + + + + t ' = u ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + + + + v ' ", | |||
| " + + + + + + + + + + + + + + + + + + + + + + + + + + w x ", | |||
| " $ y z + + + + + ' + + + ' + + + ' + + + + + + + + + + + A B ", | |||
| " C + + + + + + ' + ' + + + + + ' + + + + + + + + D E F ' ", | |||
| " + + + + + + + ' + + + + + + + ' + + + + + + + G H I J ", | |||
| " + + + + + + ' + ' + + + + + + + ' + + + + + K ' L ", | |||
| " 5 + + + + + + ' + + + ' + + + + + + + ' + + + + + M ", | |||
| " > + + + + + + + + + + + + + + + + + + + + + + + + + N ", | |||
| " O P Q + + + + + + + + + + + + + + + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -42,6 +42,11 @@ int GetID() | |||
| { | |||
| return 0x0004; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -80,6 +80,11 @@ int GetID() | |||
| { | |||
| return 0x0000; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -45,6 +45,11 @@ int GetID() | |||
| { | |||
| return 32; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -36,6 +36,11 @@ int GetID() | |||
| { | |||
| return 0x000a; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x000c; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0033; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -39,6 +39,11 @@ int GetID() | |||
| { | |||
| return 0x0010; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -36,6 +36,11 @@ int GetID() | |||
| { | |||
| return 0x0001; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x0011; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -36,6 +36,11 @@ int GetID() | |||
| { | |||
| return 0x0015; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -432,6 +432,11 @@ int GetID() | |||
| { | |||
| return 0x0011; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0014; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x001a; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -108,7 +108,7 @@ public: | |||
| bool IsTerminal() { return m_IsTerminal; } | |||
| ChannelHandler *GetChannelHandler() { return m_AudioCH; } | |||
| protected: | |||
| ChannelHandler *m_AudioCH; | |||
| @@ -42,17 +42,18 @@ m_HelpWin(NULL) | |||
| m_DragBar->type(Fl_DragBar::FLDRAG); | |||
| add(m_DragBar); | |||
| m_Hide = new Fl_Button(0,0,18,16,"X"); | |||
| m_Hide = new Fl_Button(2,2,10,10,"X"); | |||
| m_Hide->labeltype(FL_ENGRAVED_LABEL); | |||
| m_Hide->labelsize(10); | |||
| m_Hide->box(FL_NO_BOX); | |||
| m_Hide->callback((Fl_Callback*)cb_Hide); | |||
| add(m_Hide); | |||
| m_Help = new Fl_Button(w-15,0,18,16,"?"); | |||
| m_Help = new Fl_Button(w-11,2,10,10,"?"); | |||
| m_Help->labeltype(FL_ENGRAVED_LABEL); | |||
| m_Help->labelsize(10); | |||
| m_Help->box(FL_NO_BOX); | |||
| m_Help->down_box(FL_NO_BOX); | |||
| m_Help->callback((Fl_Callback*)cb_Help); | |||
| add(m_Help); | |||
| } | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0006; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -35,6 +35,11 @@ int GetID() | |||
| { | |||
| return 0x0008; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -40,6 +40,11 @@ int GetID() | |||
| { | |||
| return 0x0119; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -0,0 +1,155 @@ | |||
| ############################################################################# | |||
| # Makefile for building SwitchPlugin.so | |||
| # Generated by tmake at 21:08, 2001/11/12 | |||
| # Project: SwitchPlugin | |||
| # Template: app | |||
| ############################################################################# | |||
| ####### Compiler, tools and options | |||
| CC = gcc | |||
| CXX = g++ | |||
| CFLAGS = @CFLAGS@ | |||
| CXXFLAGS= @CXXFLAGS@ | |||
| INCPATH = -I/usr/X11R6/include | |||
| LINK = g++ -shared | |||
| LFLAGS = | |||
| LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl | |||
| MOC = moc | |||
| UIC = | |||
| TAR = tar -cf | |||
| GZIP = gzip -9f | |||
| INSTALL = @INSTALL@ | |||
| ###### Autoconf variables | |||
| prefix = @prefix@ | |||
| exec_prefix = @exec_prefix@ | |||
| bindir = @bindir@ | |||
| sbindir = @sbindir@ | |||
| libexecdir = @libexecdir@ | |||
| datadir = @datadir@ | |||
| sysconfdir = @sysconfdir@ | |||
| sharedstatedir = @sharedstatedir@ | |||
| localstatedir = @localstatedir@ | |||
| libdir = @libdir@ | |||
| infodir = @infodir@ | |||
| mandir = @mandir@ | |||
| ####### Files | |||
| HEADERS = ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../../ChannelHandler.h \ | |||
| ../Widgets/Fl_Knob.H \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../../Sample.h \ | |||
| SwitchPlugin.h \ | |||
| SwitchPluginGUI.h | |||
| SOURCES = ../SpiralPlugin.C \ | |||
| ../SpiralPluginGUI.C \ | |||
| ../../ChannelHandler.C \ | |||
| ../Widgets/Fl_Knob.cxx \ | |||
| ../Widgets/Fl_DragBar.cxx \ | |||
| ../../Sample.C \ | |||
| SwitchPlugin.C \ | |||
| SwitchPluginGUI.C | |||
| OBJECTS = ../SpiralPlugin.o \ | |||
| ../SpiralPluginGUI.o \ | |||
| ../../ChannelHandler.o \ | |||
| ../Widgets/Fl_Knob.o \ | |||
| ../Widgets/Fl_DragBar.o \ | |||
| ../../Sample.o \ | |||
| SwitchPlugin.o \ | |||
| SwitchPluginGUI.o | |||
| INTERFACES = | |||
| UICDECLS = | |||
| UICIMPLS = | |||
| SRCMOC = | |||
| OBJMOC = | |||
| DIST = | |||
| TARGET = SwitchPlugin.so | |||
| ####### Implicit rules | |||
| .SUFFIXES: .cpp .cxx .cc .C .c | |||
| .cpp.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cxx.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .cc.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .C.o: | |||
| $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | |||
| .c.o: | |||
| $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | |||
| ####### Build rules | |||
| all: $(TARGET) | |||
| $(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) | |||
| $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | |||
| moc: $(SRCMOC) | |||
| clean: | |||
| -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS) $(TARGET) | |||
| -rm -f *~ core | |||
| install: | |||
| $(INSTALL) $(TARGET) $(libdir)/SpiralPlugins | |||
| ####### Sub-libraries | |||
| ###### Combined headers | |||
| ####### Compile | |||
| ../SpiralPlugin.o: ../SpiralPlugin.C \ | |||
| ../SpiralPlugin.h \ | |||
| ../../Sample.h | |||
| ../SpiralPluginGUI.o: ../SpiralPluginGUI.C \ | |||
| ../SpiralPluginGUI.h \ | |||
| ../Widgets/Fl_DragBar.H \ | |||
| ../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 | |||
| ../../Sample.o: ../../Sample.C \ | |||
| ../../Sample.h \ | |||
| ../../SpiralInfo.h | |||
| SwitchPlugin.o: SwitchPlugin.C \ | |||
| SwitchPlugin.h \ | |||
| SwitchPluginGUI.h \ | |||
| ../../NoteTable.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h \ | |||
| SpiralIcon.xpm | |||
| SwitchPluginGUI.o: SwitchPluginGUI.C \ | |||
| SwitchPlugin.h \ | |||
| SwitchPluginGUI.h \ | |||
| ../SpiralPlugin.h \ | |||
| ../SpiralPluginGUI.h | |||
| ../../ChannelHandler.o: ../../ChannelHandler.C \ | |||
| ../../ChannelHandler.h | |||
| @@ -0,0 +1,163 @@ | |||
| /* XPM */ | |||
| static char * SpiralIcon_xpm[] = { | |||
| "36 36 124 2", | |||
| " c None", | |||
| ". c #E98A06", | |||
| "+ c #E88700", | |||
| "@ c #814E07", | |||
| "# c #8A550B", | |||
| "$ c #E88905", | |||
| "% c #7A4803", | |||
| "& c #070603", | |||
| "* c #1C1103", | |||
| "= c #090704", | |||
| "- c #B96C02", | |||
| "; c #6C4105", | |||
| "> c #E88803", | |||
| ", c #D07A03", | |||
| "' c #000000", | |||
| ") c #E88701", | |||
| "! c #E78702", | |||
| "~ c #4F330B", | |||
| "{ c #E68602", | |||
| "] c #442A07", | |||
| "^ c #E38501", | |||
| "/ c #935703", | |||
| "( c #E88802", | |||
| "_ c #CA7602", | |||
| ": c #0A0601", | |||
| "< c #150F07", | |||
| "[ c #D07A02", | |||
| "} c #D27B02", | |||
| "| c #462A03", | |||
| "1 c #020101", | |||
| "2 c #E78700", | |||
| "3 c #653C04", | |||
| "4 c #0D0A05", | |||
| "5 c #E88904", | |||
| "6 c #8F5607", | |||
| "7 c #E78905", | |||
| "8 c #CA7805", | |||
| "9 c #E98B09", | |||
| "0 c #C97602", | |||
| "a c #0C0802", | |||
| "b c #E88801", | |||
| "c c #B56A03", | |||
| "d c #140C02", | |||
| "e c #040301", | |||
| "f c #834D03", | |||
| "g c #060402", | |||
| "h c #E88A05", | |||
| "i c #D37B00", | |||
| "j c #191003", | |||
| "k c #E58807", | |||
| "l c #E98A07", | |||
| "m c #DF8201", | |||
| "n c #C37304", | |||
| "o c #090603", | |||
| "p c #E58501", | |||
| "q c #E28400", | |||
| "r c #CF7A04", | |||
| "s c #B76C03", | |||
| "t c #915500", | |||
| "u c #040303", | |||
| "v c #9F5C00", | |||
| "w c #C77400", | |||
| "x c #633B03", | |||
| "y c #693F04", | |||
| "z c #C37200", | |||
| "A c #CC7804", | |||
| "B c #0C0905", | |||
| "C c #C17101", | |||
| "D c #AF6701", | |||
| "E c #DA7F02", | |||
| "F c #945703", | |||
| "G c #271700", | |||
| "H c #160E02", | |||
| "I c #4F3209", | |||
| "J c #040302", | |||
| "K c #CD7800", | |||
| "L c #080500", | |||
| "M c #9B5C03", | |||
| "N c #C07205", | |||
| "O c #E08302", | |||
| "P c #613A03", | |||
| "Q c #915603", | |||
| "R c #E78600", | |||
| "S c #915502", | |||
| "T c #E18301", | |||
| "U c #331F03", | |||
| "V c #030201", | |||
| "W c #0F0B05", | |||
| "X c #E48501", | |||
| "Y c #603800", | |||
| "Z c #492C04", | |||
| "` c #8A5307", | |||
| " . c #161008", | |||
| ".. c #DF8200", | |||
| "+. c #1C1102", | |||
| "@. c #090500", | |||
| "#. c #E58500", | |||
| "$. c #D77D00", | |||
| "%. c #A05E03", | |||
| "&. c #100B05", | |||
| "*. c #E58601", | |||
| "=. c #2F1D02", | |||
| "-. c #5B3500", | |||
| ";. c #CB7600", | |||
| ">. c #D47B01", | |||
| ",. c #502E00", | |||
| "'. c #764604", | |||
| "). c #603904", | |||
| "!. c #905606", | |||
| "~. c #CE7801", | |||
| "{. c #5E3700", | |||
| "]. c #512F00", | |||
| "^. c #A86302", | |||
| "/. c #E28401", | |||
| "(. c #0E0902", | |||
| "_. c #070502", | |||
| ":. c #965803", | |||
| "<. c #E68601", | |||
| "[. c #452A04", | |||
| "}. c #804D07", | |||
| "|. c #4A2D03", | |||
| "1. c #1A1207", | |||
| "2. c #050402", | |||
| "3. c #120D07", | |||
| " ", | |||
| " ", | |||
| " ", | |||
| " . + + @ + + # ", | |||
| " $ + + % & + + * = ", | |||
| " . + + - ; > + , ' ) ! ~ ", | |||
| " + { ] $ + + + + + + + ^ / ( + _ : < ", | |||
| " . + + [ } + + + + + + + + + + + + + | 1 ", | |||
| " > + + + + + + + + + + + + + + + 2 3 4 ", | |||
| " 5 + + + + + + + + + + + + + + + + + 6 7 + 8 ", | |||
| " 9 $ + + + + + + + + + + + + + + + + + + + + + 0 a ", | |||
| " ) + b + + + + + + + + + + + + + + + + + + + + + c d e ", | |||
| " + + + + + + + ' ' ' + + + + + + + + + + + + + + f g ", | |||
| " h + + + + ' ' ' ' ' ' + + + + + + + + + + + + + i j k l ", | |||
| " + + + + + ' ' + + ' ' + + + + + + + + + + + + m + n o ", | |||
| " p + + + + + + + + + + + ' ' + + + + + + + + + + q r s ' ", | |||
| " ( + + + + + + + + + + + + + ' ' + ' ' + + + + + t ' = u ", | |||
| " + + + + + + + + + + + + + + + + + + ' ' ' ' ' ' + + v ' ", | |||
| " + + + + + + + + + + + + + + + + + + + ' ' + + + + + w x ", | |||
| " $ y z + + + + + + + + + + + + + + + + + + + + + + + + + A B ", | |||
| " C + + + + + ' ' + + + + + + + + + + + + + + + + D E F ' ", | |||
| " + + + ' ' ' ' + + + + + + + + + + + + + + + + G H I J ", | |||
| " + + + + + ' ' + + + + + + + + + + + + + + + K ' L ", | |||
| " 5 + + + + + + + + + + + + + + + + + + + + + + + + M ", | |||
| " > + + + + + + + + + + + + + + + + + + + + + + + + + N ", | |||
| " O P Q + + + + + + + + + + + + + + + + + + R S T p U V ", | |||
| " W X + + + + + + + + + + + + + + + + R Y ' Z ` ' . ", | |||
| " ) + + + + + + + + + + + + + + + ..+.@. ", | |||
| " > + + #.+ + + + + + + + + + + $.R + %.&. ", | |||
| " ) *.=.-.;.+ + + + + + + >.,.L '.2 ).1 ", | |||
| " !.' + + ~.{.].^.+ /.(. _.W ", | |||
| " + + :.' + <.[. ", | |||
| " }.|.V 1.2.3. ", | |||
| " ", | |||
| " ", | |||
| " "}; | |||
| @@ -0,0 +1,117 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "SwitchPlugin.h" | |||
| #include "SwitchPluginGUI.h" | |||
| #include <FL/Fl_Button.h> | |||
| #include "SpiralIcon.xpm" | |||
| #include "../../NoteTable.h" | |||
| extern "C" { | |||
| SpiralPlugin* CreateInstance() | |||
| { | |||
| return new SwitchPlugin; | |||
| } | |||
| char** GetIcon() | |||
| { | |||
| return SpiralIcon_xpm; | |||
| } | |||
| int GetID() | |||
| { | |||
| return 47; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "Maths/Logic"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| SwitchPlugin::SwitchPlugin() : | |||
| m_Mix(false) | |||
| { | |||
| m_PluginInfo.Name="Switch"; | |||
| m_PluginInfo.Width=90; | |||
| m_PluginInfo.Height=80; | |||
| m_PluginInfo.NumInputs=3; | |||
| m_PluginInfo.NumOutputs=1; | |||
| m_PluginInfo.PortTips.push_back("Input 1"); | |||
| m_PluginInfo.PortTips.push_back("Input 2"); | |||
| m_PluginInfo.PortTips.push_back("CV"); | |||
| m_PluginInfo.PortTips.push_back("Output"); | |||
| m_AudioCH->Register("Mix",&m_Mix); | |||
| } | |||
| SwitchPlugin::~SwitchPlugin() | |||
| { | |||
| } | |||
| PluginInfo &SwitchPlugin::Initialise(const HostInfo *Host) | |||
| { | |||
| return SpiralPlugin::Initialise(Host); | |||
| } | |||
| SpiralGUIType *SwitchPlugin::CreateGUI() | |||
| { | |||
| return new SwitchPluginGUI(m_PluginInfo.Width, | |||
| m_PluginInfo.Height, | |||
| this,m_AudioCH,m_HostInfo); | |||
| } | |||
| void SwitchPlugin::Execute() | |||
| { | |||
| for (int n=0; n<m_HostInfo->BUFSIZE; n++) | |||
| { | |||
| if (!m_Mix) | |||
| { | |||
| if (GetInput(2,n)<=0) | |||
| { | |||
| SetOutput(0,n,GetInput(0,n)); | |||
| } | |||
| else | |||
| { | |||
| SetOutput(0,n,GetInput(1,n)); | |||
| } | |||
| } | |||
| else | |||
| { | |||
| SetOutput(0,n,Linear(-1.0f,1.0f,GetInput(2,n),GetInput(0,n),GetInput(1,n))); | |||
| } | |||
| } | |||
| } | |||
| void SwitchPlugin::ExecuteCommands() | |||
| { | |||
| } | |||
| void SwitchPlugin::StreamOut(ostream &s) | |||
| { | |||
| s<<m_Version<<endl; | |||
| s<<m_Mix<<" "; | |||
| } | |||
| void SwitchPlugin::StreamIn(istream &s) | |||
| { | |||
| int version; | |||
| s>>version; | |||
| s>>m_Mix; | |||
| } | |||
| @@ -0,0 +1,45 @@ | |||
| /* SpiralSound | |||
| * Copyleft (C) 2001 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 "../SpiralPlugin.h" | |||
| #include <FL/Fl_Pixmap.H> | |||
| #ifndef PLUGIN | |||
| #define PLUGIN | |||
| class SwitchPlugin : public SpiralPlugin | |||
| { | |||
| public: | |||
| SwitchPlugin(); | |||
| virtual ~SwitchPlugin(); | |||
| virtual PluginInfo& Initialise(const HostInfo *Host); | |||
| virtual SpiralGUIType* CreateGUI(); | |||
| virtual void Execute(); | |||
| virtual void ExecuteCommands(); | |||
| virtual void StreamOut(ostream &s); | |||
| virtual void StreamIn(istream &s); | |||
| virtual string GetGroupName() { return "Maths/Logic"; } | |||
| bool GetMix() { return m_Mix; } | |||
| private: | |||
| bool m_Mix; | |||
| }; | |||
| #endif | |||
| @@ -0,0 +1,61 @@ | |||
| /* 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 "SwitchPluginGUI.h" | |||
| #include <FL/fl_draw.h> | |||
| #include <FL/fl_draw.H> | |||
| 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->labelsize(8); | |||
| m_Mix->type(1); | |||
| m_Mix->callback((Fl_Callback*)cb_Mix); | |||
| end(); | |||
| } | |||
| void SwitchPluginGUI::UpdateValues(SpiralPlugin *o) | |||
| { | |||
| SwitchPlugin* Plugin = (SwitchPlugin*)o; | |||
| m_Mix->value(Plugin->GetMix()); | |||
| } | |||
| //// Callbacks //// | |||
| inline void SwitchPluginGUI::cb_Mix_i(Fl_Button* o, void* v) | |||
| { | |||
| m_GUICH->Set("Mix",(bool)o->value()); | |||
| } | |||
| void SwitchPluginGUI::cb_Mix(Fl_Button* o, void* v) | |||
| { ((SwitchPluginGUI*)(o->parent()))->cb_Mix_i(o,v);} | |||
| const string SwitchPluginGUI::GetHelpText(const string &loc){ | |||
| return string("") | |||
| + "Switches between inputs, if mix is turned on the inputs are\n" | |||
| + "crossfaded between, according to the CV input"; | |||
| } | |||
| @@ -0,0 +1,52 @@ | |||
| /* 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_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Input.H> | |||
| #include "../Widgets/Fl_Knob.H" | |||
| #include "../Widgets/Fl_DragBar.H" | |||
| #include "SwitchPlugin.h" | |||
| #include "../SpiralPluginGUI.h" | |||
| #ifndef PluginGUI | |||
| #define PluginGUI | |||
| class SwitchPluginGUI : public SpiralPluginGUI | |||
| { | |||
| public: | |||
| SwitchPluginGUI(int w, int h, SwitchPlugin *o,ChannelHandler *ch,const HostInfo *Info); | |||
| virtual void UpdateValues(SpiralPlugin *o); | |||
| protected: | |||
| const string GetHelpText(const string &loc); | |||
| private: | |||
| Fl_Button* m_Mix; | |||
| //// Callbacks //// | |||
| inline void cb_Mix_i(Fl_Button* o, void* v); | |||
| static void cb_Mix(Fl_Button* o, void* v); | |||
| }; | |||
| #endif | |||
| @@ -33,7 +33,10 @@ char** GetIcon() { | |||
| int GetID() { | |||
| return 0x0032; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -42,6 +42,11 @@ int GetID() | |||
| { | |||
| return 0x0017; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -38,6 +38,11 @@ int GetID() | |||
| { | |||
| return 0x001b; | |||
| } | |||
| string GetGroupName() | |||
| { | |||
| return "SpiralSound"; | |||
| } | |||
| } | |||
| /////////////////////////////////////////////////////// | |||
| @@ -301,17 +301,6 @@ SpiralWindowType *SynthModular::CreateWindow() | |||
| m_Options->callback((Fl_Callback*)cb_Rload); | |||
| m_MainButtons->add(m_Options); | |||
| n++; | |||
| /*m_OpenEditor = new Fl_Button(5+xoff, n*gap+yoff, but, but, ""); | |||
| m_OpenEditor->box(FL_NO_BOX); | |||
| tPix = new Fl_Pixmap(edit_xpm); | |||
| m_OpenEditor->image(tPix->copy(tPix->w(),tPix->h())); | |||
| delete tPix; | |||
| m_OpenEditor->selection_color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_OpenEditor->tooltip("Open/Close Editor"); | |||
| m_OpenEditor->callback((Fl_Callback*)cb_OpenEditor); | |||
| m_MainButtons->add(m_OpenEditor); | |||
| n++;*/ | |||
| ///////////////// | |||
| @@ -321,10 +310,29 @@ SpiralWindowType *SynthModular::CreateWindow() | |||
| int edy = MAIN_HEIGHT; | |||
| Fl_Group *Left = new Fl_Group(0,MAIN_HEIGHT,TOOLBOX_WIDTH,MAIN_HEIGHT); | |||
| Left->box(FL_FLAT_BOX); | |||
| Left->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| Left->user_data((void*)(this)); | |||
| m_EditorWindow->add(Left); | |||
| m_EditorWindow->resizable(Left); | |||
| m_ToolBox = new Fl_Scroll(0,0+edy,TOOLBOX_WIDTH, TOOLBOX_HEIGHT, ""); | |||
| m_GroupName = new Fl_Box(0,MAIN_HEIGHT,TOOLBOX_WIDTH,16,""); | |||
| m_GroupName->labelsize(12); | |||
| m_GroupName->color(SpiralSynthModularInfo::GUICOL_Canvas); | |||
| m_GroupName->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE); | |||
| m_GroupName->box(FL_BORDER_BOX); | |||
| Left->add(m_GroupName); | |||
| m_PluginGroupLeft = new Fl_Button(0, MAIN_HEIGHT, 16, 16, "@<"); | |||
| m_PluginGroupLeft->callback((Fl_Callback*)cb_PluginGroupLeft); | |||
| Left->add(m_PluginGroupLeft); | |||
| m_PluginGroupRight = new Fl_Button(TOOLBOX_WIDTH-16, MAIN_HEIGHT, 16, 16, "@>"); | |||
| m_PluginGroupRight->callback((Fl_Callback*)cb_PluginGroupRight); | |||
| Left->add(m_PluginGroupRight); | |||
| m_ToolBox = new Fl_Scroll(0,0+edy+16,TOOLBOX_WIDTH, TOOLBOX_HEIGHT-16, ""); | |||
| m_ToolBox->type(Fl_Scroll::VERTICAL_ALWAYS); | |||
| m_ToolBox->box(FL_FLAT_BOX); | |||
| m_ToolBox->labeltype(FL_ENGRAVED_LABEL); | |||
| @@ -333,15 +341,6 @@ SpiralWindowType *SynthModular::CreateWindow() | |||
| m_ToolBox->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_ToolBox->user_data((void*)(this)); | |||
| Left->add(m_ToolBox); | |||
| // m_EditorWindow->resizable(m_ToolBox); | |||
| m_ToolPack = new Fl_Pack(SLIDER_WIDTH+5,5+edy,TOOLBOX_WIDTH-10, TOOLBOX_HEIGHT-40,""); | |||
| m_ToolPack->type(FL_VERTICAL); | |||
| m_ToolPack->box(FL_NO_BOX); | |||
| m_ToolPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_ToolPack->user_data((void*)(this)); | |||
| m_ToolBox->add(m_ToolPack); | |||
| //m_EditorWindow->resizable(m_ToolBox); | |||
| xoff=0; yoff=MAIN_HEIGHT+TOOLBOX_HEIGHT; | |||
| m_Buttons = new Fl_Group(xoff, yoff, TOOLBOX_WIDTH, MAIN_HEIGHT*2-TOOLBOX_HEIGHT, ""); | |||
| @@ -390,6 +389,45 @@ SpiralWindowType *SynthModular::CreateWindow() | |||
| ////////////////////////////////////////////////////////// | |||
| SynthModular::ToolBox::ToolBox(Fl_Scroll *parent, void* user) | |||
| { | |||
| int Width = 40; | |||
| int Height = 40; | |||
| m_Icon=0; | |||
| m_ToolPack = new Fl_Pack(SLIDER_WIDTH+5,25+MAIN_HEIGHT,TOOLBOX_WIDTH-10, TOOLBOX_HEIGHT-60,""); | |||
| m_ToolPack->type(FL_VERTICAL); | |||
| m_ToolPack->box(FL_NO_BOX); | |||
| m_ToolPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_ToolPack->user_data(user); | |||
| parent->add(m_ToolPack); | |||
| m_IconPack = new Fl_Pack(0,0,TOOLBOX_WIDTH-SLIDER_WIDTH,Height,""); | |||
| m_IconPack->type(FL_HORIZONTAL); | |||
| m_IconPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_IconPack->user_data(m_ToolPack->user_data()); | |||
| m_ToolPack->add(m_IconPack); | |||
| } | |||
| void SynthModular::ToolBox::AddIcon(Fl_Button *Icon) | |||
| { | |||
| int Width = 40; | |||
| int Height = 40; | |||
| if (m_Icon>=ICON_DEPTH) | |||
| { | |||
| m_Icon=0; | |||
| m_IconPack = new Fl_Pack(0,0,TOOLBOX_WIDTH-SLIDER_WIDTH,Height,""); | |||
| m_IconPack->type(FL_HORIZONTAL); | |||
| m_IconPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| m_IconPack->user_data(m_ToolPack->user_data()); | |||
| m_ToolPack->add(m_IconPack); | |||
| } | |||
| m_IconPack->add(Icon); | |||
| m_Icon++; | |||
| } | |||
| void SynthModular::LoadPlugins(string pluginPath) | |||
| { | |||
| @@ -418,14 +456,6 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
| Splash->show(); | |||
| int ID=-1; | |||
| int Icon=0; | |||
| Fl_Pack *IconPack; | |||
| IconPack = new Fl_Pack(0,0,TOOLBOX_WIDTH-SLIDER_WIDTH,Height,""); | |||
| IconPack->type(FL_HORIZONTAL); | |||
| IconPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| IconPack->user_data((void*)(this)); | |||
| m_ToolPack->add(IconPack); | |||
| for (vector<string>::iterator i=SpiralSynthModularInfo::PLUGINVEC.begin(); | |||
| i!=SpiralSynthModularInfo::PLUGINVEC.end(); i++) | |||
| @@ -446,17 +476,7 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
| #ifdef DEBUG_PLUGINS | |||
| cerr<<"Plugin ["<<*i<<"] = "<<ID<<endl; | |||
| #endif | |||
| if (Icon>=ICON_DEPTH) | |||
| { | |||
| Icon=0; | |||
| IconPack = new Fl_Pack(0,0,TOOLBOX_WIDTH-SLIDER_WIDTH,Height,""); | |||
| IconPack->type(FL_HORIZONTAL); | |||
| IconPack->color(SpiralSynthModularInfo::GUICOL_Tool); | |||
| IconPack->user_data((void*)(this)); | |||
| m_ToolPack->add(IconPack); | |||
| } | |||
| Fl_Button *NewButton = new Fl_Button(0,0,Width,Height,""); | |||
| NewButton->labelsize(10); | |||
| @@ -464,7 +484,23 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
| NewButton->image(tPix->copy(tPix->w(),tPix->h())); | |||
| delete tPix; | |||
| IconPack->add(NewButton); | |||
| string GroupName = PluginManager::Get()->GetPlugin(ID)->GetGroupName(); | |||
| ToolBox* Tool=NULL; | |||
| map<string,ToolBox*>::iterator ti=m_PluginGroupMap.find(GroupName); | |||
| if (ti==m_PluginGroupMap.end()) | |||
| { | |||
| if (Tool) Tool->GetToolPack()->hide(); | |||
| Tool = new ToolBox(m_ToolBox,(void*)(this)); | |||
| m_PluginGroupMap[GroupName]=Tool; | |||
| Tool->GetToolPack()->hide(); | |||
| } | |||
| else | |||
| { | |||
| Tool=ti->second; | |||
| } | |||
| Tool->AddIcon(NewButton); | |||
| NewButton->type(0); | |||
| NewButton->box(FL_PLASTIC_UP_BOX); | |||
| NewButton->align(FL_ALIGN_INSIDE|FL_ALIGN_TOP); | |||
| @@ -487,7 +523,6 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
| NewButton->callback((Fl_Callback*)cb_NewDevice,&Numbers[ID]); | |||
| NewButton->show(); | |||
| m_DeviceVec.push_back(NewButton); | |||
| Icon++; | |||
| m_ToolBox->redraw(); | |||
| @@ -496,6 +531,19 @@ void SynthModular::LoadPlugins(string pluginPath) | |||
| } | |||
| } | |||
| // try to show the SpiralSound group | |||
| m_CurrentGroup=m_PluginGroupMap.find("SpiralSound"); | |||
| if (m_CurrentGroup==m_PluginGroupMap.end()) | |||
| { | |||
| // can't find it - show the first plugin group | |||
| m_CurrentGroup=m_PluginGroupMap.begin(); | |||
| m_CurrentGroup->second->GetToolPack()->show(); | |||
| m_GroupName->label(m_CurrentGroup->first.c_str()); | |||
| } | |||
| m_CurrentGroup->second->GetToolPack()->show(); | |||
| m_GroupName->label(m_CurrentGroup->first.c_str()); | |||
| Splash->hide(); | |||
| delete Splash; | |||
| } | |||
| @@ -1018,13 +1066,29 @@ void SynthModular::cb_NewComment(Fl_Button* o, void* v) | |||
| ////////////////////////////////////////////////////////// | |||
| inline void SynthModular::cb_OpenEditor_i(Fl_Button* o, void* v) | |||
| inline void SynthModular::cb_PluginGroupLeft_i(Fl_Button* o, void* v) | |||
| { | |||
| m_CurrentGroup->second->GetToolPack()->hide(); | |||
| m_CurrentGroup++; | |||
| 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_PluginGroupLeft(Fl_Button* o, void* v) | |||
| {((SynthModular*)(o->parent()->user_data()))->cb_PluginGroupLeft_i(o,v);} | |||
| ////////////////////////////////////////////////////////// | |||
| inline void SynthModular::cb_PluginGroupRight_i(Fl_Button* o, void* v) | |||
| { | |||
| //if (m_EditorWindow->shown()) m_EditorWindow->hide(); | |||
| //else m_EditorWindow->show(); | |||
| m_CurrentGroup->second->GetToolPack()->hide(); | |||
| m_CurrentGroup++; | |||
| 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_OpenEditor(Fl_Button* o, void* v) | |||
| {((SynthModular*)(o->parent()->user_data()))->cb_OpenEditor_i(o,v);} | |||
| void SynthModular::cb_PluginGroupRight(Fl_Button* o, void* v) | |||
| {((SynthModular*)(o->parent()->user_data()))->cb_PluginGroupRight_i(o,v);} | |||
| ////////////////////////////////////////////////////////// | |||
| @@ -23,6 +23,7 @@ | |||
| #include <FL/x.H> | |||
| #include <FL/Fl_Double_Window.H> | |||
| #include <FL/Fl_Group.H> | |||
| #include <FL/Fl_Box.H> | |||
| #include <FL/Fl_Button.H> | |||
| #include <FL/Fl_Pixmap.H> | |||
| #include <FL/Fl_Scroll.H> | |||
| @@ -126,9 +127,31 @@ private: | |||
| Fl_Canvas *m_Canvas; | |||
| Fl_Scroll *m_CanvasScroll; | |||
| Fl_Scroll *m_ToolBox; | |||
| Fl_Pack *m_ToolPack; | |||
| Fl_Group *m_Buttons; | |||
| Fl_Button *m_NewComment; | |||
| Fl_Box *m_GroupName; | |||
| Fl_Button *m_PluginGroupLeft; | |||
| Fl_Button *m_PluginGroupRight; | |||
| class ToolBox | |||
| { | |||
| public: | |||
| ToolBox(Fl_Scroll *parent, void* user); | |||
| ~ToolBox() {} | |||
| void AddIcon(Fl_Button *Icon); | |||
| Fl_Pack *GetToolPack() { return m_ToolPack; } | |||
| private: | |||
| Fl_Pack *m_ToolPack; | |||
| Fl_Pack *m_IconPack; | |||
| int m_Icon; | |||
| }; | |||
| map<string,ToolBox*> m_PluginGroupMap; | |||
| map<string,ToolBox*>::iterator m_CurrentGroup; | |||
| SettingsWindow *m_SettingsWindow; | |||
| @@ -161,9 +184,10 @@ private: | |||
| static void cb_Unconnect(Fl_Canvas* o, void* v); | |||
| inline void cb_Close_i(Fl_Window* o, void* v); | |||
| static void cb_Close(Fl_Window* o, void* v); | |||
| inline void cb_OpenEditor_i(Fl_Button* o, void* v); | |||
| static void cb_OpenEditor(Fl_Button* o, void* v); | |||
| inline void cb_PluginGroupLeft_i(Fl_Button* o, void* v); | |||
| static void cb_PluginGroupLeft(Fl_Button* o, void* v); | |||
| inline void cb_PluginGroupRight_i(Fl_Button* o, void* v); | |||
| static void cb_PluginGroupRight(Fl_Button* o, void* v); | |||
| inline void cb_Rload_i(Fl_Button* o, void* v); | |||
| static void cb_Rload(Fl_Button* o, void* v); | |||
| @@ -78,10 +78,12 @@ SpiralSynthModularInfo::SpiralSynthModularInfo() | |||
| PLUGINVEC.push_back("ControllerPlugin.so"); | |||
| PLUGINVEC.push_back("MatrixPlugin.so"); | |||
| PLUGINVEC.push_back("SeqSelectorPlugin.so"); | |||
| PLUGINVEC.push_back("SequencerPlugin.so"); | |||
| PLUGINVEC.push_back("PoshSamplerPlugin.so"); | |||
| PLUGINVEC.push_back("WaveTablePlugin.so"); | |||
| PLUGINVEC.push_back("OscillatorPlugin.so"); | |||
| PLUGINVEC.push_back("LFOPlugin.so"); | |||
| PLUGINVEC.push_back("NoisePlugin.so"); | |||
| PLUGINVEC.push_back("EnvelopePlugin.so"); | |||
| PLUGINVEC.push_back("SampleHoldPlugin.so"); | |||
| PLUGINVEC.push_back("NoteSnapPlugin.so"); | |||
| @@ -92,6 +94,8 @@ SpiralSynthModularInfo::SpiralSynthModularInfo() | |||
| PLUGINVEC.push_back("FilterPlugin.so"); | |||
| PLUGINVEC.push_back("SVFilterPlugin.so"); | |||
| PLUGINVEC.push_back("MoogFilterPlugin.so"); | |||
| PLUGINVEC.push_back("FormantPlugin.so"); | |||
| PLUGINVEC.push_back("AnotherFilterPlugin.so"); | |||
| PLUGINVEC.push_back("EchoPlugin.so"); | |||
| PLUGINVEC.push_back("DelayPlugin.so"); | |||
| PLUGINVEC.push_back("EnvFollowerPlugin.so"); | |||
| @@ -101,6 +105,12 @@ SpiralSynthModularInfo::SpiralSynthModularInfo() | |||
| PLUGINVEC.push_back("DistributorPlugin.so"); | |||
| PLUGINVEC.push_back("SplitterPlugin.so"); | |||
| PLUGINVEC.push_back("StreamPlugin.so"); | |||
| PLUGINVEC.push_back("OperatorPlugin.so"); | |||
| PLUGINVEC.push_back("CounterPlugin.so"); | |||
| PLUGINVEC.push_back("FlipflopPlugin.so"); | |||
| PLUGINVEC.push_back("SwitchPlugin.so"); | |||
| PLUGINVEC.push_back("BeatMatchPlugin.so"); | |||
| PLUGINVEC.push_back("LogicPlugin.so"); | |||
| } | |||
| void SpiralSynthModularInfo::StreamInPrefs(istream &s) | |||
| @@ -44,8 +44,9 @@ if test $ac_arg_jack = "Y" ; then | |||
| SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin StereoMixerPlugin StreamPlugin\ | |||
| WaveTablePlugin LADSPAPlugin XFadePlugin PoshSamplerPlugin SeqSelectorPlugin\ | |||
| DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin FormantFilterPlugin \ | |||
| SplitSwitchPlugin MixSwitchPlugin MeterPlugin WaveShaperPlugin \ | |||
| AnotherFilterPlugin JackPlugin" | |||
| AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ | |||
| BeatMatchPlugin NoisePlugin SequencerPlugin LogicPlugin SplitSwitchPlugin \ | |||
| MixSwitchPlugin JackPlugin" | |||
| else | |||
| PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \ | |||
| EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \ | |||
| @@ -53,8 +54,8 @@ else | |||
| SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin StereoMixerPlugin StreamPlugin\ | |||
| WaveTablePlugin LADSPAPlugin XFadePlugin PoshSamplerPlugin SeqSelectorPlugin\ | |||
| DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin FormantFilterPlugin \ | |||
| SplitSwitchPlugin MixSwitchPlugin MeterPlugin WaveShaperPlugin \ | |||
| AnotherFilterPlugin" | |||
| AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ | |||
| BeatMatchPlugin NoisePlugin SequencerPlugin LogicPlugin SplitSwitchPlugin MixSwitchPlugin" | |||
| fi | |||
| echo "$PLUGINLIST" > SpiralSound/PluginList.txt | |||
| @@ -158,6 +159,14 @@ SpiralSound/Plugins/StreamPlugin/Makefile | |||
| SpiralSound/Plugins/WaveShaperPlugin/Makefile | |||
| SpiralSound/Plugins/WaveTablePlugin/Makefile | |||
| SpiralSound/Plugins/XFadePlugin/Makefile | |||
| SpiralSound/Plugins/OperatorPlugin/Makefile | |||
| SpiralSound/Plugins/CounterPlugin/Makefile | |||
| SpiralSound/Plugins/FlipflopPlugin/Makefile | |||
| SpiralSound/Plugins/SwitchPlugin/Makefile | |||
| SpiralSound/Plugins/BeatMatchPlugin/Makefile | |||
| SpiralSound/Plugins/NoisePlugin/Makefile | |||
| SpiralSound/Plugins/SequencerPlugin/Makefile | |||
| SpiralSound/Plugins/LogicPlugin/Makefile | |||
| SpiralSound/Plugins/SplitSwitchPlugin/Makefile | |||
| SpiralSound/Plugins/MixSwitchPlugin/Makefile | |||
| SpiralSynthPluginLocation.h | |||