diff --git a/README b/README index 2264ce2..8bb711b 100644 --- a/README +++ b/README @@ -5,26 +5,29 @@ Last changed Saturday December 11 2002. SpiralSynthModular is open source software, distributed under the General Public License (GPL). See the file COPYING. -Dependancies: -FLTK (www.fltk.org) If you build FLTK from source use -"./configure --enable-shared" -LADSPA plugins + +** Dependancies ** + +FLTK (www.fltk.org) +If you build FLTK from source use "./configure --enable-shared" + +LADSPA plugins (www.ladspa.org) Sound output can be provided by either OSS or JACK (and therefore alsa). See www.pawfal.org or sourceforge.net/projects/spiralmodular for more details. - + ** Installing ** - + To build the SpiralSynthModular application, and all the plugins: -./configure +./configure make make install spiralsynthmodular Check out the designs in the Examples directory. -For more examples be sure to check out the noize farm +For more examples be sure to check out the noize farm (http://groups.yahoo.com/group/noize_farm) an open source repository of ssm patches. @@ -38,6 +41,23 @@ options list: --Realtime : spawn audio thread with FIFO scheduling (run as root) --PluginPath : look for plugins in the specified directory +*** LRDF support for LADSPA plugins *** + +http://plugin.org.uk/releases/lrdf/ +http://www.redland.opensource.ac.uk/raptor/ + +If you have the lrdf library installed on your system, +the LADSPAPlugin will automatically use it. + +To disable detection of this this, use the configure option: +./configure --disable-liblrdf + +Having a tempfs file system mounted on /dev/shm allows a single LADSPA +plugin database to be shared between instances. + +To disable detection of this, use the configure option: +./configure --disable-posiz-shm + *** Jack support *** http://jackit.sourceforge.net @@ -49,12 +69,12 @@ To load the plugin, add it to .SpiralSynthModular's plugin list. *** Setting up your .SpiralSynthModular file *** -This file contains all the setup variables for the program. Thes values can be +This file contains all the setup variables for the program. Thes values can be edited with the options window whilst running SSM. -The following variables in the are the ones to play with to get a good playback -on your machine. This is usually tradeoff between quality and responsiveness -(latency). You can build designs and songs at low quality (22050 samplerate etc) -and then record them at higher settings. The wav file will sound fine, even if +The following variables in the are the ones to play with to get a good playback +on your machine. This is usually tradeoff between quality and responsiveness +(latency). You can build designs and songs at low quality (22050 samplerate etc) +and then record them at higher settings. The wav file will sound fine, even if the realtime output doesn't. BufferSize = 512 - Size of sample buffer to be calculated each cycle. @@ -65,9 +85,9 @@ Samplerate = 44100 - Sets the samplerate Disclaimer: -No representations are made about the suitability of this software -for any purpose. This software is provided "as is" without express -or implied warranty. +No representations are made about the suitability of this software +for any purpose. This software is provided "as is" without express +or implied warranty. (Damage to ears, speakers or buildings are not my fault :)) Dave Griffiths - dave@pawfal.org diff --git a/SpiralSound/Midi.C b/SpiralSound/Midi.C index 3ca7d60..9af2a24 100644 --- a/SpiralSound/Midi.C +++ b/SpiralSound/Midi.C @@ -44,14 +44,14 @@ static int NKEYS = 30; MidiDevice *MidiDevice::m_Singleton; string MidiDevice::m_AppName; -#ifdef OSS_MIDI -string MidiDevice::m_DeviceName; -#endif - #if __APPLE__ #define read AppleRead #endif +#ifdef USE_OSS_MIDI +string MidiDevice::m_DeviceName; +#endif + void MidiDevice::Init(const string &name, Type t) { if (!m_Singleton) @@ -69,10 +69,10 @@ m_ClockCount (0) #if __APPLE__ AppleOpen(); #endif -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI seq_handle=AlsaOpen(t); #endif -#ifdef OSS_MIDI +#ifdef USE_OSS_MIDI if (!OssOpen()) return; #endif m_Mutex = new pthread_mutex_t; @@ -88,10 +88,10 @@ MidiDevice::~MidiDevice() { #if __APPLE__ AppleClose(); #endif -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI AlsaClose(); #endif -#ifdef OSS_MIDI +#ifdef USE_OSS_MIDI OssClose(); #endif } @@ -121,7 +121,7 @@ MidiEvent MidiDevice::GetEvent(int Device) } void MidiDevice::SendEvent (int Device, const MidiEvent &Event) { -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI snd_seq_event_t ev; snd_seq_ev_clear (&ev); snd_seq_ev_set_direct (&ev); @@ -175,7 +175,7 @@ void MidiDevice::SendEvent (int Device, const MidiEvent &Event) { //////////////////////////////////////////// Oss Code Only //////////////////////////////////////// -#ifdef OSS_MIDI +#ifdef USE_OSS_MIDI bool MidiDevice::OssOpen() { //if (!SpiralInfo::WANTMIDI) return; @@ -362,7 +362,7 @@ void MidiDevice::OssAddEvent(unsigned char* midi) //////////////////////////////////////////// Alsa Code Only //////////////////////////////////////// -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI // code taken and modified from jack_miniFMsynth diff --git a/SpiralSound/Midi.h b/SpiralSound/Midi.h index a8083d5..d3ed2e9 100644 --- a/SpiralSound/Midi.h +++ b/SpiralSound/Midi.h @@ -16,6 +16,9 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef MIDI +#define MIDI + #include #include #include @@ -24,18 +27,11 @@ #include #include #include - -#ifndef MIDI -#define MIDI +#include "../config.h" using namespace std; -// comment out one of these to choose your MIDI driver (for non-Apple systems) -// I'll stick this in the ./configue when it'd all working -#define ALSA_MIDI -//#define OSS_MIDI - -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI #include #endif @@ -70,7 +66,7 @@ public: static void Init(const string &name, Type t); static void SetDeviceName(string s) { - #ifdef OSS_MIDI + #ifdef USE_OSS_MIDI m_DeviceName=s; #endif } @@ -99,20 +95,21 @@ private: pthread_mutex_t* m_Mutex; static string m_AppName; -#ifdef ALSA_MIDI +#ifdef USE_ALSA_MIDI static void *MidiReaderCallback (void *o) { ((MidiDevice*)o)->AlsaCollectEvents(); return NULL; } void AlsaCollectEvents(); void AlsaClose (); snd_seq_t *seq_handle; snd_seq_t *AlsaOpen(Type t); #endif -#ifdef OSS_MIDI +#ifdef USE_OSS_MIDI static void *MidiReaderCallback (void *o) { ((MidiDevice*)o)->OssCollectEvents(); return NULL; } void OssCollectEvents(); void OssAddEvent(unsigned char* midi); void OssReadByte(unsigned char *c); void OssClose(); - static string m_DeviceName; + bool OssOpen(); + static string m_DeviceName; int m_MidiFd, m_MidiWrFd; #endif #if __APPLE__ diff --git a/SpiralSound/Plugins/AmpPlugin/Makefile.in b/SpiralSound/Plugins/AmpPlugin/Makefile.in index 441e476..72999f1 100644 --- a/SpiralSound/Plugins/AmpPlugin/Makefile.in +++ b/SpiralSound/Plugins/AmpPlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in b/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in index 6825ac3..fc28f96 100644 --- a/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/AnotherFilterPlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/BeatMatchPlugin/Makefile.in b/SpiralSound/Plugins/BeatMatchPlugin/Makefile.in index 2beaf0c..c2ab971 100644 --- a/SpiralSound/Plugins/BeatMatchPlugin/Makefile.in +++ b/SpiralSound/Plugins/BeatMatchPlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in b/SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in index 7b9df08..10378ff 100644 --- a/SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in +++ b/SpiralSound/Plugins/ComplexEnvelopePlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ @FLTK_CXXFLAGS@ INCPATH = LINK = g++ -shared LFLAGS = -LIBS = @FLTK_LIBS@ -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/ControllerPlugin/Makefile.in b/SpiralSound/Plugins/ControllerPlugin/Makefile.in index 259c6cc..6b47678 100644 --- a/SpiralSound/Plugins/ControllerPlugin/Makefile.in +++ b/SpiralSound/Plugins/ControllerPlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/CounterPlugin/Makefile.in b/SpiralSound/Plugins/CounterPlugin/Makefile.in index 9e6a153..44b0246 100644 --- a/SpiralSound/Plugins/CounterPlugin/Makefile.in +++ b/SpiralSound/Plugins/CounterPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/DelayPlugin/Makefile.in b/SpiralSound/Plugins/DelayPlugin/Makefile.in index d3d4c8a..f5a3a80 100644 --- a/SpiralSound/Plugins/DelayPlugin/Makefile.in +++ b/SpiralSound/Plugins/DelayPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/DiskWriterPlugin/Makefile.in b/SpiralSound/Plugins/DiskWriterPlugin/Makefile.in index 0eb2703..9d161a4 100644 --- a/SpiralSound/Plugins/DiskWriterPlugin/Makefile.in +++ b/SpiralSound/Plugins/DiskWriterPlugin/Makefile.in @@ -11,7 +11,7 @@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/DistributorPlugin/Makefile.in b/SpiralSound/Plugins/DistributorPlugin/Makefile.in index a9c5f71..d813115 100644 --- a/SpiralSound/Plugins/DistributorPlugin/Makefile.in +++ b/SpiralSound/Plugins/DistributorPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/EchoPlugin/Makefile.in b/SpiralSound/Plugins/EchoPlugin/Makefile.in index cd49862..47d4b54 100644 --- a/SpiralSound/Plugins/EchoPlugin/Makefile.in +++ b/SpiralSound/Plugins/EchoPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in b/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in index 6879cf3..54c24c7 100644 --- a/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in +++ b/SpiralSound/Plugins/EnvFollowerPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/EnvelopePlugin/Makefile.in b/SpiralSound/Plugins/EnvelopePlugin/Makefile.in index d36b462..c390b31 100644 --- a/SpiralSound/Plugins/EnvelopePlugin/Makefile.in +++ b/SpiralSound/Plugins/EnvelopePlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/FilterPlugin/Makefile.in b/SpiralSound/Plugins/FilterPlugin/Makefile.in index 3ea6538..f39fb59 100644 --- a/SpiralSound/Plugins/FilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/FilterPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/FlipflopPlugin/Makefile.in b/SpiralSound/Plugins/FlipflopPlugin/Makefile.in index 770c50a..161f0ad 100644 --- a/SpiralSound/Plugins/FlipflopPlugin/Makefile.in +++ b/SpiralSound/Plugins/FlipflopPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in b/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in index 1026ed8..846472e 100644 --- a/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in +++ b/SpiralSound/Plugins/FormantFilterPlugin/Makefile.in @@ -6,12 +6,12 @@ CC = gcc CXX = g++ -CFLAGS = @CFLAGS@ -CXXFLAGS= @CXXFLAGS@ +CFLAGS = @CFLAGS@ +CXXFLAGS= @CXXFLAGS@ INCPATH = -I/usr/X11R6/include LINK = g++ -shared -LFLAGS = -LIBS = -L/usr/X11R6/lib @FLTK_LIBS@ -lGL -lXext -lX11 -ldl +LFLAGS = +LIBS = @FLTK_LIBS@ MOC = moc UIC = diff --git a/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C b/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C index 9d4eae7..be0c857 100644 --- a/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C +++ b/SpiralSound/Plugins/JackPlugin/JackPluginGUI.C @@ -14,13 +14,14 @@ * 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 "JackPlugin.h" #include "JackPluginGUI.h" #include #include #include +#include using namespace std; @@ -32,9 +33,9 @@ int OptionsList(const std::vector &List) Fl_Button *Ok = new Fl_Button(10,275,40,20,"Ok"); Ok->labelsize(10); Fl_Button *Cancel = new Fl_Button(50,275,40,20,"Cancel"); - Cancel->labelsize(10); + Cancel->labelsize(10); Fl_Hold_Browser* Browser = new Fl_Hold_Browser(5,5,290,265,""); - + for (std::vector::const_iterator i = List.begin(); i!=List.end(); i++) { @@ -125,7 +126,7 @@ SpiralPluginGUI(w,h,o,ch) m_Scroll->type(Fl_Scroll::VERTICAL_ALWAYS); m_Scroll->position(0, 0); add(m_Scroll); - + m_OutputPack = new Fl_Pack(15, 90, 85, h - 102); m_Scroll->add(m_OutputPack); @@ -178,7 +179,7 @@ void JackPluginGUI::Update() for (unsigned int n=0; nm_InputPortsChanged.size(); n++) { m_JackClient->m_InputPortsChanged[n]->Connected = jack_port_connected(m_JackClient->m_InputPortsChanged[n]->Port); - + if (m_JackClient->m_InputPortsChanged[n]->Connected) { if (m_JackClient->m_InputPortsChanged[n]->ConnectedTo!="") { m_InputButton[n]->label(m_JackClient->m_InputPortsChanged[n]->ConnectedTo.c_str()); @@ -197,7 +198,7 @@ void JackPluginGUI::Update() { m_InputButton[m_JackClient->m_InputPortsChanged[n]->PortNo]->value(0); m_InputButton[m_JackClient->m_InputPortsChanged[n]->PortNo]->label("None"); - } + } } @@ -286,7 +287,7 @@ void JackPluginGUI::AddOutput() { m_OutputLabel.push_back(new Fl_Box(0,n*30,90,10,m_OutputName[n])); m_OutputLabel[n]->labelsize(8); m_OutputPack->add(m_OutputLabel[n]); - + m_OutputButton.push_back(new Fl_Button(0,n*30+10,90,20,"None")); m_OutputButton[n]->type(1); m_OutputButton[n]->labelsize(8); @@ -322,7 +323,7 @@ inline void JackPluginGUI::cb_Remove_i(Fl_Button* o) { int n = (int) m_InputName.size(); - if (n > MIN_PORTS) + if (n > MIN_PORTS) { RemoveOutput() ; RemoveInput() ; @@ -394,7 +395,7 @@ inline void JackPluginGUI::cb_Attach_i(Fl_Button* o) } inline void JackPluginGUI::cb_Detach_i(Fl_Button* o) -{ +{ for (int n=0; n<(int)m_OutputName.size(); n++) { m_OutputButton[n]->value(false); @@ -402,16 +403,16 @@ inline void JackPluginGUI::cb_Detach_i(Fl_Button* o) } for (int n=0; n<(int)m_InputName.size(); n++) - { + { m_InputButton[n]->value(false); m_InputButton[n]->label("None"); } - + m_JackPlugin->Detach(); } inline void JackPluginGUI::cb_OutputConnect_i(Fl_Button* o) -{ +{ int index=0; std::vector::iterator it = std::find( m_OutputButton.begin(), m_OutputButton.end(), o ); @@ -420,14 +421,14 @@ inline void JackPluginGUI::cb_OutputConnect_i(Fl_Button* o) if ((o->value()) && m_GUICH->GetBool("Connected")) { - m_GUICH->SetCommand(JackPlugin::UPDATE_NAMES); + m_GUICH->SetCommand(JackPlugin::UPDATE_NAMES); m_GUICH->Wait(); - + // bit of a hack for multithreaded safety int ninputs=m_GUICH->GetInt("NumOutputPortNames"); char inputs[MAX_PORTS][256]; m_GUICH->GetData("InputPortNames",inputs); - + vector Inputs; for (int n=0; n SpiralSound/PluginList.txt -AC_ARG_ENABLE(jack, [ --enable-jack build JackPlugin ], - ac_arg_jack="Y", ac_arg_jack="N") - -if test $ac_arg_jack = "Y" ; then - PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \ - EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \ - NoteSnapPlugin OscillatorPlugin OutputPlugin RingModPlugin SVFilterPlugin \ - SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin StereoMixerPlugin StreamPlugin\ - WaveTablePlugin LADSPAPlugin XFadePlugin PoshSamplerPlugin SeqSelectorPlugin\ - DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin FormantFilterPlugin \ - AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ - BeatMatchPlugin NoisePlugin LogicPlugin SplitSwitchPlugin \ - MixSwitchPlugin MeterPlugin WaveShaperPlugin TrigPlugin SpiralLoopPlugin \ - MasherPlugin TransposePlugin JackPlugin" +dnl Check whether alsa-midi is present or has been disabled + +amidi_message="" +AC_ARG_ENABLE( + alsa_midi, + [ --disable-alsa-midi Disable alsa midi (use OSS)], + [use_alsa_midi="n"; amidi_message="manually disabled"], + [use_alsa_midi="y"] +) +if test "$use_alsa_midi" = "y"; then + AC_CHECK_HEADER(alsa/asoundlib.h, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No alsa/asoundlib.h found"]) +fi +if test "$use_alsa_midi" = "y"; then + AC_CHECK_LIB(asound, snd_seq_open, [use_alsa_midi="y"], [use_alsa_midi="n" ; amidi_message="No libasound found"]) +fi +if test "$use_alsa_midi" = "y"; then + AC_DEFINE(USE_ALSA_MIDI, , [Use ALSA MIDI not OSS]) + AMIDILIBS="-lasound" + AC_SUBST(AMIDILIBS) else - PLUGINLIST="AmpPlugin ControllerPlugin DelayPlugin EchoPlugin EnvFollowerPlugin \ - EnvelopePlugin FilterPlugin MatrixPlugin MidiPlugin MixerPlugin MoogFilterPlugin \ - NoteSnapPlugin OscillatorPlugin OutputPlugin RingModPlugin SVFilterPlugin \ - SampleHoldPlugin ScopePlugin SmoothPlugin SplitterPlugin StereoMixerPlugin StreamPlugin\ - WaveTablePlugin LADSPAPlugin XFadePlugin PoshSamplerPlugin SeqSelectorPlugin\ - DistributorPlugin LFOPlugin KeyboardPlugin DiskWriterPlugin FormantFilterPlugin \ - AnotherFilterPlugin OperatorPlugin CounterPlugin FlipflopPlugin SwitchPlugin \ - BeatMatchPlugin NoisePlugin LogicPlugin SplitSwitchPlugin \ - MixSwitchPlugin MeterPlugin WaveShaperPlugin TrigPlugin SpiralLoopPlugin \ - MasherPlugin TransposePlugin" - - fi -echo "$PLUGINLIST" > SpiralSound/PluginList.txt + AC_DEFINE(USE_OSS_MIDI, , [Use OSS MIDI not ALSA]) +fi -dnl Check whether liblrdf has been enabled +dnl Check whether liblrdf is present or has been disabled +lrdf_message="" AC_ARG_ENABLE( lrdf, - [ --enable-lrdf Enable liblrdf for LADSPA Plugin [no]], - [use_liblrdf="y"], - [use_liblrdf="n"] + [ --disable-lrdf Disable liblrdf for LADSPA Plugin], + [use_liblrdf="n" ; lrdf_message="manually disabled"], + [use_liblrdf="y"] ) if test "$use_liblrdf" = "y"; then - AC_CHECK_HEADER(lrdf.h, , AC_MSG_ERROR( ** No lrdf.h found for liblrdf)) - AC_CHECK_LIB(lrdf, lrdf_init, AC_DEFINE(HAVE_LIBLRDF, , [Enable liblrdf support for LADSPA Plugin]), AC_MSG_ERROR( ** No liblrdf found)) - LRDFLIBS="-llrdf" - AC_SUBST(LRDFLIBS) + AC_CHECK_HEADER(lrdf.h, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No lrdf.h found"]) +fi +if test "$use_liblrdf" = "y"; then + AC_CHECK_LIB(lrdf, lrdf_init, [use_liblrdf="y"], [use_liblrdf="n" ; lrdf_message="No liblrdf found"]) +fi +if test "$use_liblrdf" = "y"; then + AC_DEFINE(HAVE_LIBLRDF, , [Enable liblrdf support for LADSPA Plugin]) + LRDFLIBS="-llrdf" + AC_SUBST(LRDFLIBS) fi -dnl Check if POSIX SHM enabled (for sharing LADSPA Plugin database) -dnl Nicked in part from JACK configure.in +dnl Check if POSIX SHM is present or has been disabled +shm_message="" AC_ARG_ENABLE( posix-shm, - [ --enable-posix-shm Enable POSIX SHM for LADSPA Plugin [no] - This allows a single LADSPA plugin database - to be shared between instances], - [use_posix_shm="y"], - [use_posix_shm="n"] + [ --disable-posix-shm Disable POSIX SHM for LADSPA Plugin], + [use_posix_shm="n" ; shm_message="manually disabled"], + [use_posix_shm="y"] ) if test "$use_posix_shm" = "y"; then - AC_MSG_CHECKING([POSIX SHM support ]) - ls /dev/shm >/dev/null 2>&1 - if test $? = 0; then - AC_DEFINE(USE_POSIX_SHM, ,[Enable POSIX SHM support for LADSPA Plugin]) - AC_MSG_RESULT(found.) - SHMLIBS="-lrt" - AC_SUBST(SHMLIBS) + AC_MSG_CHECKING([POSIX SHM support ]) + if test -d /dev/shm -a -w /dev/shm ; then + AC_DEFINE(USE_POSIX_SHM, ,[Enable POSIX SHM support for LADSPA Plugin]) + AC_MSG_RESULT(found.) + SHMLIBS="-lrt" + AC_SUBST(SHMLIBS) else - AC_MSG_RESULT(not found.) + AC_MSG_RESULT(not found.) + use_posix_shm="n" + shm_message="/dev/shm not found"; fi fi +dnl Check whether libsndfile is present or has been disabled +sndfile_message="" +AC_ARG_ENABLE( + sndfile, + [ --disable-sndfile Disable libsndfile for waveform loading], + [use_sndfile="n" ; sndfile_message="manually disabled"], + [use_sndfile="y"] +) +if test "$use_sndfile" = "y"; then + AC_CHECK_HEADER(sndfile.h, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No sndfile.h found"]) +fi +if test "$use_sndfile" = "y"; then + AC_CHECK_LIB(sndfile, sf_open, [use_sndfile="y"], [use_sndfile="n" ; sndfile_message="No libXXXX found"]) +fi +if test "$use_sndfile" = "y"; then + AC_DEFINE(USE_LIBSNDFILE, , [Enable libsndfile for waveform loading]) + SFLIBS="-lsndfile" + AC_SUBST(SFLIBS) +fi + dnl Checks for library functions. AC_CHECK_HEADERS(math.h) @@ -148,8 +200,9 @@ AC_SUBST(FLTK_LIBS) AC_CHECK_HEADERS(dlfcn.h) AC_CHECK_LIB(dl, dlopen) -AC_CHECK_HEADERS(png.h) -AC_CHECK_LIB(png, png_get_copyright) +dnl Do we need png????? +dnl AC_CHECK_HEADERS(png.h) +dnl AC_CHECK_LIB(png, png_get_copyright) dnl This is normally done with libtool but since we aren't using libtool dnl yet to it here. @@ -163,11 +216,12 @@ AC_SUBST(CXXFLAGS) AC_SUBST(PLUGINLIST) dnl Modify the output files. - AC_OUTPUT( SpiralSound/Plugins/AmpPlugin/Makefile SpiralSound/Plugins/AnotherFilterPlugin/Makefile +SpiralSound/Plugins/BeatMatchPlugin/Makefile SpiralSound/Plugins/ControllerPlugin/Makefile +SpiralSound/Plugins/CounterPlugin/Makefile SpiralSound/Plugins/DelayPlugin/Makefile SpiralSound/Plugins/DiskWriterPlugin/Makefile SpiralSound/Plugins/DistributorPlugin/Makefile @@ -175,46 +229,76 @@ SpiralSound/Plugins/EchoPlugin/Makefile SpiralSound/Plugins/EnvFollowerPlugin/Makefile SpiralSound/Plugins/EnvelopePlugin/Makefile SpiralSound/Plugins/FilterPlugin/Makefile +SpiralSound/Plugins/FlipflopPlugin/Makefile SpiralSound/Plugins/FormantFilterPlugin/Makefile SpiralSound/Plugins/JackPlugin/Makefile SpiralSound/Plugins/KeyboardPlugin/Makefile SpiralSound/Plugins/LADSPAPlugin/Makefile SpiralSound/Plugins/LFOPlugin/Makefile +SpiralSound/Plugins/LogicPlugin/Makefile +SpiralSound/Plugins/MasherPlugin/Makefile SpiralSound/Plugins/MatrixPlugin/Makefile SpiralSound/Plugins/MeterPlugin/Makefile SpiralSound/Plugins/MidiPlugin/Makefile +SpiralSound/Plugins/MixSwitchPlugin/Makefile SpiralSound/Plugins/MixerPlugin/Makefile SpiralSound/Plugins/MoogFilterPlugin/Makefile +SpiralSound/Plugins/NoisePlugin/Makefile SpiralSound/Plugins/NoteSnapPlugin/Makefile +SpiralSound/Plugins/OperatorPlugin/Makefile SpiralSound/Plugins/OscillatorPlugin/Makefile SpiralSound/Plugins/OutputPlugin/Makefile SpiralSound/Plugins/PoshSamplerPlugin/Makefile SpiralSound/Plugins/RingModPlugin/Makefile SpiralSound/Plugins/SVFilterPlugin/Makefile SpiralSound/Plugins/SampleHoldPlugin/Makefile -SpiralSound/Plugins/SeqSelectorPlugin/Makefile SpiralSound/Plugins/ScopePlugin/Makefile +SpiralSound/Plugins/SeqSelectorPlugin/Makefile SpiralSound/Plugins/SmoothPlugin/Makefile +SpiralSound/Plugins/SpiralLoopPlugin/Makefile +SpiralSound/Plugins/SplitSwitchPlugin/Makefile SpiralSound/Plugins/SplitterPlugin/Makefile SpiralSound/Plugins/StereoMixerPlugin/Makefile SpiralSound/Plugins/StreamPlugin/Makefile +SpiralSound/Plugins/SwitchPlugin/Makefile +SpiralSound/Plugins/TransposePlugin/Makefile +SpiralSound/Plugins/TrigPlugin/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/LogicPlugin/Makefile -SpiralSound/Plugins/SplitSwitchPlugin/Makefile -SpiralSound/Plugins/MixSwitchPlugin/Makefile -SpiralSound/Plugins/TrigPlugin/Makefile -SpiralSound/Plugins/SpiralLoopPlugin/Makefile -SpiralSound/Plugins/MasherPlugin/Makefile -SpiralSound/Plugins/TransposePlugin/Makefile SpiralSynthPluginLocation.h Makefile ) +echo -e "\nConfig options:" +echo -n "libsndfile support for wave loading - " +if test "$use_sndfile" = "y"; then + echo "Enabled" +else + echo "Disabled - $sndfile_message" +fi +echo -n " ALSA support for MidiPlugin - " +if test "$use_alsa_midi" = "y"; then + echo "Enabled" +else + echo "Disabled - $amidi_message - Using OSS instead" +fi +echo -n " Jack support (via JackPlugin) - " +if test "$build_jack" = "y"; then + echo "Enabled" +else + echo "Disabled - $jack_message" +fi +echo -n " liblrdf support for LADSPAPlugin - " +if test "$use_liblrdf" = "y"; then + echo "Enabled" +else + echo "Disabled - $lrdf_message" +fi +echo -n " POSIX SHM support for LADSPAPlugin - " +if test "$use_posix_shm" = "y"; then + echo "Enabled" +else + echo "Disabled - $shm_message" +fi +echo ""