Browse Source

Misc fixes, mainly split wav writer and oss plugin and matrix fixes.

master
nebogeo 22 years ago
parent
commit
262b50a04d
17 changed files with 879 additions and 57 deletions
  1. +1
    -1
      GUI/Widgets/Fl_DeviceGUI.C
  2. +146
    -0
      SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPlugin.C
  3. +51
    -0
      SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPlugin.h
  4. +84
    -0
      SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C
  5. +54
    -0
      SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.h
  6. +183
    -0
      SpiralSound/Plugins/DiskWriterPlugin/Makefile.in
  7. +312
    -0
      SpiralSound/Plugins/DiskWriterPlugin/SpiralIcon.xpm
  8. +8
    -4
      SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C
  9. +18
    -4
      SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C
  10. +2
    -2
      SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C
  11. +8
    -5
      SpiralSound/Plugins/OutputPlugin/OutputPlugin.C
  12. +3
    -33
      SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C
  13. +0
    -1
      SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.h
  14. +1
    -1
      SpiralSound/SpiralInfo.h
  15. +5
    -3
      SpiralSynthModularInfo.C
  16. +1
    -1
      SpiralSynthModularInfo.h
  17. +2
    -2
      configure.in

+ 1
- 1
GUI/Widgets/Fl_DeviceGUI.C View File

