From ed7def9dfe74b4fcc9526c284521697c97dfe7d2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 7 Aug 2011 13:37:43 +0100 Subject: [PATCH] Add example plugin --- demo.lv2/Juce_Demo_Plugin.make | 102 +++++++++++++++++++++++++++++++++++++++++ demo.lv2/Juce_Demo_Plugin.ttl | 79 +++++++++++++++++++++++++++++++ demo.lv2/manifest.ttl | 8 ++++ 3 files changed, 189 insertions(+) create mode 100644 demo.lv2/Juce_Demo_Plugin.make create mode 100644 demo.lv2/Juce_Demo_Plugin.ttl create mode 100644 demo.lv2/manifest.ttl diff --git a/demo.lv2/Juce_Demo_Plugin.make b/demo.lv2/Juce_Demo_Plugin.make new file mode 100644 index 0000000..288f5ed --- /dev/null +++ b/demo.lv2/Juce_Demo_Plugin.make @@ -0,0 +1,102 @@ +# C++ Shared Library Makefile autogenerated by premake +# Don't edit this file! Instead edit `premake.lua` then rerun `make` + +ifndef CONFIG + CONFIG=Release +endif + +# if multiple archs are defined turn off automated dependency generation +DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD) + +ifeq ($(CONFIG),Release) + BINDIR := . + LIBDIR := . + OBJDIR := ./intermediate/Juce_Demo_Plugin_Release + OUTDIR := . + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JucePlugin_Build_LV2=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../juce/source" -I "../JuceLibraryCode" -I "../Source" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -O2 -march=native -Os -fPIC -fvisibility=hidden + CXXFLAGS += $(CFLAGS) + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -s -L"/usr/X11R6/lib/" -L"../.." -lfreetype -lpthread -lrt -lX11 -lGL -ljuce + LDDEPS := + RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCE_ALSA=0" -D "JucePlugin_Build_LV2=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../juce/source" -I "../JuceLibraryCode" -I "../Source" + TARGET := libJuce_Demo_Plugin.so + BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) +endif + +ifeq ($(CONFIG),Debug) + BINDIR := . + LIBDIR := . + OBJDIR := ./intermediate/Juce_Demo_Plugin_Debug + OUTDIR := . + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JucePlugin_Build_LV2=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../juce/source" -I "../JuceLibraryCode" -I "../Source" + CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -g -march=native -ggdb -O0 -fPIC -fvisibility=hidden + CXXFLAGS += $(CFLAGS) + LDFLAGS += -L$(BINDIR) -L$(LIBDIR) -shared -L"/usr/X11R6/lib/" -L"../.." -lfreetype -lpthread -lrt -lX11 -lGL -ljuce_debug + LDDEPS := + RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCE_ALSA=0" -D "JucePlugin_Build_LV2=1" -I "/usr/include" -I "/usr/include/freetype2" -I "../../juce/source" -I "../JuceLibraryCode" -I "../Source" + TARGET := libJuce_Demo_Plugin_debug.so + BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH) +endif + +OBJECTS := \ + $(OBJDIR)/PluginEditor.o \ + $(OBJDIR)/PluginProcessor.o \ + $(OBJDIR)/juce_LV2_Wrapper.o \ + +MKDIR_TYPE := msdos +CMD := $(subst \,\\,$(ComSpec)$(COMSPEC)) +ifeq (,$(CMD)) + MKDIR_TYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + MKDIR_TYPE := posix +endif +ifeq ($(MKDIR_TYPE),posix) + CMD_MKBINDIR := mkdir -p $(BINDIR) + CMD_MKLIBDIR := mkdir -p $(LIBDIR) + CMD_MKOUTDIR := mkdir -p $(OUTDIR) + CMD_MKOBJDIR := mkdir -p $(OBJDIR) +else + CMD_MKBINDIR := $(CMD) /c if not exist $(subst /,\\,$(BINDIR)) mkdir $(subst /,\\,$(BINDIR)) + CMD_MKLIBDIR := $(CMD) /c if not exist $(subst /,\\,$(LIBDIR)) mkdir $(subst /,\\,$(LIBDIR)) + CMD_MKOUTDIR := $(CMD) /c if not exist $(subst /,\\,$(OUTDIR)) mkdir $(subst /,\\,$(OUTDIR)) + CMD_MKOBJDIR := $(CMD) /c if not exist $(subst /,\\,$(OBJDIR)) mkdir $(subst /,\\,$(OBJDIR)) +endif + +.PHONY: clean + +$(OUTDIR)/$(TARGET): $(OBJECTS) $(LDDEPS) $(RESOURCES) + @echo Linking Juce_Demo_Plugin + -@$(CMD_MKBINDIR) + -@$(CMD_MKLIBDIR) + -@$(CMD_MKOUTDIR) + @$(BLDCMD) + +clean: + @echo Cleaning Juce_Demo_Plugin +ifeq ($(MKDIR_TYPE),posix) + -@rm -f $(OUTDIR)/$(TARGET) + -@rm -rf $(OBJDIR) +else + -@if exist $(subst /,\,$(OUTDIR)/$(TARGET)) del /q $(subst /,\,$(OUTDIR)/$(TARGET)) + -@if exist $(subst /,\,$(OBJDIR)) del /q $(subst /,\,$(OBJDIR)) + -@if exist $(subst /,\,$(OBJDIR)) rmdir /s /q $(subst /,\,$(OBJDIR)) +endif + +$(OBJDIR)/PluginEditor.o: ../Source/PluginEditor.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/PluginProcessor.o: ../Source/PluginProcessor.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/juce_LV2_Wrapper.o: ../../juce/source/src/audio/plugin_client/LV2/juce_LV2_Wrapper.cpp + -@$(CMD_MKOBJDIR) + @echo $(notdir $<) + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +-include $(OBJECTS:%.o=%.d) + diff --git a/demo.lv2/Juce_Demo_Plugin.ttl b/demo.lv2/Juce_Demo_Plugin.ttl new file mode 100644 index 0000000..f1f6a9e --- /dev/null +++ b/demo.lv2/Juce_Demo_Plugin.ttl @@ -0,0 +1,79 @@ +@prefix doap: . +@prefix lv2: . +@prefix lv2ev: . +@prefix lv2ui: . + + + a lv2ui:external ; + lv2ui:binary . + + + a lv2:Plugin ; + lv2ui:ui ; + + lv2:port [ + a lv2:InputPort, lv2ev:EventPort; + lv2ev:supportsEvent ; + lv2:index 0; + lv2:symbol "midi_in"; + lv2:name "MIDI Input"; + ] ; + + lv2:port [ + a lv2:OutputPort, lv2ev:EventPort; + lv2ev:supportsEvent ; + lv2:index 1; + lv2:symbol "midi_out"; + lv2:name "MIDI Output"; + ] ; + + lv2:port [ + a lv2:InputPort, lv2:AudioPort; + lv2:index 2; + lv2:symbol "audio_in_1"; + lv2:name "Audio Input 1"; + ], + [ + a lv2:InputPort, lv2:AudioPort; + lv2:index 3; + lv2:symbol "audio_in_2"; + lv2:name "Audio Input 2"; + ] ; + + lv2:port [ + a lv2:OutputPort, lv2:AudioPort; + lv2:index 4; + lv2:symbol "audio_out_1"; + lv2:name "Audio Output 1"; + ], + [ + a lv2:OutputPort, lv2:AudioPort; + lv2:index 5; + lv2:symbol "audio_out_2"; + lv2:name "Audio Output 2"; + ] ; + + lv2:port [ + a lv2:InputPort; + a lv2:ControlPort; + lv2:index 6; + lv2:symbol "gain"; + lv2:name "gain"; + lv2:default 1.0; + lv2:minimum 0.0; + lv2:maximum 1.0; + ], + [ + a lv2:InputPort; + a lv2:ControlPort; + lv2:index 8; + lv2:symbol "delay"; + lv2:name "delay"; + lv2:default 0.5; + lv2:minimum 0.0; + lv2:maximum 1.0; + ] ; + + doap:name "Juce Demo Plugin" ; + doap:creator "Raw Material Software" . + diff --git a/demo.lv2/manifest.ttl b/demo.lv2/manifest.ttl new file mode 100644 index 0000000..4a2b7d9 --- /dev/null +++ b/demo.lv2/manifest.ttl @@ -0,0 +1,8 @@ +@prefix lv2: . +@prefix rdfs: . + + + a lv2:Plugin ; + lv2:binary ; + rdfs:seeAlso . + -- 2.11.4.GIT