zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 1937da38e89eccca3a2f40f1b628150c0df9723e
parent cf3399cffd5f140d37e1c1897b91a3c6bc3250ab
Author: paulnasca <paulnasca>
Date:   Wed, 27 Apr 2005 20:42:49 +0000

*** empty log message ***

Diffstat:
MChangeLog | 4++--
Msrc/Makefile | 24+++++++++++++++++-------
Msrc/Makefile.inc | 6+++++-
Msrc/UI/Makefile | 4+++-
Msrc/main.C | 13+++++++++++--
5 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -788,4 +788,5 @@ - LANSAT PE INTERNET - VERSIUNEA (2.2.0) -------------------------------------------------------------------------------------------------- 12 Apr 2005 - Actualizat pentru MXML 2.2 (nu o sa mearga pe vers. mai vechi de mxml) - -\ No newline at end of file +27 Apr 2005 - Adaugata posibilitatea de a inlatura complet interfata grafica in Makefile.inc (in acest caz nu mai sunt necesare bibliotecile grafice ca fltk) + diff --git a/src/Makefile b/src/Makefile @@ -6,7 +6,13 @@ else CXXFLAGS= -O0 -Wall -Wpointer-arith -Wstrict-prototypes endif -CXXFLAGS += -DOS_$(OS_PORT) -D$(MIDIIN)MIDIIN -DFFTW_VERSION_$(FFTW_VERSION) -DASM_F2I_$(ASM_F2I) `fltk-config --cflags` +CXXFLAGS += -DOS_$(OS_PORT) -D$(MIDIIN)MIDIIN -DFFTW_VERSION_$(FFTW_VERSION) -DASM_F2I_$(ASM_F2I) + +ifeq ($(DISABLE_GUI),YES) + CXXFLAGS += -DDISABLE_GUI +else + CXXFLAGS += `fltk-config --cflags` +endif ifeq ($(AUDIOOUT),OSS_AND_JACK) CXXFLAGS += -DOSSAUDIOOUT -DJACKAUDIOOUT @@ -15,7 +21,11 @@ else endif export CXXFLAGS -LIBS= -lm `fltk-config --ldflags` -lmxml -lz + +LIBS= -lm -lmxml -lz +ifneq ($(DISABLE_GUI),YES) + LIBS+=`fltk-config --ldflags` +endif ifeq ($(FFTW_VERSION),2) LIBS += -lrfftw -lfftw @@ -67,6 +77,7 @@ SUBDIRS=DSP Effects Input Misc Output Params Synth Seq all: # yes " " | head + $(MAKE) -C UI $@ # @sh -c "cd UI ; $(CXX) -MM -MG -w *.cc >> ../Make.deps ; cd .." @for name in $(SUBDIRS); do sh -c "cd $$name ; $(CXX) -MM -MG -w *.C >> ../Make.deps ; cd .."; done @@ -77,10 +88,10 @@ all: ifeq ($(AUDIOOUT),DSSI) - gcc -shared -o zynaddsubfx.so */*.o *.o $(LIBS) + $(CXX) -shared -o zynaddsubfx.so */*.o *.o $(LIBS) else ifeq ($(AUDIOOUT),VST) - gcc -shared -o zynaddsubfx_vst.dll */*.o *.o ../../vstsdk2/source/common/AudioEffect.cpp ../../vstsdk2/source/common/audioeffectx.cpp $(LIBS) zynaddsubfx_gcc.def + $(CXX) -shared -o zynaddsubfx_vst.dll */*.o *.o ../../vstsdk2/source/common/AudioEffect.cpp ../../vstsdk2/source/common/audioeffectx.cpp $(LIBS) zynaddsubfx_gcc.def else @@ -103,9 +114,8 @@ objs:$(objects) debug: all main.o:Misc/Master.h Misc/Util.h Output/OSSaudiooutput.h\ - Input/OSSMidiIn.h Input/ALSAMidiIn.h \ - UI/MasterUI.h - + Input/OSSMidiIn.h Input/ALSAMidiIn.h + .PHONY : clean clean: diff --git a/src/Makefile.inc b/src/Makefile.inc @@ -1,4 +1,4 @@ -CXX=gcc +CXX=g++ #You can set the on what OS is compiling (Linux/Windows) OS_PORT=LINUX @@ -12,6 +12,10 @@ FFTW_VERSION=3 ASM_F2I=YES #ASM_F2I=NO +#Graphic user interface disable option (ZynAddSubFX will run only in text-mode) +#DISABLE_GUI=YES +DISABLE_GUI=NO + # L I N U X C O N F I G U R A T I O N #Next line sets the midi input. It can be "ALSA", "OSS" or "NONE". LINUX_MIDIIN=ALSA diff --git a/src/UI/Makefile b/src/UI/Makefile @@ -6,7 +6,9 @@ include ../Makefile.inc objects=WidgetPDial.o PresetsUI.o EnvelopeUI.o LFOUI.o FilterUI.o VirKeyboard.o ConfigUI.o\ SUBnoteUI.o ResonanceUI.o OscilGenUI.o ADnoteUI.o PADnoteUI.o EffUI.o BankUI.o \ PartUI.o MicrotonalUI.o SeqUI.o MasterUI.o - +ifeq ($(DISABLE_GUI),YES) + objects= +endif all: $(objects) diff --git a/src/main.C b/src/main.C @@ -56,10 +56,11 @@ extern Dump dump; #include "Input/WINMidiIn.h" #endif - +#ifndef DISABLE_GUI #include "UI/MasterUI.h" - MasterUI *ui; +#endif + pthread_t thr1,thr2,thr3,thr4; Master *master; int swaplr=0;//1 for left-right swapping @@ -177,8 +178,10 @@ void *thread2(void *arg){ void *thread3(void *arg){ +#ifndef DISABLE_GUI ui->showUI(); while (Pexitprogram==0) Fl::wait(); +#endif return(0); }; @@ -280,7 +283,9 @@ void initprogram(){ #if (defined(NONEMIDIIN)||(defined(VSTMIDIIN))) Midi=new NULLMidiIn(); #endif +#ifndef DISABLE_GUI ui=new MasterUI(master,&Pexitprogram); +#endif }; /* @@ -301,7 +306,9 @@ void exitprogram(){ PAfinish(); #endif +#ifndef DISABLE_GUI delete(ui); +#endif delete(Midi); delete(master); @@ -481,7 +488,9 @@ int main(int argc, char *argv[]){ exit(1); } else { master->applyparameters(); +#ifndef DISABLE_GUI if (noui==0) ui->refresh_master_ui(); +#endif }; };