@@ -89,7 +89,7 @@ int Fl_DeviceGUI::handle(int event)
{ {
int t=Fl_Group::handle(event); int t=Fl_Group::handle(event);
if (t==0)
if (t==0 && Fl::belowmouse()==this)
{ {
if (event==FL_PUSH && Fl::event_button()==1) if (event==FL_PUSH && Fl::event_button()==1)
{ {


+ 146
- 0
SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPlugin.C View File

@@ -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.
*/

// for lrintf()
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#include <math.h>

#include <sys/types.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
#include <sys/ioctl.h>
#include <limits.h>

#include "DiskWriterPlugin.h"
#include "DiskWriterPluginGUI.h"
#include <FL/fl_file_chooser.H>
#include "SpiralIcon.xpm"

static const HostInfo* host;

#define CHECK_AND_REPORT_ERROR if (result<0) \
{ \
perror("Sound device did not accept settings"); \
m_OutputOk=false; \
return false; \
}

extern "C"
{
SpiralPlugin* CreateInstance()
{
return new DiskWriterPlugin;
}

char** GetIcon()
{
return SpiralIcon_xpm;
}

int GetID()
{
return 41;
}
}

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

DiskWriterPlugin::DiskWriterPlugin() :
m_Recording(false)
{
m_PluginInfo.Name="DiskWriter";
m_PluginInfo.Width=100;
m_PluginInfo.Height=60;
m_PluginInfo.NumInputs=3;
m_PluginInfo.NumOutputs=0;
m_PluginInfo.PortTips.push_back("Left Out");
m_PluginInfo.PortTips.push_back("Right Out");
m_PluginInfo.PortTips.push_back("Record Controller");

m_AudioCH->RegisterData("Filename",ChannelHandler::INPUT,m_GUIArgs.Name,256);
}

DiskWriterPlugin::~DiskWriterPlugin()
{
}

PluginInfo &DiskWriterPlugin::Initialise(const HostInfo *Host)
{
PluginInfo& Info= SpiralPlugin::Initialise(Host);
host=Host;
return Info;
}

SpiralGUIType *DiskWriterPlugin::CreateGUI()
{
return new DiskWriterPluginGUI(m_PluginInfo.Width,
m_PluginInfo.Height,
this,
m_AudioCH,
m_HostInfo);
}

void DiskWriterPlugin::Execute()
{
if(m_Recording && m_Wav.IsOpen())
{
int on=0;
float t;
short Buffer[host->BUFSIZE*2];
for (int n=0; n<host->BUFSIZE; n++)
{
// stereo channels - interleave
t=GetInput(0,n);
if (t>1) t=1;
if (t<-1) t=-1;
Buffer[on]=lrintf(t*SHRT_MAX);
on++;
t=GetInput(1,n);
if (t>1) t=1;
if (t<-1) t=-1;
Buffer[on]=lrintf(t*SHRT_MAX);
on++;
}
// stereo 16bit * bufsize
m_Wav.Save(Buffer,host->BUFSIZE*2*2);
}
}

void DiskWriterPlugin::ExecuteCommands()
{
if (m_AudioCH->IsCommandWaiting())
{
switch(m_AudioCH->GetCommand())
{
case OPENWAV :
m_Wav.Open(m_GUIArgs.Name,WavFile::WRITE, WavFile::STEREO);
break;
case CLOSEWAV : m_Wav.Close(); break;
case RECORD : m_Recording=true; break;
case STOP : m_Recording=false; break;
default : break;
}
}
}

+ 51
- 0
SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPlugin.h View File

@@ -0,0 +1,51 @@
/* 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 "../../RiffWav.h"
#include <FL/Fl_Pixmap.H>

#ifndef OscillatorPLUGIN
#define OscillatorPLUGIN

class DiskWriterPlugin : public SpiralPlugin
{
public:
DiskWriterPlugin();
virtual ~DiskWriterPlugin();

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 GUICommands {NONE,OPENWAV,CLOSEWAV,RECORD,STOP};
struct GUIArgs
{
char Name[256];
};
private:
GUIArgs m_GUIArgs;
WavFile m_Wav;
bool m_Recording;
};

#endif

+ 84
- 0
SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.C View File

@@ -0,0 +1,84 @@
/* 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 "DiskWriterPluginGUI.h"
#include <FL/fl_draw.h>
#include <FL/fl_file_chooser.H>

static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145;

DiskWriterPluginGUI::DiskWriterPluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch,const HostInfo *Info) :
SpiralPluginGUI(w,h,o,ch)
{
Open = new Fl_Button(5, 15, 90, 20, "Open");
Open->type(1);
Open->down_box(FL_DOWN_BOX);
Open->labelsize(10);
Open->callback((Fl_Callback*)cb_Open);

Record = new Fl_Button(5, 35, 90, 20, "Record");
Record->type(1);
Record->down_box(FL_DOWN_BOX);
Record->labelsize(10);
Record->callback((Fl_Callback*)cb_Record);
end();
}

void DiskWriterPluginGUI::UpdateValues(SpiralPlugin *o)
{
}
//// Callbacks ////

inline void DiskWriterPluginGUI::cb_Open_i(Fl_Button* o, void* v)
{
if (o->value())
{
char *fn=fl_file_chooser("Pick a Wav file to save to", "*.wav", NULL);
char t[256];
sprintf(t,"%s",fn);
if (fn && fn!="")
{
m_GUICH->SetData("Filename",(void*)t);
m_GUICH->SetCommand(DiskWriterPlugin::OPENWAV);
}
else
{
m_GUICH->SetCommand(DiskWriterPlugin::CLOSEWAV);
o->value(false);
}
}
else
{
m_GUICH->SetCommand(DiskWriterPlugin::CLOSEWAV);
}
}
void DiskWriterPluginGUI::cb_Open(Fl_Button* o, void* v)
{ ((DiskWriterPluginGUI*)(o->parent()))->cb_Open_i(o,v); }

inline void DiskWriterPluginGUI::cb_Record_i(Fl_Button* o, void* v)
{
if (o->value()) m_GUICH->SetCommand(DiskWriterPlugin::RECORD);
else m_GUICH->SetCommand(DiskWriterPlugin::STOP);
}
void DiskWriterPluginGUI::cb_Record(Fl_Button* o, void* v)
{ ((DiskWriterPluginGUI*)(o->parent()))->cb_Record_i(o,v); }

+ 54
- 0
SpiralSound/Plugins/DiskWriterPlugin/DiskWriterPluginGUI.h View File

@@ -0,0 +1,54 @@
/* 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_Pixmap.H>

#include "../Widgets/Fl_Knob.H"
#include "../Widgets/Fl_DragBar.H"
#include "DiskWriterPlugin.h"
#include "../SpiralPluginGUI.h"

#ifndef SCOPEGUI
#define SCOPEGUI

class DiskWriterPluginGUI : public SpiralPluginGUI
{
public:
DiskWriterPluginGUI(int w, int h, SpiralPlugin *o, ChannelHandler *ch, const HostInfo *Info);
virtual void UpdateValues(SpiralPlugin *o);
private:

Fl_Button *Open;
Fl_Button *Record;
//// Callbacks ////
inline void cb_Record_i(Fl_Button* o, void* v);
static void cb_Record(Fl_Button* o, void* v);
inline void cb_Open_i(Fl_Button* o, void* v);
static void cb_Open(Fl_Button* o, void* v);
};

#endif

+ 183
- 0
SpiralSound/Plugins/DiskWriterPlugin/Makefile.in View File

@@ -0,0 +1,183 @@
#############################################################################
# Makefile for building DiskWriterPlugin.so
# Generated by tmake at 22:13, 2001/09/17
# Project: DiskWriterPlugin
# 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 -lfltk -lGL -lXext -lX11 -lm -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 \
../../RiffWav.h \
DiskWriterPlugin.h \
DiskWriterPluginGUI.h
SOURCES = ../SpiralPlugin.C \
../SpiralPluginGUI.C \
../../ChannelHandler.C \
../Widgets/Fl_Knob.cxx \
../Widgets/Fl_DragBar.cxx \
../../Sample.C \
../../RiffWav.C \
DiskWriterPlugin.C \
DiskWriterPluginGUI.C
OBJECTS = ../SpiralPlugin.o \
../SpiralPluginGUI.o \
../../ChannelHandler.o \
../Widgets/Fl_Knob.o \
../Widgets/Fl_DragBar.o \
../../Sample.o \
../../RiffWav.o \
DiskWriterPlugin.o \
DiskWriterPluginGUI.o
INTERFACES =
UICDECLS =
UICIMPLS =
SRCMOC =
OBJMOC =
DIST =
TARGET = DiskWriterPlugin.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 DiskWriterPlugin.pro

dist:
$(TAR) DiskWriterPlugin.tar DiskWriterPlugin.pro $(SOURCES) $(HEADERS) $(INTERFACES) $(DIST)
$(GZIP) DiskWriterPlugin.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

../../RiffWav.o: ../../RiffWav.C \
../../RiffWav.h \
../../Sample.h \
../../SpiralInfo.h

DiskWriterPlugin.o: DiskWriterPlugin.C \
DiskWriterPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../../RiffWav.h \
DiskWriterPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H \
SpiralIcon.xpm

DiskWriterPluginGUI.o: DiskWriterPluginGUI.C \
DiskWriterPluginGUI.h \
../Widgets/Fl_Knob.H \
../Widgets/Fl_DragBar.H \
DiskWriterPlugin.h \
../SpiralPlugin.h \
../../Sample.h \
../../SpiralInfo.h \
../../Sample.h \
../../RiffWav.h \
../SpiralPluginGUI.h \
../Widgets/Fl_DragBar.H

../../ChannelHandler.o: ../../ChannelHandler.C \
../../ChannelHandler.h

+ 312
- 0
SpiralSound/Plugins/DiskWriterPlugin/SpiralIcon.xpm View File

@@ -0,0 +1,312 @@
/* XPM */
static char * SpiralIcon_xpm[] = {
"36 36 273 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 #181900",
"R c #D3D3D3",
"S c #C1BEC9",
"T c #474060",
"U c #31294D",
"V c #716C85",
"W c #65607A",
"X c #625D78",
"Y c #D5D4DB",
"Z c #F7F7F7",
"` c #8B8B8B",
" . c #161616",
".. c #0C0C0C",
"+. 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 #F4FD00",
"^. c #515151",
"/. c #A6A6A7",
"(. c #827E93",
"_. c #615C77",
":. c #EAEAED",
"<. c #DFDFE1",
"[. c #1E1D24",
"}. c #9894A7",
"|. c #B1AEBB",
"1. c #69686F",
"2. c #000001",
"3. c #0A0A00",
"4. c #615C76",
"5. c #5F5A75",
"6. c #413E4D",
"7. c #020203",
"8. c #1A1A1C",
"9. c #C3C1CB",
"0. c #9D9D9D",
"a. c #202020",
"b. c #383838",
"c. c #4C4C4C",
"d. c #111112",
"e. c #C9C7D0",
"f. c #F1F1F1",
"g. c #F8F8F8",
"h. c #232323",
"i. c #010100",
"j. c #050408",
"k. c #AEACB9",
"l. c #FEFEFE",
"m. c #1D1D1D",
"n. c #020200",
"o. c #B7B5C1",
"p. c #9390A2",
"q. c #BBBBBB",
"r. c #414141",
"s. c #030303",
"t. c #28272A",
"u. c #F4F4F6",
"v. c #605B76",
"w. c #736E86",
"x. c #D8D8D8",
"y. c #727272",
"z. c #101010",
"A. c #848486",
"B. c #CCCBD3",
"C. c #747087",
"D. c #6D6881",
"E. c #1C1C1C",
"F. c #242424",
"G. c #656566",
"H. c #F6F6F6",
"I. c #E8E6EA",
"J. c #706B84",
"K. c #E3E1E6",
"L. c #474746",
"M. c #151515",
"N. c #C8C8C8",
"O. c #AEAEAE",
"P. c #080808",
"Q. c #373639",
"R. c #FDFCFE",
"S. c #ABA8B7",
"T. c #F1F0F3",
"U. c #6D6980",
"V. c #0A090E",
"W. c #95929E",
"X. c #0A0810",
"Y. c #050505",
"Z. c #5B5A5C",
"`. c #F7F6F7",
" + c #F4F3F5",
".+ c #908C9F",
"++ c #C8C6D0",
"@+ c #837E96",
"#+ c #86868A",
"$+ c #070608",
"%+ c #ECEBEE",
"&+ c #5B5571",
"*+ c #646078",
"=+ c #AFAFB0",
"-+ c #454545",
";+ c #333408",
">+ 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",
"1+ c #848387",
"2+ c #CDCDCD",
"3+ c #8D899C",
"4+ c #494262",
"5+ c #68627C",
"6+ c #40395A",
"7+ c #ECECEC",
"8+ c #020202",
"9+ c #B4B5B5",
"0+ c #0B0B0B",
"a+ c #313232",
"b+ c #E3E3E3",
"c+ c #B1AEBC",
"d+ c #BDBBC6",
"e+ c #3C3556",
"f+ c #898599",
"g+ c #EDEDED",
"h+ c #39393A",
"i+ c #040404",
"j+ c #333333",
"k+ c #F5F5F5",
"l+ c #2B2B2B",
"m+ c #2D2A3D",
"n+ c #B6B4C1",
"o+ c #F5F5F6",
"p+ c #605A76",
"q+ c #DAD8DF",
"r+ c #F5F4F6",
"s+ c #615B76",
"t+ c #524D6A",
"u+ c #E4E3E8",
"v+ c #D5D5D5",
"w+ c #1B1B1B",
"x+ c #303030",
"y+ c #AAABAB",
"z+ c #585464",
"A+ c #B0AEBB",
"B+ c #A29FAF",
"C+ c #E9E8E9",
"D+ c #787779",
"E+ c #0F0E15",
"F+ c #2D2D2E",
"G+ c #595959",
"H+ c #FAFAFB",
"I+ c #807B92",
"J+ c #B0ADBB",
"K+ c #E8E7EB",
"L+ c #3A3258",
"M+ c #E6E5EA",
"N+ c #DFDEE3",
"O+ c #443E5E",
"P+ c #BAB8C4",
"Q+ c #C1BFCA",
"R+ c #E0E0E5",
"S+ c #D0CED6",
"T+ c #362F52",
"U+ c #CECCD5",
"V+ c #413A5B",
"W+ c #6A657F",
"X+ 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 Q Q M 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 6 E ;.>.; ; ,. ",
" '.; ; ).R h !.~.{.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 6 [.}. ",
" V @ |.1.2.6 6 6 6 6 3.6 6 6 6 6 6 ].6 6 ].].].6 ",
" 4.5.6.6 7.6 6 6 6 6 6 6 6 6 6 6 ].].].].].].6 8. ",
" 9.; ; 0.a.a.b.c.a.6 6 6 6 6 6 ].].6 ].].].].].6 d. ",
" e.; ; f.g.; ; ; h.6 i.6 6 ].].].].6 ].].6 6 6 6 j. ",
" k.; ; ; ; l.; ; m.6 n.6 ].].].].].6 ].6 6 6 6 6 6 o., ",
" p.; ; l.; : q.r.s.6 6 ].].].].].].].].].6 6 6 6 t.l.u.v. ",
" w.; ; ; x.y.z.6 6 6 6 6 ].].].].].].].].].].6 6 A.; ; B.C. ",
" D.J ; : E.6 6 6 6 F...6 6 6 6 ].].].].].].].6 6 G.H.; ; I.J. ",
" K.; ; L.6 E 6 M.N.O.P.6 6 6 6 6 6 ].].].].6 6 6 Q.R.; ; > J. ",
" S.; T.U.V.6 6 O.l.; W.X.6 6 6 6 6 6 6 6 m Y.6 6 6 Z.`.; ; +.+ ",
" J.++! @+#+$+x ; ; %+&+*+=+l -+6 6 6 ;+>+,+'+6 6 6 )+!+~+; ; {+@ ",
" ]+^+/+(+_+:+; <+[+}+; H.-+6 6 E |+; ; 1+6 6 E 6 o 2+; ; = 3+ ",
" 4+> ; ; ; ; ; ; 5+6+; ; 7+b.6 6 8+D ; ; 9+0+6 6 6 a+b+; ; c+ ",
" > ; ; ; ; d+e+f+; ; g+h+6 6 i+j+; ; k+l+6 6 m+n+; o+3 ",
" p+q+= ; r+s+t+u+; ; v+w+6 6 8+x+; ; ; y+|+z+ ",
" A+4 B+ X ; ; ; C+D+x+E+F+G+; ; ; l.H+I+ ",
" J+; ; ; ; ; K+L+M+; ; ; ; = N+O+ ",
" P+Q+R+4 ; ; S+T+U+; ; ; s f+T ",
" V+ W+X+f+ ",
" ",
" ",
" "};

+ 8
- 4
SpiralSound/Plugins/MatrixPlugin/MatrixPlugin.C View File

@@ -60,7 +60,7 @@ m_PatReset(false)
m_Version=3; m_Version=3;


m_PluginInfo.Name="Matrix"; m_PluginInfo.Name="Matrix";
m_PluginInfo.Width=555;
m_PluginInfo.Width=560;
m_PluginInfo.Height=270; m_PluginInfo.Height=270;
m_PluginInfo.NumInputs=5; m_PluginInfo.NumInputs=5;
m_PluginInfo.NumOutputs=19; m_PluginInfo.NumOutputs=19;
@@ -151,8 +151,8 @@ void MatrixPlugin::Execute()
SetOutputPitch(0,n,m_CurrentNoteCV); SetOutputPitch(0,n,m_CurrentNoteCV);
SetOutput(1,n,m_CurrentTriggerCV); SetOutput(1,n,m_CurrentTriggerCV);
if (m_Step+1 >= m_Matrix[m_Current].Length) SetOutput(18, n, 1);
else SetOutput(18, n, 0);
// clear the pattern sync
SetOutput(18, n, 0);
if (GetInputPitch(0,n)>0) if (GetInputPitch(0,n)>0)
{ {
@@ -258,7 +258,11 @@ void MatrixPlugin::Execute()
m_Time=0; m_Time=0;
m_Step++; m_Step++;
if (m_Step >= m_Matrix[m_Current].Length) m_Step=0;
if (m_Step >= m_Matrix[m_Current].Length)
{
SetOutput(18, n, 1);
m_Step=0;
}
// Reset the values // Reset the values
m_CurrentTriggerCV=0; m_CurrentTriggerCV=0;


+ 18
- 4
SpiralSound/Plugins/MatrixPlugin/MatrixPluginGUI.C View File

@@ -24,8 +24,10 @@
static const int GUI_COLOUR = 179; static const int GUI_COLOUR = 179;
static const int GUIBG_COLOUR = 144; static const int GUIBG_COLOUR = 144;
static const int GUIBG2_COLOUR = 145; static const int GUIBG2_COLOUR = 145;
static const char NoteText[12][3] = {"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};


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

Fl_MatrixButton::Fl_MatrixButton(int x, int y, int w, int h, char* n) : Fl_MatrixButton::Fl_MatrixButton(int x, int y, int w, int h, char* n) :
Fl_Button(x,y,w,h,n), Fl_Button(x,y,w,h,n),
m_Volume(NULL), m_Volume(NULL),
@@ -170,24 +172,28 @@ m_LastLight(0)
m_TransLbl->labelsize(10); m_TransLbl->labelsize(10);
add (m_TransLbl); add (m_TransLbl);


int xoff=95;
int xoff=105;
int yoff=40; int yoff=40;
int butsize=7; int butsize=7;
int n=0; int n=0;
fl_color(150,150,150); fl_color(150,150,150);
int markercol=fl_color(); int markercol=fl_color();

fl_color(170,170,170);
int blcolour=fl_color();
for(int x=0; x<MATX; x++) for(int x=0; x<MATX; x++)
for(int y=0; y<MATY; y++) for(int y=0; y<MATY; y++)
{ {
Numbers[n]=n; Numbers[n]=n;
m_Matrix[x][y] = new Fl_MatrixButton(xoff+x*butsize,yoff+y*butsize,butsize+1,butsize+1,"");
m_Matrix[x][y] = new Fl_MatrixButton(xoff+x*butsize,yoff+((MATY-1)*butsize)-(y*butsize),butsize+1,butsize+1,"");
m_Matrix[x][y]->type(1); m_Matrix[x][y]->type(1);
m_Matrix[x][y]->box(FL_BORDER_BOX); m_Matrix[x][y]->box(FL_BORDER_BOX);
if ((x%8)==0) m_Matrix[x][y]->color(markercol); if ((x%8)==0) m_Matrix[x][y]->color(markercol);
else if ((y%12)==1 || (y%12)==3 || (y%12)==6 || (y%12)==8 || (y%12)==10) m_Matrix[x][y]->color(blcolour);
else m_Matrix[x][y]->color(FL_GRAY); else m_Matrix[x][y]->color(FL_GRAY);
m_Matrix[x][y]->selection_color(FL_WHITE); m_Matrix[x][y]->selection_color(FL_WHITE);
m_Matrix[x][y]->callback((Fl_Callback*)cb_Matrix,(void*)&Numbers[n]); m_Matrix[x][y]->callback((Fl_Callback*)cb_Matrix,(void*)&Numbers[n]);
m_Matrix[x][y]->SetVolCallback((Fl_Callback*)cb_MatVol,(void*)&Numbers[n]); m_Matrix[x][y]->SetVolCallback((Fl_Callback*)cb_MatVol,(void*)&Numbers[n]);
@@ -195,7 +201,15 @@ m_LastLight(0)
n++; n++;
} }
xoff=93;
yoff=37;
for(int y=0; y<MATY; y++)
{
Fl_Box *box = new Fl_Box(90,yoff+((MATY-1)*butsize)-(y*butsize),15,15,NoteText[y%12]);
box->align(FL_ALIGN_INSIDE|FL_ALIGN_LEFT);
box->labelsize(8);
}
xoff=103;
for(int x=0; x<MATX; x++) for(int x=0; x<MATX; x++)
{ {
m_Flash[x] = new Fl_LED_Button(xoff+x*butsize,20,15,15,""); m_Flash[x] = new Fl_LED_Button(xoff+x*butsize,20,15,15,"");


+ 2
- 2
SpiralSound/Plugins/OscillatorPlugin/OscillatorPluginGUI.C View File

@@ -328,7 +328,7 @@ void OscillatorPluginGUI::cb_Noise(Fl_Check_Button* o, void* v)
inline void OscillatorPluginGUI::cb_SHLen_i(Fl_Slider* o, void* v) inline void OscillatorPluginGUI::cb_SHLen_i(Fl_Slider* o, void* v)
{ {
char str[10]; char str[10];
m_GUICH->Set("SHLen",0.2f-o->value());
m_GUICH->Set("SHLen",(float)(0.2f-o->value()));
sprintf(str,"%4.3f s", 0.2f-o->value()); sprintf(str,"%4.3f s", 0.2f-o->value());
m_out_SHlen->value(str); m_out_SHlen->value(str);
} }
@@ -339,7 +339,7 @@ void OscillatorPluginGUI::cb_SHLen(Fl_Slider* o, void* v)
inline void OscillatorPluginGUI::cb_ModAmount_i(Fl_Knob* o, void* v) inline void OscillatorPluginGUI::cb_ModAmount_i(Fl_Knob* o, void* v)
{ {
char str[10]; char str[10];
m_GUICH->Set("ModAmount",o->value());
m_GUICH->Set("ModAmount",(float)o->value());
sprintf(str,"%4.0f %%", 100*o->value()); sprintf(str,"%4.0f %%", 100*o->value());
m_out_mod->value(str); m_out_mod->value(str);
} }


+ 8
- 5
SpiralSound/Plugins/OutputPlugin/OutputPlugin.C View File

@@ -90,12 +90,12 @@ m_Volume(1.0f)
m_PluginInfo.Name="OSS"; m_PluginInfo.Name="OSS";
m_PluginInfo.Width=100; m_PluginInfo.Width=100;
m_PluginInfo.Height=130;
m_PluginInfo.NumInputs=3;
m_PluginInfo.Height=100;
m_PluginInfo.NumInputs=2;
m_PluginInfo.NumOutputs=2; m_PluginInfo.NumOutputs=2;
m_PluginInfo.PortTips.push_back("Left Out"); m_PluginInfo.PortTips.push_back("Left Out");
m_PluginInfo.PortTips.push_back("Right Out"); m_PluginInfo.PortTips.push_back("Right Out");
m_PluginInfo.PortTips.push_back("Record Controller");
//m_PluginInfo.PortTips.push_back("Record Controller");
m_PluginInfo.PortTips.push_back("Left In"); m_PluginInfo.PortTips.push_back("Left In");
m_PluginInfo.PortTips.push_back("Right In"); m_PluginInfo.PortTips.push_back("Right In");
@@ -149,8 +149,11 @@ void OutputPlugin::Execute()
if (m_Mode==OUTPUT || m_Mode==DUPLEX) if (m_Mode==OUTPUT || m_Mode==DUPLEX)
{ {
OSSOutput::Get()->SendStereo(GetInput(0),GetInput(1)); OSSOutput::Get()->SendStereo(GetInput(0),GetInput(1));
for (int n=0; n<m_HostInfo->BUFSIZE;n++)
// can't open GUI stuff here
/* for (int n=0; n<m_HostInfo->BUFSIZE;n++)
{ {
// can't open GUI stuff here
if (GetInput(2,n)!=0) if (GetInput(2,n)!=0)
{ {
if (! m_CheckedAlready) if (! m_CheckedAlready)
@@ -177,7 +180,7 @@ void OutputPlugin::Execute()
} }
else else
m_CheckedAlready=false; m_CheckedAlready=false;
}
}*/
} }
if (m_Mode==INPUT || m_Mode==DUPLEX) OSSOutput::Get()->GetStereo(GetOutputBuf(0),GetOutputBuf(1)); if (m_Mode==INPUT || m_Mode==DUPLEX) OSSOutput::Get()->GetStereo(GetOutputBuf(0),GetOutputBuf(1));


+ 3
- 33
SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.C View File

@@ -35,26 +35,20 @@ SpiralPluginGUI(w,h,o,ch)
Volume->step(0.001); Volume->step(0.001);
Volume->value(0.5); Volume->value(0.5);
Volume->callback((Fl_Callback*)cb_Volume); Volume->callback((Fl_Callback*)cb_Volume);

Record = new Fl_Button(30, 80, 40, 25, "Record");
Record->type(1);
Record->down_box(FL_DOWN_BOX);
Record->labelsize(10);
Record->callback((Fl_Callback*)cb_Record);
OpenRead = new Fl_Button(2, 110, 30, 15, "Read");
OpenRead = new Fl_Button(2, 80, 30, 15, "Read");
OpenRead->type(1); OpenRead->type(1);
OpenRead->down_box(FL_DOWN_BOX); OpenRead->down_box(FL_DOWN_BOX);
OpenRead->labelsize(10); OpenRead->labelsize(10);
OpenRead->callback((Fl_Callback*)cb_OpenRead); OpenRead->callback((Fl_Callback*)cb_OpenRead);


OpenDuplex = new Fl_Button(34, 110, 31, 15, "Dplx");
OpenDuplex = new Fl_Button(34, 80, 31, 15, "Dplx");
OpenDuplex->type(1); OpenDuplex->type(1);
OpenDuplex->down_box(FL_DOWN_BOX); OpenDuplex->down_box(FL_DOWN_BOX);
OpenDuplex->labelsize(10); OpenDuplex->labelsize(10);
OpenDuplex->callback((Fl_Callback*)cb_OpenDuplex); OpenDuplex->callback((Fl_Callback*)cb_OpenDuplex);
OpenWrite = new Fl_Button(68, 110, 30, 15, "Write");
OpenWrite = new Fl_Button(68, 80, 30, 15, "Write");
OpenWrite->type(1); OpenWrite->type(1);
OpenWrite->down_box(FL_DOWN_BOX); OpenWrite->down_box(FL_DOWN_BOX);
OpenWrite->labelsize(10); OpenWrite->labelsize(10);
@@ -78,30 +72,6 @@ inline void OutputPluginGUI::cb_Volume_i(Fl_Knob* o, void* v)
void OutputPluginGUI::cb_Volume(Fl_Knob* o, void* v) void OutputPluginGUI::cb_Volume(Fl_Knob* o, void* v)
{ ((OutputPluginGUI*)(o->parent()))->cb_Volume_i(o,v); } { ((OutputPluginGUI*)(o->parent()))->cb_Volume_i(o,v); }


inline void OutputPluginGUI::cb_Record_i(Fl_Button* o, void* v)
{
if (o->value())
{
char *fn=fl_file_chooser("Pick a Wav file to save to", "*.wav", NULL);
if (fn && fn!="")
{
OSSOutput::Get()->WavOpen(fn);
}
else
{
OSSOutput::Get()->WavClose();
o->value(false);
}
}
else
{
OSSOutput::Get()->WavClose();
}
}
void OutputPluginGUI::cb_Record(Fl_Button* o, void* v)
{ ((OutputPluginGUI*)(o->parent()))->cb_Record_i(o,v); }

inline void OutputPluginGUI::cb_OpenRead_i(Fl_Button* o, void* v) inline void OutputPluginGUI::cb_OpenRead_i(Fl_Button* o, void* v)
{ {
if (o->value()) if (o->value())


+ 0
- 1
SpiralSound/Plugins/OutputPlugin/OutputPluginGUI.h View File

@@ -41,7 +41,6 @@ private:


Fl_Group *GUIMixGroup; Fl_Group *GUIMixGroup;
Fl_Knob *Volume; Fl_Knob *Volume;
Fl_Button *Record;
Fl_Button *OpenRead; Fl_Button *OpenRead;
Fl_Button *OpenWrite; Fl_Button *OpenWrite;


+ 1
- 1
SpiralSound/SpiralInfo.h View File

@@ -64,7 +64,7 @@ public:


protected: protected:
SpiralInfo() : m_HomeDir(getenv("HOME")) {}
SpiralInfo() : m_HomeDir(getenv("HOME")), m_Version(0) {}
virtual ~SpiralInfo() {} virtual ~SpiralInfo() {}


virtual string GetResFileName() { return "ballsSpiralrc"; } virtual string GetResFileName() { return "ballsSpiralrc"; }


+ 5
- 3
SpiralSynthModularInfo.C View File

@@ -70,14 +70,17 @@ SpiralSynthModularInfo::SpiralSynthModularInfo()
PLUGIN_PATH = PLUGIN_PATH_LOCATION; PLUGIN_PATH = PLUGIN_PATH_LOCATION;


PLUGINVEC.push_back("OutputPlugin.so"); PLUGINVEC.push_back("OutputPlugin.so");
PLUGINVEC.push_back("DiskWriterPlugin.so");
PLUGINVEC.push_back("ScopePlugin.so"); PLUGINVEC.push_back("ScopePlugin.so");
PLUGINVEC.push_back("MidiPlugin.so"); PLUGINVEC.push_back("MidiPlugin.so");
PLUGINVEC.push_back("KeyboardPlugin.so"); PLUGINVEC.push_back("KeyboardPlugin.so");
PLUGINVEC.push_back("ControllerPlugin.so"); PLUGINVEC.push_back("ControllerPlugin.so");
PLUGINVEC.push_back("MatrixPlugin.so");
PLUGINVEC.push_back("PoshSampler.so");
PLUGINVEC.push_back("WaveTablePlugin.so"); PLUGINVEC.push_back("WaveTablePlugin.so");
PLUGINVEC.push_back("OscillatorPlugin.so"); PLUGINVEC.push_back("OscillatorPlugin.so");
PLUGINVEC.push_back("LFOPlugin.so");
PLUGINVEC.push_back("EnvelopePlugin.so"); PLUGINVEC.push_back("EnvelopePlugin.so");
PLUGINVEC.push_back("SplitterPlugin.so");
PLUGINVEC.push_back("SampleHoldPlugin.so"); PLUGINVEC.push_back("SampleHoldPlugin.so");
PLUGINVEC.push_back("NoteSnapPlugin.so"); PLUGINVEC.push_back("NoteSnapPlugin.so");
PLUGINVEC.push_back("MixerPlugin.so"); PLUGINVEC.push_back("MixerPlugin.so");
@@ -89,13 +92,12 @@ SpiralSynthModularInfo::SpiralSynthModularInfo()
PLUGINVEC.push_back("MoogFilterPlugin.so"); PLUGINVEC.push_back("MoogFilterPlugin.so");
PLUGINVEC.push_back("EchoPlugin.so"); PLUGINVEC.push_back("EchoPlugin.so");
PLUGINVEC.push_back("DelayPlugin.so"); PLUGINVEC.push_back("DelayPlugin.so");
PLUGINVEC.push_back("MatrixPlugin.so");
PLUGINVEC.push_back("EnvFollowerPlugin.so"); PLUGINVEC.push_back("EnvFollowerPlugin.so");
PLUGINVEC.push_back("SmoothPlugin.so"); PLUGINVEC.push_back("SmoothPlugin.so");
PLUGINVEC.push_back("LADSPAPlugin.so"); PLUGINVEC.push_back("LADSPAPlugin.so");
PLUGINVEC.push_back("XFadePlugin.so"); PLUGINVEC.push_back("XFadePlugin.so");
PLUGINVEC.push_back("DistributorPlugin.so"); PLUGINVEC.push_back("DistributorPlugin.so");
PLUGINVEC.push_back("LFOPlugin.so");
PLUGINVEC.push_back("SplitterPlugin.so");
} }


void SpiralSynthModularInfo::StreamInPrefs(istream &s) void SpiralSynthModularInfo::StreamInPrefs(istream &s)


+ 1
- 1
SpiralSynthModularInfo.h View File

@@ -40,7 +40,7 @@ public:
protected: protected:
SpiralSynthModularInfo(); SpiralSynthModularInfo();
virtual string GetResFileName() { return ".SpiralSynthModularMT"; }
virtual string GetResFileName() { return ".spiralmodular"; }
static SpiralSynthModularInfo *m_SpiralSynthModularInfo; static SpiralSynthModularInfo *m_SpiralSynthModularInfo;


+ 2
- 2
configure.in View File

@@ -44,7 +44,7 @@ if test $ac_arg_jack = "Y" ; then
SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin \ SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin \
StereoMixerPlugin WaveTablePlugin LADSPAPlugin \ StereoMixerPlugin WaveTablePlugin LADSPAPlugin \
XFadePlugin JackPlugin PoshSamplerPlugin\ XFadePlugin JackPlugin PoshSamplerPlugin\
DistributorPlugin LFOPlugin KeyboardPlugin"
DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin"
else else
PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \ PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \
EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \ EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \
@@ -52,7 +52,7 @@ else
SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin \ SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin \
StereoMixerPlugin WaveTablePlugin LADSPAPlugin \ StereoMixerPlugin WaveTablePlugin LADSPAPlugin \
XFadePlugin PoshSamplerPlugin\ XFadePlugin PoshSamplerPlugin\
DistributorPlugin LFOPlugin KeyboardPlugin"
DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin"
fi fi
echo "$PLUGINLIST" > SpiralSound/PluginList.txt echo "$PLUGINLIST" > SpiralSound/PluginList.txt




Loading…
Cancel
Save