diff --git a/Builds/LinuxMakefile/Makefile b/Builds/LinuxMakefile/Makefile index f23b8da5..b9b2e9c1 100644 --- a/Builds/LinuxMakefile/Makefile +++ b/Builds/LinuxMakefile/Makefile @@ -18,7 +18,7 @@ ifeq ($(CONFIG),Debug) TARGET_ARCH := endif - CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "PD=1" -D "USEAPI_DUMMY=1" -D "PD_INTERNAL=1" -D "HAVE_UNISTD_H=1" -D "HAVE_LIBDL=1" -D "HAVE_ALLOCA_H=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=0.0.5" -D "JUCE_APP_VERSION_HEX=0x5" -I /usr/include -I /usr/include/freetype2 -I ../../ThirdParty/Vst -I ../../ThirdParty/Vst/vstsdk2.4 -I ../../JuceLibraryCode -I ../../ThirdParty/Juce/modules -I ../../ThirdParty/PureData/src + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "PD=1" -D "USEAPI_DUMMY=1" -D "PD_INTERNAL=1" -D "HAVE_UNISTD_H=1" -D "HAVE_LIBDL=1" -D "HAVE_ALLOCA_H=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=0.0.7" -D "JUCE_APP_VERSION_HEX=0x7" -I /usr/include -I /usr/include/freetype2 -I ../../ThirdParty/Vst -I ../../ThirdParty/Vst/vstsdk2.4 -I ../../JuceLibraryCode -I ../../ThirdParty/Juce/modules -I ../../ThirdParty/PureData/src CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -fPIC -O0 CXXFLAGS += $(CFLAGS) -std=c++11 LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -Wl,--no-undefined -shared -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt @@ -38,7 +38,7 @@ ifeq ($(CONFIG),Release) TARGET_ARCH := endif - CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "PD=1" -D "USEAPI_DUMMY=1" -D "PD_INTERNAL=1" -D "HAVE_UNISTD_H=1" -D "HAVE_LIBDL=1" -D "HAVE_ALLOCA_H=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=0.0.5" -D "JUCE_APP_VERSION_HEX=0x5" -I /usr/include -I /usr/include/freetype2 -I ../../ThirdParty/Vst -I ../../ThirdParty/Vst/vstsdk2.4 -I ../../JuceLibraryCode -I ../../ThirdParty/Juce/modules -I ../../ThirdParty/PureData/src + CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "PD=1" -D "USEAPI_DUMMY=1" -D "PD_INTERNAL=1" -D "HAVE_UNISTD_H=1" -D "HAVE_LIBDL=1" -D "HAVE_ALLOCA_H=1" -D "JUCER_LINUX_MAKE_6D53C8B4=1" -D "JUCE_APP_VERSION=0.0.7" -D "JUCE_APP_VERSION_HEX=0x7" -I /usr/include -I /usr/include/freetype2 -I ../../ThirdParty/Vst -I ../../ThirdParty/Vst/vstsdk2.4 -I ../../JuceLibraryCode -I ../../ThirdParty/Juce/modules -I ../../ThirdParty/PureData/src CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -fPIC -O3 CXXFLAGS += $(CFLAGS) -std=c++11 LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -Wl,--no-undefined -shared -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt @@ -52,29 +52,31 @@ OBJECTS := \ $(OBJDIR)/LookAndFeel_40552bdf.o \ $(OBJDIR)/InstanceProcessor_bc7e525e.o \ $(OBJDIR)/InstanceEditor_fa2c28eb.o \ - $(OBJDIR)/Gui_2b5c821c.o \ - $(OBJDIR)/GuiWindow_fc7f58ec.o \ - $(OBJDIR)/GuiAbout_73a909b.o \ - $(OBJDIR)/GuiConsole_b1a18b25.o \ - $(OBJDIR)/GuiFlowerButton_762682a9.o \ - $(OBJDIR)/GuiPatcher_633be1c3.o \ - $(OBJDIR)/GuiComment_a154d02d.o \ - $(OBJDIR)/GuiLabel_32dae082.o \ - $(OBJDIR)/GuiNumbox_87800701.o \ - $(OBJDIR)/GuiSlider_cf6a155d.o \ - $(OBJDIR)/GuiToggle_5aabe650.o \ - $(OBJDIR)/GuiRadio_1d3f9a09.o \ - $(OBJDIR)/GuiParameter_1f209e37.o \ - $(OBJDIR)/Pd_51c89d7d.o \ - $(OBJDIR)/PdGui_8982f688.o \ - $(OBJDIR)/PdPatch_eded9115.o \ - $(OBJDIR)/PdInstance_9098ebb2.o \ + $(OBJDIR)/Gui_edc4c728.o \ + $(OBJDIR)/GuiAbout_58af930f.o \ + $(OBJDIR)/GuiComment_699305a1.o \ + $(OBJDIR)/GuiConsole_79dfc099.o \ + $(OBJDIR)/GuiFlowerButton_5b7395b5.o \ + $(OBJDIR)/GuiLabel_844fe2f6.o \ + $(OBJDIR)/GuiNumbox_64ab530d.o \ + $(OBJDIR)/GuiParameter_d0a746ab.o \ + $(OBJDIR)/GuiPatcher_2b7a1737.o \ + $(OBJDIR)/GuiRadio_6eb49c7d.o \ + $(OBJDIR)/GuiSlider_ac956169.o \ + $(OBJDIR)/GuiToggle_37d7325c.o \ + $(OBJDIR)/GuiWindow_d9aaa4f8.o \ + $(OBJDIR)/PdConsole_4bdc72d1.o \ + $(OBJDIR)/PdEnvironment_11e3570d.o \ + $(OBJDIR)/PdInstance_ddabcf25.o \ + $(OBJDIR)/PdObject_b945538f.o \ + $(OBJDIR)/PdParameter_16404ae3.o \ + $(OBJDIR)/PdPatch_69639a82.o \ + $(OBJDIR)/PdPatchManager_e2506355.o \ + $(OBJDIR)/PdTypes_a7fd5233.o \ + $(OBJDIR)/z_pd_9c06b4b5.o \ $(OBJDIR)/bob~_dea63fa8.o \ $(OBJDIR)/bonk~_1c54edf2.o \ $(OBJDIR)/choice_9a48dd28.o \ - $(OBJDIR)/vexp_42c95f1e.o \ - $(OBJDIR)/vexp_fun_46a72f5e.o \ - $(OBJDIR)/vexp_if_a8aa2e8.o \ $(OBJDIR)/fiddle~_d178694e.o \ $(OBJDIR)/loop~_d8d5c53e.o \ $(OBJDIR)/lrshift~_770f74c8.o \ @@ -133,8 +135,6 @@ OBJECTS := \ $(OBJDIR)/s_inter_106fd5bd.o \ $(OBJDIR)/s_loader_499588dc.o \ $(OBJDIR)/s_main_b40a6202.o \ - $(OBJDIR)/s_midi_b478c56a.o \ - $(OBJDIR)/s_midi_dummy_723fbb13.o \ $(OBJDIR)/s_path_b92dd56e.o \ $(OBJDIR)/s_print_88f7f34e.o \ $(OBJDIR)/s_utf8_c2babdba.o \ @@ -151,6 +151,9 @@ OBJECTS := \ $(OBJDIR)/x_scalar_6bd11c10.o \ $(OBJDIR)/x_text_c7a174d1.o \ $(OBJDIR)/x_time_c7d49a71.o \ + $(OBJDIR)/x_vexp_fun_e64128cb.o \ + $(OBJDIR)/x_vexp_if_624547db.o \ + $(OBJDIR)/x_vexp_cb0b170b.o \ $(OBJDIR)/BinaryData_ce4232d4.o \ $(OBJDIR)/juce_audio_basics_4f86222c.o \ $(OBJDIR)/juce_audio_processors_4fc0fe4.o \ @@ -196,119 +199,129 @@ $(OBJDIR)/InstanceEditor_fa2c28eb.o: ../../Source/InstanceEditor.cpp @echo "Compiling InstanceEditor.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/Gui_2b5c821c.o: ../../Source/Gui.cpp +$(OBJDIR)/Gui_edc4c728.o: ../../Source/Gui/Gui.cpp -@mkdir -p $(OBJDIR) @echo "Compiling Gui.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiWindow_fc7f58ec.o: ../../Source/GuiWindow.cpp +$(OBJDIR)/GuiAbout_58af930f.o: ../../Source/Gui/GuiAbout.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiWindow.cpp" + @echo "Compiling GuiAbout.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiAbout_73a909b.o: ../../Source/GuiAbout.cpp +$(OBJDIR)/GuiComment_699305a1.o: ../../Source/Gui/GuiComment.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiAbout.cpp" + @echo "Compiling GuiComment.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiConsole_b1a18b25.o: ../../Source/GuiConsole.cpp +$(OBJDIR)/GuiConsole_79dfc099.o: ../../Source/Gui/GuiConsole.cpp -@mkdir -p $(OBJDIR) @echo "Compiling GuiConsole.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiFlowerButton_762682a9.o: ../../Source/GuiFlowerButton.cpp +$(OBJDIR)/GuiFlowerButton_5b7395b5.o: ../../Source/Gui/GuiFlowerButton.cpp -@mkdir -p $(OBJDIR) @echo "Compiling GuiFlowerButton.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiPatcher_633be1c3.o: ../../Source/GuiPatcher.cpp +$(OBJDIR)/GuiLabel_844fe2f6.o: ../../Source/Gui/GuiLabel.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiPatcher.cpp" + @echo "Compiling GuiLabel.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiComment_a154d02d.o: ../../Source/GuiComment.cpp +$(OBJDIR)/GuiNumbox_64ab530d.o: ../../Source/Gui/GuiNumbox.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiComment.cpp" + @echo "Compiling GuiNumbox.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiLabel_32dae082.o: ../../Source/GuiLabel.cpp +$(OBJDIR)/GuiParameter_d0a746ab.o: ../../Source/Gui/GuiParameter.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiLabel.cpp" + @echo "Compiling GuiParameter.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiNumbox_87800701.o: ../../Source/GuiNumbox.cpp +$(OBJDIR)/GuiPatcher_2b7a1737.o: ../../Source/Gui/GuiPatcher.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiNumbox.cpp" + @echo "Compiling GuiPatcher.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiSlider_cf6a155d.o: ../../Source/GuiSlider.cpp +$(OBJDIR)/GuiRadio_6eb49c7d.o: ../../Source/Gui/GuiRadio.cpp + -@mkdir -p $(OBJDIR) + @echo "Compiling GuiRadio.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/GuiSlider_ac956169.o: ../../Source/Gui/GuiSlider.cpp -@mkdir -p $(OBJDIR) @echo "Compiling GuiSlider.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiToggle_5aabe650.o: ../../Source/GuiToggle.cpp +$(OBJDIR)/GuiToggle_37d7325c.o: ../../Source/Gui/GuiToggle.cpp -@mkdir -p $(OBJDIR) @echo "Compiling GuiToggle.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiRadio_1d3f9a09.o: ../../Source/GuiRadio.cpp +$(OBJDIR)/GuiWindow_d9aaa4f8.o: ../../Source/Gui/GuiWindow.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiRadio.cpp" + @echo "Compiling GuiWindow.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/GuiParameter_1f209e37.o: ../../Source/GuiParameter.cpp +$(OBJDIR)/PdConsole_4bdc72d1.o: ../../Source/Pd/PdConsole.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling GuiParameter.cpp" + @echo "Compiling PdConsole.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/Pd_51c89d7d.o: ../../Source/Pd.cpp +$(OBJDIR)/PdEnvironment_11e3570d.o: ../../Source/Pd/PdEnvironment.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling Pd.cpp" + @echo "Compiling PdEnvironment.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/PdGui_8982f688.o: ../../Source/PdGui.cpp +$(OBJDIR)/PdInstance_ddabcf25.o: ../../Source/Pd/PdInstance.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling PdGui.cpp" + @echo "Compiling PdInstance.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/PdPatch_eded9115.o: ../../Source/PdPatch.cpp +$(OBJDIR)/PdObject_b945538f.o: ../../Source/Pd/PdObject.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling PdPatch.cpp" + @echo "Compiling PdObject.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/PdInstance_9098ebb2.o: ../../Source/PdInstance.cpp +$(OBJDIR)/PdParameter_16404ae3.o: ../../Source/Pd/PdParameter.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling PdInstance.cpp" + @echo "Compiling PdParameter.cpp" @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/bob~_dea63fa8.o: ../../ThirdParty/PureData/extra/bob~/bob~.c +$(OBJDIR)/PdPatch_69639a82.o: ../../Source/Pd/PdPatch.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling bob~.c" - @$(CC) $(CFLAGS) -o "$@" -c "$<" + @echo "Compiling PdPatch.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/bonk~_1c54edf2.o: ../../ThirdParty/PureData/extra/bonk~/bonk~.c +$(OBJDIR)/PdPatchManager_e2506355.o: ../../Source/Pd/PdPatchManager.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling bonk~.c" - @$(CC) $(CFLAGS) -o "$@" -c "$<" + @echo "Compiling PdPatchManager.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" -$(OBJDIR)/choice_9a48dd28.o: ../../ThirdParty/PureData/extra/choice/choice.c +$(OBJDIR)/PdTypes_a7fd5233.o: ../../Source/Pd/PdTypes.cpp -@mkdir -p $(OBJDIR) - @echo "Compiling choice.c" + @echo "Compiling PdTypes.cpp" + @$(CXX) $(CXXFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/z_pd_9c06b4b5.o: ../../Source/Pd/z_pd.c + -@mkdir -p $(OBJDIR) + @echo "Compiling z_pd.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" -$(OBJDIR)/vexp_42c95f1e.o: ../../ThirdParty/PureData/extra/expr~/vexp.c +$(OBJDIR)/bob~_dea63fa8.o: ../../ThirdParty/PureData/extra/bob~/bob~.c -@mkdir -p $(OBJDIR) - @echo "Compiling vexp.c" + @echo "Compiling bob~.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" -$(OBJDIR)/vexp_fun_46a72f5e.o: ../../ThirdParty/PureData/extra/expr~/vexp_fun.c +$(OBJDIR)/bonk~_1c54edf2.o: ../../ThirdParty/PureData/extra/bonk~/bonk~.c -@mkdir -p $(OBJDIR) - @echo "Compiling vexp_fun.c" + @echo "Compiling bonk~.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" -$(OBJDIR)/vexp_if_a8aa2e8.o: ../../ThirdParty/PureData/extra/expr~/vexp_if.c +$(OBJDIR)/choice_9a48dd28.o: ../../ThirdParty/PureData/extra/choice/choice.c -@mkdir -p $(OBJDIR) - @echo "Compiling vexp_if.c" + @echo "Compiling choice.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" $(OBJDIR)/fiddle~_d178694e.o: ../../ThirdParty/PureData/extra/fiddle~/fiddle~.c @@ -601,16 +614,6 @@ $(OBJDIR)/s_main_b40a6202.o: ../../ThirdParty/PureData/src/s_main.c @echo "Compiling s_main.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" -$(OBJDIR)/s_midi_b478c56a.o: ../../ThirdParty/PureData/src/s_midi.c - -@mkdir -p $(OBJDIR) - @echo "Compiling s_midi.c" - @$(CC) $(CFLAGS) -o "$@" -c "$<" - -$(OBJDIR)/s_midi_dummy_723fbb13.o: ../../ThirdParty/PureData/src/s_midi_dummy.c - -@mkdir -p $(OBJDIR) - @echo "Compiling s_midi_dummy.c" - @$(CC) $(CFLAGS) -o "$@" -c "$<" - $(OBJDIR)/s_path_b92dd56e.o: ../../ThirdParty/PureData/src/s_path.c -@mkdir -p $(OBJDIR) @echo "Compiling s_path.c" @@ -691,6 +694,21 @@ $(OBJDIR)/x_time_c7d49a71.o: ../../ThirdParty/PureData/src/x_time.c @echo "Compiling x_time.c" @$(CC) $(CFLAGS) -o "$@" -c "$<" +$(OBJDIR)/x_vexp_fun_e64128cb.o: ../../ThirdParty/PureData/src/x_vexp_fun.c + -@mkdir -p $(OBJDIR) + @echo "Compiling x_vexp_fun.c" + @$(CC) $(CFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/x_vexp_if_624547db.o: ../../ThirdParty/PureData/src/x_vexp_if.c + -@mkdir -p $(OBJDIR) + @echo "Compiling x_vexp_if.c" + @$(CC) $(CFLAGS) -o "$@" -c "$<" + +$(OBJDIR)/x_vexp_cb0b170b.o: ../../ThirdParty/PureData/src/x_vexp.c + -@mkdir -p $(OBJDIR) + @echo "Compiling x_vexp.c" + @$(CC) $(CFLAGS) -o "$@" -c "$<" + $(OBJDIR)/BinaryData_ce4232d4.o: ../../JuceLibraryCode/BinaryData.cpp -@mkdir -p $(OBJDIR) @echo "Compiling BinaryData.cpp" diff --git a/Builds/VisualStudio2015/Camomile.vcxproj b/Builds/VisualStudio2015/Camomile.vcxproj index 019e36ee..292083aa 100644 --- a/Builds/VisualStudio2015/Camomile.vcxproj +++ b/Builds/VisualStudio2015/Camomile.vcxproj @@ -85,7 +85,7 @@ Disabled EditAndContinue ..\..\ThirdParty\Vst;..\..\ThirdParty\Vst\vstsdk2.4;..\..\JuceLibraryCode;..\..\ThirdParty\Juce\modules;../../ThirdParty/PureData/src;../../ThirdParty/PthreadWindows/include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.5;JUCE_APP_VERSION_HEX=0x5;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.7;JUCE_APP_VERSION_HEX=0x7;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -132,7 +132,7 @@ Full ..\..\ThirdParty\Vst;..\..\ThirdParty\Vst\vstsdk2.4;..\..\JuceLibraryCode;..\..\ThirdParty\Juce\modules;../../ThirdParty/PureData/src;../../ThirdParty/PthreadWindows/include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.5;JUCE_APP_VERSION_HEX=0x5;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.7;JUCE_APP_VERSION_HEX=0x7;%(PreprocessorDefinitions) MultiThreaded true @@ -181,7 +181,7 @@ Disabled ProgramDatabase ..\..\ThirdParty\Vst;..\..\ThirdParty\Vst\vstsdk2.4;..\..\JuceLibraryCode;..\..\ThirdParty\Juce\modules;../../ThirdParty/PureData/src;../../ThirdParty/PthreadWindows/include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.5;JUCE_APP_VERSION_HEX=0x5;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.7;JUCE_APP_VERSION_HEX=0x7;%(PreprocessorDefinitions) MultiThreadedDebug true @@ -226,7 +226,7 @@ Full ..\..\ThirdParty\Vst;..\..\ThirdParty\Vst\vstsdk2.4;..\..\JuceLibraryCode;..\..\ThirdParty\Juce\modules;../../ThirdParty/PureData/src;../../ThirdParty/PthreadWindows/include;%(AdditionalIncludeDirectories) - _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.5;JUCE_APP_VERSION_HEX=0x5;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;PD=1;USEAPI_DUMMY=1;PD_INTERNAL=1;HAVE_STRUCT_TIMESPEC=1;PTW32_STATIC_LIB=1;JUCER_VS2015_78A5022=1;JUCE_APP_VERSION=0.0.7;JUCE_APP_VERSION_HEX=0x7;%(PreprocessorDefinitions) MultiThreaded true @@ -266,29 +266,31 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - @@ -347,8 +349,6 @@ - - @@ -365,6 +365,9 @@ + + + true @@ -1361,31 +1364,36 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1502,6 +1510,7 @@ + @@ -1805,11 +1814,13 @@ - + + + + - diff --git a/Builds/VisualStudio2015/Camomile.vcxproj.filters b/Builds/VisualStudio2015/Camomile.vcxproj.filters index 6e9c9693..87fba55c 100644 --- a/Builds/VisualStudio2015/Camomile.vcxproj.filters +++ b/Builds/VisualStudio2015/Camomile.vcxproj.filters @@ -8,6 +8,12 @@ {33E9C75D-FCFD-D74A-6894-584B92DA1489} + + {3AF8F85C-58F5-53F7-00C3-F524890FB4C3} + + + {2EC11BD7-CEBB-B832-8CB3-D70D257E2DEE} + {ABB849DA-A280-579D-8B13-1DFA0A3DAE06} @@ -280,73 +286,79 @@ Camomile\Source - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\PureData\extra + + Camomile\Source\Pd - - Camomile\PureData\extra + + Camomile\Source\Pd - - Camomile\PureData\extra + + Camomile\Source\Pd - + + Camomile\Source\Pd + + + Camomile\Source\Pd + + Camomile\PureData\extra - + Camomile\PureData\extra - + Camomile\PureData\extra @@ -523,12 +535,6 @@ Camomile\PureData\src - - Camomile\PureData\src - - - Camomile\PureData\src - Camomile\PureData\src @@ -577,6 +583,15 @@ Camomile\PureData\src + + Camomile\PureData\src + + + Camomile\PureData\src + + + Camomile\PureData\src + Juce Modules\juce_audio_basics\buffers @@ -1680,62 +1695,74 @@ Camomile\Source - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Gui - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\Source + + Camomile\Source\Pd - - Camomile\PureData\extra + + Camomile\Source\Pd - - Camomile\PureData\extra + + Camomile\Source\Pd + + + Camomile\Source\Pd + + + Camomile\Source\Pd + + + Camomile\Source\Pd + + + Camomile\Source\Pd Camomile\PureData\src @@ -1755,6 +1782,9 @@ Camomile\PureData\src + + Camomile\PureData\src + Juce Modules\juce_audio_basics\buffers @@ -2103,6 +2133,9 @@ Juce Modules\juce_core\containers + + Juce Modules\juce_core\containers + Juce Modules\juce_core\containers @@ -3008,19 +3041,25 @@ - + Camomile\Ressources - + Camomile\Ressources - + Camomile\Ressources - + + Camomile\Ressources + + Camomile\Ressources - + + Camomile\Ressources + + Camomile\Ressources diff --git a/Builds/VisualStudio2015/resources.rc b/Builds/VisualStudio2015/resources.rc index 62802cf5..1e7b0b32 100644 --- a/Builds/VisualStudio2015/resources.rc +++ b/Builds/VisualStudio2015/resources.rc @@ -7,7 +7,7 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 0,0,5,0 +FILEVERSION 0,0,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -15,9 +15,9 @@ BEGIN BEGIN VALUE "CompanyName", "CICM\0" VALUE "FileDescription", "Camomile\0" - VALUE "FileVersion", "0.0.5\0" + VALUE "FileVersion", "0.0.7\0" VALUE "ProductName", "Camomile\0" - VALUE "ProductVersion", "0.0.5\0" + VALUE "ProductVersion", "0.0.7\0" END END diff --git a/Camomile.jucer b/Camomile.jucer index bc93332f..0bbc2712 100644 --- a/Camomile.jucer +++ b/Camomile.jucer @@ -1,11 +1,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - @@ -136,8 +150,6 @@ - - @@ -156,20 +168,26 @@ + + + + - - + + + + + - =, f 5; +#X obj 53 370 r \$0-note-pitch-1-s; +#X obj 83 400 r \$0-note-velocity-1-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-1-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-1-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-1-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-1-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 23 231 pd Note1; +#X obj 263 289 outlet; +#X obj 263 121 inlet; +#N canvas 230 155 450 667 Note2 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-2-s; +#X obj 83 400 r \$0-note-velocity-2-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-2-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-2-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-2-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-2-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 83 231 pd Note2; +#N canvas 230 155 450 667 Note3 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-3-s; +#X obj 83 400 r \$0-note-velocity-3-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-3-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-3-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-3-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-3-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 143 231 pd Note3; +#N canvas 230 155 450 667 Note4 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-4-s; +#X obj 83 400 r \$0-note-velocity-4-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-4-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-4-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-4-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-4-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 203 231 pd Note4; +#N canvas 230 155 450 667 Note5 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-5-s; +#X obj 83 400 r \$0-note-velocity-5-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-5-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-5-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-5-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-5-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 263 231 pd Note5; +#N canvas 230 155 450 667 Note6 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-6-s; +#X obj 83 400 r \$0-note-velocity-6-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-6-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-6-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-6-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-6-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 323 231 pd Note6; +#N canvas 230 155 450 667 Note7 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-7-s; +#X obj 83 400 r \$0-note-velocity-7-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-7-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-7-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-7-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-7-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 384 231 pd Note7; +#N canvas 230 155 450 667 Note8 0; +#X obj 38 324 change; +#X obj 38 346 sel 1; +#X obj 38 302 >=, f 5; +#X obj 53 370 r \$0-note-pitch-8-s; +#X obj 83 400 r \$0-note-velocity-8-s; +#X obj 38 435 pack f f; +#X obj 65 109 r \$0-note-start-8-s; +#X obj 135 577 outlet; +#X obj 272 192 +, f 5; +#X obj 272 171 t b f; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 272 371 pd fmod; +#X obj 260 459 r \$0-note-pitch-8-s; +#X obj 65 156 t f f; +#X obj 38 13 inlet; +#X obj 92 179 == 0; +#X obj 38 409 f; +#X obj 245 505 pack f 0; +#X obj 245 438 sel 1; +#X obj 245 416 change; +#X obj 245 395 >=, f 5; +#X obj 245 481 f; +#X obj 305 236 == 0; +#X obj 305 258 * 0.5; +#X obj 272 346 +, f 6; +#X obj 245 287 +; +#X obj 92 201 * 0.5; +#X obj 65 228 +, f 5; +#X obj 38 228 +; +#X obj 38 55 spigot, f 9; +#X obj 89 13 r \$0-note-state-8-s; +#X obj 89 35 change; +#X obj 272 126 r \$0-note-length-8-s; +#X obj 272 214 t f f, f 6; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 245 311 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 67 20 r \$0_ppq-limit; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X connect 6 2 2 1; +#X restore 38 258 pd fmod; +#N canvas 0 22 164 201 fmod 0; +#X obj 22 82 /; +#X obj 22 104 wrap; +#X obj 22 126 *; +#X obj 22 22 inlet; +#X obj 22 148 outlet; +#X obj 67 42 t b f f; +#X obj 67 20 r \$0_ppq-limit; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 5 2 2 1; +#X connect 6 0 5 0; +#X restore 65 279 pd fmod; +#X connect 0 0 1 0; +#X connect 1 0 15 0; +#X connect 2 0 0 0; +#X connect 3 0 15 1; +#X connect 4 0 5 1; +#X connect 5 0 7 0; +#X connect 6 0 12 0; +#X connect 6 0 8 0; +#X connect 8 0 32 0; +#X connect 9 0 8 0; +#X connect 9 1 8 1; +#X connect 10 0 19 1; +#X connect 11 0 20 1; +#X connect 12 0 26 0; +#X connect 12 1 14 0; +#X connect 13 0 28 0; +#X connect 14 0 25 0; +#X connect 15 0 5 0; +#X connect 16 0 7 0; +#X connect 17 0 20 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 16 0; +#X connect 21 0 22 0; +#X connect 22 0 23 1; +#X connect 22 0 24 1; +#X connect 23 0 10 0; +#X connect 24 0 33 0; +#X connect 25 0 26 1; +#X connect 25 0 27 1; +#X connect 26 0 35 0; +#X connect 27 0 34 0; +#X connect 28 0 27 0; +#X connect 28 0 24 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 31 0 9 0; +#X connect 32 0 23 0; +#X connect 32 1 21 0; +#X connect 33 0 19 0; +#X connect 34 0 2 0; +#X connect 35 0 2 1; +#X restore 444 231 pd Note8; +#X connect 0 0 1 0; +#X connect 2 0 0 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 2 0 5 0; +#X connect 2 0 6 0; +#X connect 2 0 7 0; +#X connect 2 0 8 0; +#X connect 2 0 9 0; +#X connect 3 0 1 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X connect 9 0 1 0; +#X restore 203 343 pd generator; +#N canvas 483 58 718 392 pitcher 0; +#X obj 142 34 inlet; +#X obj 142 56 unpack; +#X obj 142 278 +; +#X obj 208 99 * 12; +#X obj 208 171 +, f 4; +#X obj 249 146 t b f; +#X obj 208 79 - 3; +#X obj 249 99 - 3; +#X obj 249 121 * 2; +#X obj 208 201 +, f 4; +#X obj 319 146 t b f; +#X obj 319 99 - 3; +#X obj 142 310 outlet; +#X obj 172 340 outlet; +#X obj 208 57 r \$0-octave-s; +#X obj 249 77 r \$0-tone-s; +#X obj 319 77 r \$0-halftone-s; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 1 13 0; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 4 0 9 0; +#X connect 5 0 4 0; +#X connect 5 1 4 1; +#X connect 6 0 3 0; +#X connect 7 0 8 0; +#X connect 8 0 5 0; +#X connect 9 0 2 1; +#X connect 10 0 9 0; +#X connect 10 1 9 1; +#X connect 11 0 10 0; +#X connect 14 0 6 0; +#X connect 15 0 7 0; +#X connect 16 0 11 0; +#X restore 203 365 pd pitcher; +#N canvas 118 400 450 300 playhead 0; +#X obj 23 22 r \$0-playhead; +#X obj 23 44 route measure; +#X obj 146 125 -, f 5; +#X obj 23 66 unpack f f f f f, f 28; +#X obj 200 129 / 4; +#X obj 200 151 % 2; +#X obj 173 95 t f f; +#X obj 200 172 == 0; +#X obj 105 139 / 4; +#X obj 64 189 *, f 5; +#X obj 64 271 s \$0_ppq-limit; +#X obj 105 161 t b f, f 6; +#X obj 146 248 outlet; +#X obj 105 103 change; +#X obj 64 123 change; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 12 0; +#X connect 3 1 14 0; +#X connect 3 2 13 0; +#X connect 3 3 2 0; +#X connect 3 4 6 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 2 1; +#X connect 6 1 4 0; +#X connect 8 0 11 0; +#X connect 9 0 10 0; +#X connect 11 0 9 0; +#X connect 11 1 9 1; +#X connect 13 0 8 0; +#X connect 14 0 9 0; +#X restore 203 320 pd playhead; +#X text 298 231 A midi note generator; +#X connect 45 0 46 0; +#X connect 46 0 0 0; +#X connect 46 1 0 1; +#X connect 47 0 45 0; +#X coords 0 -1 1 1 800 240 2 10 10; diff --git a/Patches/camo.dependencies.pd b/Patches/camo.dependencies.pd index 706b8482..0e4ff6d9 100644 --- a/Patches/camo.dependencies.pd +++ b/Patches/camo.dependencies.pd @@ -1,4 +1,4 @@ -#N canvas 330 151 647 577 10; +#N canvas 707 163 647 577 10; #X obj 417 327 soundfiler; #X obj 417 213 openpanel; #X obj 417 274 pack s s; @@ -19,7 +19,7 @@ #X obj 304 280 phasor~ 220; #X obj 304 302 *~ 2; #X obj 304 324 -~ 1; -#X obj 207 284 acos; +#X obj 322 414 bob~; #X connect 1 0 3 0; #X connect 2 0 4 0; #X connect 3 0 2 0; @@ -27,7 +27,6 @@ #X connect 4 0 0 0; #X connect 5 0 2 1; #X connect 7 0 1 0; -#X connect 11 0 9 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 11 0; diff --git a/Patches/camo.flanger~.pd b/Patches/camo.flanger~.pd index 61b49fad..42ae2ec9 100644 --- a/Patches/camo.flanger~.pd +++ b/Patches/camo.flanger~.pd @@ -60,14 +60,14 @@ #X obj 601 89 delwrite~ \$0-delay-2 5000; #X obj 318 499 vd~ \$0-delay-1, f 16; #X obj 571 499 vd~ \$0-delay-2, f 16; -#X text 646 664 Output 2; -#X text 226 664 Output 1; +#X text 646 684 Output 2; +#X text 226 684 Output 1; #X text 426 17 Stereo Flanger; #X obj 431 200 r \$0-rate; #X obj 464 505 / 100; #X obj 572 165 / 100, f 16; #X obj 297 32 adc~ 1 2, f 50; -#X obj 297 664 dac~ 1 2, f 46; +#X obj 297 684 dac~ 1 2, f 46; #X text 329 65 Write Head 1; #X text 605 65 Write Head 2; #X text 609 475 Read Head 2; @@ -76,6 +76,8 @@ #X obj 434 270 clip 0 4000; #X obj 464 475 clip 0 100; #X obj 572 135 clip 0 100; +#X obj 297 658 *~ 0.5; +#X obj 570 658 *~ 0.5; #X connect 1 0 4 0; #X connect 1 0 15 0; #X connect 1 0 12 0; @@ -88,8 +90,8 @@ #X connect 15 0 0 0; #X connect 16 0 17 0; #X connect 17 0 28 0; -#X connect 19 0 58 0; -#X connect 20 0 58 1; +#X connect 19 0 67 0; +#X connect 20 0 68 0; #X connect 21 0 22 0; #X connect 22 0 29 0; #X connect 23 0 24 0; @@ -132,4 +134,6 @@ #X connect 64 0 27 0; #X connect 65 0 55 0; #X connect 66 0 56 0; +#X connect 67 0 58 0; +#X connect 68 0 58 1; #X coords 0 -1 1 1 206 160 2 50 50; diff --git a/Patches/camo.floyd~.pd b/Patches/camo.floyd~.pd index 8af83b4a..28364521 100644 --- a/Patches/camo.floyd~.pd +++ b/Patches/camo.floyd~.pd @@ -1,26 +1,17 @@ -#N canvas 524 53 832 581 10; -#X obj 374 259 line~; -#X obj 294 432 vcf~; -#X text 407 378 <-- Q (selectivity); -#X obj 274 187 clip~ 0 0.5; -#X obj 274 211 *~ 2; -#X obj 274 235 -~; -#X obj 290 107 mtof; -#X text 416 184 <-- center frequency; -#X text 439 212 at least 61; -#X obj 290 161 phasor~; -#X text 572 536 updated for Pd version 0.39; -#X obj 294 460 vcf~; -#X obj 374 210 max 61; -#X text 425 257 smooth & convert to Hz.; -#X obj 352 383 max 3; -#X text 431 400 at least 3; -#X text 404 444 rejection of the stop bands without having; -#X text 405 426 Put two vcf objects in series for better; -#X text 403 462 to make the passband excessively narrow.; -#X obj 294 527 dac~; -#X obj 374 235 pack 0 5; -#X obj 374 284 tabread4~ \$0-mtof; +#N canvas 574 38 832 581 10; +#X obj 474 259 line~; +#X obj 374 432 vcf~; +#X obj 374 187 clip~ 0 0.5; +#X obj 374 211 *~ 2; +#X obj 374 235 -~; +#X obj 389 103 mtof; +#X obj 389 157 phasor~; +#X obj 374 460 vcf~, f 9; +#X obj 474 210 max 61; +#X obj 472 383 max 3; +#X obj 374 527 dac~; +#X obj 474 235 pack 0 5; +#X obj 474 284 tabread4~ \$0-mtof; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-mtof 130 float 1; #A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 @@ -39,36 +30,39 @@ 7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 11839.8 12543.9 13289.8 14080; #X coords 0 300 1 299 200 100 0; -#X restore 505 14 graph; -#X obj 290 20 notein; -#X obj 306 46 != 0; -#X obj 290 80 *; -#X obj 16 28 vsl 15 50 3 10 0 0 empty \$0-q Q 4 -9 0 10 -262144 -1 +#X restore 587 283 graph; +#X obj 389 16 notein; +#X obj 405 42 != 0; +#X obj 389 76 *; +#X obj 246 29 vsl 15 50 3 10 0 0 empty \$0-q Q 4 -9 0 10 -262144 -1 -1 0 1; -#X obj 352 350 r \$0-q; -#X obj 39 28 vsl 15 50 61 200 0 0 empty \$0-freq Freq -4 -9 0 10 -262144 +#X obj 472 350 r \$0-q; +#X obj 279 29 vsl 15 50 61 200 0 0 empty \$0-freq Freq -4 -9 0 10 -262144 -1 -1 0 1; -#X obj 371 176 r \$0-freq; -#X connect 0 0 21 0; -#X connect 1 0 11 0; +#X obj 471 176 r \$0-freq; +#X text 15 15 Adaptation of Miller's pacth \, filter.floyd that recreates +the Pink Floyd synthesizer of On The Run from The Dark Side Of The +Moon. The pitch is controlled by MIDI., f 35; +#X connect 0 0 12 0; +#X connect 1 0 7 0; +#X connect 2 0 3 0; #X connect 3 0 4 0; -#X connect 4 0 5 0; -#X connect 5 0 1 0; -#X connect 6 0 9 0; -#X connect 9 0 3 0; -#X connect 9 0 5 1; -#X connect 11 0 19 0; -#X connect 11 0 19 1; -#X connect 12 0 20 0; -#X connect 14 0 1 2; -#X connect 14 0 11 2; -#X connect 20 0 0 0; -#X connect 21 0 1 1; -#X connect 21 0 11 1; -#X connect 23 0 25 0; -#X connect 23 1 24 0; -#X connect 24 0 25 1; -#X connect 25 0 6 0; -#X connect 27 0 14 0; -#X connect 29 0 12 0; -#X coords 0 -1 1 1 50 80 2 10 10; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 6 0 4 1; +#X connect 7 0 10 0; +#X connect 7 0 10 1; +#X connect 8 0 11 0; +#X connect 9 0 1 2; +#X connect 9 0 7 2; +#X connect 11 0 0 0; +#X connect 12 0 1 1; +#X connect 12 0 7 1; +#X connect 14 0 16 0; +#X connect 14 1 15 0; +#X connect 15 0 16 1; +#X connect 16 0 5 0; +#X connect 18 0 9 0; +#X connect 20 0 8 0; +#X coords 0 -1 1 1 300 80 2 10 10; diff --git a/Patches/camo.minimock~.pd b/Patches/camo.minimock~.pd new file mode 100644 index 00000000..b44049f9 --- /dev/null +++ b/Patches/camo.minimock~.pd @@ -0,0 +1,2852 @@ +#N canvas 285 81 1072 566 10; +#X obj 106 408 notein, f 8; +#X obj 312 408 bendin; +#X obj 172 460 / 127; +#X obj 312 460 / 8192; +#X obj 312 482 s \$0-bend; +#X obj 106 460 pack; +#X obj 106 482 s \$0-note; +#N canvas 623 73 502 589 wf 0; +#N canvas 494 152 450 300 counter 0; +#X obj 36 91 until; +#X obj 36 113 f; +#X obj 68 114 + 1; +#X obj 36 69 f 2048; +#X obj 81 69 f 0; +#X obj 36 24 inlet; +#X obj 36 46 t b b, f 8; +#X obj 36 135 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 1 0 7 0; +#X connect 2 0 1 1; +#X connect 3 0 0 0; +#X connect 4 0 1 1; +#X connect 5 0 6 0; +#X connect 6 0 3 0; +#X connect 6 1 4 0; +#X restore 23 123 pd counter; +#X obj 23 11 loadbang; +#N canvas 1134 272 450 300 gen-tri 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 265 pack, f 9; +#X obj 51 287 outlet; +#X obj 51 54 moses 1024; +#X obj 51 172 / 511.5; +#X obj 51 214 - 1; +#X obj 108 100 t b f; +#X obj 108 144 -, f 5; +#X obj 108 122 f 1023; +#X obj 108 78 - 1024; +#X obj 51 236 * 10; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 4 1 10 0; +#X connect 5 0 6 0; +#X connect 6 0 11 0; +#X connect 7 0 9 0; +#X connect 7 1 8 1; +#X connect 8 0 5 0; +#X connect 9 0 8 0; +#X connect 10 0 7 0; +#X connect 11 0 2 0; +#X restore 83 144 pd gen-tri; +#N canvas 927 219 458 534 gen-saw-tri 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 435 pack, f 9; +#X obj 51 457 outlet; +#X obj 51 54 moses 1024; +#X obj 51 172 / 511.5; +#X obj 108 100 t b f; +#X obj 108 144 -, f 5; +#X obj 108 122 f 1023; +#X obj 108 78 - 1024; +#X obj 108 166 / 1023; +#X obj 51 354 - 1; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 4 1 9 0; +#X connect 5 0 11 0; +#X connect 6 0 8 0; +#X connect 6 1 7 1; +#X connect 7 0 10 0; +#X connect 8 0 7 0; +#X connect 9 0 6 0; +#X connect 10 0 11 0; +#X connect 11 0 2 0; +#X restore 73 186 pd gen-saw-tri; +#X text 378 10 Triangular; +#X text 378 30 Sawtooth Triangular; +#X text 378 50 Sawtooth; +#N canvas 946 390 450 300 gen-saw 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 255 pack, f 9; +#X obj 51 277 outlet; +#X obj 51 194 - 1; +#X obj 51 112 / 1024; +#X obj 51 220 / 3; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 2 0; +#X restore 63 227 pd gen-saw; +#X text 378 69 Square; +#N canvas 687 263 450 300 gen-sqr 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 215 pack, f 9; +#X obj 51 237 outlet; +#X obj 51 54 moses 1024; +#X msg 51 76 2; +#X msg 108 76 0; +#X obj 51 142 - 1; +#X obj 51 193 / 5; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X connect 5 0 7 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 2 0; +#X restore 53 268 pd gen-sqr; +#X text 378 89 Wide Rectangular; +#X text 378 109 Narrow Rectangular; +#N canvas 687 263 450 300 gen-wrect 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 215 pack, f 9; +#X obj 51 237 outlet; +#X obj 51 54 moses 1536; +#X msg 51 76 2; +#X msg 108 76 0; +#X obj 51 171 - 1; +#X obj 51 193 / 5; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 4 1 6 0; +#X connect 5 0 7 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 2 0; +#X restore 43 309 pd gen-wrect; +#N canvas 687 263 450 300 gen-nrect 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 215 pack, f 9; +#X obj 51 237 outlet; +#X obj 51 54 moses 512; +#X obj 51 171 - 1; +#X msg 108 76 0; +#X msg 51 76 2; +#X obj 51 193 / 5; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 7 0; +#X connect 4 1 6 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 2 0; +#X restore 33 350 pd gen-nrect; +#X text 378 130 Reverse Sawtooth; +#N canvas 309 200 450 300 gen-rsaw 0; +#X obj 51 10 inlet; +#X obj 51 32 t f f, f 9; +#X obj 51 255 pack, f 9; +#X obj 51 277 outlet; +#X obj 51 54 / 1024; +#X obj 51 171 - 1; +#X obj 51 195 * -1; +#X obj 51 231 / 3; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 1 1 2 1; +#X connect 2 0 3 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 2 0; +#X restore 23 391 pd gen-rsaw; +#X obj 83 167 tabwrite wf-\$0-0; +#X obj 73 208 tabwrite wf-\$0-1; +#X obj 63 249 tabwrite wf-\$0-2; +#X obj 53 290 tabwrite wf-\$0-3; +#X obj 43 331 tabwrite wf-\$0-4; +#X obj 33 372 tabwrite wf-\$0-5; +#X obj 23 413 tabwrite wf-\$0-6; +#X obj 23 63 until; +#X obj 189 30 array define -k wf-\$0-1 2048; +#A 0 -1 -0.998045 -0.99609 -0.994135 -0.99218 -0.990225 -0.98827 -0.986315 +-0.98436 -0.982405 -0.98045 -0.978495 -0.97654 -0.974585 -0.97263 -0.970675 +-0.968719 -0.966764 -0.964809 -0.962854 -0.960899 -0.958944 -0.956989 +-0.955034 -0.953079 -0.951124 -0.949169 -0.947214 -0.945259 -0.943304 +-0.941349 -0.939394 -0.937439 -0.935484 -0.933529 -0.931574 -0.929619 +-0.927664 -0.925709 -0.923754 -0.921799 -0.919844 -0.917889 -0.915934 +-0.913979 -0.912023 -0.910068 -0.908113 -0.906158 -0.904203 -0.902248 +-0.900293 -0.898338 -0.896383 -0.894428 -0.892473 -0.890518 -0.888563 +-0.886608 -0.884653 -0.882698 -0.880743 -0.878788 -0.876833 -0.874878 +-0.872923 -0.870968 -0.869013 -0.867058 -0.865103 -0.863148 -0.861193 +-0.859238 -0.857283 -0.855327 -0.853372 -0.851417 -0.849462 -0.847507 +-0.845552 -0.843597 -0.841642 -0.839687 -0.837732 -0.835777 -0.833822 +-0.831867 -0.829912 -0.827957 -0.826002 -0.824047 -0.822092 -0.820137 +-0.818182 -0.816227 -0.814272 -0.812317 -0.810362 -0.808407 -0.806452 +-0.804497 -0.802542 -0.800587 -0.798631 -0.796676 -0.794721 -0.792766 +-0.790811 -0.788856 -0.786901 -0.784946 -0.782991 -0.781036 -0.779081 +-0.777126 -0.775171 -0.773216 -0.771261 -0.769306 -0.767351 -0.765396 +-0.763441 -0.761486 -0.759531 -0.757576 -0.755621 -0.753666 -0.751711 +-0.749756 -0.747801 -0.745846 -0.743891 -0.741935 -0.73998 -0.738025 +-0.73607 -0.734115 -0.73216 -0.730205 -0.72825 -0.726295 -0.72434 -0.722385 +-0.72043 -0.718475 -0.71652 -0.714565 -0.71261 -0.710655 -0.7087 -0.706745 +-0.70479 -0.702835 -0.70088 -0.698925 -0.69697 -0.695015 -0.69306 -0.691105 +-0.68915 -0.687195 -0.685239 -0.683284 -0.681329 -0.679374 -0.677419 +-0.675464 -0.673509 -0.671554 -0.669599 -0.667644 -0.665689 -0.663734 +-0.661779 -0.659824 -0.657869 -0.655914 -0.653959 -0.652004 -0.650049 +-0.648094 -0.646139 -0.644184 -0.642229 -0.640274 -0.638319 -0.636364 +-0.634409 -0.632454 -0.630499 -0.628543 -0.626588 -0.624633 -0.622678 +-0.620723 -0.618768 -0.616813 -0.614858 -0.612903 -0.610948 -0.608993 +-0.607038 -0.605083 -0.603128 -0.601173 -0.599218 -0.597263 -0.595308 +-0.593353 -0.591398 -0.589443 -0.587488 -0.585533 -0.583578 -0.581623 +-0.579668 -0.577713 -0.575758 -0.573803 -0.571847 -0.569892 -0.567937 +-0.565982 -0.564027 -0.562072 -0.560117 -0.558162 -0.556207 -0.554252 +-0.552297 -0.550342 -0.548387 -0.546432 -0.544477 -0.542522 -0.540567 +-0.538612 -0.536657 -0.534702 -0.532747 -0.530792 -0.528837 -0.526882 +-0.524927 -0.522972 -0.521017 -0.519062 -0.517107 -0.515152 -0.513196 +-0.511241 -0.509286 -0.507331 -0.505376 -0.503421 -0.501466 -0.499511 +-0.497556 -0.495601 -0.493646 -0.491691 -0.489736 -0.487781 -0.485826 +-0.483871 -0.481916 -0.479961 -0.478006 -0.476051 -0.474096 -0.472141 +-0.470186 -0.468231 -0.466276 -0.464321 -0.462366 -0.460411 -0.458456 +-0.4565 -0.454545 -0.45259 -0.450635 -0.44868 -0.446725 -0.44477 -0.442815 +-0.44086 -0.438905 -0.43695 -0.434995 -0.43304 -0.431085 -0.42913 -0.427175 +-0.42522 -0.423265 -0.42131 -0.419355 -0.4174 -0.415445 -0.41349 -0.411535 +-0.40958 -0.407625 -0.40567 -0.403715 -0.40176 -0.399804 -0.397849 +-0.395894 -0.393939 -0.391984 -0.390029 -0.388074 -0.386119 -0.384164 +-0.382209 -0.380254 -0.378299 -0.376344 -0.374389 -0.372434 -0.370479 +-0.368524 -0.366569 -0.364614 -0.362659 -0.360704 -0.358749 -0.356794 +-0.354839 -0.352884 -0.350929 -0.348974 -0.347019 -0.345064 -0.343108 +-0.341153 -0.339198 -0.337243 -0.335288 -0.333333 -0.331378 -0.329423 +-0.327468 -0.325513 -0.323558 -0.321603 -0.319648 -0.317693 -0.315738 +-0.313783 -0.311828 -0.309873 -0.307918 -0.305963 -0.304008 -0.302053 +-0.300098 -0.298143 -0.296188 -0.294233 -0.292278 -0.290323 -0.288368 +-0.286413 -0.284458 -0.282502 -0.280547 -0.278592 -0.276637 -0.274682 +-0.272727 -0.270772 -0.268817 -0.266862 -0.264907 -0.262952 -0.260997 +-0.259042 -0.257087 -0.255132 -0.253177 -0.251222 -0.249267 -0.247312 +-0.245357 -0.243402 -0.241447 -0.239492 -0.237537 -0.235582 -0.233627 +-0.231672 -0.229717 -0.227762 -0.225806 -0.223851 -0.221896 -0.219941 +-0.217986 -0.216031 -0.214076 -0.212121 -0.210166 -0.208211 -0.206256 +-0.204301 -0.202346 -0.200391 -0.198436 -0.196481 -0.194526 -0.192571 +-0.190616 -0.188661 -0.186706 -0.184751 -0.182796 -0.180841 -0.178886 +-0.176931 -0.174976 -0.173021 -0.171066 -0.16911 -0.167155 -0.1652 +-0.163245 -0.16129 -0.159335 -0.15738 -0.155425 -0.15347 -0.151515 +-0.14956 -0.147605 -0.14565 -0.143695 -0.14174 -0.139785 -0.13783 -0.135875 +-0.13392 -0.131965 -0.13001 -0.128055 -0.1261 -0.124145 -0.12219 -0.120235 +-0.11828 -0.116325 -0.11437 -0.112414 -0.110459 -0.108504 -0.106549 +-0.104594 -0.102639 -0.100684 -0.0987293 -0.0967742 -0.0948192 -0.0928641 +-0.0909091 -0.088954 -0.086999 -0.085044 -0.0830889 -0.0811339 -0.0791789 +-0.0772238 -0.0752688 -0.0733138 -0.0713587 -0.0694037 -0.0674487 -0.0654936 +-0.0635386 -0.0615836 -0.0596285 -0.0576735 -0.0557185 -0.0537634 -0.0518084 +-0.0498534 -0.0478984 -0.0459433 -0.0439883 -0.0420333 -0.0400782 -0.0381232 +-0.0361682 -0.0342131 -0.0322581 -0.030303 -0.028348 -0.0263929 -0.0244379 +-0.0224829 -0.0205278 -0.0185728 -0.0166178 -0.0146627 -0.0127077 -0.0107527 +-0.00879765 -0.00684261 -0.00488758 -0.00293255 -0.000977516 0.000977516 +0.00293255 0.00488758 0.00684261 0.00879765 0.0107527 0.0127077 0.0146627 +0.0166178 0.0185728 0.0205278 0.0224829 0.0244379 0.0263929 0.028348 +0.030303 0.032258 0.0342131 0.0361681 0.0381231 0.0400782 0.0420332 +0.0439882 0.0459433 0.0478983 0.0498533 0.0518084 0.0537634 0.0557184 +0.0576735 0.0596285 0.0615835 0.0635387 0.0654937 0.0674487 0.0694038 +0.0713588 0.0733138 0.0752689 0.0772239 0.0791789 0.081134 0.083089 +0.085044 0.0869991 0.0889541 0.0909091 0.0928642 0.0948192 0.0967742 +0.0987293 0.100684 0.102639 0.104594 0.106549 0.108504 0.110459 0.112414 +0.11437 0.116325 0.11828 0.120235 0.12219 0.124145 0.1261 0.128055 +0.13001 0.131965 0.13392 0.135875 0.13783 0.139785 0.14174 0.143695 +0.14565 0.147605 0.14956 0.151515 0.15347 0.155425 0.15738 0.159335 +0.16129 0.163245 0.1652 0.167155 0.16911 0.171065 0.17302 0.174976 +0.176931 0.178886 0.180841 0.182796 0.184751 0.186706 0.188661 0.190616 +0.192571 0.194526 0.196481 0.198436 0.200391 0.202346 0.204301 0.206256 +0.208211 0.210166 0.212121 0.214076 0.216031 0.217986 0.219941 0.221896 +0.223851 0.225806 0.227762 0.229717 0.231672 0.233627 0.235582 0.237537 +0.239492 0.241447 0.243402 0.245357 0.247312 0.249267 0.251222 0.253177 +0.255132 0.257087 0.259042 0.260997 0.262952 0.264907 0.266862 0.268817 +0.270772 0.272727 0.274682 0.276637 0.278592 0.280547 0.282502 0.284457 +0.286412 0.288368 0.290323 0.292278 0.294233 0.296188 0.298143 0.300098 +0.302053 0.304008 0.305963 0.307918 0.309873 0.311828 0.313783 0.315738 +0.317693 0.319648 0.321603 0.323558 0.325513 0.327468 0.329423 0.331378 +0.333333 0.335288 0.337243 0.339198 0.341154 0.343109 0.345064 0.347019 +0.348974 0.350929 0.352884 0.354839 0.356794 0.358749 0.360704 0.362659 +0.364614 0.366569 0.368524 0.370479 0.372434 0.374389 0.376344 0.378299 +0.380254 0.382209 0.384164 0.386119 0.388074 0.390029 0.391984 0.393939 +0.395894 0.397849 0.399804 0.40176 0.403715 0.40567 0.407625 0.40958 +0.411535 0.41349 0.415445 0.4174 0.419355 0.42131 0.423265 0.42522 +0.427175 0.42913 0.431085 0.43304 0.434995 0.43695 0.438905 0.44086 +0.442815 0.44477 0.446725 0.44868 0.450635 0.45259 0.454545 0.456501 +0.458456 0.460411 0.462366 0.464321 0.466276 0.468231 0.470186 0.472141 +0.474096 0.476051 0.478006 0.479961 0.481916 0.483871 0.485826 0.487781 +0.489736 0.491691 0.493646 0.495601 0.497556 0.499511 0.501466 0.503421 +0.505376 0.507331 0.509286 0.511241 0.513196 0.515152 0.517107 0.519062 +0.521017 0.522972 0.524927 0.526882 0.528837 0.530792 0.532747 0.534702 +0.536657 0.538612 0.540567 0.542522 0.544477 0.546432 0.548387 0.550342 +0.552297 0.554252 0.556207 0.558162 0.560117 0.562072 0.564027 0.565982 +0.567937 0.569893 0.571848 0.573803 0.575758 0.577713 0.579668 0.581623 +0.583578 0.585533 0.587488 0.589443 0.591398 0.593353 0.595308 0.597263 +0.599218 0.601173 0.603128 0.605083 0.607038 0.608993 0.610948 0.612903 +0.614858 0.616813 0.618768 0.620723 0.622678 0.624633 0.626588 0.628543 +0.630499 0.632454 0.634409 0.636364 0.638319 0.640274 0.642229 0.644184 +0.646139 0.648094 0.650049 0.652004 0.653959 0.655914 0.657869 0.659824 +0.661779 0.663734 0.665689 0.667644 0.669599 0.671554 0.673509 0.675464 +0.677419 0.679374 0.681329 0.683284 0.685239 0.687194 0.68915 0.691105 +0.69306 0.695015 0.69697 0.698925 0.70088 0.702835 0.70479 0.706745 +0.7087 0.710655 0.71261 0.714565 0.71652 0.718475 0.72043 0.722385 +0.72434 0.726295 0.72825 0.730205 0.73216 0.734115 0.73607 0.738025 +0.73998 0.741935 0.743891 0.745846 0.747801 0.749756 0.751711 0.753666 +0.755621 0.757576 0.759531 0.761486 0.763441 0.765396 0.767351 0.769306 +0.771261 0.773216 0.775171 0.777126 0.779081 0.781036 0.782991 0.784946 +0.786901 0.788856 0.790811 0.792766 0.794721 0.796676 0.798631 0.800586 +0.802541 0.804497 0.806452 0.808407 0.810362 0.812317 0.814272 0.816227 +0.818182 0.820137 0.822092 0.824047 0.826002 0.827957 0.829912 0.831867 +0.833822 0.835777 0.837732 0.839687 0.841642 0.843597 0.845552 0.847507 +0.849462 0.851417 0.853372 0.855327 0.857283 0.859238 0.861193 0.863148 +0.865103 0.867058 0.869013 0.870968 0.872923 0.874878 0.876833 0.878788 +0.880743 0.882698 0.884653 0.886608 0.888563 0.890518 0.892473 0.894428 +0.896383 0.898338 0.900293 0.902248 0.904203 0.906158 0.908113 0.910068 +0.912023 0.913978 0.915933 0.917889 0.919844 0.921799 0.923754 0.925709 +0.927664 0.929619 0.931574 0.933529 0.935484 0.937439 0.939394 0.941349 +0.943304 0.945259 0.947214 0.949169 0.951124 0.953079; +#A 1000 0.955034 0.956989 0.958944 0.960899 0.962854 0.964809 0.966764 +0.968719 0.970675 0.97263 0.974585 0.97654 0.978495 0.98045 0.982405 +0.98436 0.986315 0.98827 0.990225 0.99218 0.994135 0.99609 0.998045 +1 0 -0.000977516 -0.00195503 -0.00293255 -0.00391006 -0.00488758 -0.0058651 +-0.00684261 -0.00782013 -0.00879765 -0.00977516 -0.0107527 -0.0117302 +-0.0127077 -0.0136852 -0.0146627 -0.0156403 -0.0166178 -0.0175953 -0.0185728 +-0.0195503 -0.0205278 -0.0215054 -0.0224829 -0.0234604 -0.0244379 -0.0254154 +-0.0263929 -0.0273705 -0.028348 -0.0293255 -0.030303 -0.0312806 -0.0322581 +-0.0332356 -0.0342131 -0.0351906 -0.0361682 -0.0371457 -0.0381232 -0.0391007 +-0.0400782 -0.0410557 -0.0420333 -0.0430108 -0.0439883 -0.0449658 -0.0459433 +-0.0469208 -0.0478984 -0.0488759 -0.0498534 -0.0508309 -0.0518084 -0.0527859 +-0.0537634 -0.054741 -0.0557185 -0.056696 -0.0576735 -0.058651 -0.0596285 +-0.0606061 -0.0615836 -0.0625611 -0.0635386 -0.0645161 -0.0654936 -0.0664712 +-0.0674487 -0.0684262 -0.0694037 -0.0703812 -0.0713587 -0.0723363 -0.0733138 +-0.0742913 -0.0752688 -0.0762463 -0.0772238 -0.0782014 -0.0791789 -0.0801564 +-0.0811339 -0.0821114 -0.0830889 -0.0840665 -0.085044 -0.0860215 -0.086999 +-0.0879765 -0.088954 -0.0899315 -0.0909091 -0.0918866 -0.0928641 -0.0938417 +-0.0948192 -0.0957967 -0.0967742 -0.0977517 -0.0987293 -0.0997068 -0.100684 +-0.101662 -0.102639 -0.103617 -0.104594 -0.105572 -0.106549 -0.107527 +-0.108504 -0.109482 -0.110459 -0.111437 -0.112414 -0.113392 -0.11437 +-0.115347 -0.116325 -0.117302 -0.11828 -0.119257 -0.120235 -0.121212 +-0.12219 -0.123167 -0.124145 -0.125122 -0.1261 -0.127077 -0.128055 +-0.129032 -0.13001 -0.130987 -0.131965 -0.132942 -0.13392 -0.134897 +-0.135875 -0.136852 -0.13783 -0.138807 -0.139785 -0.140762 -0.14174 +-0.142717 -0.143695 -0.144673 -0.14565 -0.146628 -0.147605 -0.148583 +-0.14956 -0.150538 -0.151515 -0.152493 -0.15347 -0.154448 -0.155425 +-0.156403 -0.15738 -0.158358 -0.159335 -0.160313 -0.16129 -0.162268 +-0.163245 -0.164223 -0.1652 -0.166178 -0.167155 -0.168133 -0.16911 +-0.170088 -0.171066 -0.172043 -0.173021 -0.173998 -0.174976 -0.175953 +-0.176931 -0.177908 -0.178886 -0.179863 -0.180841 -0.181818 -0.182796 +-0.183773 -0.184751 -0.185728 -0.186706 -0.187683 -0.188661 -0.189638 +-0.190616 -0.191593 -0.192571 -0.193548 -0.194526 -0.195503 -0.196481 +-0.197458 -0.198436 -0.199413 -0.200391 -0.201369 -0.202346 -0.203324 +-0.204301 -0.205279 -0.206256 -0.207234 -0.208211 -0.209189 -0.210166 +-0.211144 -0.212121 -0.213099 -0.214076 -0.215054 -0.216031 -0.217009 +-0.217986 -0.218964 -0.219941 -0.220919 -0.221896 -0.222874 -0.223851 +-0.224829 -0.225806 -0.226784 -0.227762 -0.228739 -0.229717 -0.230694 +-0.231672 -0.232649 -0.233627 -0.234604 -0.235582 -0.236559 -0.237537 +-0.238514 -0.239492 -0.240469 -0.241447 -0.242424 -0.243402 -0.244379 +-0.245357 -0.246334 -0.247312 -0.248289 -0.249267 -0.250244 -0.251222 +-0.252199 -0.253177 -0.254154 -0.255132 -0.256109 -0.257087 -0.258065 +-0.259042 -0.26002 -0.260997 -0.261975 -0.262952 -0.26393 -0.264907 +-0.265885 -0.266862 -0.26784 -0.268817 -0.269795 -0.270772 -0.27175 +-0.272727 -0.273705 -0.274682 -0.27566 -0.276637 -0.277615 -0.278592 +-0.27957 -0.280547 -0.281525 -0.282502 -0.28348 -0.284458 -0.285435 +-0.286413 -0.28739 -0.288368 -0.289345 -0.290323 -0.2913 -0.292278 +-0.293255 -0.294233 -0.29521 -0.296188 -0.297165 -0.298143 -0.29912 +-0.300098 -0.301075 -0.302053 -0.30303 -0.304008 -0.304985 -0.305963 +-0.30694 -0.307918 -0.308895 -0.309873 -0.31085 -0.311828 -0.312805 +-0.313783 -0.314761 -0.315738 -0.316716 -0.317693 -0.318671 -0.319648 +-0.320626 -0.321603 -0.322581 -0.323558 -0.324536 -0.325513 -0.326491 +-0.327468 -0.328446 -0.329423 -0.330401 -0.331378 -0.332356 -0.333333 +-0.334311 -0.335288 -0.336266 -0.337243 -0.338221 -0.339198 -0.340176 +-0.341153 -0.342131 -0.343108 -0.344086 -0.345064 -0.346041 -0.347019 +-0.347996 -0.348974 -0.349951 -0.350929 -0.351906 -0.352884 -0.353861 +-0.354839 -0.355816 -0.356794 -0.357771 -0.358749 -0.359726 -0.360704 +-0.361681 -0.362659 -0.363636 -0.364614 -0.365591 -0.366569 -0.367546 +-0.368524 -0.369501 -0.370479 -0.371457 -0.372434 -0.373412 -0.374389 +-0.375367 -0.376344 -0.377322 -0.378299 -0.379277 -0.380254 -0.381232 +-0.382209 -0.383187 -0.384164 -0.385142 -0.386119 -0.387097 -0.388074 +-0.389052 -0.390029 -0.391007 -0.391984 -0.392962 -0.393939 -0.394917 +-0.395894 -0.396872 -0.397849 -0.398827 -0.399804 -0.400782 -0.40176 +-0.402737 -0.403715 -0.404692 -0.40567 -0.406647 -0.407625 -0.408602 +-0.40958 -0.410557 -0.411535 -0.412512 -0.41349 -0.414467 -0.415445 +-0.416422 -0.4174 -0.418377 -0.419355 -0.420332 -0.42131 -0.422287 +-0.423265 -0.424242 -0.42522 -0.426197 -0.427175 -0.428153 -0.42913 +-0.430108 -0.431085 -0.432063 -0.43304 -0.434018 -0.434995 -0.435973 +-0.43695 -0.437928 -0.438905 -0.439883 -0.44086 -0.441838 -0.442815 +-0.443793 -0.44477 -0.445748 -0.446725 -0.447703 -0.44868 -0.449658 +-0.450635 -0.451613 -0.45259 -0.453568 -0.454545 -0.455523 -0.4565 +-0.457478 -0.458456 -0.459433 -0.460411 -0.461388 -0.462366 -0.463343 +-0.464321 -0.465298 -0.466276 -0.467253 -0.468231 -0.469208 -0.470186 +-0.471163 -0.472141 -0.473118 -0.474096 -0.475073 -0.476051 -0.477028 +-0.478006 -0.478983 -0.479961 -0.480938 -0.481916 -0.482893 -0.483871 +-0.484848 -0.485826 -0.486804 -0.487781 -0.488759 -0.489736 -0.490714 +-0.491691 -0.492669 -0.493646 -0.494624 -0.495601 -0.496579 -0.497556 +-0.498534 -0.499511 -0.500489 -0.501466 -0.502444 -0.503421 -0.504399 +-0.505376 -0.506354 -0.507331 -0.508309 -0.509286 -0.510264 -0.511241 +-0.512219 -0.513196 -0.514174 -0.515152 -0.516129 -0.517107 -0.518084 +-0.519062 -0.520039 -0.521017 -0.521994 -0.522972 -0.523949 -0.524927 +-0.525904 -0.526882 -0.527859 -0.528837 -0.529814 -0.530792 -0.531769 +-0.532747 -0.533724 -0.534702 -0.535679 -0.536657 -0.537634 -0.538612 +-0.539589 -0.540567 -0.541544 -0.542522 -0.543499 -0.544477 -0.545455 +-0.546432 -0.54741 -0.548387 -0.549365 -0.550342 -0.55132 -0.552297 +-0.553275 -0.554252 -0.55523 -0.556207 -0.557185 -0.558162 -0.55914 +-0.560117 -0.561095 -0.562072 -0.56305 -0.564027 -0.565005 -0.565982 +-0.56696 -0.567937 -0.568915 -0.569892 -0.57087 -0.571847 -0.572825 +-0.573803 -0.57478 -0.575758 -0.576735 -0.577713 -0.57869 -0.579668 +-0.580645 -0.581623 -0.5826 -0.583578 -0.584555 -0.585533 -0.58651 +-0.587488 -0.588465 -0.589443 -0.59042 -0.591398 -0.592375 -0.593353 +-0.59433 -0.595308 -0.596285 -0.597263 -0.59824 -0.599218 -0.600196 +-0.601173 -0.602151 -0.603128 -0.604106 -0.605083 -0.606061 -0.607038 +-0.608016 -0.608993 -0.609971 -0.610948 -0.611926 -0.612903 -0.613881 +-0.614858 -0.615836 -0.616813 -0.617791 -0.618768 -0.619746 -0.620723 +-0.621701 -0.622678 -0.623656 -0.624633 -0.625611 -0.626588 -0.627566 +-0.628543 -0.629521 -0.630499 -0.631476 -0.632454 -0.633431 -0.634409 +-0.635386 -0.636364 -0.637341 -0.638319 -0.639296 -0.640274 -0.641251 +-0.642229 -0.643206 -0.644184 -0.645161 -0.646139 -0.647116 -0.648094 +-0.649071 -0.650049 -0.651026 -0.652004 -0.652981 -0.653959 -0.654936 +-0.655914 -0.656891 -0.657869 -0.658846 -0.659824 -0.660802 -0.661779 +-0.662757 -0.663734 -0.664712 -0.665689 -0.666667 -0.667644 -0.668622 +-0.669599 -0.670577 -0.671554 -0.672532 -0.673509 -0.674487 -0.675464 +-0.676442 -0.677419 -0.678397 -0.679374 -0.680352 -0.681329 -0.682307 +-0.683284 -0.684262 -0.685239 -0.686217 -0.687195 -0.688172 -0.68915 +-0.690127 -0.691105 -0.692082 -0.69306 -0.694037 -0.695015 -0.695992 +-0.69697 -0.697947 -0.698925 -0.699902 -0.70088 -0.701857 -0.702835 +-0.703812 -0.70479 -0.705767 -0.706745 -0.707722 -0.7087 -0.709677 +-0.710655 -0.711632 -0.71261 -0.713588 -0.714565 -0.715543 -0.71652 +-0.717498 -0.718475 -0.719453 -0.72043 -0.721408 -0.722385 -0.723363 +-0.72434 -0.725318 -0.726295 -0.727273 -0.72825 -0.729228 -0.730205 +-0.731183 -0.73216 -0.733138 -0.734115 -0.735093 -0.73607 -0.737048 +-0.738025 -0.739003 -0.73998 -0.740958 -0.741935 -0.742913 -0.743891 +-0.744868 -0.745846 -0.746823 -0.747801 -0.748778 -0.749756 -0.750733 +-0.751711 -0.752688 -0.753666 -0.754643 -0.755621 -0.756598 -0.757576 +-0.758553 -0.759531 -0.760508 -0.761486 -0.762463 -0.763441 -0.764418 +-0.765396 -0.766373 -0.767351 -0.768328 -0.769306 -0.770283 -0.771261 +-0.772238 -0.773216 -0.774194 -0.775171 -0.776149 -0.777126 -0.778104 +-0.779081 -0.780059 -0.781036 -0.782014 -0.782991 -0.783969 -0.784946 +-0.785924 -0.786901 -0.787879 -0.788856 -0.789834 -0.790811 -0.791789 +-0.792766 -0.793744 -0.794721 -0.795699 -0.796676 -0.797654 -0.798631 +-0.799609 -0.800587 -0.801564 -0.802542 -0.803519 -0.804497 -0.805474 +-0.806452 -0.807429 -0.808407 -0.809384 -0.810362 -0.811339 -0.812317 +-0.813294 -0.814272 -0.815249 -0.816227 -0.817204 -0.818182 -0.819159 +-0.820137 -0.821114 -0.822092 -0.823069 -0.824047 -0.825024 -0.826002 +-0.826979 -0.827957 -0.828934 -0.829912 -0.83089 -0.831867 -0.832845 +-0.833822 -0.8348 -0.835777 -0.836755 -0.837732 -0.83871 -0.839687 +-0.840665 -0.841642 -0.84262 -0.843597 -0.844575 -0.845552 -0.84653 +-0.847507 -0.848485 -0.849462 -0.85044 -0.851417 -0.852395 -0.853372 +-0.85435 -0.855327 -0.856305 -0.857283 -0.85826 -0.859238 -0.860215 +-0.861193 -0.86217 -0.863148 -0.864125 -0.865103 -0.86608 -0.867058 +-0.868035 -0.869013 -0.86999 -0.870968 -0.871945 -0.872923 -0.8739 +-0.874878 -0.875855 -0.876833 -0.87781 -0.878788 -0.879765 -0.880743 +-0.88172 -0.882698 -0.883675 -0.884653 -0.88563 -0.886608 -0.887586 +-0.888563 -0.889541 -0.890518 -0.891496 -0.892473 -0.893451 -0.894428 +-0.895406 -0.896383 -0.897361 -0.898338 -0.899316 -0.900293 -0.901271 +-0.902248 -0.903226 -0.904203 -0.905181 -0.906158 -0.907136 -0.908113 +-0.909091 -0.910068 -0.911046 -0.912023 -0.913001 -0.913979 -0.914956 +-0.915934 -0.916911 -0.917889 -0.918866 -0.919844 -0.920821 -0.921799 +-0.922776 -0.923754 -0.924731 -0.925709 -0.926686 -0.927664 -0.928641 +-0.929619 -0.930596 -0.931574 -0.932551 -0.933529 -0.934506 -0.935484 +-0.936461 -0.937439 -0.938416 -0.939394 -0.940371 -0.941349 -0.942326 +-0.943304 -0.944282 -0.945259 -0.946237 -0.947214 -0.948192 -0.949169 +-0.950147 -0.951124 -0.952102 -0.953079; +#A 2000 -0.954057 -0.955034 -0.956012 -0.956989 -0.957967 -0.958944 +-0.959922 -0.960899 -0.961877 -0.962854 -0.963832 -0.964809 -0.965787 +-0.966764 -0.967742 -0.968719 -0.969697 -0.970675 -0.971652 -0.97263 +-0.973607 -0.974585 -0.975562 -0.97654 -0.977517 -0.978495 -0.979472 +-0.98045 -0.981427 -0.982405 -0.983382 -0.98436 -0.985337 -0.986315 +-0.987292 -0.98827 -0.989247 -0.990225 -0.991202 -0.99218 -0.993157 +-0.994135 -0.995112 -0.99609 -0.997067 -0.998045 -0.999022 -1; +#X obj 189 10 array define -k wf-\$0-0 2048; +#A 0 -10 -9.98045 -9.9609 -9.94135 -9.9218 -9.90225 -9.8827 -9.86315 +-9.8436 -9.82405 -9.8045 -9.78495 -9.7654 -9.74585 -9.7263 -9.70675 +-9.68719 -9.66764 -9.64809 -9.62854 -9.60899 -9.58944 -9.56989 -9.55034 +-9.53079 -9.51124 -9.49169 -9.47214 -9.45259 -9.43304 -9.41349 -9.39394 +-9.37439 -9.35484 -9.33529 -9.31574 -9.29619 -9.27664 -9.25709 -9.23754 +-9.21799 -9.19844 -9.17889 -9.15934 -9.13978 -9.12023 -9.10068 -9.08113 +-9.06158 -9.04203 -9.02248 -9.00293 -8.98338 -8.96383 -8.94428 -8.92473 +-8.90518 -8.88563 -8.86608 -8.84653 -8.82698 -8.80743 -8.78788 -8.76833 +-8.74878 -8.72923 -8.70968 -8.69013 -8.67058 -8.65103 -8.63148 -8.61193 +-8.59238 -8.57283 -8.55328 -8.53372 -8.51417 -8.49462 -8.47507 -8.45552 +-8.43597 -8.41642 -8.39687 -8.37732 -8.35777 -8.33822 -8.31867 -8.29912 +-8.27957 -8.26002 -8.24047 -8.22092 -8.20137 -8.18182 -8.16227 -8.14272 +-8.12317 -8.10362 -8.08407 -8.06452 -8.04497 -8.02542 -8.00587 -7.98631 +-7.96676 -7.94721 -7.92766 -7.90811 -7.88856 -7.86901 -7.84946 -7.82991 +-7.81036 -7.79081 -7.77126 -7.75171 -7.73216 -7.71261 -7.69306 -7.67351 +-7.65396 -7.63441 -7.61486 -7.59531 -7.57576 -7.55621 -7.53666 -7.51711 +-7.49756 -7.47801 -7.45846 -7.43891 -7.41935 -7.3998 -7.38025 -7.3607 +-7.34115 -7.3216 -7.30205 -7.2825 -7.26295 -7.2434 -7.22385 -7.2043 +-7.18475 -7.1652 -7.14565 -7.1261 -7.10655 -7.087 -7.06745 -7.0479 +-7.02835 -7.0088 -6.98925 -6.9697 -6.95015 -6.9306 -6.91105 -6.8915 +-6.87195 -6.8524 -6.83284 -6.81329 -6.79374 -6.77419 -6.75464 -6.73509 +-6.71554 -6.69599 -6.67644 -6.65689 -6.63734 -6.61779 -6.59824 -6.57869 +-6.55914 -6.53959 -6.52004 -6.50049 -6.48094 -6.46139 -6.44184 -6.42229 +-6.40274 -6.38319 -6.36364 -6.34409 -6.32454 -6.30499 -6.28543 -6.26588 +-6.24633 -6.22678 -6.20723 -6.18768 -6.16813 -6.14858 -6.12903 -6.10948 +-6.08993 -6.07038 -6.05083 -6.03128 -6.01173 -5.99218 -5.97263 -5.95308 +-5.93353 -5.91398 -5.89443 -5.87488 -5.85533 -5.83578 -5.81623 -5.79668 +-5.77713 -5.75758 -5.73803 -5.71847 -5.69892 -5.67937 -5.65982 -5.64027 +-5.62072 -5.60117 -5.58162 -5.56207 -5.54252 -5.52297 -5.50342 -5.48387 +-5.46432 -5.44477 -5.42522 -5.40567 -5.38612 -5.36657 -5.34702 -5.32747 +-5.30792 -5.28837 -5.26882 -5.24927 -5.22972 -5.21017 -5.19062 -5.17107 +-5.15152 -5.13196 -5.11241 -5.09286 -5.07331 -5.05376 -5.03421 -5.01466 +-4.99511 -4.97556 -4.95601 -4.93646 -4.91691 -4.89736 -4.87781 -4.85826 +-4.83871 -4.81916 -4.79961 -4.78006 -4.76051 -4.74096 -4.72141 -4.70186 +-4.68231 -4.66276 -4.64321 -4.62366 -4.60411 -4.58456 -4.565 -4.54545 +-4.5259 -4.50635 -4.4868 -4.46725 -4.4477 -4.42815 -4.4086 -4.38905 +-4.3695 -4.34995 -4.3304 -4.31085 -4.2913 -4.27175 -4.2522 -4.23265 +-4.2131 -4.19355 -4.174 -4.15445 -4.1349 -4.11535 -4.0958 -4.07625 +-4.0567 -4.03715 -4.0176 -3.99804 -3.97849 -3.95894 -3.93939 -3.91984 +-3.90029 -3.88074 -3.86119 -3.84164 -3.82209 -3.80254 -3.78299 -3.76344 +-3.74389 -3.72434 -3.70479 -3.68524 -3.66569 -3.64614 -3.62659 -3.60704 +-3.58749 -3.56794 -3.54839 -3.52884 -3.50929 -3.48974 -3.47019 -3.45064 +-3.43108 -3.41153 -3.39198 -3.37243 -3.35288 -3.33333 -3.31378 -3.29423 +-3.27468 -3.25513 -3.23558 -3.21603 -3.19648 -3.17693 -3.15738 -3.13783 +-3.11828 -3.09873 -3.07918 -3.05963 -3.04008 -3.02053 -3.00098 -2.98143 +-2.96188 -2.94233 -2.92278 -2.90323 -2.88368 -2.86413 -2.84457 -2.82502 +-2.80547 -2.78592 -2.76637 -2.74682 -2.72727 -2.70772 -2.68817 -2.66862 +-2.64907 -2.62952 -2.60997 -2.59042 -2.57087 -2.55132 -2.53177 -2.51222 +-2.49267 -2.47312 -2.45357 -2.43402 -2.41447 -2.39492 -2.37537 -2.35582 +-2.33627 -2.31672 -2.29717 -2.27762 -2.25806 -2.23851 -2.21896 -2.19941 +-2.17986 -2.16031 -2.14076 -2.12121 -2.10166 -2.08211 -2.06256 -2.04301 +-2.02346 -2.00391 -1.98436 -1.96481 -1.94526 -1.92571 -1.90616 -1.88661 +-1.86706 -1.84751 -1.82796 -1.80841 -1.78886 -1.76931 -1.74976 -1.73021 +-1.71066 -1.6911 -1.67155 -1.652 -1.63245 -1.6129 -1.59335 -1.5738 +-1.55425 -1.5347 -1.51515 -1.4956 -1.47605 -1.4565 -1.43695 -1.4174 +-1.39785 -1.3783 -1.35875 -1.3392 -1.31965 -1.3001 -1.28055 -1.261 +-1.24145 -1.2219 -1.20235 -1.1828 -1.16325 -1.1437 -1.12414 -1.10459 +-1.08504 -1.06549 -1.04594 -1.02639 -1.00684 -0.987293 -0.967742 -0.948192 +-0.928641 -0.909091 -0.88954 -0.86999 -0.85044 -0.830889 -0.811339 +-0.791789 -0.772238 -0.752688 -0.733138 -0.713587 -0.694037 -0.674487 +-0.654936 -0.635386 -0.615836 -0.596285 -0.576735 -0.557185 -0.537634 +-0.518084 -0.498534 -0.478984 -0.459433 -0.439883 -0.420333 -0.400782 +-0.381232 -0.361682 -0.342131 -0.322581 -0.30303 -0.28348 -0.263929 +-0.244379 -0.224829 -0.205278 -0.185728 -0.166178 -0.146627 -0.127077 +-0.107527 -0.0879765 -0.0684261 -0.0488758 -0.0293255 -0.00977516 0.00977516 +0.0293255 0.0488758 0.0684261 0.0879765 0.107527 0.127077 0.146627 +0.166178 0.185728 0.205278 0.224829 0.244379 0.263929 0.28348 0.30303 +0.32258 0.342131 0.361681 0.381231 0.400782 0.420332 0.439882 0.459433 +0.478983 0.498533 0.518084 0.537634 0.557184 0.576735 0.596285 0.615835 +0.635387 0.654937 0.674487 0.694038 0.713588 0.733138 0.752689 0.772239 +0.791789 0.81134 0.83089 0.85044 0.869991 0.889541 0.909091 0.928642 +0.948192 0.967742 0.987293 1.00684 1.02639 1.04594 1.06549 1.08504 +1.10459 1.12414 1.1437 1.16325 1.1828 1.20235 1.2219 1.24145 1.261 +1.28055 1.3001 1.31965 1.3392 1.35875 1.3783 1.39785 1.4174 1.43695 +1.4565 1.47605 1.4956 1.51515 1.5347 1.55425 1.5738 1.59335 1.6129 +1.63245 1.652 1.67155 1.6911 1.71065 1.7302 1.74976 1.76931 1.78886 +1.80841 1.82796 1.84751 1.86706 1.88661 1.90616 1.92571 1.94526 1.96481 +1.98436 2.00391 2.02346 2.04301 2.06256 2.08211 2.10166 2.12121 2.14076 +2.16031 2.17986 2.19941 2.21896 2.23851 2.25806 2.27762 2.29717 2.31672 +2.33627 2.35582 2.37537 2.39492 2.41447 2.43402 2.45357 2.47312 2.49267 +2.51222 2.53177 2.55132 2.57087 2.59042 2.60997 2.62952 2.64907 2.66862 +2.68817 2.70772 2.72727 2.74682 2.76637 2.78592 2.80547 2.82502 2.84457 +2.86412 2.88368 2.90323 2.92278 2.94233 2.96188 2.98143 3.00098 3.02053 +3.04008 3.05963 3.07918 3.09873 3.11828 3.13783 3.15738 3.17693 3.19648 +3.21603 3.23558 3.25513 3.27468 3.29423 3.31378 3.33333 3.35288 3.37243 +3.39198 3.41154 3.43109 3.45064 3.47019 3.48974 3.50929 3.52884 3.54839 +3.56794 3.58749 3.60704 3.62659 3.64614 3.66569 3.68524 3.70479 3.72434 +3.74389 3.76344 3.78299 3.80254 3.82209 3.84164 3.86119 3.88074 3.90029 +3.91984 3.93939 3.95894 3.97849 3.99804 4.0176 4.03715 4.0567 4.07625 +4.0958 4.11535 4.1349 4.15445 4.174 4.19355 4.2131 4.23265 4.2522 4.27175 +4.2913 4.31085 4.3304 4.34995 4.3695 4.38905 4.4086 4.42815 4.4477 +4.46725 4.4868 4.50635 4.5259 4.54545 4.56501 4.58456 4.60411 4.62366 +4.64321 4.66276 4.68231 4.70186 4.72141 4.74096 4.76051 4.78006 4.79961 +4.81916 4.83871 4.85826 4.87781 4.89736 4.91691 4.93646 4.95601 4.97556 +4.99511 5.01466 5.03421 5.05376 5.07331 5.09286 5.11241 5.13196 5.15152 +5.17107 5.19062 5.21017 5.22972 5.24927 5.26882 5.28837 5.30792 5.32747 +5.34702 5.36657 5.38612 5.40567 5.42522 5.44477 5.46432 5.48387 5.50342 +5.52297 5.54252 5.56207 5.58162 5.60117 5.62072 5.64027 5.65982 5.67937 +5.69893 5.71848 5.73803 5.75758 5.77713 5.79668 5.81623 5.83578 5.85533 +5.87488 5.89443 5.91398 5.93353 5.95308 5.97263 5.99218 6.01173 6.03128 +6.05083 6.07038 6.08993 6.10948 6.12903 6.14858 6.16813 6.18768 6.20723 +6.22678 6.24633 6.26588 6.28543 6.30499 6.32454 6.34409 6.36364 6.38319 +6.40274 6.42229 6.44184 6.46139 6.48094 6.50049 6.52004 6.53959 6.55914 +6.57869 6.59824 6.61779 6.63734 6.65689 6.67644 6.69599 6.71554 6.73509 +6.75464 6.77419 6.79374 6.81329 6.83284 6.85239 6.87194 6.8915 6.91105 +6.9306 6.95015 6.9697 6.98925 7.0088 7.02835 7.0479 7.06745 7.087 7.10655 +7.1261 7.14565 7.1652 7.18475 7.2043 7.22385 7.2434 7.26295 7.2825 +7.30205 7.3216 7.34115 7.3607 7.38025 7.3998 7.41935 7.43891 7.45846 +7.47801 7.49756 7.51711 7.53666 7.55621 7.57576 7.59531 7.61486 7.63441 +7.65396 7.67351 7.69306 7.71261 7.73216 7.75171 7.77126 7.79081 7.81036 +7.82991 7.84946 7.86901 7.88856 7.90811 7.92766 7.94721 7.96676 7.98631 +8.00587 8.02542 8.04497 8.06452 8.08407 8.10362 8.12317 8.14272 8.16227 +8.18182 8.20137 8.22092 8.24047 8.26002 8.27957 8.29912 8.31867 8.33822 +8.35777 8.37732 8.39687 8.41642 8.43597 8.45552 8.47507 8.49462 8.51417 +8.53372 8.55328 8.57283 8.59238 8.61193 8.63148 8.65103 8.67058 8.69013 +8.70968 8.72923 8.74878 8.76833 8.78788 8.80743 8.82698 8.84653 8.86608 +8.88563 8.90518 8.92473 8.94428 8.96383 8.98338 9.00293 9.02248 9.04203 +9.06158 9.08113 9.10068 9.12023 9.13978 9.15934 9.17889 9.19844 9.21799 +9.23754 9.25709 9.27664 9.29619 9.31574 9.33529 9.35484 9.37439 9.39394 +9.41349 9.43304 9.45259 9.47214 9.49169 9.51124 9.53079; +#A 1000 9.55034 9.56989 9.58944 9.60899 9.62854 9.64809 9.66764 9.68719 +9.70675 9.7263 9.74585 9.7654 9.78495 9.8045 9.82405 9.8436 9.86315 +9.8827 9.90225 9.9218 9.94135 9.9609 9.98045 10 10 9.98045 9.9609 9.94135 +9.9218 9.90225 9.8827 9.86315 9.8436 9.82405 9.8045 9.78495 9.7654 +9.74585 9.7263 9.70675 9.68719 9.66764 9.64809 9.62854 9.60899 9.58944 +9.56989 9.55034 9.53079 9.51124 9.49169 9.47214 9.45259 9.43304 9.41349 +9.39394 9.37439 9.35484 9.33529 9.31574 9.29619 9.27664 9.25709 9.23754 +9.21799 9.19844 9.17889 9.15934 9.13978 9.12023 9.10068 9.08113 9.06158 +9.04203 9.02248 9.00293 8.98338 8.96383 8.94428 8.92473 8.90518 8.88563 +8.86608 8.84653 8.82698 8.80743 8.78788 8.76833 8.74878 8.72923 8.70968 +8.69013 8.67058 8.65103 8.63148 8.61193 8.59238 8.57283 8.55328 8.53372 +8.51417 8.49462 8.47507 8.45552 8.43597 8.41642 8.39687 8.37732 8.35777 +8.33822 8.31867 8.29912 8.27957 8.26002 8.24047 8.22092 8.20137 8.18182 +8.16227 8.14272 8.12317 8.10362 8.08407 8.06452 8.04497 8.02542 8.00587 +7.98631 7.96676 7.94721 7.92766 7.90811 7.88856 7.86901 7.84946 7.82991 +7.81036 7.79081 7.77126 7.75171 7.73216 7.71261 7.69306 7.67351 7.65396 +7.63441 7.61486 7.59531 7.57576 7.55621 7.53666 7.51711 7.49756 7.47801 +7.45846 7.43891 7.41935 7.3998 7.38025 7.3607 7.34115 7.3216 7.30205 +7.2825 7.26295 7.2434 7.22385 7.2043 7.18475 7.1652 7.14565 7.1261 +7.10655 7.087 7.06745 7.0479 7.02835 7.0088 6.98925 6.9697 6.95015 +6.9306 6.91105 6.8915 6.87194 6.85239 6.83284 6.81329 6.79374 6.77419 +6.75464 6.73509 6.71554 6.69599 6.67644 6.65689 6.63734 6.61779 6.59824 +6.57869 6.55914 6.53959 6.52004 6.50049 6.48094 6.46139 6.44184 6.42229 +6.40274 6.38319 6.36364 6.34409 6.32454 6.30499 6.28543 6.26588 6.24633 +6.22678 6.20723 6.18768 6.16813 6.14858 6.12903 6.10948 6.08993 6.07038 +6.05083 6.03128 6.01173 5.99218 5.97263 5.95308 5.93353 5.91398 5.89443 +5.87488 5.85533 5.83578 5.81623 5.79668 5.77713 5.75758 5.73803 5.71848 +5.69893 5.67937 5.65982 5.64027 5.62072 5.60117 5.58162 5.56207 5.54252 +5.52297 5.50342 5.48387 5.46432 5.44477 5.42522 5.40567 5.38612 5.36657 +5.34702 5.32747 5.30792 5.28837 5.26882 5.24927 5.22972 5.21017 5.19062 +5.17107 5.15152 5.13196 5.11241 5.09286 5.07331 5.05376 5.03421 5.01466 +4.99511 4.97556 4.95601 4.93646 4.91691 4.89736 4.87781 4.85826 4.83871 +4.81916 4.79961 4.78006 4.76051 4.74096 4.72141 4.70186 4.68231 4.66276 +4.64321 4.62366 4.60411 4.58456 4.56501 4.54545 4.5259 4.50635 4.4868 +4.46725 4.4477 4.42815 4.4086 4.38905 4.3695 4.34995 4.3304 4.31085 +4.2913 4.27175 4.2522 4.23265 4.2131 4.19355 4.174 4.15445 4.1349 4.11535 +4.0958 4.07625 4.0567 4.03715 4.0176 3.99804 3.97849 3.95894 3.93939 +3.91984 3.90029 3.88074 3.86119 3.84164 3.82209 3.80254 3.78299 3.76344 +3.74389 3.72434 3.70479 3.68524 3.66569 3.64614 3.62659 3.60704 3.58749 +3.56794 3.54839 3.52884 3.50929 3.48974 3.47019 3.45064 3.43109 3.41154 +3.39198 3.37243 3.35288 3.33333 3.31378 3.29423 3.27468 3.25513 3.23558 +3.21603 3.19648 3.17693 3.15738 3.13783 3.11828 3.09873 3.07918 3.05963 +3.04008 3.02053 3.00098 2.98143 2.96188 2.94233 2.92278 2.90323 2.88368 +2.86412 2.84457 2.82502 2.80547 2.78592 2.76637 2.74682 2.72727 2.70772 +2.68817 2.66862 2.64907 2.62952 2.60997 2.59042 2.57087 2.55132 2.53177 +2.51222 2.49267 2.47312 2.45357 2.43402 2.41447 2.39492 2.37537 2.35582 +2.33627 2.31672 2.29717 2.27762 2.25806 2.23851 2.21896 2.19941 2.17986 +2.16031 2.14076 2.12121 2.10166 2.08211 2.06256 2.04301 2.02346 2.00391 +1.98436 1.96481 1.94526 1.92571 1.90616 1.88661 1.86706 1.84751 1.82796 +1.80841 1.78886 1.76931 1.74976 1.7302 1.71065 1.6911 1.67155 1.652 +1.63245 1.6129 1.59335 1.5738 1.55425 1.5347 1.51515 1.4956 1.47605 +1.4565 1.43695 1.4174 1.39785 1.3783 1.35875 1.3392 1.31965 1.3001 +1.28055 1.261 1.24145 1.2219 1.20235 1.1828 1.16325 1.1437 1.12414 +1.10459 1.08504 1.06549 1.04594 1.02639 1.00684 0.987293 0.967742 0.948192 +0.928642 0.909091 0.889541 0.869991 0.85044 0.83089 0.81134 0.791789 +0.772239 0.752689 0.733138 0.713588 0.694038 0.674487 0.654937 0.635387 +0.615835 0.596285 0.576735 0.557184 0.537634 0.518084 0.498533 0.478983 +0.459433 0.439882 0.420332 0.400782 0.381231 0.361681 0.342131 0.32258 +0.30303 0.28348 0.263929 0.244379 0.224829 0.205278 0.185728 0.166178 +0.146627 0.127077 0.107527 0.0879765 0.0684261 0.0488758 0.0293255 +0.00977516 -0.00977516 -0.0293255 -0.0488758 -0.0684261 -0.0879765 +-0.107527 -0.127077 -0.146627 -0.166178 -0.185728 -0.205278 -0.224829 +-0.244379 -0.263929 -0.28348 -0.30303 -0.322581 -0.342131 -0.361682 +-0.381232 -0.400782 -0.420333 -0.439883 -0.459433 -0.478984 -0.498534 +-0.518084 -0.537634 -0.557185 -0.576735 -0.596285 -0.615836 -0.635386 +-0.654936 -0.674487 -0.694037 -0.713587 -0.733138 -0.752688 -0.772238 +-0.791789 -0.811339 -0.830889 -0.85044 -0.86999 -0.88954 -0.909091 +-0.928641 -0.948192 -0.967742 -0.987293 -1.00684 -1.02639 -1.04594 +-1.06549 -1.08504 -1.10459 -1.12414 -1.1437 -1.16325 -1.1828 -1.20235 +-1.2219 -1.24145 -1.261 -1.28055 -1.3001 -1.31965 -1.3392 -1.35875 +-1.3783 -1.39785 -1.4174 -1.43695 -1.4565 -1.47605 -1.4956 -1.51515 +-1.5347 -1.55425 -1.5738 -1.59335 -1.6129 -1.63245 -1.652 -1.67155 +-1.6911 -1.71066 -1.73021 -1.74976 -1.76931 -1.78886 -1.80841 -1.82796 +-1.84751 -1.86706 -1.88661 -1.90616 -1.92571 -1.94526 -1.96481 -1.98436 +-2.00391 -2.02346 -2.04301 -2.06256 -2.08211 -2.10166 -2.12121 -2.14076 +-2.16031 -2.17986 -2.19941 -2.21896 -2.23851 -2.25806 -2.27762 -2.29717 +-2.31672 -2.33627 -2.35582 -2.37537 -2.39492 -2.41447 -2.43402 -2.45357 +-2.47312 -2.49267 -2.51222 -2.53177 -2.55132 -2.57087 -2.59042 -2.60997 +-2.62952 -2.64907 -2.66862 -2.68817 -2.70772 -2.72727 -2.74682 -2.76637 +-2.78592 -2.80547 -2.82502 -2.84457 -2.86413 -2.88368 -2.90323 -2.92278 +-2.94233 -2.96188 -2.98143 -3.00098 -3.02053 -3.04008 -3.05963 -3.07918 +-3.09873 -3.11828 -3.13783 -3.15738 -3.17693 -3.19648 -3.21603 -3.23558 +-3.25513 -3.27468 -3.29423 -3.31378 -3.33333 -3.35288 -3.37243 -3.39198 +-3.41153 -3.43108 -3.45064 -3.47019 -3.48974 -3.50929 -3.52884 -3.54839 +-3.56794 -3.58749 -3.60704 -3.62659 -3.64614 -3.66569 -3.68524 -3.70479 +-3.72434 -3.74389 -3.76344 -3.78299 -3.80254 -3.82209 -3.84164 -3.86119 +-3.88074 -3.90029 -3.91984 -3.93939 -3.95894 -3.97849 -3.99804 -4.0176 +-4.03715 -4.0567 -4.07625 -4.0958 -4.11535 -4.1349 -4.15445 -4.174 +-4.19355 -4.2131 -4.23265 -4.2522 -4.27175 -4.2913 -4.31085 -4.3304 +-4.34995 -4.3695 -4.38905 -4.4086 -4.42815 -4.4477 -4.46725 -4.4868 +-4.50635 -4.5259 -4.54545 -4.565 -4.58456 -4.60411 -4.62366 -4.64321 +-4.66276 -4.68231 -4.70186 -4.72141 -4.74096 -4.76051 -4.78006 -4.79961 +-4.81916 -4.83871 -4.85826 -4.87781 -4.89736 -4.91691 -4.93646 -4.95601 +-4.97556 -4.99511 -5.01466 -5.03421 -5.05376 -5.07331 -5.09286 -5.11241 +-5.13196 -5.15152 -5.17107 -5.19062 -5.21017 -5.22972 -5.24927 -5.26882 +-5.28837 -5.30792 -5.32747 -5.34702 -5.36657 -5.38612 -5.40567 -5.42522 +-5.44477 -5.46432 -5.48387 -5.50342 -5.52297 -5.54252 -5.56207 -5.58162 +-5.60117 -5.62072 -5.64027 -5.65982 -5.67937 -5.69892 -5.71847 -5.73803 +-5.75758 -5.77713 -5.79668 -5.81623 -5.83578 -5.85533 -5.87488 -5.89443 +-5.91398 -5.93353 -5.95308 -5.97263 -5.99218 -6.01173 -6.03128 -6.05083 +-6.07038 -6.08993 -6.10948 -6.12903 -6.14858 -6.16813 -6.18768 -6.20723 +-6.22678 -6.24633 -6.26588 -6.28543 -6.30499 -6.32454 -6.34409 -6.36364 +-6.38319 -6.40274 -6.42229 -6.44184 -6.46139 -6.48094 -6.50049 -6.52004 +-6.53959 -6.55914 -6.57869 -6.59824 -6.61779 -6.63734 -6.65689 -6.67644 +-6.69599 -6.71554 -6.73509 -6.75464 -6.77419 -6.79374 -6.81329 -6.83284 +-6.8524 -6.87195 -6.8915 -6.91105 -6.9306 -6.95015 -6.9697 -6.98925 +-7.0088 -7.02835 -7.0479 -7.06745 -7.087 -7.10655 -7.1261 -7.14565 +-7.1652 -7.18475 -7.2043 -7.22385 -7.2434 -7.26295 -7.2825 -7.30205 +-7.3216 -7.34115 -7.3607 -7.38025 -7.3998 -7.41935 -7.43891 -7.45846 +-7.47801 -7.49756 -7.51711 -7.53666 -7.55621 -7.57576 -7.59531 -7.61486 +-7.63441 -7.65396 -7.67351 -7.69306 -7.71261 -7.73216 -7.75171 -7.77126 +-7.79081 -7.81036 -7.82991 -7.84946 -7.86901 -7.88856 -7.90811 -7.92766 +-7.94721 -7.96676 -7.98631 -8.00587 -8.02542 -8.04497 -8.06452 -8.08407 +-8.10362 -8.12317 -8.14272 -8.16227 -8.18182 -8.20137 -8.22092 -8.24047 +-8.26002 -8.27957 -8.29912 -8.31867 -8.33822 -8.35777 -8.37732 -8.39687 +-8.41642 -8.43597 -8.45552 -8.47507 -8.49462 -8.51417 -8.53372 -8.55328 +-8.57283 -8.59238 -8.61193 -8.63148 -8.65103 -8.67058 -8.69013 -8.70968 +-8.72923 -8.74878 -8.76833 -8.78788 -8.80743 -8.82698 -8.84653 -8.86608 +-8.88563 -8.90518 -8.92473 -8.94428 -8.96383 -8.98338 -9.00293 -9.02248 +-9.04203 -9.06158; +#A 2000 -9.08113 -9.10068 -9.12023 -9.13978 -9.15934 -9.17889 -9.19844 +-9.21799 -9.23754 -9.25709 -9.27664 -9.29619 -9.31574 -9.33529 -9.35484 +-9.37439 -9.39394 -9.41349 -9.43304 -9.45259 -9.47214 -9.49169 -9.51124 +-9.53079 -9.55034 -9.56989 -9.58944 -9.60899 -9.62854 -9.64809 -9.66764 +-9.68719 -9.70675 -9.7263 -9.74585 -9.7654 -9.78495 -9.8045 -9.82405 +-9.8436 -9.86315 -9.8827 -9.90225 -9.9218 -9.94135 -9.9609 -9.98045 +-10; +#X obj 189 50 array define -k wf-\$0-2 2048; +#A 0 -0.333333 -0.333008 -0.332682 -0.332357 -0.332031 -0.331706 -0.33138 +-0.331055 -0.330729 -0.330404 -0.330078 -0.329753 -0.329427 -0.329102 +-0.328776 -0.328451 -0.328125 -0.327799 -0.327474 -0.327148 -0.326823 +-0.326497 -0.326172 -0.325846 -0.325521 -0.325195 -0.32487 -0.324544 +-0.324219 -0.323893 -0.323568 -0.323242 -0.322917 -0.322591 -0.322266 +-0.32194 -0.321615 -0.321289 -0.320964 -0.320638 -0.320312 -0.319987 +-0.319661 -0.319336 -0.31901 -0.318685 -0.318359 -0.318034 -0.317708 +-0.317383 -0.317057 -0.316732 -0.316406 -0.316081 -0.315755 -0.31543 +-0.315104 -0.314779 -0.314453 -0.314128 -0.313802 -0.313477 -0.313151 +-0.312826 -0.3125 -0.312174 -0.311849 -0.311523 -0.311198 -0.310872 +-0.310547 -0.310221 -0.309896 -0.30957 -0.309245 -0.308919 -0.308594 +-0.308268 -0.307943 -0.307617 -0.307292 -0.306966 -0.306641 -0.306315 +-0.30599 -0.305664 -0.305339 -0.305013 -0.304688 -0.304362 -0.304036 +-0.303711 -0.303385 -0.30306 -0.302734 -0.302409 -0.302083 -0.301758 +-0.301432 -0.301107 -0.300781 -0.300456 -0.30013 -0.299805 -0.299479 +-0.299154 -0.298828 -0.298503 -0.298177 -0.297852 -0.297526 -0.297201 +-0.296875 -0.296549 -0.296224 -0.295898 -0.295573 -0.295247 -0.294922 +-0.294596 -0.294271 -0.293945 -0.29362 -0.293294 -0.292969 -0.292643 +-0.292318 -0.291992 -0.291667 -0.291341 -0.291016 -0.29069 -0.290365 +-0.290039 -0.289714 -0.289388 -0.289062 -0.288737 -0.288411 -0.288086 +-0.28776 -0.287435 -0.287109 -0.286784 -0.286458 -0.286133 -0.285807 +-0.285482 -0.285156 -0.284831 -0.284505 -0.28418 -0.283854 -0.283529 +-0.283203 -0.282878 -0.282552 -0.282227 -0.281901 -0.281576 -0.28125 +-0.280924 -0.280599 -0.280273 -0.279948 -0.279622 -0.279297 -0.278971 +-0.278646 -0.27832 -0.277995 -0.277669 -0.277344 -0.277018 -0.276693 +-0.276367 -0.276042 -0.275716 -0.275391 -0.275065 -0.27474 -0.274414 +-0.274089 -0.273763 -0.273438 -0.273112 -0.272786 -0.272461 -0.272135 +-0.27181 -0.271484 -0.271159 -0.270833 -0.270508 -0.270182 -0.269857 +-0.269531 -0.269206 -0.26888 -0.268555 -0.268229 -0.267904 -0.267578 +-0.267253 -0.266927 -0.266602 -0.266276 -0.265951 -0.265625 -0.265299 +-0.264974 -0.264648 -0.264323 -0.263997 -0.263672 -0.263346 -0.263021 +-0.262695 -0.26237 -0.262044 -0.261719 -0.261393 -0.261068 -0.260742 +-0.260417 -0.260091 -0.259766 -0.25944 -0.259115 -0.258789 -0.258464 +-0.258138 -0.257812 -0.257487 -0.257161 -0.256836 -0.25651 -0.256185 +-0.255859 -0.255534 -0.255208 -0.254883 -0.254557 -0.254232 -0.253906 +-0.253581 -0.253255 -0.25293 -0.252604 -0.252279 -0.251953 -0.251628 +-0.251302 -0.250977 -0.250651 -0.250326 -0.25 -0.249674 -0.249349 -0.249023 +-0.248698 -0.248372 -0.248047 -0.247721 -0.247396 -0.24707 -0.246745 +-0.246419 -0.246094 -0.245768 -0.245443 -0.245117 -0.244792 -0.244466 +-0.244141 -0.243815 -0.24349 -0.243164 -0.242839 -0.242513 -0.242188 +-0.241862 -0.241536 -0.241211 -0.240885 -0.24056 -0.240234 -0.239909 +-0.239583 -0.239258 -0.238932 -0.238607 -0.238281 -0.237956 -0.23763 +-0.237305 -0.236979 -0.236654 -0.236328 -0.236003 -0.235677 -0.235352 +-0.235026 -0.234701 -0.234375 -0.234049 -0.233724 -0.233398 -0.233073 +-0.232747 -0.232422 -0.232096 -0.231771 -0.231445 -0.23112 -0.230794 +-0.230469 -0.230143 -0.229818 -0.229492 -0.229167 -0.228841 -0.228516 +-0.22819 -0.227865 -0.227539 -0.227214 -0.226888 -0.226562 -0.226237 +-0.225911 -0.225586 -0.22526 -0.224935 -0.224609 -0.224284 -0.223958 +-0.223633 -0.223307 -0.222982 -0.222656 -0.222331 -0.222005 -0.22168 +-0.221354 -0.221029 -0.220703 -0.220378 -0.220052 -0.219727 -0.219401 +-0.219076 -0.21875 -0.218424 -0.218099 -0.217773 -0.217448 -0.217122 +-0.216797 -0.216471 -0.216146 -0.21582 -0.215495 -0.215169 -0.214844 +-0.214518 -0.214193 -0.213867 -0.213542 -0.213216 -0.212891 -0.212565 +-0.21224 -0.211914 -0.211589 -0.211263 -0.210938 -0.210612 -0.210286 +-0.209961 -0.209635 -0.20931 -0.208984 -0.208659 -0.208333 -0.208008 +-0.207682 -0.207357 -0.207031 -0.206706 -0.20638 -0.206055 -0.205729 +-0.205404 -0.205078 -0.204753 -0.204427 -0.204102 -0.203776 -0.203451 +-0.203125 -0.202799 -0.202474 -0.202148 -0.201823 -0.201497 -0.201172 +-0.200846 -0.200521 -0.200195 -0.19987 -0.199544 -0.199219 -0.198893 +-0.198568 -0.198242 -0.197917 -0.197591 -0.197266 -0.19694 -0.196615 +-0.196289 -0.195964 -0.195638 -0.195312 -0.194987 -0.194661 -0.194336 +-0.19401 -0.193685 -0.193359 -0.193034 -0.192708 -0.192383 -0.192057 +-0.191732 -0.191406 -0.191081 -0.190755 -0.19043 -0.190104 -0.189779 +-0.189453 -0.189128 -0.188802 -0.188477 -0.188151 -0.187826 -0.1875 +-0.187174 -0.186849 -0.186523 -0.186198 -0.185872 -0.185547 -0.185221 +-0.184896 -0.18457 -0.184245 -0.183919 -0.183594 -0.183268 -0.182943 +-0.182617 -0.182292 -0.181966 -0.181641 -0.181315 -0.18099 -0.180664 +-0.180339 -0.180013 -0.179688 -0.179362 -0.179036 -0.178711 -0.178385 +-0.17806 -0.177734 -0.177409 -0.177083 -0.176758 -0.176432 -0.176107 +-0.175781 -0.175456 -0.17513 -0.174805 -0.174479 -0.174154 -0.173828 +-0.173503 -0.173177 -0.172852 -0.172526 -0.172201 -0.171875 -0.171549 +-0.171224 -0.170898 -0.170573 -0.170247 -0.169922 -0.169596 -0.169271 +-0.168945 -0.16862 -0.168294 -0.167969 -0.167643 -0.167318 -0.166992 +-0.166667 -0.166341 -0.166016 -0.16569 -0.165365 -0.165039 -0.164714 +-0.164388 -0.164062 -0.163737 -0.163411 -0.163086 -0.16276 -0.162435 +-0.162109 -0.161784 -0.161458 -0.161133 -0.160807 -0.160482 -0.160156 +-0.159831 -0.159505 -0.15918 -0.158854 -0.158529 -0.158203 -0.157878 +-0.157552 -0.157227 -0.156901 -0.156576 -0.15625 -0.155924 -0.155599 +-0.155273 -0.154948 -0.154622 -0.154297 -0.153971 -0.153646 -0.15332 +-0.152995 -0.152669 -0.152344 -0.152018 -0.151693 -0.151367 -0.151042 +-0.150716 -0.150391 -0.150065 -0.14974 -0.149414 -0.149089 -0.148763 +-0.148438 -0.148112 -0.147786 -0.147461 -0.147135 -0.14681 -0.146484 +-0.146159 -0.145833 -0.145508 -0.145182 -0.144857 -0.144531 -0.144206 +-0.14388 -0.143555 -0.143229 -0.142904 -0.142578 -0.142253 -0.141927 +-0.141602 -0.141276 -0.140951 -0.140625 -0.140299 -0.139974 -0.139648 +-0.139323 -0.138997 -0.138672 -0.138346 -0.138021 -0.137695 -0.13737 +-0.137044 -0.136719 -0.136393 -0.136068 -0.135742 -0.135417 -0.135091 +-0.134766 -0.13444 -0.134115 -0.133789 -0.133464 -0.133138 -0.132812 +-0.132487 -0.132161 -0.131836 -0.13151 -0.131185 -0.130859 -0.130534 +-0.130208 -0.129883 -0.129557 -0.129232 -0.128906 -0.128581 -0.128255 +-0.12793 -0.127604 -0.127279 -0.126953 -0.126628 -0.126302 -0.125977 +-0.125651 -0.125326 -0.125 -0.124674 -0.124349 -0.124023 -0.123698 +-0.123372 -0.123047 -0.122721 -0.122396 -0.12207 -0.121745 -0.121419 +-0.121094 -0.120768 -0.120443 -0.120117 -0.119792 -0.119466 -0.119141 +-0.118815 -0.11849 -0.118164 -0.117839 -0.117513 -0.117188 -0.116862 +-0.116536 -0.116211 -0.115885 -0.11556 -0.115234 -0.114909 -0.114583 +-0.114258 -0.113932 -0.113607 -0.113281 -0.112956 -0.11263 -0.112305 +-0.111979 -0.111654 -0.111328 -0.111003 -0.110677 -0.110352 -0.110026 +-0.109701 -0.109375 -0.109049 -0.108724 -0.108398 -0.108073 -0.107747 +-0.107422 -0.107096 -0.106771 -0.106445 -0.10612 -0.105794 -0.105469 +-0.105143 -0.104818 -0.104492 -0.104167 -0.103841 -0.103516 -0.10319 +-0.102865 -0.102539 -0.102214 -0.101888 -0.101562 -0.101237 -0.100911 +-0.100586 -0.10026 -0.0999349 -0.0996094 -0.0992839 -0.0989583 -0.0986328 +-0.0983073 -0.0979818 -0.0976562 -0.0973307 -0.0970052 -0.0966797 -0.0963542 +-0.0960286 -0.0957031 -0.0953776 -0.0950521 -0.0947266 -0.094401 -0.0940755 +-0.09375 -0.0934245 -0.093099 -0.0927734 -0.0924479 -0.0921224 -0.0917969 +-0.0914714 -0.0911458 -0.0908203 -0.0904948 -0.0901693 -0.0898438 -0.0895182 +-0.0891927 -0.0888672 -0.0885417 -0.0882161 -0.0878906 -0.0875651 -0.0872396 +-0.0869141 -0.0865885 -0.086263 -0.0859375 -0.085612 -0.0852865 -0.0849609 +-0.0846354 -0.0843099 -0.0839844 -0.0836589 -0.0833333 -0.0830078 -0.0826823 +-0.0823568 -0.0820312 -0.0817057 -0.0813802 -0.0810547 -0.0807292 -0.0804036 +-0.0800781 -0.0797526 -0.0794271 -0.0791016 -0.078776 -0.0784505 -0.078125 +-0.0777995 -0.077474 -0.0771484 -0.0768229 -0.0764974 -0.0761719 -0.0758464 +-0.0755208 -0.0751953 -0.0748698 -0.0745443 -0.0742188 -0.0738932 -0.0735677 +-0.0732422 -0.0729167 -0.0725911 -0.0722656 -0.0719401 -0.0716146 -0.0712891 +-0.0709635 -0.070638 -0.0703125 -0.069987 -0.0696615 -0.0693359 -0.0690104 +-0.0686849 -0.0683594 -0.0680339 -0.0677083 -0.0673828 -0.0670573 -0.0667318 +-0.0664062 -0.0660807 -0.0657552 -0.0654297 -0.0651042 -0.0647786 -0.0644531 +-0.0641276 -0.0638021 -0.0634766 -0.063151 -0.0628255 -0.0625 -0.0621745 +-0.061849 -0.0615234 -0.0611979 -0.0608724 -0.0605469 -0.0602214 -0.0598958 +-0.0595703 -0.0592448 -0.0589193 -0.0585938 -0.0582682 -0.0579427 -0.0576172 +-0.0572917 -0.0569661 -0.0566406 -0.0563151 -0.0559896 -0.0556641 -0.0553385 +-0.055013 -0.0546875 -0.054362 -0.0540365 -0.0537109 -0.0533854 -0.0530599 +-0.0527344 -0.0524089 -0.0520833 -0.0517578 -0.0514323 -0.0511068 -0.0507812 +-0.0504557 -0.0501302 -0.0498047 -0.0494792 -0.0491536 -0.0488281 -0.0485026 +-0.0481771 -0.0478516 -0.047526 -0.0472005 -0.046875 -0.0465495 -0.046224 +-0.0458984 -0.0455729 -0.0452474 -0.0449219 -0.0445964 -0.0442708 -0.0439453 +-0.0436198 -0.0432943 -0.0429688 -0.0426432 -0.0423177 -0.0419922 -0.0416667 +-0.0413411 -0.0410156 -0.0406901 -0.0403646 -0.0400391 -0.0397135 -0.039388 +-0.0390625 -0.038737 -0.0384115 -0.0380859 -0.0377604 -0.0374349 -0.0371094 +-0.0367839 -0.0364583 -0.0361328 -0.0358073 -0.0354818 -0.0351562 -0.0348307 +-0.0345052 -0.0341797 -0.0338542 -0.0335286 -0.0332031 -0.0328776 -0.0325521 +-0.0322266 -0.031901 -0.0315755 -0.03125 -0.0309245 -0.030599 -0.0302734 +-0.0299479 -0.0296224 -0.0292969 -0.0289714 -0.0286458 -0.0283203 -0.0279948 +-0.0276693 -0.0273438 -0.0270182 -0.0266927 -0.0263672 -0.0260417 -0.0257161 +-0.0253906 -0.0250651 -0.0247396 -0.0244141 -0.0240885 -0.023763 -0.0234375 +-0.023112 -0.0227865 -0.0224609 -0.0221354 -0.0218099 -0.0214844 -0.0211589 +-0.0208333 -0.0205078 -0.0201823 -0.0198568 -0.0195312 -0.0192057 -0.0188802 +-0.0185547 -0.0182292 -0.0179036 -0.0175781 -0.0172526 -0.0169271 -0.0166016 +-0.016276 -0.0159505 -0.015625 -0.0152995 -0.014974 -0.0146484 -0.0143229 +-0.0139974 -0.0136719 -0.0133464 -0.0130208 -0.0126953 -0.0123698 -0.0120443 +-0.0117188 -0.0113932 -0.0110677 -0.0107422 -0.0104167 -0.0100911 -0.00976562 +-0.0094401 -0.00911458 -0.00878906 -0.00846354 -0.00813802; +#A 1000 -0.0078125 -0.00748698 -0.00716146 -0.00683594 -0.00651042 +-0.0061849 -0.00585938 -0.00553385 -0.00520833 -0.00488281 -0.00455729 +-0.00423177 -0.00390625 -0.00358073 -0.00325521 -0.00292969 -0.00260417 +-0.00227865 -0.00195312 -0.0016276 -0.00130208 -0.000976562 -0.000651042 +-0.000325521 0 0.000325521 0.000651042 0.000976562 0.00130208 0.0016276 +0.00195312 0.00227865 0.00260417 0.00292969 0.00325521 0.00358073 0.00390625 +0.00423177 0.00455729 0.00488281 0.00520833 0.00553385 0.00585938 0.0061849 +0.00651042 0.00683594 0.00716146 0.00748698 0.0078125 0.00813802 0.00846354 +0.00878906 0.00911458 0.0094401 0.00976562 0.0100911 0.0104167 0.0107422 +0.0110677 0.0113932 0.0117188 0.0120443 0.0123698 0.0126953 0.0130208 +0.0133464 0.0136719 0.0139974 0.0143229 0.0146484 0.014974 0.0152995 +0.015625 0.0159505 0.016276 0.0166016 0.0169271 0.0172526 0.0175781 +0.0179036 0.0182292 0.0185547 0.0188802 0.0192057 0.0195312 0.0198568 +0.0201823 0.0205078 0.0208333 0.0211589 0.0214844 0.0218099 0.0221354 +0.0224609 0.0227865 0.023112 0.0234375 0.023763 0.0240885 0.0244141 +0.0247396 0.0250651 0.0253906 0.0257161 0.0260417 0.0263672 0.0266927 +0.0270182 0.0273438 0.0276693 0.0279948 0.0283203 0.0286458 0.0289714 +0.0292969 0.0296224 0.0299479 0.0302734 0.030599 0.0309245 0.03125 +0.0315755 0.031901 0.0322266 0.0325521 0.0328776 0.0332031 0.0335286 +0.0338542 0.0341797 0.0345052 0.0348307 0.0351562 0.0354818 0.0358073 +0.0361328 0.0364583 0.0367839 0.0371094 0.0374349 0.0377604 0.0380859 +0.0384115 0.038737 0.0390625 0.039388 0.0397135 0.0400391 0.0403646 +0.0406901 0.0410156 0.0413411 0.0416667 0.0419922 0.0423177 0.0426432 +0.0429688 0.0432943 0.0436198 0.0439453 0.0442708 0.0445964 0.0449219 +0.0452474 0.0455729 0.0458984 0.046224 0.0465495 0.046875 0.0472005 +0.047526 0.0478516 0.0481771 0.0485026 0.0488281 0.0491536 0.0494792 +0.0498047 0.0501302 0.0504557 0.0507812 0.0511068 0.0514323 0.0517578 +0.0520833 0.0524089 0.0527344 0.0530599 0.0533854 0.0537109 0.0540365 +0.054362 0.0546875 0.055013 0.0553385 0.0556641 0.0559896 0.0563151 +0.0566406 0.0569661 0.0572917 0.0576172 0.0579427 0.0582682 0.0585938 +0.0589193 0.0592448 0.0595703 0.0598958 0.0602214 0.0605469 0.0608724 +0.0611979 0.0615234 0.061849 0.0621745 0.0625 0.0628255 0.063151 0.0634766 +0.0638021 0.0641276 0.0644531 0.0647786 0.0651042 0.0654297 0.0657552 +0.0660807 0.0664062 0.0667318 0.0670573 0.0673828 0.0677083 0.0680339 +0.0683594 0.0686849 0.0690104 0.0693359 0.0696615 0.069987 0.0703125 +0.070638 0.0709635 0.0712891 0.0716146 0.0719401 0.0722656 0.0725911 +0.0729167 0.0732422 0.0735677 0.0738932 0.0742188 0.0745443 0.0748698 +0.0751953 0.0755208 0.0758464 0.0761719 0.0764974 0.0768229 0.0771484 +0.077474 0.0777995 0.078125 0.0784505 0.078776 0.0791016 0.0794271 +0.0797526 0.0800781 0.0804036 0.0807292 0.0810547 0.0813802 0.0817057 +0.0820312 0.0823568 0.0826823 0.0830078 0.0833333 0.0836589 0.0839844 +0.0843099 0.0846354 0.0849609 0.0852865 0.085612 0.0859375 0.086263 +0.0865885 0.0869141 0.0872396 0.0875651 0.0878906 0.0882161 0.0885417 +0.0888672 0.0891927 0.0895182 0.0898438 0.0901693 0.0904948 0.0908203 +0.0911458 0.0914714 0.0917969 0.0921224 0.0924479 0.0927734 0.093099 +0.0934245 0.09375 0.0940755 0.094401 0.0947266 0.0950521 0.0953776 +0.0957031 0.0960286 0.0963542 0.0966797 0.0970052 0.0973307 0.0976562 +0.0979818 0.0983073 0.0986328 0.0989583 0.0992839 0.0996094 0.0999349 +0.10026 0.100586 0.100911 0.101237 0.101562 0.101888 0.102214 0.102539 +0.102865 0.10319 0.103516 0.103841 0.104167 0.104492 0.104818 0.105143 +0.105469 0.105794 0.10612 0.106445 0.106771 0.107096 0.107422 0.107747 +0.108073 0.108398 0.108724 0.109049 0.109375 0.109701 0.110026 0.110352 +0.110677 0.111003 0.111328 0.111654 0.111979 0.112305 0.11263 0.112956 +0.113281 0.113607 0.113932 0.114258 0.114583 0.114909 0.115234 0.11556 +0.115885 0.116211 0.116536 0.116862 0.117188 0.117513 0.117839 0.118164 +0.11849 0.118815 0.119141 0.119466 0.119792 0.120117 0.120443 0.120768 +0.121094 0.121419 0.121745 0.12207 0.122396 0.122721 0.123047 0.123372 +0.123698 0.124023 0.124349 0.124674 0.125 0.125326 0.125651 0.125977 +0.126302 0.126628 0.126953 0.127279 0.127604 0.12793 0.128255 0.128581 +0.128906 0.129232 0.129557 0.129883 0.130208 0.130534 0.130859 0.131185 +0.13151 0.131836 0.132161 0.132487 0.132812 0.133138 0.133464 0.133789 +0.134115 0.13444 0.134766 0.135091 0.135417 0.135742 0.136068 0.136393 +0.136719 0.137044 0.13737 0.137695 0.138021 0.138346 0.138672 0.138997 +0.139323 0.139648 0.139974 0.140299 0.140625 0.140951 0.141276 0.141602 +0.141927 0.142253 0.142578 0.142904 0.143229 0.143555 0.14388 0.144206 +0.144531 0.144857 0.145182 0.145508 0.145833 0.146159 0.146484 0.14681 +0.147135 0.147461 0.147786 0.148112 0.148438 0.148763 0.149089 0.149414 +0.14974 0.150065 0.150391 0.150716 0.151042 0.151367 0.151693 0.152018 +0.152344 0.152669 0.152995 0.15332 0.153646 0.153971 0.154297 0.154622 +0.154948 0.155273 0.155599 0.155924 0.15625 0.156576 0.156901 0.157227 +0.157552 0.157878 0.158203 0.158529 0.158854 0.15918 0.159505 0.159831 +0.160156 0.160482 0.160807 0.161133 0.161458 0.161784 0.162109 0.162435 +0.16276 0.163086 0.163411 0.163737 0.164062 0.164388 0.164714 0.165039 +0.165365 0.16569 0.166016 0.166341 0.166667 0.166992 0.167318 0.167643 +0.167969 0.168294 0.16862 0.168945 0.169271 0.169596 0.169922 0.170247 +0.170573 0.170898 0.171224 0.171549 0.171875 0.172201 0.172526 0.172852 +0.173177 0.173503 0.173828 0.174154 0.174479 0.174805 0.17513 0.175456 +0.175781 0.176107 0.176432 0.176758 0.177083 0.177409 0.177734 0.17806 +0.178385 0.178711 0.179036 0.179362 0.179688 0.180013 0.180339 0.180664 +0.18099 0.181315 0.181641 0.181966 0.182292 0.182617 0.182943 0.183268 +0.183594 0.183919 0.184245 0.18457 0.184896 0.185221 0.185547 0.185872 +0.186198 0.186523 0.186849 0.187174 0.1875 0.187826 0.188151 0.188477 +0.188802 0.189128 0.189453 0.189779 0.190104 0.19043 0.190755 0.191081 +0.191406 0.191732 0.192057 0.192383 0.192708 0.193034 0.193359 0.193685 +0.19401 0.194336 0.194661 0.194987 0.195312 0.195638 0.195964 0.196289 +0.196615 0.19694 0.197266 0.197591 0.197917 0.198242 0.198568 0.198893 +0.199219 0.199544 0.19987 0.200195 0.200521 0.200846 0.201172 0.201497 +0.201823 0.202148 0.202474 0.202799 0.203125 0.203451 0.203776 0.204102 +0.204427 0.204753 0.205078 0.205404 0.205729 0.206055 0.20638 0.206706 +0.207031 0.207357 0.207682 0.208008 0.208333 0.208659 0.208984 0.20931 +0.209635 0.209961 0.210286 0.210612 0.210938 0.211263 0.211589 0.211914 +0.21224 0.212565 0.212891 0.213216 0.213542 0.213867 0.214193 0.214518 +0.214844 0.215169 0.215495 0.21582 0.216146 0.216471 0.216797 0.217122 +0.217448 0.217773 0.218099 0.218424 0.21875 0.219076 0.219401 0.219727 +0.220052 0.220378 0.220703 0.221029 0.221354 0.22168 0.222005 0.222331 +0.222656 0.222982 0.223307 0.223633 0.223958 0.224284 0.224609 0.224935 +0.22526 0.225586 0.225911 0.226237 0.226562 0.226888 0.227214 0.227539 +0.227865 0.22819 0.228516 0.228841 0.229167 0.229492 0.229818 0.230143 +0.230469 0.230794 0.23112 0.231445 0.231771 0.232096 0.232422 0.232747 +0.233073 0.233398 0.233724 0.234049 0.234375 0.234701 0.235026 0.235352 +0.235677 0.236003 0.236328 0.236654 0.236979 0.237305 0.23763 0.237956 +0.238281 0.238607 0.238932 0.239258 0.239583 0.239909 0.240234 0.24056 +0.240885 0.241211 0.241536 0.241862 0.242188 0.242513 0.242839 0.243164 +0.24349 0.243815 0.244141 0.244466 0.244792 0.245117 0.245443 0.245768 +0.246094 0.246419 0.246745 0.24707 0.247396 0.247721 0.248047 0.248372 +0.248698 0.249023 0.249349 0.249674 0.25 0.250326 0.250651 0.250977 +0.251302 0.251628 0.251953 0.252279 0.252604 0.25293 0.253255 0.253581 +0.253906 0.254232 0.254557 0.254883 0.255208 0.255534 0.255859 0.256185 +0.25651 0.256836 0.257161 0.257487 0.257812 0.258138 0.258464 0.258789 +0.259115 0.25944 0.259766 0.260091 0.260417 0.260742 0.261068 0.261393 +0.261719 0.262044 0.26237 0.262695 0.263021 0.263346 0.263672 0.263997 +0.264323 0.264648 0.264974 0.265299 0.265625 0.265951 0.266276 0.266602 +0.266927 0.267253 0.267578 0.267904 0.268229 0.268555 0.26888 0.269206 +0.269531 0.269857 0.270182 0.270508 0.270833 0.271159 0.271484 0.27181 +0.272135 0.272461 0.272786 0.273112 0.273438 0.273763 0.274089 0.274414 +0.27474 0.275065 0.275391 0.275716 0.276042 0.276367 0.276693 0.277018 +0.277344 0.277669 0.277995 0.27832 0.278646 0.278971 0.279297 0.279622 +0.279948 0.280273 0.280599 0.280924 0.28125 0.281576 0.281901 0.282227 +0.282552 0.282878 0.283203 0.283529 0.283854 0.28418 0.284505 0.284831 +0.285156 0.285482 0.285807 0.286133 0.286458 0.286784 0.287109 0.287435 +0.28776 0.288086 0.288411 0.288737 0.289062 0.289388 0.289714 0.290039 +0.290365 0.29069 0.291016 0.291341 0.291667 0.291992 0.292318 0.292643 +0.292969 0.293294 0.29362 0.293945 0.294271 0.294596 0.294922 0.295247 +0.295573 0.295898 0.296224 0.296549 0.296875 0.297201 0.297526 0.297852 +0.298177 0.298503 0.298828 0.299154 0.299479 0.299805 0.30013 0.300456 +0.300781 0.301107 0.301432 0.301758 0.302083 0.302409 0.302734 0.30306 +0.303385 0.303711 0.304036 0.304362 0.304688 0.305013 0.305339 0.305664 +0.30599 0.306315 0.306641 0.306966 0.307292 0.307617 0.307943 0.308268 +0.308594 0.308919 0.309245 0.30957 0.309896 0.310221 0.310547 0.310872 +0.311198 0.311523 0.311849 0.312174 0.3125 0.312826 0.313151 0.313477 +0.313802 0.314128 0.314453 0.314779 0.315104 0.31543 0.315755 0.316081 +0.316406 0.316732 0.317057 0.317383; +#A 2000 0.317708 0.318034 0.318359 0.318685 0.31901 0.319336 0.319661 +0.319987 0.320312 0.320638 0.320964 0.321289 0.321615 0.32194 0.322266 +0.322591 0.322917 0.323242 0.323568 0.323893 0.324219 0.324544 0.32487 +0.325195 0.325521 0.325846 0.326172 0.326497 0.326823 0.327148 0.327474 +0.327799 0.328125 0.328451 0.328776 0.329102 0.329427 0.329753 0.330078 +0.330404 0.330729 0.331055 0.33138 0.331706 0.332031 0.332357 0.332682 +0.333008; +#X obj 189 70 array define -k wf-\$0-3 2048; +#A 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+-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2; +#A 2000 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 +-0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2 -0.2; +#X obj 189 131 array define -k wf-\$0-6 2048; +#A 0 0.333333 0.333008 0.332682 0.332357 0.332031 0.331706 0.33138 +0.331055 0.330729 0.330404 0.330078 0.329753 0.329427 0.329102 0.328776 +0.328451 0.328125 0.327799 0.327474 0.327148 0.326823 0.326497 0.326172 +0.325846 0.325521 0.325195 0.32487 0.324544 0.324219 0.323893 0.323568 +0.323242 0.322917 0.322591 0.322266 0.32194 0.321615 0.321289 0.320964 +0.320638 0.320312 0.319987 0.319661 0.319336 0.31901 0.318685 0.318359 +0.318034 0.317708 0.317383 0.317057 0.316732 0.316406 0.316081 0.315755 +0.31543 0.315104 0.314779 0.314453 0.314128 0.313802 0.313477 0.313151 +0.312826 0.3125 0.312174 0.311849 0.311523 0.311198 0.310872 0.310547 +0.310221 0.309896 0.30957 0.309245 0.308919 0.308594 0.308268 0.307943 +0.307617 0.307292 0.306966 0.306641 0.306315 0.30599 0.305664 0.305339 +0.305013 0.304688 0.304362 0.304036 0.303711 0.303385 0.30306 0.302734 +0.302409 0.302083 0.301758 0.301432 0.301107 0.300781 0.300456 0.30013 +0.299805 0.299479 0.299154 0.298828 0.298503 0.298177 0.297852 0.297526 +0.297201 0.296875 0.296549 0.296224 0.295898 0.295573 0.295247 0.294922 +0.294596 0.294271 0.293945 0.29362 0.293294 0.292969 0.292643 0.292318 +0.291992 0.291667 0.291341 0.291016 0.29069 0.290365 0.290039 0.289714 +0.289388 0.289062 0.288737 0.288411 0.288086 0.28776 0.287435 0.287109 +0.286784 0.286458 0.286133 0.285807 0.285482 0.285156 0.284831 0.284505 +0.28418 0.283854 0.283529 0.283203 0.282878 0.282552 0.282227 0.281901 +0.281576 0.28125 0.280924 0.280599 0.280273 0.279948 0.279622 0.279297 +0.278971 0.278646 0.27832 0.277995 0.277669 0.277344 0.277018 0.276693 +0.276367 0.276042 0.275716 0.275391 0.275065 0.27474 0.274414 0.274089 +0.273763 0.273438 0.273112 0.272786 0.272461 0.272135 0.27181 0.271484 +0.271159 0.270833 0.270508 0.270182 0.269857 0.269531 0.269206 0.26888 +0.268555 0.268229 0.267904 0.267578 0.267253 0.266927 0.266602 0.266276 +0.265951 0.265625 0.265299 0.264974 0.264648 0.264323 0.263997 0.263672 +0.263346 0.263021 0.262695 0.26237 0.262044 0.261719 0.261393 0.261068 +0.260742 0.260417 0.260091 0.259766 0.25944 0.259115 0.258789 0.258464 +0.258138 0.257812 0.257487 0.257161 0.256836 0.25651 0.256185 0.255859 +0.255534 0.255208 0.254883 0.254557 0.254232 0.253906 0.253581 0.253255 +0.25293 0.252604 0.252279 0.251953 0.251628 0.251302 0.250977 0.250651 +0.250326 0.25 0.249674 0.249349 0.249023 0.248698 0.248372 0.248047 +0.247721 0.247396 0.24707 0.246745 0.246419 0.246094 0.245768 0.245443 +0.245117 0.244792 0.244466 0.244141 0.243815 0.24349 0.243164 0.242839 +0.242513 0.242188 0.241862 0.241536 0.241211 0.240885 0.24056 0.240234 +0.239909 0.239583 0.239258 0.238932 0.238607 0.238281 0.237956 0.23763 +0.237305 0.236979 0.236654 0.236328 0.236003 0.235677 0.235352 0.235026 +0.234701 0.234375 0.234049 0.233724 0.233398 0.233073 0.232747 0.232422 +0.232096 0.231771 0.231445 0.23112 0.230794 0.230469 0.230143 0.229818 +0.229492 0.229167 0.228841 0.228516 0.22819 0.227865 0.227539 0.227214 +0.226888 0.226562 0.226237 0.225911 0.225586 0.22526 0.224935 0.224609 +0.224284 0.223958 0.223633 0.223307 0.222982 0.222656 0.222331 0.222005 +0.22168 0.221354 0.221029 0.220703 0.220378 0.220052 0.219727 0.219401 +0.219076 0.21875 0.218424 0.218099 0.217773 0.217448 0.217122 0.216797 +0.216471 0.216146 0.21582 0.215495 0.215169 0.214844 0.214518 0.214193 +0.213867 0.213542 0.213216 0.212891 0.212565 0.21224 0.211914 0.211589 +0.211263 0.210938 0.210612 0.210286 0.209961 0.209635 0.20931 0.208984 +0.208659 0.208333 0.208008 0.207682 0.207357 0.207031 0.206706 0.20638 +0.206055 0.205729 0.205404 0.205078 0.204753 0.204427 0.204102 0.203776 +0.203451 0.203125 0.202799 0.202474 0.202148 0.201823 0.201497 0.201172 +0.200846 0.200521 0.200195 0.19987 0.199544 0.199219 0.198893 0.198568 +0.198242 0.197917 0.197591 0.197266 0.19694 0.196615 0.196289 0.195964 +0.195638 0.195312 0.194987 0.194661 0.194336 0.19401 0.193685 0.193359 +0.193034 0.192708 0.192383 0.192057 0.191732 0.191406 0.191081 0.190755 +0.19043 0.190104 0.189779 0.189453 0.189128 0.188802 0.188477 0.188151 +0.187826 0.1875 0.187174 0.186849 0.186523 0.186198 0.185872 0.185547 +0.185221 0.184896 0.18457 0.184245 0.183919 0.183594 0.183268 0.182943 +0.182617 0.182292 0.181966 0.181641 0.181315 0.18099 0.180664 0.180339 +0.180013 0.179688 0.179362 0.179036 0.178711 0.178385 0.17806 0.177734 +0.177409 0.177083 0.176758 0.176432 0.176107 0.175781 0.175456 0.17513 +0.174805 0.174479 0.174154 0.173828 0.173503 0.173177 0.172852 0.172526 +0.172201 0.171875 0.171549 0.171224 0.170898 0.170573 0.170247 0.169922 +0.169596 0.169271 0.168945 0.16862 0.168294 0.167969 0.167643 0.167318 +0.166992 0.166667 0.166341 0.166016 0.16569 0.165365 0.165039 0.164714 +0.164388 0.164062 0.163737 0.163411 0.163086 0.16276 0.162435 0.162109 +0.161784 0.161458 0.161133 0.160807 0.160482 0.160156 0.159831 0.159505 +0.15918 0.158854 0.158529 0.158203 0.157878 0.157552 0.157227 0.156901 +0.156576 0.15625 0.155924 0.155599 0.155273 0.154948 0.154622 0.154297 +0.153971 0.153646 0.15332 0.152995 0.152669 0.152344 0.152018 0.151693 +0.151367 0.151042 0.150716 0.150391 0.150065 0.14974 0.149414 0.149089 +0.148763 0.148438 0.148112 0.147786 0.147461 0.147135 0.14681 0.146484 +0.146159 0.145833 0.145508 0.145182 0.144857 0.144531 0.144206 0.14388 +0.143555 0.143229 0.142904 0.142578 0.142253 0.141927 0.141602 0.141276 +0.140951 0.140625 0.140299 0.139974 0.139648 0.139323 0.138997 0.138672 +0.138346 0.138021 0.137695 0.13737 0.137044 0.136719 0.136393 0.136068 +0.135742 0.135417 0.135091 0.134766 0.13444 0.134115 0.133789 0.133464 +0.133138 0.132812 0.132487 0.132161 0.131836 0.13151 0.131185 0.130859 +0.130534 0.130208 0.129883 0.129557 0.129232 0.128906 0.128581 0.128255 +0.12793 0.127604 0.127279 0.126953 0.126628 0.126302 0.125977 0.125651 +0.125326 0.125 0.124674 0.124349 0.124023 0.123698 0.123372 0.123047 +0.122721 0.122396 0.12207 0.121745 0.121419 0.121094 0.120768 0.120443 +0.120117 0.119792 0.119466 0.119141 0.118815 0.11849 0.118164 0.117839 +0.117513 0.117188 0.116862 0.116536 0.116211 0.115885 0.11556 0.115234 +0.114909 0.114583 0.114258 0.113932 0.113607 0.113281 0.112956 0.11263 +0.112305 0.111979 0.111654 0.111328 0.111003 0.110677 0.110352 0.110026 +0.109701 0.109375 0.109049 0.108724 0.108398 0.108073 0.107747 0.107422 +0.107096 0.106771 0.106445 0.10612 0.105794 0.105469 0.105143 0.104818 +0.104492 0.104167 0.103841 0.103516 0.10319 0.102865 0.102539 0.102214 +0.101888 0.101562 0.101237 0.100911 0.100586 0.10026 0.0999349 0.0996094 +0.0992839 0.0989583 0.0986328 0.0983073 0.0979818 0.0976562 0.0973307 +0.0970052 0.0966797 0.0963542 0.0960286 0.0957031 0.0953776 0.0950521 +0.0947266 0.094401 0.0940755 0.09375 0.0934245 0.093099 0.0927734 0.0924479 +0.0921224 0.0917969 0.0914714 0.0911458 0.0908203 0.0904948 0.0901693 +0.0898438 0.0895182 0.0891927 0.0888672 0.0885417 0.0882161 0.0878906 +0.0875651 0.0872396 0.0869141 0.0865885 0.086263 0.0859375 0.085612 +0.0852865 0.0849609 0.0846354 0.0843099 0.0839844 0.0836589 0.0833333 +0.0830078 0.0826823 0.0823568 0.0820312 0.0817057 0.0813802 0.0810547 +0.0807292 0.0804036 0.0800781 0.0797526 0.0794271 0.0791016 0.078776 +0.0784505 0.078125 0.0777995 0.077474 0.0771484 0.0768229 0.0764974 +0.0761719 0.0758464 0.0755208 0.0751953 0.0748698 0.0745443 0.0742188 +0.0738932 0.0735677 0.0732422 0.0729167 0.0725911 0.0722656 0.0719401 +0.0716146 0.0712891 0.0709635 0.070638 0.0703125 0.069987 0.0696615 +0.0693359 0.0690104 0.0686849 0.0683594 0.0680339 0.0677083 0.0673828 +0.0670573 0.0667318 0.0664062 0.0660807 0.0657552 0.0654297 0.0651042 +0.0647786 0.0644531 0.0641276 0.0638021 0.0634766 0.063151 0.0628255 +0.0625 0.0621745 0.061849 0.0615234 0.0611979 0.0608724 0.0605469 0.0602214 +0.0598958 0.0595703 0.0592448 0.0589193 0.0585938 0.0582682 0.0579427 +0.0576172 0.0572917 0.0569661 0.0566406 0.0563151 0.0559896 0.0556641 +0.0553385 0.055013 0.0546875 0.054362 0.0540365 0.0537109 0.0533854 +0.0530599 0.0527344 0.0524089 0.0520833 0.0517578 0.0514323 0.0511068 +0.0507812 0.0504557 0.0501302 0.0498047 0.0494792 0.0491536 0.0488281 +0.0485026 0.0481771 0.0478516 0.047526 0.0472005 0.046875 0.0465495 +0.046224 0.0458984 0.0455729 0.0452474 0.0449219 0.0445964 0.0442708 +0.0439453 0.0436198 0.0432943 0.0429688 0.0426432 0.0423177 0.0419922 +0.0416667 0.0413411 0.0410156 0.0406901 0.0403646 0.0400391 0.0397135 +0.039388 0.0390625 0.038737 0.0384115 0.0380859 0.0377604 0.0374349 +0.0371094 0.0367839 0.0364583 0.0361328 0.0358073 0.0354818 0.0351562 +0.0348307 0.0345052 0.0341797 0.0338542 0.0335286 0.0332031 0.0328776 +0.0325521 0.0322266 0.031901 0.0315755 0.03125 0.0309245 0.030599 0.0302734 +0.0299479 0.0296224 0.0292969 0.0289714 0.0286458 0.0283203 0.0279948 +0.0276693 0.0273438 0.0270182 0.0266927 0.0263672 0.0260417 0.0257161 +0.0253906 0.0250651 0.0247396 0.0244141 0.0240885 0.023763 0.0234375 +0.023112 0.0227865 0.0224609 0.0221354 0.0218099 0.0214844 0.0211589 +0.0208333 0.0205078 0.0201823 0.0198568 0.0195312 0.0192057 0.0188802 +0.0185547 0.0182292 0.0179036 0.0175781 0.0172526 0.0169271 0.0166016 +0.016276 0.0159505 0.015625 0.0152995 0.014974 0.0146484 0.0143229 +0.0139974 0.0136719 0.0133464 0.0130208 0.0126953 0.0123698 0.0120443 +0.0117188 0.0113932 0.0110677 0.0107422 0.0104167 0.0100911 0.00976562 +0.0094401 0.00911458 0.00878906 0.00846354 0.00813802; +#A 1000 0.0078125 0.00748698 0.00716146 0.00683594 0.00651042 0.0061849 +0.00585938 0.00553385 0.00520833 0.00488281 0.00455729 0.00423177 0.00390625 +0.00358073 0.00325521 0.00292969 0.00260417 0.00227865 0.00195312 0.0016276 +0.00130208 0.000976562 0.000651042 0.000325521 -0 -0.000325521 -0.000651042 +-0.000976562 -0.00130208 -0.0016276 -0.00195312 -0.00227865 -0.00260417 +-0.00292969 -0.00325521 -0.00358073 -0.00390625 -0.00423177 -0.00455729 +-0.00488281 -0.00520833 -0.00553385 -0.00585938 -0.0061849 -0.00651042 +-0.00683594 -0.00716146 -0.00748698 -0.0078125 -0.00813802 -0.00846354 +-0.00878906 -0.00911458 -0.0094401 -0.00976562 -0.0100911 -0.0104167 +-0.0107422 -0.0110677 -0.0113932 -0.0117188 -0.0120443 -0.0123698 -0.0126953 +-0.0130208 -0.0133464 -0.0136719 -0.0139974 -0.0143229 -0.0146484 -0.014974 +-0.0152995 -0.015625 -0.0159505 -0.016276 -0.0166016 -0.0169271 -0.0172526 +-0.0175781 -0.0179036 -0.0182292 -0.0185547 -0.0188802 -0.0192057 -0.0195312 +-0.0198568 -0.0201823 -0.0205078 -0.0208333 -0.0211589 -0.0214844 -0.0218099 +-0.0221354 -0.0224609 -0.0227865 -0.023112 -0.0234375 -0.023763 -0.0240885 +-0.0244141 -0.0247396 -0.0250651 -0.0253906 -0.0257161 -0.0260417 -0.0263672 +-0.0266927 -0.0270182 -0.0273438 -0.0276693 -0.0279948 -0.0283203 -0.0286458 +-0.0289714 -0.0292969 -0.0296224 -0.0299479 -0.0302734 -0.030599 -0.0309245 +-0.03125 -0.0315755 -0.031901 -0.0322266 -0.0325521 -0.0328776 -0.0332031 +-0.0335286 -0.0338542 -0.0341797 -0.0345052 -0.0348307 -0.0351562 -0.0354818 +-0.0358073 -0.0361328 -0.0364583 -0.0367839 -0.0371094 -0.0374349 -0.0377604 +-0.0380859 -0.0384115 -0.038737 -0.0390625 -0.039388 -0.0397135 -0.0400391 +-0.0403646 -0.0406901 -0.0410156 -0.0413411 -0.0416667 -0.0419922 -0.0423177 +-0.0426432 -0.0429688 -0.0432943 -0.0436198 -0.0439453 -0.0442708 -0.0445964 +-0.0449219 -0.0452474 -0.0455729 -0.0458984 -0.046224 -0.0465495 -0.046875 +-0.0472005 -0.047526 -0.0478516 -0.0481771 -0.0485026 -0.0488281 -0.0491536 +-0.0494792 -0.0498047 -0.0501302 -0.0504557 -0.0507812 -0.0511068 -0.0514323 +-0.0517578 -0.0520833 -0.0524089 -0.0527344 -0.0530599 -0.0533854 -0.0537109 +-0.0540365 -0.054362 -0.0546875 -0.055013 -0.0553385 -0.0556641 -0.0559896 +-0.0563151 -0.0566406 -0.0569661 -0.0572917 -0.0576172 -0.0579427 -0.0582682 +-0.0585938 -0.0589193 -0.0592448 -0.0595703 -0.0598958 -0.0602214 -0.0605469 +-0.0608724 -0.0611979 -0.0615234 -0.061849 -0.0621745 -0.0625 -0.0628255 +-0.063151 -0.0634766 -0.0638021 -0.0641276 -0.0644531 -0.0647786 -0.0651042 +-0.0654297 -0.0657552 -0.0660807 -0.0664062 -0.0667318 -0.0670573 -0.0673828 +-0.0677083 -0.0680339 -0.0683594 -0.0686849 -0.0690104 -0.0693359 -0.0696615 +-0.069987 -0.0703125 -0.070638 -0.0709635 -0.0712891 -0.0716146 -0.0719401 +-0.0722656 -0.0725911 -0.0729167 -0.0732422 -0.0735677 -0.0738932 -0.0742188 +-0.0745443 -0.0748698 -0.0751953 -0.0755208 -0.0758464 -0.0761719 -0.0764974 +-0.0768229 -0.0771484 -0.077474 -0.0777995 -0.078125 -0.0784505 -0.078776 +-0.0791016 -0.0794271 -0.0797526 -0.0800781 -0.0804036 -0.0807292 -0.0810547 +-0.0813802 -0.0817057 -0.0820312 -0.0823568 -0.0826823 -0.0830078 -0.0833333 +-0.0836589 -0.0839844 -0.0843099 -0.0846354 -0.0849609 -0.0852865 -0.085612 +-0.0859375 -0.086263 -0.0865885 -0.0869141 -0.0872396 -0.0875651 -0.0878906 +-0.0882161 -0.0885417 -0.0888672 -0.0891927 -0.0895182 -0.0898438 -0.0901693 +-0.0904948 -0.0908203 -0.0911458 -0.0914714 -0.0917969 -0.0921224 -0.0924479 +-0.0927734 -0.093099 -0.0934245 -0.09375 -0.0940755 -0.094401 -0.0947266 +-0.0950521 -0.0953776 -0.0957031 -0.0960286 -0.0963542 -0.0966797 -0.0970052 +-0.0973307 -0.0976562 -0.0979818 -0.0983073 -0.0986328 -0.0989583 -0.0992839 +-0.0996094 -0.0999349 -0.10026 -0.100586 -0.100911 -0.101237 -0.101562 +-0.101888 -0.102214 -0.102539 -0.102865 -0.10319 -0.103516 -0.103841 +-0.104167 -0.104492 -0.104818 -0.105143 -0.105469 -0.105794 -0.10612 +-0.106445 -0.106771 -0.107096 -0.107422 -0.107747 -0.108073 -0.108398 +-0.108724 -0.109049 -0.109375 -0.109701 -0.110026 -0.110352 -0.110677 +-0.111003 -0.111328 -0.111654 -0.111979 -0.112305 -0.11263 -0.112956 +-0.113281 -0.113607 -0.113932 -0.114258 -0.114583 -0.114909 -0.115234 +-0.11556 -0.115885 -0.116211 -0.116536 -0.116862 -0.117188 -0.117513 +-0.117839 -0.118164 -0.11849 -0.118815 -0.119141 -0.119466 -0.119792 +-0.120117 -0.120443 -0.120768 -0.121094 -0.121419 -0.121745 -0.12207 +-0.122396 -0.122721 -0.123047 -0.123372 -0.123698 -0.124023 -0.124349 +-0.124674 -0.125 -0.125326 -0.125651 -0.125977 -0.126302 -0.126628 +-0.126953 -0.127279 -0.127604 -0.12793 -0.128255 -0.128581 -0.128906 +-0.129232 -0.129557 -0.129883 -0.130208 -0.130534 -0.130859 -0.131185 +-0.13151 -0.131836 -0.132161 -0.132487 -0.132812 -0.133138 -0.133464 +-0.133789 -0.134115 -0.13444 -0.134766 -0.135091 -0.135417 -0.135742 +-0.136068 -0.136393 -0.136719 -0.137044 -0.13737 -0.137695 -0.138021 +-0.138346 -0.138672 -0.138997 -0.139323 -0.139648 -0.139974 -0.140299 +-0.140625 -0.140951 -0.141276 -0.141602 -0.141927 -0.142253 -0.142578 +-0.142904 -0.143229 -0.143555 -0.14388 -0.144206 -0.144531 -0.144857 +-0.145182 -0.145508 -0.145833 -0.146159 -0.146484 -0.14681 -0.147135 +-0.147461 -0.147786 -0.148112 -0.148438 -0.148763 -0.149089 -0.149414 +-0.14974 -0.150065 -0.150391 -0.150716 -0.151042 -0.151367 -0.151693 +-0.152018 -0.152344 -0.152669 -0.152995 -0.15332 -0.153646 -0.153971 +-0.154297 -0.154622 -0.154948 -0.155273 -0.155599 -0.155924 -0.15625 +-0.156576 -0.156901 -0.157227 -0.157552 -0.157878 -0.158203 -0.158529 +-0.158854 -0.15918 -0.159505 -0.159831 -0.160156 -0.160482 -0.160807 +-0.161133 -0.161458 -0.161784 -0.162109 -0.162435 -0.16276 -0.163086 +-0.163411 -0.163737 -0.164062 -0.164388 -0.164714 -0.165039 -0.165365 +-0.16569 -0.166016 -0.166341 -0.166667 -0.166992 -0.167318 -0.167643 +-0.167969 -0.168294 -0.16862 -0.168945 -0.169271 -0.169596 -0.169922 +-0.170247 -0.170573 -0.170898 -0.171224 -0.171549 -0.171875 -0.172201 +-0.172526 -0.172852 -0.173177 -0.173503 -0.173828 -0.174154 -0.174479 +-0.174805 -0.17513 -0.175456 -0.175781 -0.176107 -0.176432 -0.176758 +-0.177083 -0.177409 -0.177734 -0.17806 -0.178385 -0.178711 -0.179036 +-0.179362 -0.179688 -0.180013 -0.180339 -0.180664 -0.18099 -0.181315 +-0.181641 -0.181966 -0.182292 -0.182617 -0.182943 -0.183268 -0.183594 +-0.183919 -0.184245 -0.18457 -0.184896 -0.185221 -0.185547 -0.185872 +-0.186198 -0.186523 -0.186849 -0.187174 -0.1875 -0.187826 -0.188151 +-0.188477 -0.188802 -0.189128 -0.189453 -0.189779 -0.190104 -0.19043 +-0.190755 -0.191081 -0.191406 -0.191732 -0.192057 -0.192383 -0.192708 +-0.193034 -0.193359 -0.193685 -0.19401 -0.194336 -0.194661 -0.194987 +-0.195312 -0.195638 -0.195964 -0.196289 -0.196615 -0.19694 -0.197266 +-0.197591 -0.197917 -0.198242 -0.198568 -0.198893 -0.199219 -0.199544 +-0.19987 -0.200195 -0.200521 -0.200846 -0.201172 -0.201497 -0.201823 +-0.202148 -0.202474 -0.202799 -0.203125 -0.203451 -0.203776 -0.204102 +-0.204427 -0.204753 -0.205078 -0.205404 -0.205729 -0.206055 -0.20638 +-0.206706 -0.207031 -0.207357 -0.207682 -0.208008 -0.208333 -0.208659 +-0.208984 -0.20931 -0.209635 -0.209961 -0.210286 -0.210612 -0.210938 +-0.211263 -0.211589 -0.211914 -0.21224 -0.212565 -0.212891 -0.213216 +-0.213542 -0.213867 -0.214193 -0.214518 -0.214844 -0.215169 -0.215495 +-0.21582 -0.216146 -0.216471 -0.216797 -0.217122 -0.217448 -0.217773 +-0.218099 -0.218424 -0.21875 -0.219076 -0.219401 -0.219727 -0.220052 +-0.220378 -0.220703 -0.221029 -0.221354 -0.22168 -0.222005 -0.222331 +-0.222656 -0.222982 -0.223307 -0.223633 -0.223958 -0.224284 -0.224609 +-0.224935 -0.22526 -0.225586 -0.225911 -0.226237 -0.226562 -0.226888 +-0.227214 -0.227539 -0.227865 -0.22819 -0.228516 -0.228841 -0.229167 +-0.229492 -0.229818 -0.230143 -0.230469 -0.230794 -0.23112 -0.231445 +-0.231771 -0.232096 -0.232422 -0.232747 -0.233073 -0.233398 -0.233724 +-0.234049 -0.234375 -0.234701 -0.235026 -0.235352 -0.235677 -0.236003 +-0.236328 -0.236654 -0.236979 -0.237305 -0.23763 -0.237956 -0.238281 +-0.238607 -0.238932 -0.239258 -0.239583 -0.239909 -0.240234 -0.24056 +-0.240885 -0.241211 -0.241536 -0.241862 -0.242188 -0.242513 -0.242839 +-0.243164 -0.24349 -0.243815 -0.244141 -0.244466 -0.244792 -0.245117 +-0.245443 -0.245768 -0.246094 -0.246419 -0.246745 -0.24707 -0.247396 +-0.247721 -0.248047 -0.248372 -0.248698 -0.249023 -0.249349 -0.249674 +-0.25 -0.250326 -0.250651 -0.250977 -0.251302 -0.251628 -0.251953 -0.252279 +-0.252604 -0.25293 -0.253255 -0.253581 -0.253906 -0.254232 -0.254557 +-0.254883 -0.255208 -0.255534 -0.255859 -0.256185 -0.25651 -0.256836 +-0.257161 -0.257487 -0.257812 -0.258138 -0.258464 -0.258789 -0.259115 +-0.25944 -0.259766 -0.260091 -0.260417 -0.260742 -0.261068 -0.261393 +-0.261719 -0.262044 -0.26237 -0.262695 -0.263021 -0.263346 -0.263672 +-0.263997 -0.264323 -0.264648 -0.264974 -0.265299 -0.265625 -0.265951 +-0.266276 -0.266602 -0.266927 -0.267253 -0.267578 -0.267904 -0.268229 +-0.268555 -0.26888 -0.269206 -0.269531 -0.269857 -0.270182 -0.270508 +-0.270833 -0.271159 -0.271484 -0.27181 -0.272135 -0.272461 -0.272786 +-0.273112 -0.273438 -0.273763 -0.274089 -0.274414 -0.27474 -0.275065 +-0.275391 -0.275716 -0.276042 -0.276367 -0.276693 -0.277018 -0.277344 +-0.277669 -0.277995 -0.27832 -0.278646 -0.278971 -0.279297 -0.279622 +-0.279948 -0.280273 -0.280599 -0.280924 -0.28125 -0.281576 -0.281901 +-0.282227 -0.282552 -0.282878 -0.283203 -0.283529 -0.283854 -0.28418 +-0.284505 -0.284831 -0.285156 -0.285482 -0.285807 -0.286133 -0.286458 +-0.286784 -0.287109 -0.287435 -0.28776 -0.288086 -0.288411 -0.288737 +-0.289062 -0.289388 -0.289714 -0.290039 -0.290365 -0.29069 -0.291016 +-0.291341 -0.291667 -0.291992 -0.292318 -0.292643 -0.292969 -0.293294 +-0.29362 -0.293945 -0.294271 -0.294596 -0.294922 -0.295247 -0.295573 +-0.295898 -0.296224 -0.296549 -0.296875 -0.297201 -0.297526 -0.297852 +-0.298177 -0.298503 -0.298828 -0.299154 -0.299479 -0.299805 -0.30013 +-0.300456 -0.300781 -0.301107 -0.301432 -0.301758 -0.302083 -0.302409 +-0.302734 -0.30306 -0.303385 -0.303711 -0.304036 -0.304362 -0.304688 +-0.305013 -0.305339 -0.305664 -0.30599 -0.306315 -0.306641 -0.306966 +-0.307292 -0.307617 -0.307943 -0.308268 -0.308594 -0.308919 -0.309245 +-0.30957 -0.309896 -0.310221 -0.310547 -0.310872 -0.311198 -0.311523 +-0.311849 -0.312174 -0.3125 -0.312826 -0.313151 -0.313477 -0.313802 +-0.314128 -0.314453 -0.314779 -0.315104 -0.31543 -0.315755 -0.316081 +-0.316406 -0.316732 -0.317057 -0.317383; +#A 2000 -0.317708 -0.318034 -0.318359 -0.318685 -0.31901 -0.319336 +-0.319661 -0.319987 -0.320312 -0.320638 -0.320964 -0.321289 -0.321615 +-0.32194 -0.322266 -0.322591 -0.322917 -0.323242 -0.323568 -0.323893 +-0.324219 -0.324544 -0.32487 -0.325195 -0.325521 -0.325846 -0.326172 +-0.326497 -0.326823 -0.327148 -0.327474 -0.327799 -0.328125 -0.328451 +-0.328776 -0.329102 -0.329427 -0.329753 -0.330078 -0.330404 -0.330729 +-0.331055 -0.33138 -0.331706 -0.332031 -0.332357 -0.332682 -0.333008 +; +#X msg 23 37 1; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 0 0 7 0; +#X connect 0 0 9 0; +#X connect 0 0 12 0; +#X connect 0 0 13 0; +#X connect 0 0 15 0; +#X connect 2 0 16 0; +#X connect 3 0 17 0; +#X connect 7 0 18 0; +#X connect 9 0 19 0; +#X connect 12 0 20 0; +#X connect 13 0 21 0; +#X connect 15 0 22 0; +#X connect 23 0 0 0; +#X connect 31 0 23 0; +#X restore 673 407 pd wf; +#X obj 515 438 line~; +#X obj 515 417 pack f 20; +#X obj 515 371 r \$0-volume-s; +#X obj 515 394 dbtorms; +#X obj 390 527 dac~; +#N canvas 124 254 677 475 init 0; +#X obj 176 27 loadbang; +#X obj 176 101 s \$0-volume; +#X msg 116 107 3; +#X msg 328 38 0; +#X obj 116 204 s \$0-osc-octave-1; +#X obj 116 246 s \$0-osc-octave-3; +#X obj 145 139 s \$0-osc-wf-1; +#X obj 145 159 s \$0-osc-wf-2; +#X obj 145 179 s \$0-osc-wf-3; +#X msg 145 107 0; +#X obj 86 271 s \$0-osc-tone-1; +#X obj 86 292 s \$0-osc-tone-2; +#X obj 86 313 s \$0-osc-tone-3; +#X obj 56 338 s \$0-osc-halftone-1; +#X obj 56 359 s \$0-osc-halftone-2; +#X obj 56 380 s \$0-osc-halftone-3; +#X obj 235 209 s \$0-osc-mod-1; +#X obj 235 229 s \$0-osc-mod-2; +#X obj 235 249 s \$0-osc-mod-3; +#X obj 195 271 s \$0-osc-cent-1; +#X obj 195 291 s \$0-osc-cent-2; +#X obj 195 311 s \$0-osc-cent-3; +#X obj 235 139 s \$0-osc-volume-1; +#X obj 235 159 s \$0-osc-volume-2; +#X obj 235 179 s \$0-osc-volume-3; +#X obj 331 64 s \$0-mod-wf; +#X obj 318 86 s \$0-mod-rate; +#X obj 318 106 s \$0-mod-depth; +#X obj 436 106 s \$0-bendsize; +#X obj 413 51 s \$0-mod-noisemix; +#X msg 547 37 20; +#X obj 411 184 s \$0-filter-min; +#X msg 411 158 20; +#X obj 398 206 s \$0-filter-range; +#X obj 370 230 s \$0-filter-q; +#X msg 363 189 10; +#X obj 370 301 s \$0-filter-a; +#X obj 370 322 s \$0-filter-d; +#X obj 465 280 s \$0-filter-s; +#X obj 370 342 s \$0-filter-r; +#X msg 466 259 90; +#X msg 320 317 100; +#X msg 176 79 80; +#X msg 326 282 1000; +#X msg 366 262 3000; +#X msg 381 158 2000; +#X obj 116 225 s \$0-osc-octave-2; +#X obj 548 67 s \$0-note-slide; +#X obj 538 87 s \$0-note-a; +#X obj 538 107 s \$0-note-r; +#X obj 538 127 s \$0-note-d; +#X obj 538 147 s \$0-note-s; +#X msg 502 133 90; +#X connect 0 0 42 0; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 0 0 9 0; +#X connect 0 0 30 0; +#X connect 0 0 35 0; +#X connect 0 0 45 0; +#X connect 0 0 32 0; +#X connect 0 0 40 0; +#X connect 0 0 43 0; +#X connect 0 0 44 0; +#X connect 0 0 52 0; +#X connect 2 0 4 0; +#X connect 2 0 5 0; +#X connect 2 0 10 0; +#X connect 2 0 11 0; +#X connect 2 0 12 0; +#X connect 2 0 13 0; +#X connect 2 0 14 0; +#X connect 2 0 15 0; +#X connect 2 0 46 0; +#X connect 3 0 25 0; +#X connect 3 0 26 0; +#X connect 3 0 27 0; +#X connect 3 0 28 0; +#X connect 3 0 29 0; +#X connect 9 0 6 0; +#X connect 9 0 7 0; +#X connect 9 0 8 0; +#X connect 9 0 16 0; +#X connect 9 0 17 0; +#X connect 9 0 18 0; +#X connect 9 0 19 0; +#X connect 9 0 20 0; +#X connect 9 0 21 0; +#X connect 9 0 23 0; +#X connect 9 0 24 0; +#X connect 30 0 47 0; +#X connect 30 0 48 0; +#X connect 30 0 49 0; +#X connect 30 0 50 0; +#X connect 32 0 31 0; +#X connect 35 0 34 0; +#X connect 40 0 38 0; +#X connect 41 0 39 0; +#X connect 42 0 1 0; +#X connect 42 0 41 0; +#X connect 42 0 22 0; +#X connect 43 0 37 0; +#X connect 44 0 36 0; +#X connect 45 0 33 0; +#X connect 52 0 51 0; +#X restore 673 431 pd init; +#X text 30 19 OSCILLATOR 1; +#X text 155 19 OSCILLATOR 2; +#X text 280 19 OSCILLATOR 3; +#X text 443 19 MODULATION; +#X obj 390 487 *~; +#N canvas 46 93 649 713 filter 0; +#X obj 50 571 vcf~, f 50; +#X obj 50 593 outlet~; +#X obj 198 495 +~ 0; +#X obj 198 453 *~ 1; +#X obj 346 544 r \$0-filter-q-s; +#X obj 219 473 r \$0-filter-min-s; +#X obj 219 432 r \$0-filter-range-s; +#X obj 50 49 inlet~; +#X obj 96 35 unpack; +#X obj 96 13 r \$0-note; +#X obj 283 157 r \$0-filter-a-s; +#X obj 198 209 pack f f; +#X obj 283 237 / 100; +#X obj 198 384 line~; +#X obj 268 189 del; +#X obj 313 260 r \$0-filter-d-s; +#X obj 268 289 pack f f; +#X obj 129 58 sel 0, f 12; +#X obj 129 109 t b b; +#X msg 156 130 stop; +#X obj 129 324 f 0; +#X obj 129 346 pack f f; +#X obj 198 109 f 1; +#X obj 198 84 bang; +#X obj 268 267 f; +#X obj 198 131 t f f; +#X obj 283 215 r \$0-filter-s-s; +#X obj 174 320 r \$0-filter-r-s; +#X obj 365 338 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 +-262144 -1 -1 3000 256; +#X connect 0 0 1 0; +#X connect 2 0 0 1; +#X connect 3 0 2 0; +#X connect 4 0 0 2; +#X connect 5 0 2 1; +#X connect 6 0 3 1; +#X connect 7 0 0 0; +#X connect 8 1 17 0; +#X connect 9 0 8 0; +#X connect 10 0 11 1; +#X connect 10 0 14 1; +#X connect 10 0 28 0; +#X connect 11 0 13 0; +#X connect 12 0 24 1; +#X connect 13 0 3 0; +#X connect 14 0 24 0; +#X connect 15 0 16 1; +#X connect 16 0 13 0; +#X connect 17 0 18 0; +#X connect 17 1 23 0; +#X connect 18 0 20 0; +#X connect 18 1 19 0; +#X connect 19 0 14 0; +#X connect 20 0 21 0; +#X connect 21 0 13 0; +#X connect 22 0 25 0; +#X connect 23 0 22 0; +#X connect 24 0 16 0; +#X connect 25 0 14 0; +#X connect 25 1 11 0; +#X connect 26 0 12 0; +#X connect 27 0 21 1; +#X restore 390 416 pd filter; +#X text 650 19 FILTER; +#N canvas 446 187 476 579 note-adsr 0; +#X obj 127 49 unpack; +#X obj 127 27 r \$0-note; +#X obj 229 223 pack f f; +#X obj 314 251 / 100; +#X obj 229 398 line~; +#X obj 299 303 pack f f; +#X obj 160 72 sel 0, f 12; +#X obj 160 123 t b b; +#X obj 160 338 f 0; +#X obj 160 360 pack f f; +#X obj 229 105 t f f; +#X msg 187 144 clear; +#X obj 299 281 *; +#X obj 299 203 pipe; +#X obj 320 171 r \$0-note-a-s; +#X obj 314 229 r \$0-note-s-s; +#X obj 344 274 r \$0-note-d-s; +#X obj 81 359 inlet~; +#X obj 81 451 *~; +#X obj 81 473 outlet~; +#X obj 205 334 r \$0-note-r-s; +#X connect 0 1 6 0; +#X connect 1 0 0 0; +#X connect 2 0 4 0; +#X connect 3 0 12 1; +#X connect 4 0 18 1; +#X connect 5 0 4 0; +#X connect 6 0 7 0; +#X connect 6 1 10 0; +#X connect 7 0 8 0; +#X connect 7 1 11 0; +#X connect 8 0 9 0; +#X connect 9 0 4 0; +#X connect 10 0 13 0; +#X connect 10 1 2 0; +#X connect 11 0 13 0; +#X connect 12 0 5 0; +#X connect 13 0 12 0; +#X connect 14 0 2 1; +#X connect 14 0 13 1; +#X connect 15 0 3 0; +#X connect 16 0 5 1; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 20 0 9 1; +#X restore 390 449 pd note-adsr; +#X text 870 19 CONTROLER; +#X obj 103 437 poly 1 1; +#X obj 172 408 ctlin 1; +#X obj 232 430 / 127; +#X obj 232 408 ctlin 7; +#X obj 232 452 * 100; +#X obj 232 482 s \$0-volume; +#X obj 172 482 s \$0-ctrl; +#N canvas 749 38 449 710 modulation 0; +#X obj 135 659 outlet~; +#X obj 74 187 phasor~; +#X obj 74 279 -~ 0.5; +#X obj 74 301 abs~; +#X obj 218 303 cos~; +#X obj 74 323 *~ 4; +#X obj 74 345 -~ 1; +#X obj 218 351 *~; +#X obj 218 373 clip~ -1 1; +#X obj 335 345 noise~; +#X obj 74 367 *~; +#X obj 141 145 t b f; +#X obj 141 167 f 1; +#X obj 141 189 -, f 5; +#X obj 141 211 pack f 20; +#X obj 141 273 line~; +#X obj 126 325 -~; +#X obj 126 300 sig~ 1; +#X obj 126 427 *~; +#X obj 233 113 - 1; +#X obj 233 241 pack f 20; +#X obj 233 323 line~; +#X obj 233 283 + 1; +#X obj 141 90 clip 0 1; +#X obj 233 193 clip 0 1; +#X obj 52 21 r \$0-mod-wf-s; +#X obj 141 61 f; +#X obj 233 90 clip 1 2; +#X obj 233 263 * 5; +#X obj 313 90 clip 2 3; +#X obj 313 112 - 2; +#X obj 315 145 t b f; +#X obj 315 167 f 1; +#X obj 315 189 -, f 5; +#X obj 315 211 pack f 20; +#X obj 315 273 line~; +#X obj 300 325 -~; +#X obj 300 300 sig~ 1; +#X obj 320 397 *~; +#X obj 126 449 *~; +#X obj 135 609 *~; +#X obj 150 584 line~; +#X obj 150 564 pack f 20; +#X obj 150 537 r \$0-mod-depth-s; +#X obj 25 66 r \$0-mod-rate-s; +#X connect 1 0 2 0; +#X connect 1 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 7 0; +#X connect 5 0 6 0; +#X connect 6 0 10 0; +#X connect 7 0 8 0; +#X connect 8 0 18 1; +#X connect 9 0 38 1; +#X connect 10 0 40 0; +#X connect 11 0 12 0; +#X connect 11 1 13 1; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 15 0 10 1; +#X connect 15 0 16 1; +#X connect 16 0 18 0; +#X connect 17 0 16 0; +#X connect 18 0 39 0; +#X connect 19 0 24 0; +#X connect 20 0 28 0; +#X connect 21 0 7 1; +#X connect 22 0 21 0; +#X connect 23 0 11 0; +#X connect 24 0 20 0; +#X connect 25 0 26 0; +#X connect 26 0 23 0; +#X connect 26 0 27 0; +#X connect 26 0 29 0; +#X connect 27 0 19 0; +#X connect 28 0 22 0; +#X connect 29 0 30 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 31 1 33 1; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 35 0 36 1; +#X connect 35 0 39 1; +#X connect 36 0 38 0; +#X connect 37 0 36 0; +#X connect 38 0 40 0; +#X connect 39 0 40 0; +#X connect 40 0 0 0; +#X connect 41 0 40 1; +#X connect 42 0 41 0; +#X connect 43 0 42 0; +#X connect 44 0 1 0; +#X restore 390 349 pd modulation; +#N canvas 0 23 450 300 synthesizers 0; +#N canvas 773 23 333 804 oscillator-1 0; +#X obj 11 501 mtof~; +#X obj 11 32 unpack; +#X obj 11 207 line~; +#X obj 11 361 +~; +#X obj 26 289 *; +#X obj 26 311 pack f 30; +#X obj 26 333 line~; +#X obj 11 720 *~; +#X obj 26 697 line~; +#X obj 11 185 pack; +#X obj 26 237 r \$0-bend; +#X obj 11 527 phasor~; +#X obj 11 549 *~ 2045; +#X obj 11 571 +~ 1; +#X obj 26 675 pack f 20; +#X obj 11 10 r \$0-note; +#X msg 77 573 set \$1; +#X obj 26 382 inlet~; +#X obj 11 743 outlet~; +#X obj 11 598 tabread4~; +#X obj 77 528 r \$0-osc-wf-1-s; +#X obj 77 551 makefilename wf-\$0-%d; +#X obj 11 475 +~; +#X obj 26 626 r \$0-osc-volume-1-s; +#X obj 26 650 dbtorms; +#X obj 53 56 r \$0-osc-octave-1-s; +#X obj 96 76 r \$0-osc-tone-1-s; +#X obj 139 98 r \$0-osc-halftone-1-s; +#N canvas 0 22 450 300 pitcher 0; +#N canvas 0 22 85 191 octaver 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 78 * 12; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 2 1; +#X connect 5 0 3 0; +#X restore 11 47 pd octaver; +#N canvas 940 249 85 191 toner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X obj 26 78 * 2; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 6 0; +#X connect 6 0 3 0; +#X restore 11 89 pd toner; +#N canvas 940 249 85 191 halftoner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 3 0; +#X restore 11 131 pd halftoner; +#X obj 68 19 inlet; +#X obj 11 19 inlet; +#X obj 128 19 inlet; +#X obj 188 19 inlet; +#X obj 11 213 outlet; +#X obj 248 19 inlet; +#N canvas 940 249 85 191 center 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 11 152 outlet; +#X obj 26 57 / 100, f 29; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 5 0 3 0; +#X restore 11 169 pd center; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 9 0; +#X connect 3 0 0 1; +#X connect 4 0 0 0; +#X connect 5 0 1 1; +#X connect 6 0 2 1; +#X connect 8 0 9 1; +#X connect 9 0 7 0; +#X restore 11 138 pd pitcher; +#X obj 26 454 *~, f 9; +#X obj 41 261 r \$0-bendsize-s; +#X obj 181 118 r \$0-osc-cent-1-s; +#X obj 32 162 r \$0-note-slide-s; +#X obj 77 398 line~; +#X obj 77 376 pack f 20; +#X obj 187 388 line~; +#X obj 187 366 pack f 20; +#X obj 187 341 r \$0-ctrl; +#X obj 77 420 *~; +#X obj 77 331 r \$0-osc-mod-1-s; +#X obj 77 353 / 100; +#X connect 0 0 11 0; +#X connect 1 0 28 0; +#X connect 2 0 3 0; +#X connect 3 0 22 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 7 0 18 0; +#X connect 8 0 7 1; +#X connect 9 0 2 0; +#X connect 10 0 4 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 19 0; +#X connect 14 0 8 0; +#X connect 15 0 1 0; +#X connect 16 0 19 0; +#X connect 17 0 29 0; +#X connect 19 0 7 0; +#X connect 20 0 21 0; +#X connect 21 0 16 0; +#X connect 22 0 0 0; +#X connect 23 0 24 0; +#X connect 24 0 14 0; +#X connect 25 0 28 1; +#X connect 26 0 28 2; +#X connect 27 0 28 3; +#X connect 28 0 9 0; +#X connect 29 0 22 1; +#X connect 30 0 4 1; +#X connect 31 0 28 4; +#X connect 32 0 9 1; +#X connect 33 0 38 0; +#X connect 34 0 33 0; +#X connect 35 0 38 1; +#X connect 36 0 35 0; +#X connect 37 0 36 0; +#X connect 38 0 29 1; +#X connect 39 0 40 0; +#X connect 40 0 34 0; +#X restore 257 107 pd oscillator-1; +#N canvas 773 23 333 804 oscillator-2 0; +#X obj 11 501 mtof~; +#X obj 11 32 unpack; +#X obj 11 207 line~; +#X obj 11 361 +~; +#X obj 26 289 *; +#X obj 26 311 pack f 30; +#X obj 26 333 line~; +#X obj 11 720 *~; +#X obj 26 697 line~; +#X obj 11 185 pack; +#X obj 26 237 r \$0-bend; +#X obj 11 527 phasor~; +#X obj 11 549 *~ 2045; +#X obj 11 571 +~ 1; +#X obj 26 675 pack f 20; +#X obj 11 10 r \$0-note; +#X msg 77 573 set \$1; +#X obj 26 382 inlet~; +#X obj 11 743 outlet~; +#X obj 11 598 tabread4~; +#X obj 77 551 makefilename wf-\$0-%d; +#X obj 11 475 +~; +#X obj 26 650 dbtorms; +#N canvas 0 22 450 300 pitcher 0; +#N canvas 0 22 85 191 octaver 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 78 * 12; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 2 1; +#X connect 5 0 3 0; +#X restore 11 47 pd octaver; +#N canvas 940 249 85 191 toner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X obj 26 78 * 2; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 6 0; +#X connect 6 0 3 0; +#X restore 11 89 pd toner; +#N canvas 940 249 85 191 halftoner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 3 0; +#X restore 11 131 pd halftoner; +#X obj 68 19 inlet; +#X obj 11 19 inlet; +#X obj 128 19 inlet; +#X obj 188 19 inlet; +#X obj 11 213 outlet; +#X obj 248 19 inlet; +#N canvas 940 249 85 191 center 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 11 152 outlet; +#X obj 26 57 / 100, f 29; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 5 0 3 0; +#X restore 11 169 pd center; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 9 0; +#X connect 3 0 0 1; +#X connect 4 0 0 0; +#X connect 5 0 1 1; +#X connect 6 0 2 1; +#X connect 8 0 9 1; +#X connect 9 0 7 0; +#X restore 11 138 pd pitcher; +#X obj 26 454 *~, f 9; +#X obj 41 261 r \$0-bendsize-s; +#X obj 53 56 r \$0-osc-octave-2-s; +#X obj 96 76 r \$0-osc-tone-2-s; +#X obj 139 98 r \$0-osc-halftone-2-s; +#X obj 181 118 r \$0-osc-cent-2-s; +#X obj 77 528 r \$0-osc-wf-2-s; +#X obj 26 626 r \$0-osc-volume-2-s; +#X obj 32 162 r \$0-note-slide-s; +#X obj 77 398 line~; +#X obj 77 376 pack f 20; +#X obj 187 388 line~; +#X obj 187 366 pack f 20; +#X obj 187 341 r \$0-ctrl; +#X obj 77 420 *~; +#X obj 77 331 r \$0-osc-mod-2-s; +#X obj 77 353 / 100; +#X connect 0 0 11 0; +#X connect 1 0 23 0; +#X connect 2 0 3 0; +#X connect 3 0 21 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 7 0 18 0; +#X connect 8 0 7 1; +#X connect 9 0 2 0; +#X connect 10 0 4 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 19 0; +#X connect 14 0 8 0; +#X connect 15 0 1 0; +#X connect 16 0 19 0; +#X connect 17 0 24 0; +#X connect 19 0 7 0; +#X connect 20 0 16 0; +#X connect 21 0 0 0; +#X connect 22 0 14 0; +#X connect 23 0 9 0; +#X connect 24 0 21 1; +#X connect 25 0 4 1; +#X connect 26 0 23 1; +#X connect 27 0 23 2; +#X connect 28 0 23 3; +#X connect 29 0 23 4; +#X connect 30 0 20 0; +#X connect 31 0 22 0; +#X connect 32 0 9 1; +#X connect 33 0 38 0; +#X connect 34 0 33 0; +#X connect 35 0 38 1; +#X connect 36 0 35 0; +#X connect 37 0 36 0; +#X connect 38 0 24 1; +#X connect 39 0 40 0; +#X connect 40 0 34 0; +#X restore 157 105 pd oscillator-2; +#N canvas 773 23 333 804 oscillator-3 0; +#X obj 11 501 mtof~; +#X obj 11 32 unpack; +#X obj 11 207 line~; +#X obj 11 361 +~; +#X obj 26 289 *; +#X obj 26 311 pack f 30; +#X obj 26 333 line~; +#X obj 11 720 *~; +#X obj 26 697 line~; +#X obj 11 185 pack; +#X obj 26 237 r \$0-bend; +#X obj 11 527 phasor~; +#X obj 11 549 *~ 2045; +#X obj 11 571 +~ 1; +#X obj 26 675 pack f 20; +#X obj 11 10 r \$0-note; +#X msg 77 573 set \$1; +#X obj 26 382 inlet~; +#X obj 11 743 outlet~; +#X obj 11 598 tabread4~; +#X obj 77 551 makefilename wf-\$0-%d; +#X obj 11 475 +~; +#X obj 26 650 dbtorms; +#N canvas 0 22 450 300 pitcher 0; +#N canvas 0 22 85 191 octaver 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 78 * 12; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 2 1; +#X connect 5 0 3 0; +#X restore 11 47 pd octaver; +#N canvas 940 249 85 191 toner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X obj 26 78 * 2; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 6 0; +#X connect 6 0 3 0; +#X restore 11 89 pd toner; +#N canvas 940 249 85 191 halftoner 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 26 57 - 4; +#X obj 11 152 outlet; +#X connect 0 0 4 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 4 0 3 0; +#X restore 11 131 pd halftoner; +#X obj 68 19 inlet; +#X obj 11 19 inlet; +#X obj 128 19 inlet; +#X obj 188 19 inlet; +#X obj 11 213 outlet; +#X obj 248 19 inlet; +#N canvas 940 249 85 191 center 0; +#X obj 26 33 inlet; +#X obj 11 7 inlet; +#X obj 11 130 +, f 4; +#X obj 26 100 t b f; +#X obj 11 152 outlet; +#X obj 26 57 / 100, f 29; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 3 1 2 1; +#X connect 5 0 3 0; +#X restore 11 169 pd center; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 9 0; +#X connect 3 0 0 1; +#X connect 4 0 0 0; +#X connect 5 0 1 1; +#X connect 6 0 2 1; +#X connect 8 0 9 1; +#X connect 9 0 7 0; +#X restore 11 138 pd pitcher; +#X obj 26 454 *~, f 9; +#X obj 77 398 line~; +#X obj 77 376 pack f 20; +#X obj 41 261 r \$0-bendsize-s; +#X obj 53 56 r \$0-osc-octave-3-s; +#X obj 96 76 r \$0-osc-tone-3-s; +#X obj 139 98 r \$0-osc-halftone-3-s; +#X obj 181 118 r \$0-osc-cent-3-s; +#X obj 77 331 r \$0-osc-mod-3-s; +#X obj 77 528 r \$0-osc-wf-3-s; +#X obj 26 626 r \$0-osc-volume-3-s; +#X obj 32 162 r \$0-note-slide-s; +#X obj 187 388 line~; +#X obj 187 366 pack f 20; +#X obj 77 420 *~; +#X obj 187 341 r \$0-ctrl; +#X obj 77 353 / 100; +#X connect 0 0 11 0; +#X connect 1 0 23 0; +#X connect 2 0 3 0; +#X connect 3 0 21 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 7 0 18 0; +#X connect 8 0 7 1; +#X connect 9 0 2 0; +#X connect 10 0 4 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 19 0; +#X connect 14 0 8 0; +#X connect 15 0 1 0; +#X connect 16 0 19 0; +#X connect 17 0 24 0; +#X connect 19 0 7 0; +#X connect 20 0 16 0; +#X connect 21 0 0 0; +#X connect 22 0 14 0; +#X connect 23 0 9 0; +#X connect 24 0 21 1; +#X connect 25 0 38 0; +#X connect 26 0 25 0; +#X connect 27 0 4 1; +#X connect 28 0 23 1; +#X connect 29 0 23 2; +#X connect 30 0 23 3; +#X connect 31 0 23 4; +#X connect 32 0 40 0; +#X connect 33 0 20 0; +#X connect 34 0 22 0; +#X connect 35 0 9 1; +#X connect 36 0 38 1; +#X connect 37 0 36 0; +#X connect 38 0 24 1; +#X connect 39 0 37 0; +#X connect 40 0 26 0; +#X restore 53 105 pd oscillator-3; +#X obj 157 209 outlet~; +#X obj 157 177 /~ 3; +#X obj 156 23 inlet~; +#X connect 0 0 4 0; +#X connect 1 0 4 0; +#X connect 2 0 4 0; +#X connect 4 0 3 0; +#X connect 5 0 0 0; +#X connect 5 0 1 0; +#X connect 5 0 2 0; +#X restore 390 383 pd synthesizers; +#X obj 31 59 hradio 15 1 0 7 \$0-osc-wf-1-s \$0-osc-wf-1 Waveform-1 +0 -8 0 10 -262144 -1 -1 0; +#X obj 31 99 hradio 15 1 0 7 \$0-osc-octave-1-s \$0-osc-octave-1 Octave-1_octave +0 -8 0 10 -262144 -1 -1 3; +#X obj 31 139 hradio 15 1 0 7 \$0-osc-tone-1-s \$0-osc-tone-1 Tone-1_tone +0 -8 0 10 -262144 -1 -1 3; +#X obj 31 179 hradio 15 1 0 7 \$0-osc-halftone-1-s \$0-osc-halftone-1 +Half-Tone-1_halftone 0 -8 0 10 -262144 -1 -1 3; +#X obj 34 219 hsl 100 15 0 100 0 0 \$0-osc-cent-1-s \$0-osc-cent-1 +Cent-1_cent -2 -8 0 10 -262144 -1 -1 0 1; +#X obj 34 259 hsl 100 15 0 100 0 0 \$0-osc-mod-1-s \$0-osc-mod-1 Modulation-1_% +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 34 299 hsl 100 15 0 100 0 0 \$0-osc-volume-1-s \$0-osc-volume-1 +Volume-1_dB -2 -8 0 10 -262144 -1 -1 7920 1; +#X obj 156 59 hradio 15 1 0 7 \$0-osc-wf-2-s \$0-osc-wf-2 Waveform-2 +0 -8 0 10 -262144 -1 -1 0; +#X obj 156 99 hradio 15 1 0 7 \$0-osc-octave-2-s \$0-osc-octave-2 Octave-2_octave +0 -8 0 10 -262144 -1 -1 3; +#X obj 156 139 hradio 15 1 0 7 \$0-osc-tone-2-s \$0-osc-tone-2 Tone-2_tone +0 -8 0 10 -262144 -1 -1 3; +#X obj 156 179 hradio 15 1 0 7 \$0-osc-halftone-2-s \$0-osc-halftone-2 +Half-Tone-2_halftone 0 -8 0 10 -262144 -1 -1 3; +#X obj 159 219 hsl 100 15 0 100 0 0 \$0-osc-cent-2-s \$0-osc-cent-2 +Cent-2_% -2 -8 0 10 -262144 -1 -1 0 1; +#X obj 159 259 hsl 100 15 0 100 0 0 \$0-osc-mod-2-s \$0-osc-mod-2 Modulation-2_% +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 159 299 hsl 100 15 0 100 0 0 \$0-osc-volume-2-s \$0-osc-volume-2 +Volume-2_dB -2 -8 0 10 -262144 -1 -1 0 1; +#X obj 281 59 hradio 15 1 0 7 \$0-osc-wf-3-s \$0-osc-wf-3 Waveform-3 +0 -8 0 10 -262144 -1 -1 0; +#X obj 281 99 hradio 15 1 0 7 \$0-osc-octave-3-s \$0-osc-octave-3 Octave-3_octave +0 -8 0 10 -262144 -1 -1 3; +#X obj 281 139 hradio 15 1 0 7 \$0-osc-tone-3-s \$0-osc-tone-3 Tone-3_tone +0 -8 0 10 -262144 -1 -1 3; +#X obj 281 179 hradio 15 1 0 7 \$0-osc-halftone-3-s \$0-osc-halftone-3 +Half-Tone-3_halftone 0 -8 0 10 -262144 -1 -1 3; +#X obj 284 219 hsl 100 15 0 100 0 0 \$0-osc-cent-3-s \$0-osc-cent-3 +Cent-3_% -2 -8 0 10 -262144 -1 -1 0 1; +#X obj 284 259 hsl 100 15 0 100 0 0 \$0-osc-mod-3-s \$0-osc-mod-3 Modulation-3_% +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 284 299 hsl 100 15 0 100 0 0 \$0-osc-volume-3-s \$0-osc-volume-3 +Volume-3_dB -2 -8 0 10 -262144 -1 -1 0 1; +#X obj 444 59 hsl 100 15 0 3 0 0 \$0-mod-wf-s \$0-mod-wf Waveform -2 +-8 0 10 -262144 -1 -1 0 1; +#X obj 556 59 nbx 5 15 0 3 0 0 empty \$0-mod-wf empty 0 -8 0 10 -262144 +-1 -1 0 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 414 42 pd; +#X obj 444 99 hsl 100 15 0 20 0 0 \$0-mod-rate-s \$0-mod-rate Rate_Hz +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 556 99 nbx 5 15 0 20 0 0 empty \$0-mod-rate empty 0 -8 0 10 +-262144 -1 -1 0 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 414 82 pd; +#X obj 444 139 hsl 100 15 0 12 0 0 \$0-mod-depth-s \$0-mod-depth Depth_halftone +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 556 139 nbx 5 15 0 12 0 0 empty \$0-mod-depth empty 0 -8 0 10 +-262144 -1 -1 0 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 414 122 pd; +#X obj 654 59 hsl 100 15 0 5000 0 0 \$0-filter-min-s \$0-filter-min +Filter-Min_Hz -2 -8 0 10 -262144 -1 -1 40 1; +#X obj 766 59 nbx 5 15 0 5000 0 0 empty \$0-filter-min empty 0 -8 0 +10 -262144 -1 -1 20 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 42 pd; +#X obj 654 99 hsl 100 15 0 20000 0 0 \$0-filter-range-s \$0-filter-range +Filter-Range_Hz -2 -8 0 10 -262144 -1 -1 990 1; +#X obj 766 99 nbx 5 15 0 20000 0 0 empty \$0-filter-range empty 0 -8 +0 10 -262144 -1 -1 2000 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 82 pd; +#X obj 654 139 hsl 100 15 0 20 0 0 \$0-filter-q-s \$0-filter-q Filter-Q +-2 -8 0 10 -262144 -1 -1 4950 1; +#X obj 766 139 nbx 5 15 0 20 0 0 empty \$0-filter-q empty 0 -8 0 10 +-262144 -1 -1 10 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 122 pd; +#X obj 654 179 hsl 100 15 0 10000 0 0 \$0-filter-a-s \$0-filter-a Filter-Attack_ms +-2 -8 0 10 -262144 -1 -1 2970 1; +#X obj 766 179 nbx 5 15 0 10000 0 0 empty \$0-filter-a empty 0 -8 0 +10 -262144 -1 -1 3000 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 162 pd; +#X obj 654 219 hsl 100 15 0 10000 0 0 \$0-filter-d-s \$0-filter-d Filter-Decay_ms +-2 -8 0 10 -262144 -1 -1 990 1; +#X obj 766 219 nbx 5 15 0 10000 0 0 empty \$0-filter-d empty 0 -8 0 +10 -262144 -1 -1 1000 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 202 pd; +#X obj 654 259 hsl 100 15 0 10000 0 0 \$0-filter-r-s \$0-filter-r Filter-Release_ms +-2 -8 0 10 -262144 -1 -1 99 1; +#X obj 766 259 nbx 5 15 0 10000 0 0 empty \$0-filter-r empty 0 -8 0 +10 -262144 -1 -1 100 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 242 pd; +#X obj 654 299 hsl 100 15 0 100 0 0 \$0-filter-s-s \$0-filter-s Filter-Sustain_% +-2 -8 0 10 -262144 -1 -1 8910 1; +#X obj 766 299 nbx 5 15 0 100 0 0 empty \$0-filter-s empty 0 -8 0 10 +-262144 -1 -1 90 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 624 282 pd; +#X obj 874 59 hsl 100 15 0 10000 0 0 \$0-note-a-s \$0-note-a Note-Attack_ms +-2 -8 0 10 -262144 -1 -1 20 1; +#X obj 986 59 nbx 5 15 0 10000 0 0 empty \$0-note-a empty 0 -8 0 10 +-262144 -1 -1 20 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 42 pd; +#X obj 874 99 hsl 100 15 0 10000 0 0 \$0-note-d-s \$0-note-d Note-Decay_ms +-2 -8 0 10 -262144 -1 -1 20 1; +#X obj 986 99 nbx 5 15 0 10000 0 0 empty \$0-note-d empty 0 -8 0 10 +-262144 -1 -1 20 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 82 pd; +#X obj 874 139 hsl 100 15 0 10000 0 0 \$0-note-r-s \$0-note-r Note-Release_ms +-2 -8 0 10 -262144 -1 -1 20 1; +#X obj 986 139 nbx 5 15 0 10000 0 0 empty \$0-note-r empty 0 -8 0 10 +-262144 -1 -1 20 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 122 pd; +#X obj 874 179 hsl 100 15 0 100 0 0 \$0-note-s-s \$0-note-s Note-Sustain_% +-2 -8 0 10 -262144 -1 -1 8910 1; +#X obj 986 179 nbx 5 15 0 100 0 0 empty \$0-note-s empty 0 -8 0 10 +-262144 -1 -1 90 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 162 pd; +#X obj 874 219 hsl 100 15 0 500 0 0 \$0-note-slide-s \$0-note-slide +Note-Slide_ms -2 -8 0 10 -262144 -1 -1 396 1; +#X obj 986 219 nbx 5 15 0 500 0 0 empty \$0-note-slide empty 0 -8 0 +10 -262144 -1 -1 20 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 202 pd; +#X obj 874 259 hsl 100 15 0 12 0 0 \$0-bendsize-s \$0-bendsize Bend-Size_halftone +-2 -8 0 10 -262144 -1 -1 0 1; +#X obj 986 259 nbx 5 15 0 12 0 0 empty \$0-bendsize empty 0 -8 0 10 +-262144 -1 -1 0 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 242 pd; +#X obj 874 299 hsl 100 15 0 100 0 0 \$0-volume-s \$0-volume Volume +-2 -8 0 10 -262144 -1 -1 7920 1; +#X obj 986 299 nbx 5 15 0 100 0 0 empty \$0-volume empty 0 -8 0 10 +-262144 -1 -1 80 256; +#N canvas 0 22 450 300 (subpatch) 0; +#X obj 14 18 inlet; +#X msg 14 40 set \$1; +#X obj 14 62 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X restore 844 282 pd; +#X text 437 179 A synthesizer inspired by the MiniMoog patch of Jaime +E. Oliver La Rosa from the Faculty of Arts and Sciences of NYU., f +26; +#X connect 0 0 23 0; +#X connect 0 1 23 1; +#X connect 1 0 3 0; +#X connect 2 0 29 0; +#X connect 3 0 4 0; +#X connect 5 0 6 0; +#X connect 8 0 18 1; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 11 0 9 0; +#X connect 18 0 12 0; +#X connect 18 0 12 1; +#X connect 19 0 21 0; +#X connect 21 0 18 0; +#X connect 23 1 5 0; +#X connect 23 2 5 1; +#X connect 24 0 2 0; +#X connect 25 0 27 0; +#X connect 26 0 25 0; +#X connect 27 0 28 0; +#X connect 30 0 31 0; +#X connect 31 0 19 0; +#X connect 53 0 55 0; +#X connect 54 0 53 0; +#X connect 55 0 54 0; +#X connect 56 0 58 0; +#X connect 57 0 56 0; +#X connect 58 0 57 0; +#X connect 59 0 61 0; +#X connect 60 0 59 0; +#X connect 61 0 60 0; +#X connect 62 0 64 0; +#X connect 63 0 62 0; +#X connect 64 0 63 0; +#X connect 65 0 67 0; +#X connect 66 0 65 0; +#X connect 67 0 66 0; +#X connect 68 0 70 0; +#X connect 69 0 68 0; +#X connect 70 0 69 0; +#X connect 71 0 73 0; +#X connect 72 0 71 0; +#X connect 73 0 72 0; +#X connect 74 0 76 0; +#X connect 75 0 74 0; +#X connect 76 0 75 0; +#X connect 77 0 79 0; +#X connect 78 0 77 0; +#X connect 79 0 78 0; +#X connect 80 0 82 0; +#X connect 81 0 80 0; +#X connect 82 0 81 0; +#X connect 83 0 85 0; +#X connect 84 0 83 0; +#X connect 85 0 84 0; +#X connect 86 0 88 0; +#X connect 87 0 86 0; +#X connect 88 0 87 0; +#X connect 89 0 91 0; +#X connect 90 0 89 0; +#X connect 91 0 90 0; +#X connect 92 0 94 0; +#X connect 93 0 92 0; +#X connect 94 0 93 0; +#X connect 95 0 97 0; +#X connect 96 0 95 0; +#X connect 97 0 96 0; +#X connect 98 0 100 0; +#X connect 99 0 98 0; +#X connect 100 0 99 0; +#X connect 101 0 103 0; +#X connect 102 0 101 0; +#X connect 103 0 102 0; +#X coords 0 -1 1 1 1050 320 2 10 10; diff --git a/Patches/camo.netreceive.pd b/Patches/camo.netreceive.pd new file mode 100644 index 00000000..c8e40ff1 --- /dev/null +++ b/Patches/camo.netreceive.pd @@ -0,0 +1,11 @@ +#N canvas 251 186 661 318 10; +#X obj 61 81 netreceive 2000; +#X obj 61 119 print; +#X obj 148 117 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X text 61 9 This patch shows that you can send message through OSC +with the plugin., f 54; +#X text 61 49 Open camo.netsend in a Camomile plugin to use it., f +54; +#X connect 0 0 1 0; +#X connect 0 1 2 0; diff --git a/Patches/camo.netsend.pd b/Patches/camo.netsend.pd new file mode 100644 index 00000000..f07011c1 --- /dev/null +++ b/Patches/camo.netsend.pd @@ -0,0 +1,29 @@ +#N canvas 679 189 450 300 10; +#X obj 84 193 netsend; +#X obj 84 221 print netsend1; +#X obj 123 251 print netsend2; +#X msg 216 129 connect localhost 2000; +#X obj 99 54 nbx 5 14 0 100 0 0 empty \$0-send Send 56 8 0 10 -262144 +-1 -1 0 256; +#X obj 23 53 tgl 15 0 empty \$0-connect Connect 17 7 0 10 -262144 -1 +-1 0 1; +#X obj 170 97 sel 0 1; +#X msg 170 158 disconnect; +#X msg 84 167 send \$1; +#X text 24 10 Open camo.receive in PD., f 25; +#X text 24 23 Click on connect., f 25; +#X text 24 35 Change the numbox value., f 25; +#X obj 170 74 change; +#X obj 84 123 change; +#X connect 0 0 1 0; +#X connect 0 1 2 0; +#X connect 3 0 0 0; +#X connect 4 0 13 0; +#X connect 5 0 12 0; +#X connect 6 0 7 0; +#X connect 6 1 3 0; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X connect 12 0 6 0; +#X connect 13 0 8 0; +#X coords 0 -1 1 1 180 60 1 10 10; diff --git a/Patches/camo.subpatch.pd b/Patches/camo.subpatch.pd new file mode 100644 index 00000000..4da4ec9d --- /dev/null +++ b/Patches/camo.subpatch.pd @@ -0,0 +1,8 @@ +#N canvas 488 45 647 577 10; +#X obj 288 218 inlet~; +#X obj 348 218 inlet~; +#X obj 288 240 outlet~; +#X obj 348 240 outlet~; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X coords 0 577 1 576 300 300 0; diff --git a/Patches/camo.test.pd b/Patches/camo.test.pd index df78d7dc..e500512e 100644 --- a/Patches/camo.test.pd +++ b/Patches/camo.test.pd @@ -1,4 +1,4 @@ -#N canvas 1011 127 647 577 10; +#N canvas 488 45 647 577 10; #X obj 185 168 nbx 5 15 0 20 0 0 empty \$0-zaza empty 0 -8 0 10 -262144 -1 -1 0 256; #X obj 54 168 hradio 15 1 0 8 empty \$0-zaza zaza 0 -8 0 10 -262144 @@ -27,13 +27,28 @@ -1 0; #X obj 181 269 vradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144 -1 -1 0; -#X msg 133 453 100; #X obj 133 475 print zaza; #X obj 135 357 loadbang; #X msg 135 379 1; #X obj 133 409 metro 500; +#X obj 406 149 r pd; +#X obj 406 171 route dsp; +#X obj 406 213 samplerate~; +#X obj 406 255 print samplerate; +#X obj 406 193 bang; +#X obj 398 401 camo.subpatch; +#X obj 409 363 adc~; +#X obj 398 423 dac~, f 13; +#X obj 236 377 r \$0-playhead; +#X obj 291 291 zaza; #X connect 10 0 11 0; -#X connect 14 0 15 0; +#X connect 15 0 16 0; #X connect 16 0 17 0; -#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 22 0; +#X connect 22 0 20 0; +#X connect 23 0 25 0; +#X connect 23 1 25 1; +#X connect 24 0 23 0; +#X connect 24 1 23 1; #X coords 0 -1 1 1 300 300 2 50 50; diff --git a/README.md b/README.md index 67fa94b8..d401d73f 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ ![](https://cloud.githubusercontent.com/assets/1409918/13610631/ebdacae8-e55e-11e5-903c-fb3ad342adb8.png) -**See the [wiki](https://github.com/pierreguillot/Camomile/wiki) for further informations.** +**See the [wiki](https://github.com/pierreguillot/Camomile/wiki) for further informations and download.** diff --git a/Ressources/clear0.png b/Ressources/clear0.png deleted file mode 100644 index 2f3a15be..00000000 Binary files a/Ressources/clear0.png and /dev/null differ diff --git a/Ressources/clear1.png b/Ressources/clear1.png index 79601518..f10976b5 100644 Binary files a/Ressources/clear1.png and b/Ressources/clear1.png differ diff --git a/Ressources/clear2.png b/Ressources/clear2.png new file mode 100644 index 00000000..1dc206b6 Binary files /dev/null and b/Ressources/clear2.png differ diff --git a/Ressources/copy1.png b/Ressources/copy1.png new file mode 100644 index 00000000..0a6ab6b2 Binary files /dev/null and b/Ressources/copy1.png differ diff --git a/Ressources/copy2.png b/Ressources/copy2.png new file mode 100644 index 00000000..92f88c4f Binary files /dev/null and b/Ressources/copy2.png differ diff --git a/Ressources/flowerG.png b/Ressources/flowerG.png deleted file mode 100644 index f9763492..00000000 Binary files a/Ressources/flowerG.png and /dev/null differ diff --git a/Ressources/option.png b/Ressources/option.png new file mode 100644 index 00000000..94d3fc51 Binary files /dev/null and b/Ressources/option.png differ diff --git a/Source/Gui.cpp b/Source/Gui/Gui.cpp similarity index 64% rename from Source/Gui.cpp rename to Source/Gui/Gui.cpp index e081e31d..ea96dccd 100644 --- a/Source/Gui.cpp +++ b/Source/Gui/Gui.cpp @@ -10,8 +10,6 @@ // GUI // // ==================================================================================== // -GuiWindow* Gui::m_window = nullptr; - Font Gui::getFont() { #ifdef __APPLE__ @@ -47,37 +45,6 @@ Colour const& Gui::getColorInv() noexcept return c; } -size_t& Gui::getCounter() noexcept -{ - static size_t counter; - return counter; -} - -void Gui::addInstance() noexcept -{ - ++getCounter(); - if(m_window == nullptr) - { - m_window = new GuiWindow(); - } -} - -void Gui::removeInstance() noexcept -{ - --getCounter(); - if(getCounter() == 0 && m_window) - { - m_window->removeFromDesktop(); - delete m_window; - m_window = nullptr; - } -} - -GuiWindow& Gui::getWindow() noexcept -{ - return *m_window; -} - diff --git a/Source/Gui.hpp b/Source/Gui/Gui.hpp similarity index 79% rename from Source/Gui.hpp rename to Source/Gui/Gui.hpp index 51992e40..763f7a60 100644 --- a/Source/Gui.hpp +++ b/Source/Gui/Gui.hpp @@ -7,7 +7,7 @@ #ifndef __CAMOMILE_GUI__ #define __CAMOMILE_GUI__ -#include "InstanceProcessor.hpp" +#include "../InstanceProcessor.hpp" #include "GuiParameter.hpp" #include "GuiRadio.hpp" #include "GuiToggle.hpp" @@ -28,19 +28,12 @@ class Gui { public: - static void addInstance() noexcept; - static void removeInstance() noexcept; static Font getFont(); static int getBorderSize() noexcept; static Colour const& getColorBg() noexcept; static Colour const& getColorBd() noexcept; static Colour const& getColorTxt() noexcept; static Colour const& getColorInv() noexcept; - static GuiWindow& getWindow() noexcept; - -private: - static size_t& getCounter() noexcept; - static GuiWindow* m_window; }; #endif diff --git a/Source/GuiAbout.cpp b/Source/Gui/GuiAbout.cpp similarity index 69% rename from Source/GuiAbout.cpp rename to Source/Gui/GuiAbout.cpp index 911a84ef..8274ed8d 100644 --- a/Source/GuiAbout.cpp +++ b/Source/Gui/GuiAbout.cpp @@ -13,11 +13,6 @@ GuiAbout::GuiAbout() { - m_image1.setImage(ImageCache::getFromMemory(BinaryData::flowerG_png, BinaryData::flowerG_pngSize)); - m_image1.setBoundingBox(RelativeParallelogram(Rectangle(300.f - 128.f, 370.f - 128.f, 128.f, 128.f))); - m_image1.setOpacity(0.5f); - addAndMakeVisible(&m_image1); - m_text.setMultiLine(true); m_text.setReadOnly(true); m_text.setScrollbarsShown(false); @@ -32,14 +27,7 @@ GuiAbout::GuiAbout() "Author :\n"+ String(JucePlugin_Manufacturer) + "\n\n" "Organizations :\nCICM | Université Paris 8 | Labex Arts H2H\n\n" "Web Site :\n" + String(JucePlugin_ManufacturerWebsite)+"/wiki\n\n" - "Credits :\nPure Data by Miller Puckette\nJuce by ROLI Ltd." -#ifdef JucePlugin_Build_VST - + "\nVST PlugIn Technology by Steinberg Media Technologies"); -#elif JucePlugin_Build_VST3 - + "\nVST PlugIn Technology by Steinberg Media Technologies"); -#else - ); -#endif + "Credits :\nPure Data by Miller Puckette and others\nJuce by ROLI Ltd.\nlibPD by the Pure Data community\nVST PlugIn Technology by Steinberg Media Technologies"); m_text.setBounds(0, 0, 300, 370); addAndMakeVisible(&m_text, -1); } diff --git a/Source/GuiAbout.hpp b/Source/Gui/GuiAbout.hpp similarity index 88% rename from Source/GuiAbout.hpp rename to Source/Gui/GuiAbout.hpp index eb179ef2..9e61da25 100644 --- a/Source/GuiAbout.hpp +++ b/Source/Gui/GuiAbout.hpp @@ -7,7 +7,7 @@ #ifndef __CAMOMILE_GUI_ABOUT__ #define __CAMOMILE_GUI_ABOUT__ -#include "InstanceProcessor.hpp" +#include "../InstanceProcessor.hpp" // ==================================================================================== // // GUI ABOUT // @@ -18,7 +18,6 @@ class GuiAbout : public Component public: GuiAbout(); private: - DrawableImage m_image1; juce::TextEditor m_text; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiAbout) diff --git a/Source/GuiComment.cpp b/Source/Gui/GuiComment.cpp similarity index 67% rename from Source/GuiComment.cpp rename to Source/Gui/GuiComment.cpp index 6b6bb75e..1b3b3c53 100644 --- a/Source/GuiComment.cpp +++ b/Source/Gui/GuiComment.cpp @@ -8,14 +8,15 @@ #include "Gui.hpp" // ==================================================================================== // -// GUI TOGGLE // +// GUI COMMENT // // ==================================================================================== // -GuiComment::GuiComment(pd::Comment const& cmt) : m_text(cmt.getText()) +GuiComment::GuiComment(pd::Object const& cmt) : m_text(cmt.getText()) { setInterceptsMouseClicks(false, false); setWantsKeyboardFocus(false); - setBounds(cmt.getX(), cmt.getY(), cmt.getWidth() < 1.f ? 360 : cmt.getWidth() * 6, 200); + std::array bounds(cmt.getBounds()); + setBounds(int(bounds[0]), int(bounds[1]), bounds[2] < 1.f ? 360 : bounds[2] * 6, 200); } void GuiComment::paint(Graphics& g) diff --git a/Source/GuiComment.hpp b/Source/Gui/GuiComment.hpp similarity index 91% rename from Source/GuiComment.hpp rename to Source/Gui/GuiComment.hpp index 815797f3..492a0f23 100644 --- a/Source/GuiComment.hpp +++ b/Source/Gui/GuiComment.hpp @@ -16,7 +16,7 @@ class GuiComment : public Component { public: - GuiComment(pd::Comment const& cmt); + GuiComment(pd::Object const& cmt); void paint(Graphics& g) final; private: const std::string m_text; diff --git a/Source/Gui/GuiConsole.cpp b/Source/Gui/GuiConsole.cpp new file mode 100644 index 00000000..d022e1a4 --- /dev/null +++ b/Source/Gui/GuiConsole.cpp @@ -0,0 +1,163 @@ +/* + // Copyright (c) 2015 Pierre Guillot. + // For information on usage and redistribution, and for a DISCLAIMER OF ALL + // WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "GuiConsole.hpp" +#include "GuiFlowerButton.hpp" +#include "Gui.hpp" + +// ==================================================================================== // +// GUI CONSOLE // +// ==================================================================================== // + +GuiConsole::GuiConsole(pd::Console::History& history) : m_history(history) +{ + m_level = Level::Post; + m_size = 0; + setWantsKeyboardFocus(true); + TableHeaderComponent* header = new TableHeaderComponent(); + header->addColumn(String("ID"), 1, 300, 300, 300, TableHeaderComponent::notResizableOrSortable, -1); + header->setStretchToFitActive(false); + header->setColumnVisible(1, true); + + m_table.setBounds(0, 0, 300, 350); + m_table.setModel(this); + m_table.setOutlineThickness(0); + m_table.setWantsKeyboardFocus(true); + m_table.setMultipleSelectionEnabled(false); + m_table.setMouseMoveSelectsRows(false); + m_table.setHeaderHeight(0); + m_table.setRowHeight(Gui::getFont().getHeight() + 2); + m_table.setColour(ListBox::ColourIds::backgroundColourId, Colours::transparentWhite); + m_table.getViewport()->setScrollBarsShown(true, false, true, false); + m_table.getViewport()->setScrollBarThickness(1); + m_table.setModel(this); + m_table.setHeader(header); + addAndMakeVisible(m_table); + + m_clear_button.addListener(this); + addAndMakeVisible(&m_clear_button); + m_copy_button.addListener(this); + addAndMakeVisible(&m_copy_button); + m_level_button.addListener(this); + addAndMakeVisible(&m_level_button); + startTimer(100); +} + +GuiConsole::~GuiConsole() +{ + stopTimer(); +} + +void GuiConsole::buttonClicked(Button* button) +{ + if(button == &m_clear_button) + { + m_history.clear(); + } + else if(button == &m_copy_button) + { + String text; + for(size_t i = 0; i < m_size; i++) + { + pd::Console::Message message(m_history.getMessageUntilLevel(m_level, i)); + if(!message.text.empty()) + { + text += message.text + "\n"; + } + } + SystemClipboard::copyTextToClipboard(text); + } + else + { + juce::PopupMenu m; + m.addItem(1, "Fatal", true, m_level == Level::Fatal); + m.addItem(2, "Error", true, m_level == Level::Error); + m.addItem(3, "Normal", true, m_level == Level::Post); + m.addItem(4, "All", true, m_level == Level::Log); + int level = m.showAt(getScreenBounds().translated(0, -6 * (Gui::getFont().getHeight() + 2) - 4), + 0, 0, Gui::getFont().getHeight() + 2); + if(level && level != int(m_level)+1) + { + m_level = Level(level-1); + m_size = m_history.getNumberOfMessageUntilLevel(m_level); + m_table.updateContent(); + } + } +} + +bool GuiConsole::keyPressed(const KeyPress& key) +{ + if(key.getModifiers().isCommandDown() && key.getTextCharacter() == 'c') + { + SparseSet selection = m_table.getSelectedRows(); + if(!selection.isEmpty()) + { + String text; + for(size_t i = 0; i < selection.size(); i++) + { + pd::Console::Message message(m_history.getMessageUntilLevel(m_level, i)); + if(!message.text.empty()) + { + text += message.text + "\n"; + } + } + SystemClipboard::copyTextToClipboard(text); + return true; + } + } + return false; +} + +int GuiConsole::getNumRows() +{ + return m_size; +} + +void GuiConsole::paintRowBackground(Graphics& g, int rowNumber, int width, int height, bool rowIsSelected) +{ + +} + +void GuiConsole::paintCell(Graphics& g, int rowNumber, int columnId, int width, int height, bool rowIsSelected) +{ + pd::Console::Message message(m_history.getMessageUntilLevel(m_level, rowNumber)); + if(rowIsSelected) + { + g.setColour(Gui::getColorTxt()); + g.fillRect(0, 0, width, height); + } + g.setFont(Gui::getFont()); + if(message.level == Level::Fatal) + { + g.setColour(Colours::red); + } + else if(message.level == Level::Error) + { + g.setColour(Colours::orange); + } + else if(message.level == Level::Post) + { + g.setColour(rowIsSelected ? Gui::getColorBg() : Gui::getColorTxt()); + } + else + { + g.setColour(Colours::green); + } + g.drawText(message.text, 2, 0, width, height, juce::Justification::centredLeft); +} + +void GuiConsole::timerCallback() +{ + const size_t size = m_history.getNumberOfMessageUntilLevel(m_level); + if(m_size != size) + { + m_size = size; + m_table.updateContent(); + } +} + + + diff --git a/Source/Gui/GuiConsole.hpp b/Source/Gui/GuiConsole.hpp new file mode 100644 index 00000000..ba337ebc --- /dev/null +++ b/Source/Gui/GuiConsole.hpp @@ -0,0 +1,45 @@ +/* + // Copyright (c) 2015 Pierre Guillot. + // For information on usage and redistribution, and for a DISCLAIMER OF ALL + // WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef __CAMOMILE_GUI_CONSOLE__ +#define __CAMOMILE_GUI_CONSOLE__ + +#include "../InstanceProcessor.hpp" +#include "GuiFlowerButton.hpp" + +// ==================================================================================== // +// GUI TOGGLE // +// ==================================================================================== // + +class GuiConsole : public juce::Component, public juce::Timer, +public juce::Button::Listener, juce::TableListBoxModel +{ +public: + GuiConsole(pd::Console::History& history); + ~GuiConsole(); + void timerCallback() final; + void buttonClicked(Button* button) final; + + int getNumRows() final; + void paintRowBackground(Graphics& g, int rowNumber, int width, int height, bool rowIsSelected) final; + void paintCell(Graphics& g, int rowNumber, int columnId, int width, int height, bool rowIsSelected) final; + bool keyPressed(const KeyPress& key) final; +private: + typedef pd::Console::History History; + typedef pd::Console::Message::Level Level; + + History& m_history; + Level m_level; + size_t m_size; + TableListBox m_table; + GuiClearButton m_clear_button; + GuiCopyButton m_copy_button; + GuiLevelButton m_level_button; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiConsole) +}; + + +#endif diff --git a/Source/Gui/GuiFlowerButton.cpp b/Source/Gui/GuiFlowerButton.cpp new file mode 100644 index 00000000..5572040f --- /dev/null +++ b/Source/Gui/GuiFlowerButton.cpp @@ -0,0 +1,173 @@ +/* + // Copyright (c) 2015 Pierre Guillot. + // For information on usage and redistribution, and for a DISCLAIMER OF ALL + // WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "GuiFlowerButton.hpp" +#include "Gui.hpp" + +// ==================================================================================== // +// GUI BUTTON // +// ==================================================================================== // + +GuiFlowerButton::GuiFlowerButton() : Button("CamomileButton") +{ + setClickingTogglesState(false); + setAlwaysOnTop(true); + m_image1.setImage(ImageCache::getFromMemory(BinaryData::flower1_png, BinaryData::flower1_pngSize)); + m_image2.setImage(ImageCache::getFromMemory(BinaryData::flower1_png, BinaryData::flower1_pngSize)); + m_image3.setImage(ImageCache::getFromMemory(BinaryData::flower2_png, BinaryData::flower2_pngSize)); + m_image1.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); + m_image2.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); + m_image3.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); + m_image1.setOverlayColour(Gui::getColorTxt()); + m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); + addAndMakeVisible(m_image1, 0); + addChildComponent(m_image2, 0); + addAndMakeVisible(m_image3, -1); + m_image3.setAlwaysOnTop(true); + setBounds(3, 3, 15, 15); +} + +void GuiFlowerButton::paintButton(Graphics& g, bool over, bool down) +{ + +} + +void GuiFlowerButton::buttonStateChanged() +{ + if(isDown() || isOver()) + { + m_image1.setVisible(false); + m_image2.setVisible(true); + } + else + { + m_image1.setVisible(true); + m_image2.setVisible(false); + } +} + + + +GuiClearButton::GuiClearButton() : Button("ClearButton") +{ + setClickingTogglesState(false); + setAlwaysOnTop(true); + m_image1.setImage(ImageCache::getFromMemory(BinaryData::clear2_png, BinaryData::clear2_pngSize)); + m_image2.setImage(ImageCache::getFromMemory(BinaryData::clear2_png, BinaryData::clear2_pngSize)); + m_image3.setImage(ImageCache::getFromMemory(BinaryData::clear1_png, BinaryData::clear1_pngSize)); + m_image1.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image2.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image3.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image1.setOverlayColour(Gui::getColorTxt()); + m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); + addAndMakeVisible(m_image3, 0); + addAndMakeVisible(m_image1, -1); + addChildComponent(m_image2, -1); + m_image1.setAlwaysOnTop(true); + m_image2.setAlwaysOnTop(true); + setBounds(20, 350, 16, 16); +} + +void GuiClearButton::paintButton(Graphics& g, bool over, bool down) +{ + +} + +void GuiClearButton::buttonStateChanged() +{ + if(isDown() || isOver()) + { + m_image1.setVisible(false); + m_image2.setVisible(true); + } + else + { + m_image1.setVisible(true); + m_image2.setVisible(false); + } +} + + +GuiCopyButton::GuiCopyButton() : Button("CopyButton") +{ + setClickingTogglesState(false); + setAlwaysOnTop(true); + m_image1.setImage(ImageCache::getFromMemory(BinaryData::copy1_png, BinaryData::copy1_pngSize)); + m_image2.setImage(ImageCache::getFromMemory(BinaryData::copy1_png, BinaryData::copy1_pngSize)); + m_image3.setImage(ImageCache::getFromMemory(BinaryData::copy2_png, BinaryData::copy2_pngSize)); + m_image1.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image2.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image3.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image1.setOverlayColour(Gui::getColorTxt()); + m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); + addAndMakeVisible(m_image3, 0); + addAndMakeVisible(m_image1, -1); + addChildComponent(m_image2, -1); + m_image1.setAlwaysOnTop(true); + m_image2.setAlwaysOnTop(true); + setBounds(38, 350, 16, 16); +} + +void GuiCopyButton::paintButton(Graphics& g, bool over, bool down) +{ + +} + +void GuiCopyButton::buttonStateChanged() +{ + if(isDown() || isOver()) + { + m_image1.setVisible(false); + m_image2.setVisible(true); + } + else + { + m_image1.setVisible(true); + m_image2.setVisible(false); + } +} + + + + +GuiLevelButton::GuiLevelButton() : Button("LevelButton") +{ + setClickingTogglesState(false); + setAlwaysOnTop(true); + m_image1.setImage(ImageCache::getFromMemory(BinaryData::option_png, BinaryData::option_pngSize)); + m_image2.setImage(ImageCache::getFromMemory(BinaryData::option_png, BinaryData::option_pngSize)); + m_image3.setImage(ImageCache::getFromMemory(BinaryData::flower2_png, BinaryData::flower2_pngSize)); + m_image1.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image2.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image3.setTransformToFit(Rectangle(0.f, 0.f, 16.f, 16.f), RectanglePlacement::stretchToFit); + m_image1.setOverlayColour(Gui::getColorTxt()); + m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); + addAndMakeVisible(m_image3, 0); + addAndMakeVisible(m_image1, -1); + addChildComponent(m_image2, -1); + m_image1.setAlwaysOnTop(true); + m_image2.setAlwaysOnTop(true); + setBounds(2, 350, 16, 16); +} + +void GuiLevelButton::paintButton(Graphics& g, bool over, bool down) +{ + +} + +void GuiLevelButton::buttonStateChanged() +{ + if(isDown() || isOver()) + { + m_image1.setVisible(false); + m_image2.setVisible(true); + } + else + { + m_image1.setVisible(true); + m_image2.setVisible(false); + } +} diff --git a/Source/GuiFlowerButton.hpp b/Source/Gui/GuiFlowerButton.hpp similarity index 59% rename from Source/GuiFlowerButton.hpp rename to Source/Gui/GuiFlowerButton.hpp index 2afbb22b..5a346dab 100644 --- a/Source/GuiFlowerButton.hpp +++ b/Source/Gui/GuiFlowerButton.hpp @@ -7,7 +7,7 @@ #ifndef __CAMOMILE_GUI_FLOWER_BUTTON__ #define __CAMOMILE_GUI_FLOWER_BUTTON__ -#include "InstanceProcessor.hpp" +#include "../InstanceProcessor.hpp" // ==================================================================================== // // GUI FLOWER BUTTON // @@ -36,8 +36,37 @@ class GuiClearButton : public Button private: DrawableImage m_image1; DrawableImage m_image2; + DrawableImage m_image3; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiClearButton) }; +class GuiCopyButton : public Button +{ +public: + GuiCopyButton(); + void paintButton(Graphics& g, bool over, bool down) final; + void buttonStateChanged() final; +private: + DrawableImage m_image1; + DrawableImage m_image2; + DrawableImage m_image3; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiCopyButton) +}; + +class GuiLevelButton : public Button +{ +public: + GuiLevelButton(); + void paintButton(Graphics& g, bool over, bool down) final; + void buttonStateChanged() final; +private: + DrawableImage m_image1; + DrawableImage m_image2; + DrawableImage m_image3; + + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiLevelButton) +}; + #endif diff --git a/Source/GuiLabel.cpp b/Source/Gui/GuiLabel.cpp similarity index 92% rename from Source/GuiLabel.cpp rename to Source/Gui/GuiLabel.cpp index 12f4310b..0a11e2da 100644 --- a/Source/GuiLabel.cpp +++ b/Source/Gui/GuiLabel.cpp @@ -15,7 +15,7 @@ GuiLabel::GuiLabel(InstanceProcessor& processor, pd::Gui const& gui) : Label("label", String(gui.getName()) + " " + gui.getLabel()) { - std::array labelpos(gui.getLabelPosition()); + std::array labelpos(gui.getLabelPosition()); setFont(Gui::getFont()); setJustificationType(Justification::topLeft); setColour(Label::backgroundColourId, Gui::getColorInv()); diff --git a/Source/GuiLabel.hpp b/Source/Gui/GuiLabel.hpp similarity index 100% rename from Source/GuiLabel.hpp rename to Source/Gui/GuiLabel.hpp diff --git a/Source/GuiNumbox.cpp b/Source/Gui/GuiNumbox.cpp similarity index 100% rename from Source/GuiNumbox.cpp rename to Source/Gui/GuiNumbox.cpp diff --git a/Source/GuiNumbox.hpp b/Source/Gui/GuiNumbox.hpp similarity index 100% rename from Source/GuiNumbox.hpp rename to Source/Gui/GuiNumbox.hpp diff --git a/Source/GuiParameter.cpp b/Source/Gui/GuiParameter.cpp similarity index 91% rename from Source/GuiParameter.cpp rename to Source/Gui/GuiParameter.cpp index c6479cbb..dea66a70 100644 --- a/Source/GuiParameter.cpp +++ b/Source/Gui/GuiParameter.cpp @@ -15,11 +15,11 @@ m_processor(processor), m_type(gui.getType()), m_minimum(gui.getMinimum()), m_maximum(gui.getMaximum()), -m_index(processor.getParameterIndex(gui.getBindingName())+1), +m_index(processor.getParameterIndex(gui.getReceiveTie())+1), m_value(gui.getValue()), m_edited(false) { - std::array bounds(gui.getBounds()); + std::array bounds(gui.getBounds()); setBounds(int(bounds[0]), int(bounds[1]), int(bounds[2]), int(bounds[3])); setOpaque(true); if(m_index) diff --git a/Source/GuiParameter.hpp b/Source/Gui/GuiParameter.hpp similarity index 94% rename from Source/GuiParameter.hpp rename to Source/Gui/GuiParameter.hpp index a3c74857..f79d1b19 100644 --- a/Source/GuiParameter.hpp +++ b/Source/Gui/GuiParameter.hpp @@ -7,7 +7,7 @@ #ifndef __CAMOMILE_GUI_PARAMETER__ #define __CAMOMILE_GUI_PARAMETER__ -#include "InstanceProcessor.hpp" +#include "../InstanceProcessor.hpp" // ==================================================================================== // // GUI PARAMETER // diff --git a/Source/GuiPatcher.cpp b/Source/Gui/GuiPatcher.cpp similarity index 90% rename from Source/GuiPatcher.cpp rename to Source/Gui/GuiPatcher.cpp index e3e396c0..0998da13 100644 --- a/Source/GuiPatcher.cpp +++ b/Source/Gui/GuiPatcher.cpp @@ -34,8 +34,8 @@ void GuiPatcher::setPatch(InstanceProcessor& processor, pd::Patch const& patch) m_labels.clear(); if(patch.isValid()) { - std::array size(patch.getSize()); - setSize(std::max(size[0], 120.f), std::max(size[1], 20.f)); + std::array size(patch.getSize()); + setSize(std::max(size[0], 120), std::max(size[1], 20)); std::vector guis(patch.getGuis()); for(size_t i = 0; i < guis.size(); ++i) { @@ -69,7 +69,7 @@ void GuiPatcher::setPatch(InstanceProcessor& processor, pd::Patch const& patch) } } - std::vector cmts(patch.getComments()); + std::vector cmts(patch.getComments()); for(size_t i = 0; i < cmts.size(); ++i) { m_comment.add(new GuiComment(cmts[i])); diff --git a/Source/GuiPatcher.hpp b/Source/Gui/GuiPatcher.hpp similarity index 100% rename from Source/GuiPatcher.hpp rename to Source/Gui/GuiPatcher.hpp diff --git a/Source/GuiRadio.cpp b/Source/Gui/GuiRadio.cpp similarity index 100% rename from Source/GuiRadio.cpp rename to Source/Gui/GuiRadio.cpp diff --git a/Source/GuiRadio.hpp b/Source/Gui/GuiRadio.hpp similarity index 100% rename from Source/GuiRadio.hpp rename to Source/Gui/GuiRadio.hpp diff --git a/Source/GuiSlider.cpp b/Source/Gui/GuiSlider.cpp similarity index 100% rename from Source/GuiSlider.cpp rename to Source/Gui/GuiSlider.cpp diff --git a/Source/GuiSlider.hpp b/Source/Gui/GuiSlider.hpp similarity index 100% rename from Source/GuiSlider.hpp rename to Source/Gui/GuiSlider.hpp diff --git a/Source/GuiToggle.cpp b/Source/Gui/GuiToggle.cpp similarity index 100% rename from Source/GuiToggle.cpp rename to Source/Gui/GuiToggle.cpp diff --git a/Source/GuiToggle.hpp b/Source/Gui/GuiToggle.hpp similarity index 100% rename from Source/GuiToggle.hpp rename to Source/Gui/GuiToggle.hpp diff --git a/Source/GuiWindow.cpp b/Source/Gui/GuiWindow.cpp similarity index 100% rename from Source/GuiWindow.cpp rename to Source/Gui/GuiWindow.cpp diff --git a/Source/GuiWindow.hpp b/Source/Gui/GuiWindow.hpp similarity index 91% rename from Source/GuiWindow.hpp rename to Source/Gui/GuiWindow.hpp index 7f1c75f7..b56fac2e 100644 --- a/Source/GuiWindow.hpp +++ b/Source/Gui/GuiWindow.hpp @@ -7,7 +7,7 @@ #ifndef __CAMOMILE_GUI_WINDOW__ #define __CAMOMILE_GUI_WINDOW__ -#include "InstanceProcessor.hpp" +#include "../InstanceProcessor.hpp" // ==================================================================================== // // GUI WINDOW // diff --git a/Source/GuiConsole.cpp b/Source/GuiConsole.cpp deleted file mode 100644 index fd2f3a08..00000000 --- a/Source/GuiConsole.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - // Copyright (c) 2015 Pierre Guillot. - // For information on usage and redistribution, and for a DISCLAIMER OF ALL - // WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "GuiConsole.hpp" -#include "GuiFlowerButton.hpp" -#include "Gui.hpp" - -// ==================================================================================== // -// GUI CONSOLE // -// ==================================================================================== // - -GuiConsole::GuiConsole() -{ - m_text.setMultiLine(true); - m_text.setReadOnly(true); - m_text.setScrollbarsShown(true); - m_text.setScrollBarThickness(1); - m_text.setCaretVisible(false); - m_text.setPopupMenuEnabled (true); - m_text.setColour(juce::TextEditor::backgroundColourId, Gui::getColorInv()); - m_text.setColour(juce::TextEditor::outlineColourId, Gui::getColorInv()); - m_text.setColour(juce::TextEditor::shadowColourId,Gui::getColorInv()); - m_text.setColour(juce::TextEditor::textColourId, Gui::getColorTxt()); - m_text.setFont(Gui::getFont()); - m_text.setBounds(0, 0, 300, 350); - m_text.moveCaretToEnd(); - - std::vector messages(pd::Pd::getConsole()); - for(size_t i = 0; i < messages.size(); ++i) - { - m_text.moveCaretToEnd(); - m_text.setColour(juce::TextEditor::textColourId, Gui::getColorTxt()); - m_text.insertTextAtCaret(messages[i].message); - } - addAndMakeVisible(&m_text, 1); - - m_button.addListener(this); - addAndMakeVisible(&m_button); - - startTimer(100); -} - -GuiConsole::~GuiConsole() -{ - stopTimer(); -} - -void GuiConsole::buttonClicked(Button* button) -{ - pd::Pd::clearConsole(); -} - -void GuiConsole::timerCallback() -{ - if(pd::Pd::hasConsoleChanged()) - { - m_text.clear(); - std::vector messages(pd::Pd::getConsole()); - for(size_t i = 0; i < messages.size(); ++i) - { - m_text.moveCaretToEnd(); - m_text.setColour(juce::TextEditor::textColourId, Gui::getColorTxt()); - m_text.insertTextAtCaret(messages[i].message); - } - } -} - - - diff --git a/Source/GuiConsole.hpp b/Source/GuiConsole.hpp deleted file mode 100644 index 5b0f5093..00000000 --- a/Source/GuiConsole.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - // Copyright (c) 2015 Pierre Guillot. - // For information on usage and redistribution, and for a DISCLAIMER OF ALL - // WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#ifndef __CAMOMILE_GUI_CONSOLE__ -#define __CAMOMILE_GUI_CONSOLE__ - -#include "InstanceProcessor.hpp" -#include "GuiFlowerButton.hpp" -// ==================================================================================== // -// GUI TOGGLE // -// ==================================================================================== // - -class GuiConsole : public juce::Component, public juce::Timer, public juce::Button::Listener -{ -public: - GuiConsole(); - ~GuiConsole(); - void timerCallback() final; - void buttonClicked(Button* button) final; -private: - GuiClearButton m_button; - juce::TextEditor m_text; - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GuiConsole) -}; - - -#endif diff --git a/Source/GuiFlowerButton.cpp b/Source/GuiFlowerButton.cpp deleted file mode 100644 index 4ff2a565..00000000 --- a/Source/GuiFlowerButton.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - // Copyright (c) 2015 Pierre Guillot. - // For information on usage and redistribution, and for a DISCLAIMER OF ALL - // WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "GuiFlowerButton.hpp" -#include "Gui.hpp" - -// ==================================================================================== // -// GUI BUTTON // -// ==================================================================================== // - -GuiFlowerButton::GuiFlowerButton() : Button("CamomileButton") -{ - setClickingTogglesState(false); - setAlwaysOnTop(true); - m_image1.setImage(ImageCache::getFromMemory(BinaryData::flower1_png, BinaryData::flower1_pngSize)); - m_image2.setImage(ImageCache::getFromMemory(BinaryData::flower1_png, BinaryData::flower1_pngSize)); - m_image3.setImage(ImageCache::getFromMemory(BinaryData::flower2_png, BinaryData::flower2_pngSize)); - m_image1.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); - m_image2.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); - m_image3.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); - m_image1.setOverlayColour(Gui::getColorTxt()); - m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); - addAndMakeVisible(m_image1, 0); - addChildComponent(m_image2, 0); - addAndMakeVisible(m_image3, -1); - m_image3.setAlwaysOnTop(true); - setBounds(3, 3, 15, 15); -} - -void GuiFlowerButton::paintButton(Graphics& g, bool over, bool down) -{ - -} - -void GuiFlowerButton::buttonStateChanged() -{ - if(isDown() || isOver()) - { - m_image1.setVisible(false); - m_image2.setVisible(true); - } - else - { - m_image1.setVisible(true); - m_image2.setVisible(false); - } -} - - - -GuiClearButton::GuiClearButton() : Button("ClearButton") -{ - setClickingTogglesState(false); - setAlwaysOnTop(true); - m_image1.setImage(ImageCache::getFromMemory(BinaryData::clear0_png, BinaryData::clear0_pngSize)); - m_image2.setImage(ImageCache::getFromMemory(BinaryData::clear1_png, BinaryData::clear1_pngSize)); - m_image1.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); - m_image2.setTransformToFit(Rectangle(0.f, 0.f, 15.f, 15.f), RectanglePlacement::stretchToFit); - m_image1.setOverlayColour(Gui::getColorTxt()); - m_image2.setOverlayColour(Gui::getColorTxt().interpolatedWith(Gui::getColorBg(), 0.5f)); - addAndMakeVisible(m_image1, 0); - addChildComponent(m_image2, 0); - - setBounds(3, 353, 15, 15); -} - -void GuiClearButton::paintButton(Graphics& g, bool over, bool down) -{ - -} - -void GuiClearButton::buttonStateChanged() -{ - if(isDown() || isOver()) - { - m_image1.setVisible(false); - m_image2.setVisible(true); - } - else - { - m_image1.setVisible(true); - m_image2.setVisible(false); - } -} diff --git a/Source/InstanceEditor.cpp b/Source/InstanceEditor.cpp index 20c20ffa..8ba06675 100644 --- a/Source/InstanceEditor.cpp +++ b/Source/InstanceEditor.cpp @@ -14,7 +14,7 @@ InstanceEditor::InstanceEditor(InstanceProcessor& p) : AudioProcessorEditor(&p), m_processor(p) { m_button.addListener(this); - m_processor.addListener(this); + m_processor.PatchManager::addListener(this); addAndMakeVisible(m_patcher); addAndMakeVisible(m_button); setOpaque(true); @@ -25,7 +25,7 @@ InstanceEditor::InstanceEditor(InstanceProcessor& p) : AudioProcessorEditor(&p), InstanceEditor::~InstanceEditor() { - m_processor.removeListener(this); + m_processor.PatchManager::removeListener(this); } void InstanceEditor::paint(Graphics& g) @@ -40,7 +40,8 @@ void InstanceEditor::paint(Graphics& g) const pd::Patch patch = m_processor.getPatch(); if(patch.isValid()) { - g.drawText(String(patch.getName()).trimCharactersAtEnd(".pd"), 0, 0, getWidth(), 20, juce::Justification::centred); + g.drawText(String(patch.getName()).upToLastOccurrenceOf(StringRef(".pd"), false, false), + 0, 0, getWidth(), 20, juce::Justification::centred); } else { @@ -72,10 +73,11 @@ void InstanceEditor::buttonClicked(Button* button) const int result = m.showAt(button->getScreenBounds().translated(-2, 3)); if(result == 1) { - Gui::getWindow().setContentOwned(new GuiAbout(), false); - Gui::getWindow().setName("About Camomile " + String(JucePlugin_VersionString)); - Gui::getWindow().addToDesktop(); - Gui::getWindow().grabKeyboardFocus(); + m_window.setContentOwned(new GuiAbout(), false); + m_window.setName("About Camomile " + String(JucePlugin_VersionString)); + m_window.addToDesktop(); + m_window.toFront(false); + m_window.setAlwaysOnTop(true); } else if(result == 2) { @@ -88,7 +90,8 @@ void InstanceEditor::buttonClicked(Button* button) juce::File file(fc.getResult()); if(file.getFileExtension() == juce::String(".pd")) { - m_processor.loadPatch(file); + m_processor.loadPatch(file.getFileName().toStdString(), + file.getParentDirectory().getFullPathName().toStdString()); } } } @@ -98,36 +101,34 @@ void InstanceEditor::buttonClicked(Button* button) if(fc.browseForFileToOpen()) { juce::File file(fc.getResult()); - if(file.getFileExtension() == juce::String(".pd")) + if(file.exists() && file.getFileExtension() == juce::String(".pd")) { - m_processor.loadPatch(file); + m_processor.loadPatch(file.getFileName().toStdString(), + file.getParentDirectory().getFullPathName().toStdString()); } } } - } else if(result == 3) { - m_processor.loadPatch(juce::File()); + m_processor.closePatch(); } else if(result == 4) { const pd::Patch patch = m_processor.getPatch(); if(patch.isValid()) { - File file(patch.getPath() + File::separatorString.toStdString() + patch.getName()); - if(file.exists()) - { - m_processor.loadPatch(file); - } + m_processor.loadPatch(patch.getName(), patch.getPath()); } } else if(result == 5) { - Gui::getWindow().setContentOwned(new GuiConsole(), false); - Gui::getWindow().setName("Camomile Console"); - Gui::getWindow().addToDesktop(); - Gui::getWindow().grabKeyboardFocus(); + m_window.setContentOwned(new GuiConsole(m_processor), false); + m_window.setName("Camomile Console"); + m_window.addToDesktop(); + m_window.grabKeyboardFocus(); + m_window.toFront(true); + m_window.setAlwaysOnTop(true); } else if(result == 6) { diff --git a/Source/InstanceEditor.hpp b/Source/InstanceEditor.hpp index bbf720b4..53bdc4ed 100644 --- a/Source/InstanceEditor.hpp +++ b/Source/InstanceEditor.hpp @@ -4,16 +4,16 @@ // WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ -#ifndef __CAMOMILE_PATCH_EDITOR__ -#define __CAMOMILE_PATCH_EDITOR__ +#ifndef __CAMOMILE_INSTANCE_EDITOR__ +#define __CAMOMILE_INSTANCE_EDITOR__ -#include "Gui.hpp" +#include "Gui/Gui.hpp" // ==================================================================================== // // INSTANCE EDITOR // // ==================================================================================== // -class InstanceEditor : public AudioProcessorEditor, public InstanceProcessor::Listener, public Button::Listener +class InstanceEditor : public AudioProcessorEditor, public pd::PatchManager::Listener, public Button::Listener { public: InstanceEditor(InstanceProcessor&); @@ -25,11 +25,11 @@ class InstanceEditor : public AudioProcessorEditor, public InstanceProcessor::Li InstanceProcessor& m_processor; GuiFlowerButton m_button; GuiPatcher m_patcher; - Toolbar m_menu; + GuiWindow m_window; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(InstanceEditor) }; -#endif // PLUGINEDITOR_H_INCLUDED +#endif diff --git a/Source/InstanceProcessor.cpp b/Source/InstanceProcessor.cpp index 777cbef7..c873a23a 100644 --- a/Source/InstanceProcessor.cpp +++ b/Source/InstanceProcessor.cpp @@ -8,27 +8,30 @@ #include "InstanceEditor.hpp" #include "LookAndFeel.hpp" -InstanceProcessor::InstanceProcessor() : pd::Instance(pd::Pd::createInstance()) -{ - Gui::addInstance(); - m_parameters.resize(32); +pd::Symbol InstanceProcessor::s_playing; +pd::Symbol InstanceProcessor::s_measure; + +InstanceProcessor::InstanceProcessor() : pd::Instance("Camomile"), +m_parameters(64), m_playing_list(2), m_measure_list(5) +{ + sendConsolePost(std::string("Camomile ") + + std::string(JucePlugin_VersionString) + + std::string(" for Pure Data ") + + pd::Environment::getPdVersion()); + s_playing = pd::Symbol("playing"); + s_measure = pd::Symbol("measure"); busArrangement.inputBuses.getReference(0).channels = AudioChannelSet::discreteChannels(16); busArrangement.outputBuses.getReference(0).channels = AudioChannelSet::discreteChannels(16); + m_path = juce::File::getCurrentWorkingDirectory().getFullPathName(); } InstanceProcessor::~InstanceProcessor() { - Gui::removeInstance(); - std::lock_guard guard(m_mutex); - m_listeners.clear(); + ; } const String InstanceProcessor::getName() const { - if(m_patch.isValid()) - { - return String(JucePlugin_Name + std::string(" ") + m_patch.getName()); - } return String(JucePlugin_Name); } @@ -41,7 +44,7 @@ const String InstanceProcessor::getParameterName(int index) { if(m_parameters[index].isValid()) { - return m_parameters[index].getName(512); + return m_parameters[index].getName(); } else { @@ -51,7 +54,7 @@ const String InstanceProcessor::getParameterName(int index) float InstanceProcessor::getParameter(int index) { - return m_parameters[index].getValue(); + return m_parameters[index].getValueNormalized(); } float InstanceProcessor:: getParameterNonNormalized(int index) const @@ -72,7 +75,7 @@ void InstanceProcessor::setParameterNonNormalizedNotifyingHost(int index, float void InstanceProcessor::setParameter(int index, float newValue) { - m_parameters[index].setValue(newValue); + m_parameters[index].setValueNormalized(newValue); } float InstanceProcessor::getParameterDefaultValue(int index) @@ -82,12 +85,12 @@ float InstanceProcessor::getParameterDefaultValue(int index) const String InstanceProcessor::getParameterText(int index) { - return m_parameters[index].getText(index, 512); + return m_parameters[index].getTextForValue(); } String InstanceProcessor::getParameterText(int index, int size) { - return m_parameters[index].getText(index, size); + return m_parameters[index].getTextForValue(); } String InstanceProcessor::getParameterLabel(int index) const @@ -97,12 +100,12 @@ String InstanceProcessor::getParameterLabel(int index) const int InstanceProcessor::getParameterNumSteps(int index) { - return m_parameters[index].getNumSteps(); + return m_parameters[index].getNumberOfSteps(); } bool InstanceProcessor::isParameterAutomatable(int index) const { - return m_parameters[index].isAutomatable(); + return true; } bool InstanceProcessor::isParameterOrientationInverted(int index) const @@ -112,16 +115,16 @@ bool InstanceProcessor::isParameterOrientationInverted(int index) const bool InstanceProcessor::isMetaParameter(int index) const { - return m_parameters[index].isMetaParameter(); + return false; } -int InstanceProcessor::getParameterIndex(pd::BindingName const& name) +int InstanceProcessor::getParameterIndex(pd::Tie const& name) { - if(name != nullptr) + if(name != pd::Tie()) { for(size_t i = 0; i < m_parameters.size(); i++) { - if(m_parameters[i].getBindingName() == name) + if(m_parameters[i].getTie() == name) { return i; } @@ -134,7 +137,7 @@ int InstanceProcessor::getParameterIndex(String const& name) { for(size_t i = 0; i < m_parameters.size(); i++) { - if(m_parameters[i].getName(512) == name) + if(m_parameters[i].getName() == name) { return i; } @@ -145,14 +148,16 @@ int InstanceProcessor::getParameterIndex(String const& name) void InstanceProcessor::parametersChanged() { size_t index = 0; - + lock(); for(size_t i = 0; i < m_parameters.size(); i++) { - m_parameters[i] = Parameter(); + m_parameters[i] = pd::Parameter(); } - if(m_patch.isValid()) + unlock(); + pd::Patch patch(getPatch()); + if(patch.isValid()) { - std::vector guis(m_patch.getGuis()); + std::vector guis(patch.getGuis()); for(auto const& gui : guis) { if(gui.isParameter()) @@ -160,16 +165,22 @@ void InstanceProcessor::parametersChanged() bool ok = true; for(size_t i = 0; i < m_parameters.size() && m_parameters[i].isValid(); i++) { - if(gui.getName() == m_parameters[i].getName(512)) + if(gui.getName() == m_parameters[i].getName()) + { + sendConsoleError("Warning in patch " + patch.getName() + ": " + gui.getName() + " parameter is duplicated !"); + ok = false; + break; + } + else if(gui.getReceiveTie() == m_parameters[i].getTie()) { - pd::Pd::errorToConsole("Warning in patch " + m_patch.getName() + ": " + gui.getName() + " parameter is duplicated !"); + sendConsoleError("Warning in patch " + patch.getName() + ": " + gui.getName() + " parameter shares the same receive symbol with another parameter !"); ok = false; break; } } if(ok) { - m_parameters[index] = Parameter(gui); + m_parameters[index] = pd::Parameter(gui); index++; } } @@ -180,23 +191,19 @@ void InstanceProcessor::parametersChanged() { if(m_parameters[i].isValid()) { - setParameterNotifyingHost(i, m_parameters[i].getValue()); + setParameterNotifyingHost(i, m_parameters[i].getValueNormalized()); } } } void InstanceProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) { - lock(); - prepareDsp(getTotalNumInputChannels(), getTotalNumOutputChannels(), sampleRate, samplesPerBlock); - unlock(); + prepareDsp(16, 16, sampleRate, samplesPerBlock); } void InstanceProcessor::releaseResources() { - lock(); releaseDsp(); - unlock(); } void InstanceProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& midiMessages) @@ -205,40 +212,132 @@ void InstanceProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& midi { buffer.clear(i, 0, buffer.getNumSamples()); } + bool infos = false; + AudioPlayHead* playhead = getPlayHead(); + if(playhead && m_patch_tie) + { + infos = playhead->getCurrentPosition(m_playinfos); + } lock(); - MidiMessage message; - MidiBuffer::Iterator it (midiMessages); - int samplePosition = buffer.getNumSamples(); - while(it.getNextEvent (message, samplePosition)) { - if(message.isNoteOn()) - { - sendNoteOn(message.getChannel(), message.getNoteNumber(), message.getVelocity()); - } - if(message.isNoteOff()) + m_midi.clear(); + if(infos) { - sendNoteOff(message.getChannel(), message.getNoteNumber(), message.getVelocity()); + m_playing_list.setFloat(0, m_playinfos.isPlaying); + m_playing_list.setFloat(1, m_playinfos.timeInSeconds); + sendMessageAnything(m_patch_tie, s_playing, m_playing_list); + m_measure_list.setFloat(0, m_playinfos.bpm); + m_measure_list.setFloat(1, m_playinfos.timeSigNumerator); + m_measure_list.setFloat(2, m_playinfos.timeSigDenominator); + m_measure_list.setFloat(3, m_playinfos.ppqPosition); + m_measure_list.setFloat(4, m_playinfos.ppqPositionOfLastBarStart); + sendMessageAnything(m_patch_tie, s_measure, m_measure_list); } - if(message.isPitchWheel()) + for(size_t i = 0; i < m_parameters.size() && m_parameters[i].isValid(); ++i) { - sendPitchBend(message.getChannel(), message.getPitchWheelValue()); + sendMessageFloat(m_parameters[i].getTie(), m_parameters[i].getValueNonNormalized()); } - if(message.isAftertouch()) + + MidiMessage message; + MidiBuffer::Iterator it(midiMessages); + int position = midiMessages.getFirstEventTime(); + while(it.getNextEvent(message, position)) { - sendAfterTouch(message.getChannel(), message.getAfterTouchValue()); + if(message.isNoteOnOrOff()) + { + sendMidiNote(message.getChannel(), message.getNoteNumber(), message.getVelocity()); + } + else if(message.isController()) + { + sendMidiControlChange(message.getChannel(), message.getControllerNumber(), message.getControllerValue()); + } + else if(message.isPitchWheel()) + { + sendMidiPitchBend(message.getChannel(), message.getPitchWheelValue()); + } + else if(message.isChannelPressure()) + { + sendMidiAfterTouch(message.getChannel(), message.getChannelPressureValue()); + } + else if(message.isAftertouch()) + { + sendMidiPolyAfterTouch(message.getChannel(), message.getNoteNumber(), message.getAfterTouchValue()); + } + else if(message.isProgramChange()) + { + sendMidiProgramChange(message.getChannel(), message.getProgramChangeNumber()); + } } } - - for(size_t i = 0; i < m_parameters.size() && m_parameters[i].isValid(); i++) - { - send(m_parameters[i].getBindingName(), m_parameters[i].getValueNonNormalized()); - } + midiMessages.clear(); performDsp(buffer.getNumSamples(), getTotalNumInputChannels(), buffer.getArrayOfReadPointers(), getTotalNumOutputChannels(), buffer.getArrayOfWritePointers()); + midiMessages.swapWith(m_midi); unlock(); - midiMessages.clear(); +} + +void InstanceProcessor::receiveConsolePost(std::string const& message) +{ + pd::Console::History::addPost(message); +} + +void InstanceProcessor::receiveConsoleLog(std::string const& message) +{ + pd::Console::History::addLog(message); +} + +void InstanceProcessor::receiveConsoleError(std::string const& message) +{ + pd::Console::History::addError(message); +} + +void InstanceProcessor::receiveConsoleFatal(std::string const& message) +{ + pd::Console::History::addFatal(message); +} + +void InstanceProcessor::receiveMidiNoteOn(int channel, int pitch, int velocity) +{ + if(velocity) + { + m_midi.addEvent(MidiMessage::noteOn(channel+1, pitch, uint8(velocity)), 0); + } + else + { + m_midi.addEvent(MidiMessage::noteOff(channel+1, pitch, uint8(velocity)), 0); + } +} + +void InstanceProcessor::receiveMidiControlChange(int channel, int control, int value) +{ + m_midi.addEvent(MidiMessage::controllerEvent(channel+1, control, value), 0); +} + +void InstanceProcessor::receiveMidiProgramChange(int channel, int value) +{ + m_midi.addEvent(MidiMessage::programChange(channel+1, value), 0); +} + +void InstanceProcessor::receiveMidiPitchBend(int channel, int value) +{ + m_midi.addEvent(MidiMessage::pitchWheel(channel+1, value), 0); +} + +void InstanceProcessor::receiveMidiAfterTouch(int channel, int value) +{ + m_midi.addEvent(MidiMessage::channelPressureChange(channel+1, value), 0); +} + +void InstanceProcessor::receiveMidiPolyAfterTouch(int channel, int pitch, int value) +{ + m_midi.addEvent(MidiMessage::aftertouchChange(channel+1, pitch, value), 0); +} + +void InstanceProcessor::receiveMidiByte(int port, int value) +{ + m_midi.addEvent(MidiMessage(port, value), 0); } AudioProcessorEditor* InstanceProcessor::createEditor() @@ -246,71 +345,71 @@ AudioProcessorEditor* InstanceProcessor::createEditor() return new InstanceEditor(*this); } -void InstanceProcessor::loadPatch(const juce::File& file) +void InstanceProcessor::loadPatch(std::string const& name, std::string const& path) { suspendProcessing(true); if(isSuspended()) { - if(true) { releaseDsp(); - if(file.exists() && file.getFileExtension() == String(".pd")) + m_patch = pd::Patch(*this, name, path); + pd::Patch patch(getPatch()); + if(patch.isValid()) { - m_patch = createPatch(file.getFileName().toStdString(), file.getParentDirectory().getFullPathName().toStdString()); + m_patch_tie = pd::Tie(std::to_string(patch.getDollarZero()) + "-playhead"); } else { - m_patch = pd::Patch(); + m_patch_tie = pd::Tie(); + sendConsoleError("Camomile can't find the patch : " + name); } } parametersChanged(); - prepareDsp(getTotalNumInputChannels(), getTotalNumOutputChannels(), getSampleRate(), getBlockSize()); + prepareDsp(getTotalNumInputChannels(), getTotalNumOutputChannels(), + AudioProcessor::getSampleRate(), getBlockSize()); - std::vector listeners = getListeners(); - for(auto it : listeners) - { - it->patchChanged(); - } + pd::PatchManager::notifyListeners(); } suspendProcessing(false); } -void InstanceProcessor::addListener(Listener* listener) +void InstanceProcessor::closePatch() { - if(listener) + suspendProcessing(true); + if(isSuspended()) { - std::lock_guard guard(m_mutex); - m_listeners.insert(listener); + { + releaseDsp(); + m_patch = pd::Patch(); + m_patch_tie = pd::Tie(); + } + + parametersChanged(); + prepareDsp(getTotalNumInputChannels(), getTotalNumOutputChannels(), + AudioProcessor::getSampleRate(), getBlockSize()); + + pd::PatchManager::notifyListeners(); } + suspendProcessing(false); } -void InstanceProcessor::removeListener(Listener* listener) +void InstanceProcessor::getStateInformation(MemoryBlock& destData) { - if(listener) + juce::XmlElement xml(String("CamomileSettings")); + + pd::Patch patch(getPatch()); + if(patch.isValid()) { - std::lock_guard guard(m_mutex); - m_listeners.erase(listener); + xml.setAttribute(String("name"), patch.getName()); + xml.setAttribute(String("path"), patch.getPath()); } -} - -std::vector InstanceProcessor::getListeners() const noexcept -{ - std::lock_guard guard(m_mutex); - return std::vector(m_listeners.begin(), m_listeners.end()); -} - -void InstanceProcessor::getStateInformation(MemoryBlock& destData) -{ - XmlElement xml(String("CamomileSettings")); - xml.setAttribute(String("name"), m_patch.getName()); - xml.setAttribute(String("path"), m_patch.getPath()); XmlElement* params = xml.createNewChildElement("params"); for(size_t i = 0; i < m_parameters.size(); i++) { if(m_parameters[i].isValid()) { - params->setAttribute(String(m_parameters[i].getName(512)), double(m_parameters[i].getValue())); + params->setAttribute(String(m_parameters[i].getName()), double(m_parameters[i].getValueNormalized())); } } copyXmlToBinary(xml, destData); @@ -325,8 +424,27 @@ void InstanceProcessor::setStateInformation (const void* data, int sizeInBytes) { String name = xml->getStringAttribute("name"); String path = xml->getStringAttribute("path"); - File file(path + File::separatorString + name); - loadPatch(file); + if(File::isAbsolutePath(path)) + { + File file(path + File::separatorString + name); + if(!file.exists()) + { + file = File(m_path + File::separatorString + name); + if(!file.exists()) + { + file = File(File::getCurrentWorkingDirectory().getFullPathName() + File::separatorString + name); + if(!file.exists()) + { + file = File(File::getSpecialLocation(juce::File::SpecialLocationType::userDocumentsDirectory).getFullPathName() + File::separatorString + name); + if(!file.exists()) + { + file = File(path + File::separatorString + name); + } + } + } + } + loadPatch(name.toStdString(), path.toStdString()); + } XmlElement* params = xml->getChildByName(juce::StringRef("params")); if(params) @@ -351,133 +469,6 @@ AudioProcessor* JUCE_CALLTYPE createPluginFilter() return new InstanceProcessor(); } -// ==================================================================================== // -// PARAMETERS // -// ==================================================================================== // - - -InstanceProcessor::Parameter::Parameter() -: m_valid(false), m_value (0.f), m_min(0.f), m_max(0.f), -m_name (""), m_label(""), m_bname(nullptr), m_nsteps(0) -{ - -} - -InstanceProcessor::Parameter::Parameter(Parameter const& other) -: m_valid(other.m_valid), m_value (other.m_value), -m_min(other.m_min), m_max(other.m_max), -m_name (other.m_name), m_label(other.m_label), -m_bname(other.m_bname), m_nsteps(other.m_nsteps) -{ - -} - -InstanceProcessor::Parameter::Parameter(pd::Gui const& gui) -: m_valid(true), m_value (0.f), -m_min(gui.getMinimum()), -m_max(gui.getMaximum()), -m_name(gui.getName()), -m_label(gui.getLabel()), -m_bname(gui.getBindingName()), -m_nsteps(gui.getNumberOfSteps()) -{ - setValueNonNormalized(gui.getValue()); -} - -InstanceProcessor::Parameter::~Parameter() -{ - -} - -InstanceProcessor::Parameter& InstanceProcessor::Parameter::operator=(InstanceProcessor::Parameter const& other) -{ - m_valid = other.m_valid; - m_value = other.m_value; - m_min = other.m_min; - m_max = other.m_max; - m_name = other.m_name; - m_label = other.m_label; - m_bname = other.m_bname; - m_nsteps= other.m_nsteps; - return *this; -} - -InstanceProcessor::Parameter& InstanceProcessor::Parameter::operator=(InstanceProcessor::Parameter&& other) -{ - m_valid = other.m_valid; - m_value = other.m_value; - m_min = other.m_min; - m_max = other.m_max; - std::swap(m_name, other.m_name); - std::swap(m_label, other.m_label); - m_bname = other.m_bname; - m_nsteps= other.m_nsteps; - return *this; -} - -bool InstanceProcessor::Parameter::isValid() const noexcept -{ - return m_valid; -} - -float InstanceProcessor::Parameter::getValue() const -{ - return m_value; -} - -float InstanceProcessor::Parameter::getValueNonNormalized() const -{ - if(m_min < m_max) - { - return m_value * (m_max - m_min) + m_min; - } - return (1.f - m_value) * (m_min - m_max) + m_max; -} - -void InstanceProcessor::Parameter::setValue(float newValue) -{ - newValue = std::min(std::max(newValue, 0.f), 1.f); - if(m_nsteps) - { - const float step = (1.f/ float(m_nsteps)); - m_value = std::round(newValue / step) * step; - } - else - { - m_value = newValue; - } -} - -void InstanceProcessor::Parameter::setValueNonNormalized(float newValue) -{ - m_value = getValueNormalized(newValue); -} - -float InstanceProcessor::Parameter::getValueNormalized(float newValue) -{ - if(m_min < m_max) - { - return std::min(std::max((newValue - m_min) / (m_max - m_min), 0.f), 1.f); - } - return std::min(std::max(1.f - ((newValue - m_max) / (m_min - m_max)), 0.f), 1.f); -} - -float InstanceProcessor::Parameter::getDefaultValue() const {return 0.f;} - -String InstanceProcessor::Parameter::getName(int maximumStringLength) const {return m_name;} - -String InstanceProcessor::Parameter::getLabel() const {return m_label;} - -String InstanceProcessor::Parameter::getText (float value, int size) const {return String(getValueNonNormalized());} - -float InstanceProcessor::Parameter::getValueForText (const String& text) const {return text.getFloatValue();} - -bool InstanceProcessor::Parameter::isOrientationInverted() const {return false;} - -int InstanceProcessor::Parameter::getNumSteps() const -{ - return m_nsteps != 0 ? m_nsteps : AudioProcessor::getDefaultNumParameterSteps(); -} diff --git a/Source/InstanceProcessor.hpp b/Source/InstanceProcessor.hpp index 84a6b953..aa93012e 100644 --- a/Source/InstanceProcessor.hpp +++ b/Source/InstanceProcessor.hpp @@ -7,13 +7,14 @@ #ifndef __CAMOMILE_INTANCE_PROCESSOR__ #define __CAMOMILE_INTANCE_PROCESSOR__ -#include "Pd.hpp" +#include "Pd/Pd.hpp" #include "../JuceLibraryCode/JuceHeader.h" -class InstanceProcessor : public AudioProcessor, public pd::Instance + +class InstanceProcessor : public AudioProcessor, +public pd::Instance, public pd::PatchManager, public pd::Console::History { public: - class Listener; InstanceProcessor(); ~InstanceProcessor(); @@ -56,73 +57,67 @@ class InstanceProcessor : public AudioProcessor, public pd::Instance void setCurrentProgram(int index) final {} const String getProgramName(int index) final {return String();} void changeProgramName(int index, const String& newName) final {} - + int getParameterIndex(pd::Tie const& name); + int getParameterIndex(String const& name); + + void getStateInformation(MemoryBlock& destData) final; void setStateInformation(const void* data, int sizeInBytes) final; - void loadPatch(const juce::File& file); - inline const pd::Patch getPatch() const noexcept {return m_patch;} - inline pd::Patch getPatch() noexcept {return m_patch;} - int getParameterIndex(pd::BindingName const& name); - int getParameterIndex(String const& name); + //! @brief Receives a normal post to the Pure Data console. + void receiveConsolePost(std::string const& message) final; + + //! @brief Receives a log post to the Pure Data console. + void receiveConsoleLog(std::string const& message) final; - void addListener(Listener* listener); - void removeListener(Listener* listener); - class Listener - { - public: - inline constexpr Listener() {} - inline virtual ~Listener() {} - virtual void patchChanged() = 0; - }; + //! @brief Receives a error to the Pure Data console. + void receiveConsoleError(std::string const& message) final; + + //! @brief Receives a fatal error to the Pure Data console. + void receiveConsoleFatal(std::string const& message) final; -private: + //! @brief Loads a patch. + void loadPatch(std::string const& name, std::string const& path) final; - class Parameter : public AudioProcessorParameter - { - public: - Parameter(); - Parameter(Parameter const& other); - Parameter(pd::Gui const& gui); - ~Parameter(); - Parameter& operator=(Parameter const& other); - Parameter& operator=(Parameter&& other); - bool isValid() const noexcept; - float getValue() const final; - float getValueNonNormalized() const; - void setValue(float newValue) final; - void setValueNonNormalized(float newValue); - float getValueNormalized(float newValue); - float getDefaultValue() const final; - String getName(int maximumStringLength) const final; - String getLabel() const final; - String getText (float value, int size) const final; - float getValueForText (const String& text) const final; - bool isOrientationInverted() const final; - int getNumSteps() const final; - inline pd::BindingName const& getBindingName() const noexcept {return m_bname;} - - private: - bool m_valid; - float m_value; - float m_min; - float m_max; - String m_name; - String m_label; - pd::BindingName m_bname; - int m_nsteps; - }; - - pd::Patch m_patch; - std::set m_listeners; - std::vector m_parameters; - mutable std::mutex m_mutex; + //! @brief Closes a patch. + void closePatch() final; +protected: + //! @brief Receives midi note on. + void receiveMidiNoteOn(int channel, int pitch, int velocity) final; + + //! @brief Receives midi control change. + void receiveMidiControlChange(int channel, int control, int value) final; + + //! @brief Receives midi program change. + void receiveMidiProgramChange(int channel, int value) final; + + //! @brief Receives midi pitch bend. + void receiveMidiPitchBend(int channel, int value) final; + + //! @brief Receives midi after touch. + void receiveMidiAfterTouch(int channel, int value) final; + + //! @brief Receives midi poly after touch. + void receiveMidiPolyAfterTouch(int channel, int pitch, int value) final; + + //! @brief Receives midi byte. + void receiveMidiByte(int port, int value) final; +private: + static pd::Symbol s_playing; + static pd::Symbol s_measure; + std::vector m_parameters; + juce::String m_path; + MidiBuffer m_midi; + pd::Tie m_patch_tie; + pd::List m_playing_list; + pd::List m_measure_list; + AudioPlayHead::CurrentPositionInfo m_playinfos; + void parametersChanged(); - std::vector getListeners() const noexcept; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InstanceProcessor) }; -#endif // PLUGINPROCESSOR_H_INCLUDED +#endif diff --git a/Source/LookAndFeel.cpp b/Source/LookAndFeel.cpp index f297a4e1..6c893ca7 100644 --- a/Source/LookAndFeel.cpp +++ b/Source/LookAndFeel.cpp @@ -23,7 +23,7 @@ */ #include "LookAndFeel.hpp" -#include "Gui.hpp" +#include "Gui/Gui.hpp" namespace LookAndFeelHelpers { diff --git a/Source/Pd.cpp b/Source/Pd.cpp deleted file mode 100644 index baee685e..00000000 --- a/Source/Pd.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "Pd.hpp" -#include "PdInstance.hpp" -#include - -extern "C" -{ -#include "../ThirdParty/PureData/src/m_pd.h" -#include "../ThirdParty/PureData/src/g_canvas.h" -#include "../ThirdParty/PureData/src/s_stuff.h" -#include "../ThirdParty/PureData/src/m_imp.h" -EXTERN void pd_init(void); -} - -namespace pd -{ - // ==================================================================================== // - // PD // - // ==================================================================================== // - - Pd::Pd() noexcept - { - signal(SIGFPE, SIG_IGN); - sys_printhook = NULL; - sys_soundin = NULL; - sys_soundout = NULL; - // are all these settings necessary? - sys_schedblocksize = DEFDACBLKSIZE; - sys_externalschedlib = 0; - sys_printtostderr = 0; - sys_usestdpath = 0; - sys_debuglevel = 1; - sys_verbose = 1; - sys_noloadbang = 0; - sys_nogui = 1; - sys_hipriority = 0; - sys_nmidiin = 0; - sys_nmidiout = 0; - sys_init_fdpoll(); -#ifdef HAVE_SCHED_TICK_ARG - sys_time = 0; -#endif - pd_init(); - sys_set_audio_api(API_DUMMY); - sys_searchpath = NULL; - m_sample_rate = 0; - int indev[MAXAUDIOINDEV], inch[MAXAUDIOINDEV], - outdev[MAXAUDIOOUTDEV], outch[MAXAUDIOOUTDEV]; - indev[0] = outdev[0] = DEFAULTAUDIODEV; - inch[0] = m_max_channels; - outch[0] = m_max_channels; - sys_set_audio_settings(1, indev, 1, inch, - 1, outdev, 1, outch, 44100, -1, 1, DEFDACBLKSIZE); - sched_set_using_audio(SCHED_AUDIO_CALLBACK); - sys_reopen_audio(); - m_sample_rate = sys_getsr(); - m_console.clear(); - m_console.push_back({"Camomile " + getVersion()+" for Pure Data "+getPdVersion()+"\n", Post::Type::Log}); - m_console_changed = true; - sys_printhook = reinterpret_cast(print); - } - - Pd& Pd::get() noexcept - { - static Pd pd; - return pd; - } - - void Pd::print(const char* s) - { - Pd& pd = Pd::get(); - std::string message(s); - if(message.compare(0, 5, "error")) - { - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({message, Post::Type::Error}); - } - else if(message.compare(0, 7, "verbose")) - { - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({message, Post::Type::Log}); - } - else - { - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({message, Post::Type::Post}); - } -#ifdef DEBUG - std::cout << s; -#endif - } - - std::string Pd::getPdVersion() - { - return std::to_string(PD_MAJOR_VERSION) + "." + - std::to_string(PD_MINOR_VERSION) + "." + - std::to_string(PD_BUGFIX_VERSION); - } - - void Pd::addToSearchPath(std::string const& path) noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_mutex); - sys_searchpath = namelist_append(sys_searchpath, path.c_str(), 0); - } - - void Pd::clearSearchPath() noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_mutex); - namelist_free(sys_searchpath); - sys_searchpath = NULL; - } - - void Pd::clearConsole() noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - bool state = !pd.m_console.empty(); - pd.m_console.clear(); - pd.m_console_changed = state; - } - - void Pd::postToConsole(std::string const& text) noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({text, Post::Type::Post}); - pd.m_console_changed = true; - } - - void Pd::logToConsole(std::string const& text) noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({text, Post::Type::Log}); - pd.m_console_changed = true; - } - - void Pd::errorToConsole(std::string const& text) noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - pd.m_console.push_back({text, Post::Type::Error}); - pd.m_console_changed = true; - } - - std::vector Pd::getConsole(bool state) noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - pd.m_console_changed = state; - return pd.m_console; - } - - bool Pd::hasConsoleChanged() noexcept - { - Pd& pd = Pd::get(); - std::lock_guard guard(pd.m_console_mutex); - return pd.m_console_changed; - } - - void Pd::setSampleRate(const int samplerate) noexcept - { - Pd& pd = Pd::get(); - if(pd.m_sample_rate != samplerate) - { - int indev[MAXAUDIOINDEV], inch[MAXAUDIOINDEV], - outdev[MAXAUDIOOUTDEV], outch[MAXAUDIOOUTDEV]; - indev[0] = outdev[0] = DEFAULTAUDIODEV; - inch[0] = pd.m_max_channels; - outch[0] = pd.m_max_channels; - sys_set_audio_settings(1, indev, 1, inch, - 1, outdev, 1, outch, samplerate, -1, 1, DEFDACBLKSIZE); - sched_set_using_audio(SCHED_AUDIO_CALLBACK); - sys_reopen_audio(); - pd.m_sample_rate = sys_getsr(); - } - } - - void Pd::lock() noexcept - { - Pd& pd = Pd::get(); - pd.m_mutex.lock(); - } - - void Pd::unlock() noexcept - { - Pd& pd = Pd::get(); - pd.m_mutex.unlock(); - } - - Instance Pd::createInstance() noexcept - { - Pd& pd = Pd::get(); - pd.m_mutex.lock(); - Instance instance(pdinstance_new()); - pd.m_mutex.unlock(); - return instance; - } -} - - - diff --git a/Source/Pd.hpp b/Source/Pd.hpp deleted file mode 100644 index ed56de25..00000000 --- a/Source/Pd.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#ifndef __CAMOMILE_PD__ -#define __CAMOMILE_PD__ - -#include "PdGui.hpp" - -extern "C" -{ -#include "../ThirdParty/PureData/src/m_pd.h" -} - -namespace pd -{ - class Instance; - - // ==================================================================================== // - // POST // - // ==================================================================================== // - //! @brief The post. - //! @details The wrapper for post, error and log messages. - class Post - { - public: - enum class Type : unsigned char - { - Post = 0, - Error = 1, - Log = 2 - }; - std::string message; - Type type; - }; - - // ==================================================================================== // - // PD // - // ==================================================================================== // - - //! @brief Pure Data. - //! @details The wrapper for Pure Data environment. - class Pd - { - public: - //! @brief Gets the current version of the program. - static std::string getVersion() {return std::string("0.0.5");} - - //! @brief Adds a path the global search path. - static std::string getPdVersion(); - - //! @brief Adds a path the global search path. - static void addToSearchPath(std::string const& path) noexcept; - - //! @brief Clears all the paths of the global search path. - static void clearSearchPath() noexcept; - - //! @brief Sets the text of the console. - static void clearConsole() noexcept; - - //! @brief Sets the text of the console. - static void postToConsole(std::string const& text) noexcept; - - //! @brief Sets the text of the console. - static void logToConsole(std::string const& text) noexcept; - - //! @brief Sets the text of the console. - static void errorToConsole(std::string const& text) noexcept; - - //! @brief Retrieves the text of the console. - static std::vector getConsole(bool state = false) noexcept; - - //! @brief Retrieves the text of the console. - static bool hasConsoleChanged() noexcept; - - //! @brief Creates a new Instance object. - static Instance createInstance() noexcept; - - private: - - //! @brief The Pure Data contructor. - Pd() noexcept; - - //! @brief The Pure Data destructor. - ~Pd() noexcept {} - - //! @brief Gets the singleton of Pure Data. - static Pd& get() noexcept; - - //! @brief Locks Pure Data. - static void lock() noexcept; - - //! @brief Unlocks Pure Data. - static void unlock() noexcept; - - //! @brief Sets the global sample rate. - static void setSampleRate(const int samplerate) noexcept; - - std::mutex m_mutex; - int m_sample_rate; - const int m_max_channels = 16; - - std::mutex m_console_mutex; - bool m_console_changed; - std::vector m_console; - static void print(const char* s); - - friend class Instance; - }; -} - -#endif diff --git a/Source/Pd/Pd.hpp b/Source/Pd/Pd.hpp new file mode 100644 index 00000000..da03f5d9 --- /dev/null +++ b/Source/Pd/Pd.hpp @@ -0,0 +1,15 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_HPP +#define Z_PD_HPP + +#include "PdObject.hpp" +#include "PdConsole.hpp" +#include "PdParameter.hpp" +#include "PdPatchManager.hpp" + +#endif // Z_PD_HPP diff --git a/Source/Pd/PdConsole.cpp b/Source/Pd/PdConsole.cpp new file mode 100644 index 00000000..d4b5b59b --- /dev/null +++ b/Source/Pd/PdConsole.cpp @@ -0,0 +1,201 @@ +/* + // Copyright (c) 2015 Pierre Guillot. + // For information on usage and redistribution, and for a DISCLAIMER OF ALL + // WARRANTIES, see the file, "LICENSE.txt," in this distribution. + */ + +#include "PdConsole.hpp" + +namespace pd +{ + + Console::History::History() : + m_fatal_count(0), + m_error_count(0), + m_post_count(0), + m_log_count(0) + { + m_messages.reserve(512); + } + + size_t Console::History::getNumberOfMessageUntilLevel(Console::Message::Level level) const noexcept + { + if(level == Message::Level::Fatal) + return m_fatal_count; + if(level == Message::Level::Error) + return m_fatal_count + m_error_count; + if(level == Message::Level::Post) + return m_fatal_count + m_error_count + m_post_count; + return m_fatal_count + m_error_count + m_post_count + m_log_count; + } + + Console::Message Console::History::getMessage(size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(m_messages.size() > index) + return m_messages[index]; + return Message{Message::Level::Post, std::string()}; + } + + std::string Console::History::getFatal(size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(m_fatal_count > index) + { + for(size_t i = 0, c = 0; i < m_messages.size(); ++i) + { + if(m_messages[i].level == Level::Fatal) + { + ++c; + if(c == index+1) + { + return m_messages[i].text; + } + } + + } + } + return std::string(); + } + + std::string Console::History::getError(size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(m_fatal_count > index) + { + for(size_t i = 0, c = 0; i < m_messages.size(); ++i) + { + if(m_messages[i].level == Level::Error) + { + ++c; + if(c == index+1) + { + return m_messages[i].text; + } + } + + } + } + return std::string(); + } + + std::string Console::History::getPost(size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(m_fatal_count > index) + { + for(size_t i = 0, c = 0; i < m_messages.size(); ++i) + { + if(m_messages[i].level == Level::Post) + { + ++c; + if(c == index+1) + { + return m_messages[i].text; + } + } + + } + } + return std::string(); + } + + std::string Console::History::getLog(size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(m_fatal_count > index) + { + for(size_t i = 0, c = 0; i < m_messages.size(); ++i) + { + if(m_messages[i].level == Level::Log) + { + ++c; + if(c == index+1) + { + return m_messages[i].text; + } + } + + } + } + return std::string(); + } + + Console::Message Console::History::getMessageUntilLevel(Console::Message::Level level, size_t index) const noexcept + { + std::lock_guard guard(m_mutex); + if(getNumberOfMessageUntilLevel(level) > index) + { + for(size_t i = 0, c = 0; i < m_messages.size(); ++i) + { + if(m_messages[i].level <= level) + { + ++c; + if(c == index+1) + { + return m_messages[i]; + } + } + + } + } + return Message(); + } + + void Console::History::clear() noexcept + { + std::lock_guard guard(m_mutex); + m_fatal_count = m_error_count = m_post_count = m_log_count = 0; + return m_messages.clear(); + } + + void Console::History::add(Message message) noexcept + { + std::lock_guard guard(m_mutex); + if(message.level == Level::Fatal) + { + m_fatal_count++; + } + if(message.level == Level::Error) + { + m_error_count++; + } + if(message.level == Level::Post) + { + m_post_count++; + } + else + { + m_log_count++; + } + m_messages.push_back(std::move(message)); + } + + void Console::History::addFatal(std::string message) noexcept + { + std::lock_guard guard(m_mutex); + m_fatal_count++; + m_messages.push_back({Level::Fatal, std::move(message)}); + } + + void Console::History::addError(std::string message) noexcept + { + std::lock_guard guard(m_mutex); + m_error_count++; + m_messages.push_back({Level::Error, std::move(message)}); + } + + void Console::History::addPost(std::string message) noexcept + { + std::lock_guard guard(m_mutex); + m_post_count++; + m_messages.push_back({Level::Post, std::move(message)}); + } + + void Console::History::addLog(std::string message) noexcept + { + std::lock_guard guard(m_mutex); + m_log_count++; + m_messages.push_back({Level::Log, std::move(message)}); + } +} \ No newline at end of file diff --git a/Source/Pd/PdConsole.hpp b/Source/Pd/PdConsole.hpp new file mode 100644 index 00000000..a4ad58eb --- /dev/null +++ b/Source/Pd/PdConsole.hpp @@ -0,0 +1,106 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_CONSOLE_HPP +#define Z_PD_CONSOLE_HPP + +#include "PdTypes.hpp" + +namespace pd +{ + //! @brief A class that manages the console + class Console + { + public: + //! @brief A small class that describes a message in the console + class Message + { + public: + enum class Level + { + Fatal = 0, Error = 1, Post = 2, Log = 3 + }; + Level level; + std::string text; + }; + + //! @brief A small class that manages the history of message in the console + class History + { + public: + typedef Message::Level Level; + //! @brief the constructor. + History(); + + //! @brief Gets the number of all messages. + inline size_t getNumberOfMessages() const noexcept {return m_messages.size();} + + //! @brief Gets the number of fatal messages. + inline size_t getNumberOfFatalMessages() const noexcept {return m_fatal_count;} + + //! @brief Gets the number of error messages. + inline size_t getNumberOfErrorMessages() const noexcept {return m_error_count;} + + //! @brief Gets the number of post messages. + inline size_t getNumberOfPostMessages() const noexcept {return m_post_count;} + + //! @brief Gets the number of log messages. + inline size_t getNumberOfLogMessages() const noexcept {return m_log_count;} + + //! @brief Gets the number of messages until a level. + size_t getNumberOfMessageUntilLevel(Level level) const noexcept; + + //! @brief Gets a message at an index. + Message getMessage(size_t index) const noexcept; + + //! @brief Gets a fatal message at an index. + std::string getFatal(size_t index) const noexcept; + + //! @brief Gets an error message at an index. + std::string getError(size_t index) const noexcept; + + //! @brief Gets a post message at an index. + std::string getPost(size_t index) const noexcept; + + //! @brief Gets a log message at an index. + std::string getLog(size_t index) const noexcept; + + //! @brief Gets a message at an index until a level. + Message getMessageUntilLevel(Level level, size_t index) const noexcept; + + //! @brief Clears the history. + void clear() noexcept; + + //! @brief Retrieves a copy of the history. + inline std::vector getMessages() const {return m_messages;} + + //! @brief Adds a message in the history. + void add(Message message) noexcept; + + //! @brief Adds a fatal message in the history. + void addFatal(std::string message) noexcept; + + //! @brief Adds an error message in the history. + void addError(std::string message) noexcept; + + //! @brief Adds a post message in the history. + void addPost(std::string message) noexcept; + + //! @brief Adds a log message in the history. + void addLog(std::string message) noexcept; + + private: + mutable std::mutex m_mutex; + size_t m_fatal_count; + size_t m_error_count; + size_t m_post_count; + size_t m_log_count; + std::vector m_messages; + }; + }; +} + +#endif //Z_PD_CONSOLE_HPP diff --git a/Source/Pd/PdEnvironment.cpp b/Source/Pd/PdEnvironment.cpp new file mode 100644 index 00000000..e9b255c4 --- /dev/null +++ b/Source/Pd/PdEnvironment.cpp @@ -0,0 +1,70 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdEnvironment.hpp" +#include "PdInstance.hpp" + +extern "C" +{ +#include "z_pd.h" +} + +namespace pd +{ + // ==================================================================================== // + // PD // + // ==================================================================================== // + + Environment::Environment() noexcept + { + static bool initialized = false; + if(!initialized) + { + z_pd_init(); + } + } + + Environment::~Environment() noexcept + { + z_pd_clear(); + } + + Environment& Environment::get() noexcept + { + static Environment pd; + return pd; + } + + std::string Environment::getPdVersion() + { + return std::to_string(z_pd_version_getmajor()) + "." + + std::to_string(z_pd_version_getminor()) + "." + + std::to_string(z_pd_version_getbug()); + } + + void Environment::addToSearchPath(std::string const& path) noexcept + { + std::lock_guard guard(Environment::get().m_mutex); + z_pd_searchpath_add(path.c_str()); + } + + void Environment::clearSearchPath() noexcept + { + std::lock_guard guard(Environment::get().m_mutex); + z_pd_searchpath_clear(); + } + + void Environment::lock() noexcept + { + Environment::get().m_mutex.lock(); + } + + void Environment::unlock() noexcept + { + Environment::get().m_mutex.unlock(); + } +} + diff --git a/Source/Pd/PdEnvironment.hpp b/Source/Pd/PdEnvironment.hpp new file mode 100644 index 00000000..635b912d --- /dev/null +++ b/Source/Pd/PdEnvironment.hpp @@ -0,0 +1,54 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_ENVIRONMENT_HPP +#define Z_PD_ENVIRONMENT_HPP + +#include "PdTypes.hpp" + +namespace pd +{ + // ==================================================================================== // + // ENVIRONMENT // + // ==================================================================================== // + + //! @brief Pure Data. + //! @details The wrapper for Pure Data environment. + class Environment + { + public: + //! @brief Adds a path the global search path. + static std::string getPdVersion(); + + //! @brief Adds a path the global search path. + static void addToSearchPath(std::string const& path) noexcept; + + //! @brief Clears all the paths of the global search path. + static void clearSearchPath() noexcept; + + private: + + //! @brief The Pure Data contructor. + Environment() noexcept; + + //! @brief The Pure Data destructor. + ~Environment() noexcept; + + //! @brief Gets the singleton of Pure Data. + static Environment& get() noexcept; + + //! @brief Locks Pure Data. + static void lock() noexcept; + + //! @brief Unlocks Pure Data. + static void unlock() noexcept; + + std::mutex m_mutex; + friend class Instance; + }; +} + +#endif // Z_PD_ENVIRONMENT_HPP diff --git a/Source/Pd/PdInstance.cpp b/Source/Pd/PdInstance.cpp new file mode 100644 index 00000000..f10237a2 --- /dev/null +++ b/Source/Pd/PdInstance.cpp @@ -0,0 +1,386 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdInstance.hpp" +#include "PdPatch.hpp" + +extern "C" +{ +#include "z_pd.h" + +} + +namespace pd +{ + struct Instance::Internal : public Smuggler + { + public: + z_instance object; + Instance* ref; + + static void m_print(Instance::Internal* instance, const char *s) + { + int level = 2; + std::string message(s); + if(!message.compare(0, 6, "error:")) + { + level = 1; + message.erase(message.begin(), message.begin()+5); + } + else if(!message.compare(0, 8, "verbose(") && isdigit(message[8])) + { + level = std::atoi(message.c_str()+8); + message.erase(message.begin(), message.begin()+12); + } + else if(!message.compare(0, 5, "tried") || !message.compare(0, 5, "input")) + { + level = 3; + instance->ref->receiveConsoleLog(message); + } + if(!message.empty() && (message[0] == ' ' || message[0] == '\n')) + { + size_t i = 0; + while(i < message.size() && message[i] != ' ') + { + ++i; + } + message.erase(message.begin(), message.begin()+i+1); + } + + if(!message.empty()) + { + if(level == 0) + { + instance->ref->receiveConsoleFatal(message); + } + else if(level == 1) + { + instance->ref->receiveConsoleError(message); + } + else if(level == 2) + { + instance->ref->receiveConsolePost(message); + } + else + { + instance->ref->receiveConsoleLog(message); + } + } + } + + static void m_noteon(Instance::Internal* instance, int port, int channel, int pitch, int velocity) + { + instance->ref->receiveMidiNoteOn(channel, pitch, velocity); + } + + static void m_controlchange(Instance::Internal* instance, int port, int channel, int control, int value) + { + instance->ref->receiveMidiControlChange(channel, control, value); + } + + static void m_programchange(Instance::Internal* instance, int port, int channel, int value) + { + instance->ref->receiveMidiProgramChange(channel, value); + } + + static void m_pitchbend(Instance::Internal* instance, int port, int channel, int value) + { + instance->ref->receiveMidiPitchBend(channel, value); + } + + static void m_aftertouch(Instance::Internal* instance, int port, int channel, int value) + { + instance->ref->receiveMidiAfterTouch(channel, value); + } + + static void m_polyaftertouch(Instance::Internal* instance, int port, int channel, int pitch, int value) + { + instance->ref->receiveMidiPolyAfterTouch(channel, pitch, value); + } + + static void m_byte(Instance::Internal* instance, int port, int value) + { + instance->ref->receiveMidiByte(port, value); + } + + + + + static void m_bang(Instance::Internal* instance, z_tie* tie) + { + instance->ref->receiveMessageBang(createTie(tie)); + } + + static void m_float(Instance::Internal* instance, z_tie* tie, z_float f) + { + instance->ref->receiveMessageFloat(createTie(tie), f); + } + + static void m_symbol(Instance::Internal* instance, z_tie* tie, z_symbol* s) + { + instance->ref->receiveMessageSymbol(createTie(tie), createSymbol(s)); + } + + static void m_gpointer(Instance::Internal* instance, z_tie* tie, z_gpointer *g) + { + instance->ref->receiveMessageGpointer(createTie(tie), createGpointer(g)); + } + + static void m_list(Instance::Internal* instance, z_tie* tie, z_list *list) + { + instance->ref->receiveMessageList(createTie(tie), createList(list)); + } + + static void m_anything(Instance::Internal* instance, z_tie* tie, z_symbol *s, z_list *list) + { + instance->ref->receiveMessageAnything(createTie(tie), createSymbol(s), createList(list)); + } + }; + + // ==================================================================================== // + // INSTANCE // + // ==================================================================================== // + + Instance::Instance(const std::string& name) noexcept + { + Environment::lock(); + m_ptr = z_pd_instance_new(sizeof(Instance::Internal), + (z_hook_print)Instance::Internal::m_print, + (z_hook_noteon)Instance::Internal::m_noteon, + (z_hook_controlchange)Instance::Internal::m_controlchange, + (z_hook_programchange)Instance::Internal::m_programchange, + (z_hook_pitchbend)Instance::Internal::m_pitchbend, + (z_hook_aftertouch)Instance::Internal::m_aftertouch, + (z_hook_polyaftertouch)Instance::Internal::m_polyaftertouch, + (z_hook_byte)Instance::Internal::m_byte); + reinterpret_cast(m_ptr)->ref = this; + m_count = new std::atomic(1); + Environment::unlock(); + } + + Instance::Instance() noexcept : + m_ptr(nullptr), + m_count(nullptr) + { + + } + + + Instance::Instance(Instance const& other) noexcept : + m_ptr(other.m_ptr), + m_count(other.m_count) + { + if(m_ptr && m_count) + { + ++(*m_count); + } + } + + Instance::Instance(Instance&& other) noexcept : + m_ptr(other.m_ptr), + m_count(other.m_count) + { + other.m_ptr = nullptr; + other.m_count = nullptr; + } + + void Instance::release() noexcept + { + if(m_ptr && m_count && m_count->operator--() == 0) + { + releaseDsp(); + lock(); + z_pd_instance_free(reinterpret_cast(m_ptr)); + unlock(); + delete m_count; + m_ptr = nullptr; + m_count = nullptr; + } + } + + Instance& Instance::operator=(Instance const& other) noexcept + { + release(); + if(other.m_ptr && other.m_count && other.m_count->operator++() > 0) + { + m_ptr = other.m_ptr; + m_count = other.m_count; + } + return *this; + } + + Instance& Instance::operator=(Instance&& other) noexcept + { + std::swap(m_count, other.m_count); + std::swap(m_ptr, other.m_ptr); + return *this; + } + + Instance::~Instance() noexcept + { + release(); + } + + void Instance::prepareDsp(const int nins, const int nouts, const int samplerate, const int nsamples) noexcept + { + lock(); + z_pd_instance_dsp_prepare(reinterpret_cast(m_ptr), nins, nouts, samplerate, nsamples); + unlock(); + } + + void Instance::performDsp(int nsamples, const int nins, const float** inputs, const int nouts, float** outputs) noexcept + { + z_pd_instance_dsp_perform(reinterpret_cast(m_ptr), nsamples, nins, inputs, nouts, outputs); + } + + void Instance::releaseDsp() noexcept + { + lock(); + z_pd_instance_dsp_release(reinterpret_cast(m_ptr)); + unlock(); + } + + + + + + void Instance::sendConsolePost(std::string const& message) noexcept + { + lock(); + z_pd_console_post(message.c_str()); + unlock(); + } + + void Instance::sendConsoleLog(std::string const& message) noexcept + { + lock(); + z_pd_console_log(message.c_str()); + unlock(); + } + + void Instance::sendConsoleError(std::string const& message) noexcept + { + lock(); + z_pd_console_error(message.c_str()); + unlock(); + } + + void Instance::sendConsoleFatal(std::string const& message) noexcept + { + lock(); + z_pd_console_fatal(message.c_str()); + unlock(); + } + + + + + + + void Instance::sendMessageBang(Tie const& name) const + { + z_pd_messagesend_bang(reinterpret_cast(getTie(name))); + } + + void Instance::sendMessageFloat(Tie const& name, float val) const + { + z_pd_messagesend_float(reinterpret_cast(getTie(name)), val); + } + + void Instance::sendMessageSymbol(Tie const& name, Symbol const& s) const + { + z_pd_messagesend_symbol(reinterpret_cast(getTie(name)), + reinterpret_cast(getSymbol(s))); + } + + void Instance::sendMessageGpointer(Tie const& name, Gpointer const& g) const + { + z_pd_messagesend_gpointer(reinterpret_cast(getTie(name)), + reinterpret_cast(getGpointer(g))); + } + + void Instance::sendMessageList(Tie const& name, List const& list) const + { + z_pd_messagesend_list(reinterpret_cast(getTie(name)), + reinterpret_cast(getList(list))); + } + + void Instance::sendMessageAnything(Tie const& name, Symbol const& s, List const& list) const + { + z_pd_messagesend_anything(reinterpret_cast(getTie(name)), + reinterpret_cast(getSymbol(s)), + reinterpret_cast(getList(list))); + } + + void Instance::sendMidiNote(int channel, int pitch, int velocity) const + { + z_pd_midisend_noteon(channel, pitch, velocity); + } + + void Instance::sendMidiControlChange(int channel, int controller, int value) const + { + z_pd_midisend_controlchange(channel, controller, value); + } + + void Instance::sendMidiProgramChange(int channel, int value) const + { + z_pd_midisend_programchange(channel, value); + } + + void Instance::sendMidiPitchBend(int channel, int value) const + { + z_pd_midisend_pitchbend(channel, value); + } + + void Instance::sendMidiAfterTouch(int channel, int value) const + { + z_pd_midisend_aftertouch(channel, value); + } + + void Instance::sendMidiPolyAfterTouch(int channel, int pitch, int value) const + { + z_pd_midisend_polyaftertouch(channel, pitch, value); + } + + void Instance::sendMidiByte(int port, int byte) const + { + z_pd_midisend_byte(port, byte); + } + + void Instance::sendMidiSysEx(int port, int byte) const + { + z_pd_midisend_sysex(port, byte); + } + + void Instance::sendMidiSysRealtime(int port, int byte) const + { + z_pd_midisend_sysrealtimein(port, byte); + } + + void Instance::lock() noexcept + { + Environment::lock(); + z_pd_instance_set(reinterpret_cast(m_ptr)); + } + + void Instance::unlock() noexcept + { + Environment::unlock(); + } + + bool Instance::isValid() const noexcept + { + return bool(m_ptr) && bool(m_count) && bool(m_count->load()); + } + + int Instance::getSampleRate() const noexcept + { + return z_pd_instance_get_samplerate(reinterpret_cast(m_ptr)); + } +} + + + diff --git a/Source/Pd/PdInstance.hpp b/Source/Pd/PdInstance.hpp new file mode 100644 index 00000000..ecad1cf1 --- /dev/null +++ b/Source/Pd/PdInstance.hpp @@ -0,0 +1,216 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_INSTANCE_HPP +#define Z_PD_INSTANCE_HPP + +#include "PdEnvironment.hpp" + +namespace pd +{ + class Patch; + // ==================================================================================== // + // INSTANCE // + // ==================================================================================== // + + //! @brief The Pure Data instance. + //! @details The Instance is a wrapper for the Pure Data's native instance. + //! With the default constructor, the Instance won't be initialized. The Instance has some + //! kind of smart pointer behavior so when an Instance object is no more useful the object + //! is deleted. + class Instance : private Smuggler + { + public: + + //! @brief The constructor for an empty Instance. + //! @details Creates an Instance that can be used as an empty reference inside + //! another class. + Instance() noexcept; + + //! @brief The copy constructor. + //! Creates a copy of an Instance and increments his counter. + Instance(Instance const& other) noexcept; + + //! @brief The move constructor. + //! @details Creates a copy of an Instance without incrementing his counter. The + //! other Instance will be useless. + Instance(Instance&& other) noexcept; + + //! @brief The copy operator. + //! Copies the Instance and increments his counter. + Instance& operator=(Instance const& other) noexcept; + + //! @brief The move operator. + //! @details Copies the Instance without incrementing his counter. The other + //! Instance will be destroyed if needed. + Instance& operator=(Instance&& other) noexcept; + + //! @brief The destructor. + //! @details The Instance will be destroyed if no other copy exists. + virtual ~Instance() noexcept; + + //! @brief Retrieves if the Instance is valid. + bool isValid() const noexcept; + + //! @brief Retrieves the sample rate of the Instance. + int getSampleRate() const noexcept; + + + + + //! @brief Sends a normal post to the Pure Data console. + void sendConsolePost(std::string const& message) noexcept; + + //! @brief Sends a log post to the Pure Data console. + void sendConsoleLog(std::string const& message) noexcept; + + //! @brief Sends an error to the Pure Data console. + void sendConsoleError(std::string const& message) noexcept; + + //! @brief Sends a fatal error to the Pure Data console. + void sendConsoleFatal(std::string const& message) noexcept; + + + //! @brief Receives a normal post to the Pure Data console. + virtual void receiveConsolePost(std::string const& message) {}; + + //! @brief Receives a log post to the Pure Data console. + virtual void receiveConsoleLog(std::string const& message) {}; + + //! @brief Receives a error to the Pure Data console. + virtual void receiveConsoleError(std::string const& message) {}; + + //! @brief Receives a fatal error to the Pure Data console. + virtual void receiveConsoleFatal(std::string const& message) {}; + protected: + + //! @brief The real constructor. + Instance(const std::string& name) noexcept; + + //! @brief Locks Instance. + void lock() noexcept; + + //! @brief Unlocks Instance. + void unlock() noexcept; + + + + + //! @brief Prepares the digital signal processing chain of the Instance. + void prepareDsp(const int nins, const int nouts, const int samplerate, const int nsamples) noexcept; + + //! @brief Performs the digital signal processing chain of the Instance. + //! @details You should locks the Instance to ensure thread safety. + void performDsp(int nsamples, const int nins, const float** inputs, const int nouts, float** outputs) noexcept; + + //! @brief Releases the digital signal processing chain of the Instance. + void releaseDsp() noexcept; + + + + //! @brief Sends midi note on. + void sendMidiNote(int channel, int pitch, int velocity) const; + + //! @brief Sends midi control change. + void sendMidiControlChange(int channel, int controller, int value) const; + + //! @brief Sends midi program change. + void sendMidiProgramChange(int channel, int value) const; + + //! @brief Sends midi pitch bend. + void sendMidiPitchBend(int channel, int value) const; + + //! @brief Sends midi after touch. + void sendMidiAfterTouch(int channel, int value) const; + + //! @brief Sends midi poly after touch. + void sendMidiPolyAfterTouch(int channel, int pitch, int value) const; + + //! @brief Sends midi byte. + void sendMidiByte(int port, int byte) const; + + //! @brief Sends midi sys ex. + void sendMidiSysEx(int port, int byte) const; + + //! @brief Sends midi sys real time. + void sendMidiSysRealtime(int port, int byte) const; + + + + + //! @brief Receives midi note on. + virtual void receiveMidiNoteOn(int channel, int pitch, int velocity) {}; + + //! @brief Receives midi control change. + virtual void receiveMidiControlChange(int channel, int control, int value) {} + + //! @brief Receives midi program change. + virtual void receiveMidiProgramChange(int channel, int value) {} + + //! @brief Receives midi pitch bend. + virtual void receiveMidiPitchBend(int channel, int value) {} + + //! @brief Receives midi after touch. + virtual void receiveMidiAfterTouch(int channel, int value) {} + + //! @brief Receives midi poly after touch. + virtual void receiveMidiPolyAfterTouch(int channel, int pitch, int value) {} + + //! @brief Receives midi byte. + virtual void receiveMidiByte(int port, int value) {} + + + + + //! @brief Sends bang. + void sendMessageBang(Tie const& name) const; + + //! @brief Sends float. + void sendMessageFloat(Tie const& name, float f) const; + + //! @brief Sends symbol. + void sendMessageSymbol(Tie const& name, Symbol const& s) const; + + //! @brief Sends gpointer. + void sendMessageGpointer(Tie const& name, Gpointer const& g) const; + + //! @brief Sends list. + void sendMessageList(Tie const& name, List const& list) const; + + //! @brief Sends anything. + void sendMessageAnything(Tie const& name, Symbol const& s, List const& list) const; + + //! @brief Receives bang. + virtual void receiveMessageBang(Tie const& tie) {} + + //! @brief Receives float. + virtual void receiveMessageFloat(Tie const& tie, float f) {} + + //! @brief Receives symbol. + virtual void receiveMessageSymbol(Tie const& tie, Symbol const& s) {} + + //! @brief Receives gpointer. + virtual void receiveMessageGpointer(Tie const& tie, Gpointer const& g) {} + + //! @brief Receives list. + virtual void receiveMessageList(Tie const& tie, List const& list) {} + + //! @brief Receives anything. + virtual void receiveMessageAnything(Tie const& tie, Symbol const& s, List const& list) {} + + private: + struct Internal; + void release() noexcept; + + void* m_ptr; + std::atomic* m_count; + friend class Patch; + + }; + +} + +#endif // Z_PD_INSTANCE_HPP diff --git a/Source/Pd/PdObject.cpp b/Source/Pd/PdObject.cpp new file mode 100644 index 00000000..ce18ab5b --- /dev/null +++ b/Source/Pd/PdObject.cpp @@ -0,0 +1,274 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdObject.hpp" + +extern "C" +{ +#include "z_pd.h" +} + +namespace pd +{ + + // ==================================================================================== // + // COMMENT // + // ==================================================================================== // + + + Object::Object() noexcept : m_ptr(nullptr), m_patch() + { + + } + + Object::Object(Patch const& patch, void* ptr) noexcept : + m_ptr(ptr), m_patch(patch) + { + ; + } + + Object::Object(Object const& other) noexcept : + m_ptr(other.m_ptr), m_patch(other.m_patch) + { + ; + } + + Object::Object(Object&& other) noexcept : + m_ptr(other.m_ptr), m_patch(other.m_patch) + { + other.m_ptr = nullptr; + other.m_patch = Patch(); + } + + Object& Object::operator=(Object const& other) noexcept + { + m_ptr = other.m_ptr; + m_patch = other.m_patch; + return *this; + } + + Object& Object::operator=(Object&& other) noexcept + { + std::swap(m_ptr, other.m_ptr); + std::swap(m_patch, other.m_patch); + return *this; + } + + Object::~Object() noexcept + { + m_ptr = nullptr; + m_patch = Patch(); + } + + bool Object::isValid() const noexcept + { + return bool(m_ptr) && m_patch.isValid(); + } + + std::string Object::getText() const + { + if(isValid()) + { + char* text = nullptr; + int size = 0; + z_pd_object_get_text(reinterpret_cast(m_ptr), &size, &text); + if(text && size) + { + std::string txt(text, size); + free(text); + return txt; + } + } + return std::string(); + } + + std::array Object::getBounds() const noexcept + { + int x = 0, y = 0, w = 0, h = 0; + if(isValid()) + { + z_pd_object_get_bounds(reinterpret_cast(m_ptr), + reinterpret_cast(m_patch.m_ptr), + &x, &y, &w, &h); + } + return {x, y, w, h}; + } + + void* Object::getPatchPtr() const noexcept + { + return isValid() ? m_patch.m_ptr : nullptr; + } + + void* Object::getPtr() const noexcept + { + return isValid() ? m_ptr : nullptr; + } + + // ==================================================================================== // + // GUI // + // ==================================================================================== // + + Gui::Gui() noexcept : Object(), m_type(Type::Invalid) + { + + } + + Gui::Gui(Patch const& patch, Type type, void* ptr) noexcept : + Object(patch, ptr), m_type(type) + { + ; + } + + Gui::Gui(Gui const& other) noexcept : + Object(other), m_type(other.m_type) + { + ; + } + + Gui::Gui(Gui&& other) noexcept : + Object(std::move(other)), m_type(other.m_type) + { + other.m_type = Type::Invalid; + } + + Gui& Gui::operator=(Gui const& other) noexcept + { + Object::operator=(other); + m_type = other.m_type; + return *this; + } + + Gui& Gui::operator=(Gui&& other) noexcept + { + Object::operator=(std::move(other)); + std::swap(m_type, other.m_type); + return *this; + } + + Gui::~Gui() noexcept + { + ; + } + + Gui::Type Gui::getType() const noexcept + { + return m_type; + } + + bool Gui::isParameter() const noexcept + { + return isValid() && !getName().empty() && getReceiveTie() != Tie(); + } + + std::string Gui::getName() const + { + if(isValid()) + { + z_symbol* s = z_pd_gui_get_label(reinterpret_cast(getPtr())); + if(s) + { + std::string name(z_pd_symbol_get_name(s)); + if(!name.empty() && name != "empty") + { + auto pos = name.find("_"); + if(pos != std::string::npos) + { + name.erase(name.begin()+pos, name.end()); + } + return name; + } + } + } + return std::string(); + } + + std::string Gui::getLabel() const + { + if(isValid()) + { + z_symbol* s = z_pd_gui_get_label(reinterpret_cast(getPtr())); + if(s) + { + std::string name(z_pd_symbol_get_name(s)); + if(!name.empty() && name != "empty") + { + auto pos = name.find("_"); + if(pos != std::string::npos) + { + name.erase(name.begin(), name.begin()+pos+1); + return name; + } + } + } + } + return std::string(); + } + + + Tie Gui::getReceiveTie() const + { + if(isValid()) + { + z_symbol* s = z_pd_gui_get_receive_symbol(reinterpret_cast(getPtr())); + if(s && s != z_pd_symbol_create("empty")) + { + return Smuggler::createTie(s); + } + } + return Tie(); + } + + size_t Gui::getNumberOfSteps() const noexcept + { + if(isValid()) + { + return z_pd_gui_get_number_of_steps(reinterpret_cast(getPtr())); + } + return 0.f; + } + + float Gui::getMinimum() const noexcept + { + if(isValid()) + { + return z_pd_gui_get_minimum_value(reinterpret_cast(getPtr())); + } + return 0.f; + } + + float Gui::getMaximum() const noexcept + { + if(isValid()) + { + return z_pd_gui_get_maximum_value(reinterpret_cast(getPtr())); + } + return 1.f; + } + + float Gui::getValue() const noexcept + { + if(isValid()) + { + return z_pd_gui_get_value(reinterpret_cast(getPtr())); + } + return 0.f; + } + + std::array Gui::getLabelPosition() const noexcept + { + int x = 0, y = 0; + if(isValid()) + { + z_pd_gui_get_label_position(reinterpret_cast(getPtr()), + reinterpret_cast(getPatchPtr()), + &x, &y); + } + return {x, y}; + } +} + + + diff --git a/Source/PdGui.hpp b/Source/Pd/PdObject.hpp similarity index 80% rename from Source/PdGui.hpp rename to Source/Pd/PdObject.hpp index c0bd8de2..23772f2d 100644 --- a/Source/PdGui.hpp +++ b/Source/Pd/PdObject.hpp @@ -4,14 +4,76 @@ // WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ -#ifndef __CAMOMILE_PD_GUI__ -#define __CAMOMILE_PD_GUI__ +#ifndef Z_PD_OBJECT_HPP +#define Z_PD_OBJECT_HPP #include "PdPatch.hpp" namespace pd { - class Patch; + //! @brief The Pure Data Object. + //! @details The Instance is a wrapper for the Pure Data's native comment. + //! With the default constructor, theObjectGui won't be initialized. A valid + //! Object should be created via a Patch. The Gui should be used as tempory object, + //! because it locks the Patch. + class Object + { + public: + + //! @brief The constructor for an empty Object. + //! @details Creates an Object that can be used as an empty reference inside + //! another class. + Object() noexcept; + + //! @brief The copy constructor. + //! @details Creates a copy of an Object and increments his counter. + Object(Object const& other) noexcept; + + //! @brief The move constructor. + //! @details Creates a copy of an Object without incrementing his counter. The + //! Object Patch will be useless. + Object(Object&& other) noexcept; + + //! @brief The copy operator. + //! @details Copies the Object and increments his counter. + Object& operator=(Object const& other) noexcept; + + //! @brief The move operator. + //! @details Copies the Object without incrementing his counter. The other + //! Object will be destroyed if needed. + Object& operator=(Object&& other) noexcept; + + //! @brief The destructor. + //! @details The Object will be destroyed if no other copy exists. + virtual ~Object() noexcept; + + //! @brief Gets if the Object is valid. + bool isValid() const noexcept; + + //! @brief The text of the Object. + std::string getText() const; + + //! @brief The bounds of the Object. + std::array getBounds() const noexcept; + + protected: + + void* getPatchPtr() const noexcept; + + void* getPtr() const noexcept; + + //! @brief The constructor for a new Object. + //! @details Creates a new valid Object. You should never have to use it. Use the + //! Patch to retrieve an Object. + Object(Patch const& patch, void* ptr) noexcept; + + private: + + void* m_ptr; + Patch m_patch; + friend class Patch; + }; + // ==================================================================================== // // GUI // // ==================================================================================== // @@ -21,7 +83,7 @@ namespace pd //! With the default constructor, the Gui won't be initialized. A valid //! Gui should be created via a Patch. The Gui should be used as tempory object, //! because it locks the Patch. - class Gui + class Gui : public Object, private Smuggler { public: @@ -63,9 +125,6 @@ namespace pd //! @details The Object will be destroyed if no other copy exists. virtual ~Gui() noexcept; - //! @brief Gets if the Object is valid. - bool isValid() const noexcept; - //! @brief The class name of the Object. Type getType() const noexcept; @@ -74,7 +133,7 @@ namespace pd std::string getLabel() const; - BindingName getBindingName() const; + Tie getReceiveTie() const; bool isParameter() const noexcept; @@ -86,9 +145,7 @@ namespace pd size_t getNumberOfSteps() const noexcept; - std::array getBounds() const noexcept; - - std::array getLabelPosition() const noexcept; + std::array getLabelPosition() const noexcept; private: @@ -97,73 +154,9 @@ namespace pd //! Patch to retrieve an Object. Gui(Patch const& patch, Type type, void* ptr) noexcept; - void* m_ptr; Type m_type; - Patch m_patch; friend class Patch; }; - - - //! @brief The Pure Data Comment. - //! @details The Instance is a wrapper for the Pure Data's native comment. - //! With the default constructor, theCommentGui won't be initialized. A valid - //! Comment should be created via a Patch. The Gui should be used as tempory object, - //! because it locks the Patch. - class Comment - { - public: - - //! @brief The constructor for an empty Object. - //! @details Creates an Object that can be used as an empty reference inside - //! another class. - Comment() noexcept; - - //! @brief The copy constructor. - //! @details Creates a copy of an Object and increments his counter. - Comment(Comment const& other) noexcept; - - //! @brief The move constructor. - //! @details Creates a copy of an Object without incrementing his counter. The - //! Object Patch will be useless. - Comment(Comment&& other) noexcept; - - //! @brief The copy operator. - //! @details Copies the Object and increments his counter. - Comment& operator=(Comment const& other) noexcept; - - //! @brief The move operator. - //! @details Copies the Object without incrementing his counter. The other - //! Object will be destroyed if needed. - Comment& operator=(Comment&& other) noexcept; - - //! @brief The destructor. - //! @details The Object will be destroyed if no other copy exists. - virtual ~Comment() noexcept; - - //! @brief Gets if the Object is valid. - bool isValid() const noexcept; - - //! @brief The Text of the Object. - std::string getText() const; - - float getX() const noexcept; - - float getY() const noexcept; - - float getWidth() const noexcept; - - private: - - //! @brief The constructor for a new Object. - //! @details Creates a new valid Object. You should never have to use it. Use the - //! Patch to retrieve an Object. - Comment(Patch const& patch, void* ptr) noexcept; - - void* m_ptr; - Patch m_patch; - friend class Patch; - }; - } #endif diff --git a/Source/Pd/PdParameter.cpp b/Source/Pd/PdParameter.cpp new file mode 100644 index 00000000..9acf9101 --- /dev/null +++ b/Source/Pd/PdParameter.cpp @@ -0,0 +1,94 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdParameter.hpp" + +namespace pd +{ + + Parameter::Parameter() + : m_valid(false), m_value (0.f), m_min(0.f), m_max(0.f), + m_name (""), m_label(""), m_bname(), m_nsteps(0) + { + + } + + Parameter::Parameter(Parameter const& other) + : m_valid(other.m_valid), m_value (other.m_value), + m_min(other.m_min), m_max(other.m_max), + m_name (other.m_name), m_label(other.m_label), + m_bname(other.m_bname), m_nsteps(other.m_nsteps) + { + + } + + Parameter::Parameter(pd::Gui const& gui) + : m_valid(true), m_value (0.f), + m_min(gui.getMinimum()), + m_max(gui.getMaximum()), + m_name(gui.getName()), + m_label(gui.getLabel()), + m_bname(gui.getReceiveTie()), + m_nsteps(gui.getNumberOfSteps()) + { + setValueNonNormalized(gui.getValue()); + } + + Parameter::~Parameter() + { + + } + + Parameter& Parameter::operator=(Parameter const& other) + { + m_valid = other.m_valid; + m_value = other.m_value; + m_min = other.m_min; + m_max = other.m_max; + m_name = other.m_name; + m_label = other.m_label; + m_bname = other.m_bname; + m_nsteps= other.m_nsteps; + return *this; + } + + Parameter& Parameter::operator=(Parameter&& other) + { + std::swap(m_valid, other.m_valid); + std::swap(m_value, other.m_value); + std::swap(m_min, other.m_min); + std::swap(m_max, other.m_max); + std::swap(m_name, other.m_name); + std::swap(m_label, other.m_label); + std::swap(m_bname, other.m_bname); + std::swap(m_nsteps, other.m_nsteps); + return *this; + } + + void Parameter::setValueNormalized(float value) + { + value = std::min(std::max(value, 0.f), 1.f); + if(m_nsteps) + { + const float step = (1.f/ float(m_nsteps - 1)); + m_value = std::round(value / step) * step; + } + else + { + m_value = value; + } + } + + + float Parameter::getValueNormalized(float value) + { + if(m_min < m_max) + { + return std::min(std::max((value - m_min) / (m_max - m_min), 0.f), 1.f); + } + return std::min(std::max(1.f - ((value - m_max) / (m_min - m_max)), 0.f), 1.f); + } +} \ No newline at end of file diff --git a/Source/Pd/PdParameter.hpp b/Source/Pd/PdParameter.hpp new file mode 100644 index 00000000..3b09a80c --- /dev/null +++ b/Source/Pd/PdParameter.hpp @@ -0,0 +1,92 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_PARAMETER_HPP +#define Z_PD_PARAMETER_HPP + +#include "PdObject.hpp" + +namespace pd +{ + //! @brief A class that manages a parameter + class Parameter + { + public: + + //! @brief The default constructor. + Parameter(); + + //! @brief The copy constructor. + Parameter(Parameter const& other); + + //! @brief The real constructor. + Parameter(Gui const& gui); + + //! @brief The destructor. + ~Parameter(); + + //! @brief The copy operator. + Parameter& operator=(Parameter const& other); + + //! @brief The move operator. + Parameter& operator=(Parameter&& other); + + //! @brief Gets if the parameter is valid. + inline bool isValid() const noexcept {return m_valid;} + + //! @brief Gets the normalized value. + inline float getValueNormalized() const noexcept {return m_value;} + + //! @brief Gets the non normalized value. + inline float getValueNonNormalized() const noexcept { + return (m_min < m_max) ? m_value * (m_max - m_min) + m_min : (1.f - m_value) * (m_min - m_max) + m_max;} + + //! @brief Sets the normalized value. + void setValueNormalized(float value); + + //! @brief Sets the non normalized value. + inline void setValueNonNormalized(float value) {m_value = getValueNormalized(value);} + + //! @brief Sets the normalized value of a non normalized value. + float getValueNormalized(float value); + + //! @brief Gets the default value of the parameter. + inline float getDefaultValue() const noexcept {return 0.f;} + + //! @brief Gets the name of the parameter. + inline std::string getName() const {return m_name;} + + //! @brief Gets the label of the parameter. + inline std::string getLabel() const {return m_label;} + + //! @brief Gets the text for the value of the parameter. + inline std::string getTextForValue() const {return std::to_string(getValueNonNormalized());} + + //! @brief Gets if the value for a text. + inline float getValueForText(std::string const& text) const noexcept {return std::atof(text.c_str());} + + //! @brief Gets if the orientation of the parameter is inverted. + inline bool isOrientationInverted() const noexcept {return false;} + + //! @brief Gets the number of steps of the parameter. + inline int getNumberOfSteps() const noexcept {return m_nsteps != 0 ? m_nsteps : 0x7fffffff;} + + //! @brief Gets the tie of the parameter. + inline pd::Tie const& getTie() const noexcept {return m_bname;} + + private: + bool m_valid; + float m_value; + float m_min; + float m_max; + std::string m_name; + std::string m_label; + pd::Tie m_bname; + int m_nsteps; + }; +} + +#endif diff --git a/Source/Pd/PdPatch.cpp b/Source/Pd/PdPatch.cpp new file mode 100644 index 00000000..535057f9 --- /dev/null +++ b/Source/Pd/PdPatch.cpp @@ -0,0 +1,205 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdPatch.hpp" +#include "PdObject.hpp" + +extern "C" +{ +#include "z_pd.h" +} + +namespace pd +{ + // ==================================================================================== // + // PATCHER // + // ==================================================================================== // + + Patch::Patch() noexcept : m_ptr(nullptr), m_count(nullptr), m_instance() + { + + } + + Patch::Patch(Instance& instance, std::string const& name, std::string const& path) noexcept : + m_ptr(nullptr), m_count(nullptr), m_instance(instance) + { + if(m_instance.isValid()) + { + m_instance.lock(); + m_ptr = z_pd_patch_new(name.c_str(), path.c_str()); + if(m_ptr) + { + m_count = new std::atomic(1); + } + m_instance.unlock(); + } + } + + Patch::Patch(Patch const& other) noexcept : + m_ptr(other.m_ptr), m_count(other.m_count), m_instance(other.m_instance) + { + if(m_ptr && m_count) + { + ++(*m_count); + } + } + + Patch::Patch(Patch&& other) noexcept : + m_ptr(other.m_ptr), m_count(other.m_count), m_instance(other.m_instance) + { + other.m_ptr = nullptr; + other.m_count = nullptr; + other.m_instance = Instance(); + } + + void Patch::release() noexcept + { + if(m_ptr && m_count && m_count->operator--() == 0) + { + m_instance.lock(); + z_pd_patch_free(reinterpret_cast(m_ptr)); + m_instance.unlock(); + delete m_count; + m_ptr = nullptr; + m_count = nullptr; + } + } + + Patch& Patch::operator=(Patch const& other) noexcept + { + release(); + if(other.m_ptr && other.m_count && other.m_count->operator++() > 0) + { + m_ptr = other.m_ptr; + m_count = other.m_count; + m_instance = other.m_instance; + } + return *this; + } + + Patch& Patch::operator=(Patch&& other) noexcept + { + std::swap(m_count, other.m_count); + std::swap(m_ptr, other.m_ptr); + std::swap(m_instance, other.m_instance); + return *this; + } + + Patch::~Patch() noexcept + { + release(); + } + + bool Patch::isValid() const noexcept + { + return bool(m_ptr) && bool(m_count) && m_instance.isValid(); + } + + Instance Patch::getInstance() const noexcept + { + return m_instance; + } + + std::string Patch::getName() const + { + return isValid() ? z_pd_patch_get_name(reinterpret_cast(m_ptr)) : std::string(); + } + + std::string Patch::getPath() const + { + return isValid() ? z_pd_patch_get_path(reinterpret_cast(m_ptr)) : std::string(); + } + + int Patch::getDollarZero() + { + int value = 0; + if(isValid()) + { + m_instance.lock(); + value = z_pd_patch_get_dollarzero(reinterpret_cast(m_ptr)); + m_instance.unlock(); + } + return value; + } + + std::array Patch::getPosition() const noexcept + { + return isValid() ? + std::array{z_pd_patch_get_x(reinterpret_cast(m_ptr)), z_pd_patch_get_y(reinterpret_cast(m_ptr))} : + std::array{0, 0}; + } + + std::array Patch::getSize() const noexcept + { + return isValid() ? + std::array{z_pd_patch_get_width(reinterpret_cast(m_ptr)), z_pd_patch_get_height(reinterpret_cast(m_ptr))} : + std::array{0, 0}; + } + + std::vector Patch::getGuis() const noexcept + { + std::vector objects; + if(isValid()) + { + z_symbol* hsl = z_pd_symbol_create("hsl"); + z_symbol* vsl = z_pd_symbol_create("vsl"); + z_symbol* tgl = z_pd_symbol_create("tgl"); + z_symbol* nbx = z_pd_symbol_create("nbx"); + z_symbol* vra = z_pd_symbol_create("vradio"); + z_symbol* hra = z_pd_symbol_create("hradio"); + for(z_object *y = z_pd_patch_get_first_object(reinterpret_cast(m_ptr)); y; + y = z_pd_patch_get_next_object(reinterpret_cast(m_ptr), y)) + { + if(z_pd_object_get_name(y) == hsl) + { + objects.push_back(Gui(*this, Gui::Type::HorizontalSlider, reinterpret_cast(y))); + } + else if(z_pd_object_get_name(y) == vsl) + { + objects.push_back(Gui(*this, Gui::Type::VerticalSlider, reinterpret_cast(y))); + } + else if(z_pd_object_get_name(y) == tgl) + { + objects.push_back(Gui(*this, Gui::Type::Toggle, reinterpret_cast(y))); + } + else if(z_pd_object_get_name(y) == nbx) + { + objects.push_back(Gui(*this, Gui::Type::Number, reinterpret_cast(y))); + } + else if(z_pd_object_get_name(y) == vra) + { + objects.push_back(Gui(*this, Gui::Type::VerticalRadio, reinterpret_cast(y))); + } + else if(z_pd_object_get_name(y) == hra) + { + objects.push_back(Gui(*this, Gui::Type::HorizontalRadio, reinterpret_cast(y))); + } + } + } + return objects; + } + + std::vector Patch::getComments() const noexcept + { + std::vector objects; + if(isValid()) + { + z_symbol* txt = z_pd_symbol_create("text"); + for(z_object *y = z_pd_patch_get_first_object(reinterpret_cast(m_ptr)); y; + y = z_pd_patch_get_next_object(reinterpret_cast(m_ptr), y)) + { + if(z_pd_object_get_name(y)== txt) + { + objects.push_back(Object(*this, reinterpret_cast(y))); + } + } + } + return objects; + } +} + + + diff --git a/Source/PdPatch.hpp b/Source/Pd/PdPatch.hpp similarity index 74% rename from Source/PdPatch.hpp rename to Source/Pd/PdPatch.hpp index c6cf5556..e258fc92 100644 --- a/Source/PdPatch.hpp +++ b/Source/Pd/PdPatch.hpp @@ -4,15 +4,15 @@ // WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ -#ifndef __CAMOMILE_PD_PATCH__ -#define __CAMOMILE_PD_PATCH__ +#ifndef Z_PD_PATCH_HPP +#define Z_PD_PATCH_HPP #include "PdInstance.hpp" namespace pd { class Gui; - class Comment; + class Object; // ==================================================================================== // // PATCHER // // ==================================================================================== // @@ -26,6 +26,10 @@ namespace pd { public: + //! @brief The constructor for a new Patch. + //! @details Creates a new valid Patch. + Patch(Instance& instance, std::string const& name, std::string const& path) noexcept; + //! @brief The constructor for an empty Patch. //! @details Creates an Patch that can be used as an empty reference inside //! another class. @@ -56,7 +60,7 @@ namespace pd //! @brief Gets if the Patch is valid. bool isValid() const noexcept; - //! @brief Gets the Instance that owns the Path. + //! @brief Gets the Instance that owns the Patch. Instance getInstance() const noexcept; //! @brief Gets the file's name. @@ -65,38 +69,28 @@ namespace pd //! @brief Gets the file's path. std::string getPath() const; - //! @brief Gets the Patch margin. - std::array getMargin() const noexcept; + //! @brief Gets the dollar zero of the Patch. + int getDollarZero(); + + //! @brief Gets the Patch position. + std::array getPosition() const noexcept; //! @brief Gets the Patch size. - std::array getSize() const noexcept; + std::array getSize() const noexcept; //! @brief Gets the Gui objects from the patch. std::vector getGuis() const noexcept; //! @brief Gets the Comment objects from the patch. - std::vector getComments() const noexcept; + std::vector getComments() const noexcept; private: - - //! @brief The constructor for a new Patch. - //! @details Creates a new valid Patch. - Patch(Instance& instance, void* ptr, std::string const& name, std::string const& path) noexcept; - - //! @brief Gets the relative bounds of a GUI. - std::array getGuiBounds(Gui const& gui) const noexcept; - - //! @brief Gets the relative bounds of a GUI. - std::array getGuiLabelPosition(Gui const& gui) const noexcept; - + void release() noexcept; void* m_ptr; std::atomic* m_count; - std::string m_name; - std::string m_path; Instance m_instance; - friend class Instance; - friend class Gui; + friend class Object; }; } -#endif +#endif // Z_PD_PATCH_HPP diff --git a/Source/Pd/PdPatchManager.cpp b/Source/Pd/PdPatchManager.cpp new file mode 100644 index 00000000..8a85adc2 --- /dev/null +++ b/Source/Pd/PdPatchManager.cpp @@ -0,0 +1,53 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdPatchManager.hpp" + +namespace pd +{ + PatchManager::PatchManager() + { + + } + + PatchManager::~PatchManager() + { + std::lock_guard guard(m_mutex); + m_listeners.clear(); + } + + void PatchManager::addListener(Listener* listener) + { + if(listener) + { + std::lock_guard guard(m_mutex); + m_listeners.insert(listener); + } + } + + void PatchManager::removeListener(Listener* listener) + { + if(listener) + { + std::lock_guard guard(m_mutex); + m_listeners.erase(listener); + } + } + + void PatchManager::notifyListeners() + { + std::vector listeners; + { + std::lock_guard guard(m_mutex); + listeners.reserve(listeners.size()); + listeners.insert(listeners.begin(), m_listeners.begin(), m_listeners.end()); + } + for(size_t i = 0; i < listeners.size(); ++i) + { + listeners[i]->patchChanged(); + } + } +} \ No newline at end of file diff --git a/Source/Pd/PdPatchManager.hpp b/Source/Pd/PdPatchManager.hpp new file mode 100644 index 00000000..31d3b050 --- /dev/null +++ b/Source/Pd/PdPatchManager.hpp @@ -0,0 +1,46 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_PATCH_MANAGER_HPP +#define Z_PD_PATCH_MANAGER_HPP + +#include "PdObject.hpp" + +namespace pd +{ + //! @brief A class that manages a patch to clean + class PatchManager + { + public: + PatchManager(); + virtual ~PatchManager(); + + class Listener + { + public: + inline constexpr Listener() {} + inline virtual ~Listener() {} + virtual void patchChanged() = 0; + }; + + void addListener(Listener* listener); + void removeListener(Listener* listener); + + virtual void loadPatch(std::string const& name, std::string const& path) = 0; + virtual void closePatch() = 0; + inline const pd::Patch getPatch() const noexcept {return m_patch;} + inline pd::Patch getPatch() noexcept {return m_patch;} + protected: + void notifyListeners(); + pd::Patch m_patch; + private: + + std::set m_listeners; + std::mutex m_mutex; + }; +} + +#endif //Z_PD_PATCH_MANAGER_HPP diff --git a/Source/Pd/PdTypes.cpp b/Source/Pd/PdTypes.cpp new file mode 100644 index 00000000..9ab01a98 --- /dev/null +++ b/Source/Pd/PdTypes.cpp @@ -0,0 +1,171 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#include "PdTypes.hpp" + +extern "C" +{ +#include "z_pd.h" +} + +namespace pd +{ + Tie::Tie(std::string const& name) noexcept : ptr(z_pd_tie_create(name.c_str())) + { + ; + } + + Tie::Tie(char const* name) noexcept : ptr(z_pd_tie_create(name)) + { + + } + + Tie& Tie::operator=(std::string const& name) + { + ptr = z_pd_tie_create(name.c_str()); + return *this; + } + + Tie& Tie::operator=(char const* name) + { + ptr = z_pd_tie_create(name); + return *this; + } + + std::string Tie::getName() const + { + return z_pd_tie_get_name(reinterpret_cast(ptr)); + } + + + + + + + Symbol::Symbol(std::string const& name) noexcept : ptr(z_pd_tie_create(name.c_str())) + { + ; + } + + Symbol::Symbol(char const* name) noexcept : ptr(z_pd_tie_create(name)) + { + + } + + Symbol& Symbol::operator=(std::string const& name) + { + ptr = z_pd_tie_create(name.c_str()); + return *this; + } + + Symbol& Symbol::operator=(char const* name) + { + ptr = z_pd_tie_create(name); + return *this; + } + + std::string Symbol::getName() const + { + return z_pd_tie_get_name(reinterpret_cast(ptr)); + } + + + + + + + List::List() : ptr(z_pd_list_create(0)) + { + ; + } + + List::List(size_t size) : ptr(z_pd_list_create(size)) + { + ; + } + + List::List(List const& other) : ptr(z_pd_list_create_copy(reinterpret_cast(other.ptr))) + { + + } + + List::List(List&& other) : ptr(z_pd_list_create(0)) + { + std::swap(ptr, other.ptr); + } + + List::~List() + { + z_pd_list_free(reinterpret_cast(ptr)); + } + + List& List::operator=(List const& other) + { + z_pd_list_copy(reinterpret_cast(ptr), reinterpret_cast(other.ptr)); + return *this; + } + + List& List::operator=(List&& other) + { + std::swap(ptr, other.ptr); + return *this; + } + + List::Type List::getType(size_t index) const + { + z_listtype const t = z_pd_list_get_type(reinterpret_cast(ptr), index); + if(t == Z_NULL) + return Type::Nothing; + if(t == Z_FLOAT) + return Type::Float; + if(t == Z_SYMBOL) + return Type::Symbol; + return Type::Gpointer; + } + + void List::resize(size_t size) + { + z_pd_list_resize(reinterpret_cast(ptr), size); + } + + float List::getFloat(size_t index) const + { + return z_pd_list_get_float(reinterpret_cast(ptr), index); + } + + Symbol List::getSymbol(size_t index) const + { + return Symbol(z_pd_list_get_symbol(reinterpret_cast(ptr), index)); + } + + Gpointer List::getGpointer(size_t index) const + { + return Gpointer(z_pd_list_get_gpointer(reinterpret_cast(ptr), index)); + } + + size_t List::getSize() const noexcept + { + return z_pd_list_get_size(reinterpret_cast(ptr)); + } + + void List::setFloat(size_t index, float value) + { + z_pd_list_set_float(reinterpret_cast(ptr), index, value); + } + + void List::setSymbol(size_t index, Symbol& symbol) + { + z_pd_list_set_symbol(reinterpret_cast(ptr), index, + reinterpret_cast(symbol.ptr)); + } + + void List::setGpointer(size_t index, Gpointer& pointer) + { + z_pd_list_set_gpointer(reinterpret_cast(ptr), index, + reinterpret_cast(pointer.ptr)); + } +} + diff --git a/Source/Pd/PdTypes.hpp b/Source/Pd/PdTypes.hpp new file mode 100644 index 00000000..fd954f17 --- /dev/null +++ b/Source/Pd/PdTypes.hpp @@ -0,0 +1,168 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +#ifndef Z_PD_TYPES_HPP +#define Z_PD_TYPES_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace pd +{ + class Smuggler; + class List; + + // ==================================================================================== // + // TIE // + // ==================================================================================== // + //! @brief A tie is used as a connection between the interface and Pure Data. + //! @details The wrapper for z_tie struct. + class Tie + { + public: + Tie(std::string const& name) noexcept ; + Tie(char const* name) noexcept ; + inline constexpr Tie() : ptr(nullptr) {} + inline constexpr Tie(Tie const& other) : ptr(other.ptr) {} + inline Tie& operator=(Tie const& other) {ptr = other.ptr; return *this;} + Tie& operator=(std::string const& name); + Tie& operator=(char const* name); + inline constexpr bool operator!=(Tie const& other)const noexcept {return other.ptr != ptr;} + inline constexpr bool operator==(Tie const& other) const noexcept {return other.ptr == ptr;} + inline constexpr operator bool() const noexcept {return bool(ptr);} + std::string getName() const; + + private: + void* ptr; + friend class Smuggler; + friend class List; + inline constexpr void const* get() const noexcept{return ptr;} + inline constexpr Tie(void *_ptr) : ptr(_ptr) {} + }; + + + // ==================================================================================== // + // SYMBOL // + // ==================================================================================== // + //! @brief A symbol is used as for fast comparaison of string with Pure Data. + //! @details The wrapper for z_symbol struct. + class Symbol + { + public: + Symbol(std::string const& name) noexcept ; + Symbol(char const* name) noexcept ; + inline constexpr Symbol() : ptr(nullptr) {} + inline constexpr Symbol(Symbol const& other) : ptr(other.ptr) {} + inline Symbol& operator=(Symbol const& other) {ptr = other.ptr; return *this;} + Symbol& operator=(std::string const& name); + Symbol& operator=(char const* name); + inline constexpr bool operator!=(Symbol const& other)const noexcept {return other.ptr != ptr;} + inline constexpr bool operator==(Symbol const& other) const noexcept{return other.ptr == ptr;} + inline constexpr operator bool() const noexcept {return bool(ptr);} + std::string getName() const; + + private: + void* ptr; + friend class Smuggler; + friend class List; + inline constexpr void const* get() const noexcept{return ptr;} + inline constexpr Symbol(void *_ptr) : ptr(_ptr) {} + }; + + + // ==================================================================================== // + // GPOINTER // + // ==================================================================================== // + //! @brief A gpointer. + //! @details The wrapper for z_gpointer struct. + class Gpointer + { + public: + inline constexpr Gpointer() : ptr(nullptr) {} + inline constexpr Gpointer(Gpointer const& other) : ptr(other.ptr) {} + inline Gpointer& operator=(Gpointer const& other) {ptr = other.ptr; return *this;} + inline bool operator!=(Gpointer const& other)const noexcept {return other.ptr != ptr;} + inline bool operator==(Gpointer const& other) const noexcept{return other.ptr == ptr;} + + private: + void* ptr; + friend class Smuggler; + friend class List; + inline constexpr void const* get() const noexcept{return ptr;} + inline constexpr Gpointer(void *_ptr) : ptr(_ptr) {} + }; + + // ==================================================================================== // + // LIST // + // ==================================================================================== // + //! @brief A list. + //! @details The wrapper for z_list struct. + class List + { + public: + enum class Type + { + Nothing, + Float, + Symbol, + Gpointer + }; + List(); + List(size_t size); + List(List const& other); + List(List&& other); + ~List(); + List& operator=(List const& other); + List& operator=(List&& other); + void resize(size_t size); + size_t getSize() const noexcept; + Type getType(size_t index) const; + float getFloat(size_t index) const; + Symbol getSymbol(size_t index) const; + Gpointer getGpointer(size_t index) const; + void setFloat(size_t index, float value); + void setSymbol(size_t index, Symbol& symbol); + void setGpointer(size_t index, Gpointer& pointer); + private: + void* ptr; + friend class Smuggler; + inline void const* get() const noexcept{return ptr;} + inline List(void *_ptr) : ptr(_ptr) {} + }; + + + //! @brief The smuggler is optimized for internal use. + //! @details The class doesn't break the efficiency of creation of some type, but you + //! should use it if and only if you know what you do. + class Smuggler + { + public: + ~Smuggler() noexcept {} + protected: + inline static constexpr void const* getTie(Tie const& tie) noexcept {return tie.ptr;} + inline static constexpr Tie createTie(void *ptr) noexcept {return Tie(ptr);} + inline static constexpr void const* getSymbol(Symbol const& symbol) noexcept {return symbol.ptr;} + inline static constexpr Symbol createSymbol(void *ptr) noexcept {return Symbol(ptr);} + inline static constexpr void const* getGpointer(Gpointer const& gpointer) noexcept {return gpointer.ptr;} + inline static constexpr Gpointer createGpointer(void *ptr) noexcept {return Gpointer(ptr);} + + inline static constexpr void const* getList(List const& list) noexcept {return list.ptr;} + inline static List createList(void *ptr) noexcept {return List(ptr);} + }; +} + +#endif // Z_PD_TYPES_HPP diff --git a/Source/Pd/z_pd.c b/Source/Pd/z_pd.c new file mode 100644 index 00000000..a3fb31f7 --- /dev/null +++ b/Source/Pd/z_pd.c @@ -0,0 +1,1201 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +// This part of the code is greatly inspired by Pure Data and libPD, and sometimes +// directly copied. None of the authors of Pure Data and libPD is responsible for these +// experiments but you must be aware of their unintended contribution. + +#include "z_pd.h" +#include "../ThirdParty/PureData/src/m_pd.h" +#include "../ThirdParty/PureData/src/g_canvas.h" +#include "../ThirdParty/PureData/src/s_stuff.h" +#include "../ThirdParty/PureData/src/m_imp.h" +#include "../ThirdParty/PureData/src/g_all_guis.h" + + +EXTERN void pd_init(void); + +void bob_tilde_setup(); +void bonk_tilde_setup(); +void choice_setup(); +void fiddle_tilde_setup(); +void loop_tilde_setup(); +void lrshift_tilde_setup(); +void pique_setup(); +void sigmund_tilde_setup(); +void stdout_setup(); + +void sys_get_midi_apis(char *buf) {} +void sys_listmididevs(void) {} +void sys_get_midi_params(int *pnmidiindev, int *pmidiindev,int *pnmidioutdev, int *pmidioutdev) {} +void sys_open_midi(int nmidiindev, int *midiindev, int nmidioutdev, int *midioutdev, int enable) {} +void sys_close_midi() {} +void sys_reopen_midi(void) {} +void sys_initmidiqueue(void) {} +void sys_pollmidiqueue(void) {} +void sys_setmiditimediff(double inbuftime, double outbuftime) {} +void glob_midi_setapi(void *dummy, t_floatarg f) {} +void glob_midi_properties(t_pd *dummy, t_floatarg flongform) {} +void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) {} +int sys_mididevnametonumber(int output, const char *name) { return 0; } +void sys_mididevnumbertoname(int output, int devno, char *name, int namesize) {} + +static t_class *z_receiver_class; + +typedef struct _receiver +{ + t_object z_obj; + struct _instance* z_owner; + t_symbol* z_sym; + z_hook_bang z_m_bang; + z_hook_float z_m_float; + z_hook_symbol z_m_symbol; + z_hook_gpointer z_m_gpointer; + z_hook_list z_m_list; + z_hook_anything z_m_anything; + struct _receiver* z_next; +} z_receiver; + +static void receiver_bang(z_receiver *x) +{ + if(x->z_m_bang) + { + x->z_m_bang(x->z_owner, x->z_sym); + } +} + +static void receiver_float(z_receiver *x, t_float f) +{ + if(x->z_m_float) + { + x->z_m_float(x->z_owner, x->z_sym, f); + } +} + +static void receiver_symbol(z_receiver *x, t_symbol *s) +{ + if(x->z_m_symbol) + { + x->z_m_symbol(x->z_owner, x->z_sym, s); + } +} + +static void receiver_pointer(z_receiver *x, t_gpointer *gp) +{ + if(x->z_m_gpointer) + { + x->z_m_gpointer(x->z_owner, x->z_sym, gp); + } +} + +struct _list +{ + int l_n; + t_atom *l_vec; +}; + +static void receiver_list(z_receiver *x, t_symbol *s, int argc, t_atom *argv) +{ + if(x->z_m_list) + { + z_list b; + b.l_n = argc; + b.l_vec = argv; + x->z_m_list(x->z_owner, x->z_sym, &b); + } +} + +static void receiver_anything(z_receiver *x, t_symbol *s, int argc, t_atom *argv) +{ + if(x->z_m_anything) + { + z_list b; + b.l_n = argc; + b.l_vec = argv; + x->z_m_anything(x->z_owner, x->z_sym, s, &b); + } +} + +static void receiver_free(z_receiver *x) +{ + pd_unbind((t_pd *)x, x->z_sym); +} + +void receiver_setup(void) +{ + t_class* c = class_new(gensym("z_receiver"), + (t_newmethod)NULL, + (t_method)receiver_free, + sizeof(z_receiver), CLASS_PD, A_DEFSYM, 0); + if(c) + { + class_addbang(c, receiver_bang); + class_addfloat(c, receiver_float); + class_addsymbol(c, receiver_symbol); + class_addpointer(c, receiver_pointer); + class_addlist(c, receiver_list); + class_addanything(c, receiver_anything); + } + z_receiver_class = c; +} + + + + + +struct _internal +{ + t_pdinstance* z_intance; + t_sample* z_inputs; + t_sample* z_outputs; + int z_ninputs; + int z_noutputs; + int z_samplerate; + z_hook_print z_m_print; + z_hook_noteon z_m_noteon; + z_hook_controlchange z_m_controlchange; + z_hook_programchange z_m_programchange; + z_hook_pitchbend z_m_pitchbend; + z_hook_aftertouch z_m_aftertouch; + z_hook_polyaftertouch z_m_polyaftertouch; + z_hook_byte z_m_byte; + z_receiver* z_receiver_list; +}; + +static t_sample* z_sample_ins = NULL; +static t_sample* z_sample_outs = NULL; +static t_pdinstance* z_first_instance = NULL; +static z_instance* z_current_instance = NULL; +static t_symbol* z_sym_pd = NULL; +static t_symbol* z_sym_dsp = NULL; +static z_symbol* z_sym_hsl = NULL; +static z_symbol* z_sym_vsl = NULL; +static z_symbol* z_sym_tgl = NULL; +static z_symbol* z_sym_nbx = NULL; +static z_symbol* z_sym_vradio = NULL; +static z_symbol* z_sym_hradio = NULL; + +static void z_pd_print(const char* s); + +void z_pd_init() +{ + int devices = 0; + int ioputs = 2; + static char initialized = 0; + if(!initialized) + { + signal(SIGFPE, SIG_IGN); + sys_printhook = NULL; + sys_soundin = NULL; + sys_soundout = NULL; + sys_schedblocksize = DEFDACBLKSIZE; + sys_externalschedlib = 0; + sys_printtostderr = 0; + sys_usestdpath = 0; + sys_debuglevel = 1; + sys_verbose = 4; + sys_noloadbang = 0; + sys_nogui = 1; + sys_hipriority = 0; + sys_nmidiin = 0; + sys_nmidiout = 0; + sys_init_fdpoll(); + pd_init(); + sys_set_audio_api(API_DUMMY); + sys_searchpath = NULL; + sys_set_audio_settings(1, &devices, 1, &ioputs, 1, &devices, 1, &ioputs, 44100, -1, 1, DEFDACBLKSIZE); + sched_set_using_audio(SCHED_AUDIO_CALLBACK); + sys_reopen_audio(); + z_sample_ins = sys_soundin; + z_sample_outs = sys_soundout; + z_first_instance= pd_this; + sys_soundin = NULL; + sys_soundout = NULL; + z_current_instance = NULL; + + z_sym_pd = gensym("pd"); + z_sym_dsp = gensym("dsp"); + z_sym_hsl = gensym("hsl"); + z_sym_vsl = gensym("vsl"); + z_sym_tgl = gensym("tgl"); + z_sym_nbx = gensym("nbx"); + z_sym_vradio = gensym("vradio"); + z_sym_hradio = gensym("hradio"); + + bob_tilde_setup(); + bonk_tilde_setup(); + choice_setup(); + fiddle_tilde_setup(); + loop_tilde_setup(); + lrshift_tilde_setup(); + pique_setup(); + sigmund_tilde_setup(); + stdout_setup(); + receiver_setup(); + + sys_printhook = (t_printhook)(z_pd_print); + initialized = 1; + } + else + { + pd_error(NULL, "Pure Data is already initialized."); + } +} + +void z_pd_clear() +{ + if(z_sample_ins) + { + freebytes(z_sample_ins, (sys_inchannels ? sys_inchannels : 2) * (DEFDACBLKSIZE * sizeof(t_sample))); + } + if(z_sample_outs) + { + freebytes(z_sample_outs, (sys_outchannels ? sys_outchannels : 2) * (DEFDACBLKSIZE * sizeof(t_sample))); + } + if(z_first_instance) + { + pdinstance_free(z_first_instance); + } +} + + + + +unsigned int z_pd_version_getmajor() +{ + return PD_MAJOR_VERSION; +} + +unsigned int z_pd_version_getminor() +{ + return PD_MINOR_VERSION; +} + +unsigned int z_pd_version_getbug() +{ + return PD_BUGFIX_VERSION; +} + + + + + +void z_pd_searchpath_clear() +{ + namelist_free(sys_searchpath); + sys_searchpath = NULL; +} + +void z_pd_searchpath_add(const char* path) +{ + sys_searchpath = namelist_append(sys_searchpath, path, 0); +} + + + + +void z_pd_console_fatal(char const* message) +{ + verbose(-3, "%s", message); +} + +void z_pd_console_error(char const* message) +{ + verbose(-2, "%s", message); +} + +void z_pd_console_post(char const* message) +{ + verbose(-1, "%s", message); +} + +void z_pd_console_log(char const* message) +{ + verbose(0, "%s", message); +} + + + + + + + + +static void z_pd_print(const char* s) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_print) + { + z_current_instance->z_internal_ptr->z_m_print(z_current_instance, s); + } +#ifdef DEBUG + printf("%s", s); +#endif +} + + +z_instance* z_pd_instance_new(size_t size, + z_hook_print mprint, + z_hook_noteon mnoteon, + z_hook_controlchange mcontrolchange, + z_hook_programchange mprogramchange, + z_hook_pitchbend mpitchbend, + z_hook_aftertouch maftertouch, + z_hook_polyaftertouch mpolyaftertouch, + z_hook_byte mbyte) +{ + z_instance* instance = NULL; + z_internal* internal = (z_internal *)malloc(sizeof(z_internal)); + if(internal) + { + internal->z_inputs = NULL; + internal->z_outputs = NULL; + internal->z_samplerate = 0; + internal->z_ninputs = 0; + internal->z_noutputs = 0; + + + internal->z_m_print = mprint; + internal->z_m_noteon = mnoteon; + internal->z_m_controlchange = mcontrolchange; + internal->z_m_programchange = mprogramchange; + internal->z_m_pitchbend = mpitchbend; + internal->z_m_aftertouch = maftertouch; + internal->z_m_polyaftertouch = mpolyaftertouch; + internal->z_m_byte = mbyte; + + internal->z_receiver_list = NULL; + internal->z_intance = pdinstance_new(); + if(!internal->z_intance) + { + free(internal); + return NULL; + } + instance = malloc(size); + if(instance) + { + instance->z_internal_ptr = internal; + } + } + return instance; +} + +void z_pd_instance_free(z_instance* instance) +{ + z_receiver* next = NULL; + if(z_current_instance == instance) + { + z_current_instance = NULL; + } + while(instance->z_internal_ptr->z_receiver_list) + { + next = instance->z_internal_ptr->z_receiver_list->z_next; + pd_free((t_pd *)instance->z_internal_ptr->z_receiver_list); + instance->z_internal_ptr->z_receiver_list = next; + } + pdinstance_free(instance->z_internal_ptr->z_intance); + instance->z_internal_ptr->z_intance = NULL; + free(instance->z_internal_ptr); + instance->z_internal_ptr = NULL; + free(instance); +} + +void z_pd_instance_set(z_instance* instance) +{ + pd_setinstance(instance->z_internal_ptr->z_intance); + sys_soundin = instance->z_internal_ptr->z_inputs; + sys_soundout = instance->z_internal_ptr->z_outputs; + sys_inchannels = instance->z_internal_ptr->z_ninputs; + sys_outchannels = instance->z_internal_ptr->z_noutputs; + sys_dacsr = instance->z_internal_ptr->z_samplerate; + z_current_instance = instance; +} + +static z_receiver* z_pd_instance_getreceiver(z_instance* instance, z_tie* tie) +{ + z_receiver* recv = instance->z_internal_ptr->z_receiver_list->z_next; + while(recv) + { + if(recv->z_sym == tie) + { + return recv; + } + recv = recv->z_next; + } + return NULL; +} + +void z_pd_instance_bind(z_instance* instance, z_tie* tie, + z_hook_bang mbang, + z_hook_float mfloat, + z_hook_symbol msymbol, + z_hook_gpointer mgpointer, + z_hook_list mlist, + z_hook_anything manything) +{ + z_receiver *x = z_pd_instance_getreceiver(instance, tie); + if(x) + { + x->z_m_bang = mbang; + x->z_m_float = mfloat; + x->z_m_symbol = msymbol; + x->z_m_gpointer = mgpointer; + x->z_m_list = mlist; + x->z_m_anything = manything; + } + else + { + x = (z_receiver *)pd_new(z_receiver_class); + if(x) + { + x->z_sym = tie; + x->z_owner = instance; + x->z_m_bang = mbang; + x->z_m_float = mfloat; + x->z_m_symbol = msymbol; + x->z_m_gpointer = mgpointer; + x->z_m_list = mlist; + x->z_m_anything = manything; + x->z_next = instance->z_internal_ptr->z_receiver_list; + instance->z_internal_ptr->z_receiver_list = x; + pd_bind((t_pd *)x, x->z_sym); + } + } +} + +void z_pd_instance_unbind(z_instance* instance, z_tie* tie) +{ + z_receiver *x = z_pd_instance_getreceiver(instance, tie); + if(x) + { + pd_free((t_pd *)x); + } +} + +void z_pd_instance_dsp_prepare(z_instance* instance, + const int nins, const int nouts, + const int samplerate, const int nsamples) +{ + if(samplerate != instance->z_internal_ptr->z_samplerate || + nins != instance->z_internal_ptr->z_ninputs || + nouts != instance->z_internal_ptr->z_noutputs) + { + sys_setchsr(nins, nouts, samplerate); + instance->z_internal_ptr->z_inputs = sys_soundin; + instance->z_internal_ptr->z_outputs = sys_soundout; + instance->z_internal_ptr->z_ninputs = sys_inchannels; + instance->z_internal_ptr->z_noutputs = sys_outchannels; + instance->z_internal_ptr->z_samplerate = sys_getsr(); + } + t_atom av; + av.a_type = A_FLOAT; + av.a_w.w_float = 1; + pd_typedmess((t_pd *)z_sym_pd->s_thing, z_sym_dsp, 1, &av); +} + +void z_pd_instance_dsp_perform(z_instance* instance, int nsamples, + const int nins, const z_sample** inputs, + const int nouts, z_sample** outputs) +{ + int i, j; + t_sample *ins = instance->z_internal_ptr->z_inputs; + t_sample *outs = instance->z_internal_ptr->z_outputs; + for(i = 0; i < nsamples; i += DEFDACBLKSIZE) + { + for(j = 0; j < nins; j++) + { + memcpy(ins+j*DEFDACBLKSIZE, inputs[j]+i, DEFDACBLKSIZE * sizeof(t_sample)); + } + memset(outs, 0, DEFDACBLKSIZE * sizeof(t_sample) * nouts); + sched_tick(); + for(j = 0; j < nouts; j++) + { + memcpy(outputs[j]+i, outs+j*DEFDACBLKSIZE, DEFDACBLKSIZE * sizeof(t_sample)); + } + } +} + +void z_pd_instance_dsp_release(z_instance* instance) +{ + +} + +int z_pd_instance_get_samplerate(z_instance* instance) +{ + return instance->z_internal_ptr->z_samplerate; +} + + + + + + + +z_patch* z_pd_patch_new(const char* name, const char* path) +{ + t_canvas* cnv = NULL; + if(name && path) + { + cnv = (t_canvas *)glob_evalfile(NULL, gensym(name), gensym(path)); + if(cnv) + { + cnv->gl_edit = 0; + } + } + else if(name) + { + cnv = (t_canvas *)glob_evalfile(NULL, gensym(name), gensym("")); + if(cnv) + { + cnv->gl_edit = 0; + } + } + return cnv; +} + +void z_pd_patch_free(z_patch* patch) +{ + canvas_free(patch); +} + +const char* z_pd_patch_get_name(z_patch const* patch) +{ + return patch->gl_name->s_name; +} + +const char* z_pd_patch_get_path(z_patch const* patch) +{ + return canvas_getdir((t_glist *)patch)->s_name; +} + +int z_pd_patch_get_dollarzero(z_patch const* patch) +{ + int value = 0; + t_canvas* current = canvas_getcurrent(); + canvas_setcurrent((t_glist *)patch); + value = canvas_getdollarzero(); + canvas_setcurrent(current); + return value; +} + +int z_pd_patch_get_x(z_patch const* patch) +{ + return patch->gl_xmargin; +} + +int z_pd_patch_get_y(z_patch const* patch) +{ + return patch->gl_ymargin; +} + +int z_pd_patch_get_width(z_patch const* patch) +{ + return patch->gl_pixwidth; +} + +int z_pd_patch_get_height(z_patch const* patch) +{ + return patch->gl_pixheight; +} + +z_object* z_pd_patch_get_first_object(z_patch* patch) +{ + return (z_object *)patch->gl_list; +} + +z_object* z_pd_patch_get_next_object(z_patch* patch, z_object* previous) +{ + return (z_object *)((t_gobj *)previous)->g_next; +} + + + + +static char z_pd_object_is_patchable(z_object const* object) +{ + return object->te_g.g_pd->c_patchable; +} + +static struct _widgetbehavior* z_pd_object_get_widget(z_object const* object) +{ + return object->te_g.g_pd->c_wb; +} + + +z_symbol* z_pd_object_get_name(z_object const* object) +{ + return object->te_g.g_pd->c_name; +} + +void z_pd_object_get_text(z_object const* object, int* size, char** text) +{ + binbuf_gettext(((t_text *)(object))->te_binbuf, text, size); +} + +void z_pd_object_get_bounds(z_object const* object, z_patch const* patch, int* x, int* y, int* width, int* height) +{ + struct _widgetbehavior const* wb = z_pd_object_get_widget(object); + if(z_pd_object_is_patchable(object) && wb && wb->w_getrectfn) + { + wb->w_getrectfn((t_gobj *)object, (t_canvas *)patch, x, y, width, height); + *width = *width - *x; + *height = *height - *y; + *x = *x - z_pd_patch_get_x(patch); + *y = *y - z_pd_patch_get_y(patch); + } + else + { + *x = 0; + *y = 0; + *width = 0; + *height = 0; + } +} + + + + + +z_symbol* z_pd_gui_get_label(z_gui const* gui) +{ + return gui->x_lab; +} + +z_symbol* z_pd_gui_get_receive_symbol(z_gui const* gui) +{ + return gui->x_rcv; +} + +z_symbol* z_pd_gui_get_send_symbol(z_gui const* gui) +{ + return gui->x_rcv; +} + +float z_pd_gui_get_maximum_value(z_gui const* gui) +{ + if(gui->x_obj.te_g.g_pd->c_name == z_sym_hsl) + { + return ((t_hslider *)gui)->x_max; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vsl) + { + return ((t_vslider *)gui)->x_max; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_tgl) + { + return 1.f; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_nbx) + { + return ((t_my_numbox *)gui)->x_max; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vradio) + { + return ((t_hdial *)gui)->x_number - 1; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_hradio) + { + return ((t_vdial *)gui)->x_number - 1; + } + return 0.f; +} + +float z_pd_gui_get_minimum_value(z_gui const* gui) +{ + if(gui->x_obj.te_g.g_pd->c_name == z_sym_hsl) + { + return ((t_hslider *)gui)->x_min; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vsl) + { + return ((t_vslider *)gui)->x_min; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_tgl) + { + return 0.f; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_nbx) + { + return ((t_my_numbox *)gui)->x_min; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vradio) + { + return 0.f; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_hradio) + { + return 0.f; + } + return 0.f; +} + +int z_pd_gui_get_number_of_steps(z_gui const* gui) +{ + if(gui->x_obj.te_g.g_pd->c_name == z_sym_hsl) + { + return 0; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vsl) + { + return 0; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_tgl) + { + return 2; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_nbx) + { + return 0; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vradio) + { + return ((t_hdial *)gui)->x_number; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_hradio) + { + return ((t_vdial *)gui)->x_number; + } + return 0.f; +} + +float z_pd_gui_get_value(z_gui const* gui) +{ + if(gui->x_obj.te_g.g_pd->c_name == z_sym_hsl) + { + return ((t_hslider *)gui)->x_val; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vsl) + { + return ((t_vslider *)gui)->x_val; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_tgl) + { + return ((t_toggle *)gui)->x_on; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_nbx) + { + return ((t_my_numbox *)gui)->x_val; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_vradio) + { + return ((t_hdial *)gui)->x_on; + } + else if(gui->x_obj.te_g.g_pd->c_name == z_sym_hradio) + { + return ((t_vdial *)gui)->x_on; + } + return 0.f; +} + +void z_pd_gui_get_label_position(z_gui const* gui, z_patch const* patch, int* x, int* y) +{ + *x = ((t_object *)gui)->te_xpix - z_pd_patch_get_x(patch) + gui->x_ldx; + *y = ((t_object *)gui)->te_ypix - z_pd_patch_get_y(patch) + gui->x_ldy; +} + + + + + + +z_tie* z_pd_tie_create(const char* name) +{ + return (z_tie *)gensym(name); +} + +char const* z_pd_tie_get_name(z_tie const* tie) +{ + return tie->s_name; +} + +z_symbol* z_pd_symbol_create(const char* symbol) +{ + return (z_symbol *)gensym(symbol); +} + +char const* z_pd_symbol_get_name(z_symbol const* symbol) +{ + return symbol->s_name; +} + +z_list* z_pd_list_create(size_t size) +{ + z_list *x = (z_list *)malloc(sizeof(z_list)); + if(x) + { + if(size) + { + x->l_vec = (t_atom *)malloc(size * sizeof(t_atom)); + if(x->l_vec) + { + x->l_n = size; + } + else + { + x->l_n = 0; + } + } + else + { + x->l_n = 0; + x->l_vec = NULL; + } + } + return x; +} + +void z_pd_list_free(z_list *list) +{ + if(list->l_vec && list->l_n) + { + free(list->l_vec); + } + list->l_vec = NULL; + list->l_n = 0; + free(list); +} + +char z_pd_list_resize(z_list *list, size_t size) +{ + t_atom* temp = NULL; + if(list->l_vec && list->l_n) + { + temp = realloc(list->l_vec, size * sizeof(t_atom)); + if(temp) + { + list->l_vec = temp; + list->l_n = size; + return 0; + } + } + else + { + list->l_vec = (t_atom *)malloc(size * sizeof(t_atom)); + if(list->l_vec) + { + list->l_n = size; + return 0; + } + else + { + list->l_n = 0; + } + } + return -1; +} + +z_list* z_pd_list_create_copy(z_list const* list) +{ + z_list* x = z_pd_list_create(list->l_n); + if(x) + { + memcpy(x->l_vec, list->l_vec, list->l_n * sizeof(t_atom)); + x->l_n = list->l_n; + } + return x; +} + +char z_pd_list_copy(z_list* list1, z_list const* list2) +{ + if(!z_pd_list_resize(list1, list2->l_n)) + { + memcpy(list1->l_vec, list2->l_vec, list2->l_n * sizeof(t_atom)); + return 0; + } + return -1; +} + +size_t z_pd_list_get_size(z_list const* list) +{ + return list->l_n; +} + +z_listtype z_pd_list_get_type(z_list const* list, size_t index) +{ + if((list->l_vec+index)->a_type == A_FLOAT) + return Z_FLOAT; + if((list->l_vec+index)->a_type == A_SYMBOL) + return Z_SYMBOL; + if((list->l_vec+index)->a_type == A_POINTER) + return Z_POINTER; + return Z_NULL; +} + +z_float z_pd_list_get_float(z_list const* list, size_t index) +{ + return (list->l_vec+index)->a_w.w_float; +} + +z_symbol* z_pd_list_get_symbol(z_list const* list, size_t index) +{ + return (list->l_vec+index)->a_w.w_symbol; +} + +z_gpointer* z_pd_list_get_gpointer(z_list const* list, size_t index) +{ + return (list->l_vec+index)->a_w.w_gpointer; +} + +void z_pd_list_set_float(z_list *list, size_t index, z_float value) +{ + (list->l_vec+index)->a_type = A_FLOAT; + (list->l_vec+index)->a_w.w_float = value; +} + +void z_pd_list_set_symbol(z_list *list, size_t index, z_symbol* symbol) +{ + (list->l_vec+index)->a_type = A_SYMBOL; + (list->l_vec+index)->a_w.w_symbol = symbol; +} + +void z_pd_list_set_gpointer(z_list *list, size_t index, z_gpointer* pointer) +{ + (list->l_vec+index)->a_type = A_POINTER; + (list->l_vec+index)->a_w.w_gpointer = pointer; +} + + + + + + + +void z_pd_messagesend_bang(z_tie const* tie) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_bang((t_pd *)sym->s_thing); + } +} + +void z_pd_messagesend_float(z_tie const* tie, z_float value) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_float((t_pd *)sym->s_thing, value); + } +} + +void z_pd_messagesend_gpointer(z_tie const* tie, z_gpointer const* pointer) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_pointer((t_pd *)sym->s_thing, (t_gpointer *)pointer); + } +} + +void z_pd_messagesend_symbol(z_tie const* tie, z_symbol const* symbol) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_symbol((t_pd *)sym->s_thing, (t_symbol *)symbol); + } +} + +void z_pd_messagesend_list(z_tie const* tie, z_list const* list) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_list((t_pd *)sym->s_thing, &s_list, list->l_n, list->l_vec); + } +} + +void z_pd_messagesend_anything(z_tie const* tie, z_symbol const* symbol, z_list const* list) +{ + t_symbol const* sym = (t_symbol const *)tie; + if(sym && sym->s_thing) + { + pd_typedmess((t_pd *)sym->s_thing, (t_symbol *)symbol, list->l_n, list->l_vec); + } +} + + + + + + + + +#define Z_PD_MIDI_CHECK_CHANNEL(channel) if (channel < 0 || channel > 16) return; +#define Z_PD_MIDI_CHECK_PORT(port) if (port < 0 || port > 0x0fff) return; +#define Z_PD_MIDI_CHECK_RANGE_7BIT(v) if (v < 0 || v > 0x7f) return; +#define Z_PD_MIDI_CHECK_RANGE_8BIT(v) if (v < 0 || v > 0xff) return; +#define Z_PD_MIDI_WRAP_PORT(channel) (channel >> 4) +#define Z_PD_MIDI_WRAP_CHANNEL(channel) (channel & 0x0f) + +void z_pd_midisend_noteon(int channel, int pitch, int velocity) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + Z_PD_MIDI_CHECK_RANGE_7BIT(pitch) + Z_PD_MIDI_CHECK_RANGE_8BIT(velocity) + inmidi_noteon(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), pitch, velocity); +} + +void z_pd_midisend_controlchange(int channel, int controller, int value) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + Z_PD_MIDI_CHECK_RANGE_7BIT(controller) + Z_PD_MIDI_CHECK_RANGE_7BIT(value) + inmidi_controlchange(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), controller, value); +} + +void z_pd_midisend_programchange(int channel, int value) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + Z_PD_MIDI_CHECK_RANGE_7BIT(value) + inmidi_programchange(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), value); +} + +void z_pd_midisend_pitchbend(int channel, int value) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + if (value < -8192 || value > 8191) return; + inmidi_pitchbend(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), value + 8192); +} + +void z_pd_midisend_aftertouch(int channel, int value) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + Z_PD_MIDI_CHECK_RANGE_7BIT(value) + inmidi_aftertouch(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), value); +} + +void z_pd_midisend_polyaftertouch(int channel, int pitch, int value) +{ + Z_PD_MIDI_CHECK_CHANNEL(channel) + Z_PD_MIDI_CHECK_RANGE_7BIT(pitch) + Z_PD_MIDI_CHECK_RANGE_7BIT(value) + inmidi_polyaftertouch(Z_PD_MIDI_WRAP_PORT(channel), Z_PD_MIDI_WRAP_CHANNEL(channel), pitch, value); +} + +void z_pd_midisend_byte(int port, int byte) +{ + Z_PD_MIDI_CHECK_PORT(port) + Z_PD_MIDI_CHECK_RANGE_8BIT(byte) + inmidi_byte(port, byte); +} + +void z_pd_midisend_sysex(int port, int byte) +{ + Z_PD_MIDI_CHECK_PORT(port) + Z_PD_MIDI_CHECK_RANGE_7BIT(byte) + inmidi_sysex(port, byte); +} + +void z_pd_midisend_sysrealtimein(int port, int byte) +{ + Z_PD_MIDI_CHECK_PORT(port) + Z_PD_MIDI_CHECK_RANGE_8BIT(byte) + inmidi_realtimein(port, byte); +} + +#undef Z_PD_MIDI_CHECK_CHANNEL +#undef Z_PD_MIDI_CHECK_PORT +#undef Z_PD_MIDI_CHECK_RANGE_7BIT +#undef Z_PD_MIDI_CHECK_RANGE_8BIT +#undef Z_PD_MIDI_WRAP_PORT +#undef Z_PD_MIDI_WRAP_CHANNEL + + +#define Z_PD_MIDI_CLIP(x, low, high) ((x > high) ? high : ((x < low) ? low : x)) +#define Z_PD_MIDI_CLIP4BIT(x) Z_PD_MIDI_CLIP(x, 0, 0x0f) +#define Z_PD_MIDI_CLIP7BIT(x) Z_PD_MIDI_CLIP(x, 0, 0x7f) +#define Z_PD_MIDI_CLIP8BIT(x) Z_PD_MIDI_CLIP(x, 0, 0xff) +#define Z_PD_MIDI_CLIP12BIT(x) Z_PD_MIDI_CLIP(x, 0, 0x0fff) +#define Z_PD_MIDI_CLIP14BIT(x) Z_PD_MIDI_CLIP(x, 0, 0x3fff) +#define Z_PD_MIDI_CLIPCHANNEL(x) Z_PD_MIDI_CLIP(x, 0, 15) + +void outmidi_noteon(int port, int channel, int pitch, int velo) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_noteon) + { + z_current_instance->z_internal_ptr->z_m_noteon(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP7BIT(pitch), + Z_PD_MIDI_CLIP7BIT(velo)); + } +} + +void outmidi_controlchange(int port, int channel, int ctl, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_controlchange) + { + z_current_instance->z_internal_ptr->z_m_controlchange(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP7BIT(ctl), + Z_PD_MIDI_CLIP7BIT(value)); + } +} + +void outmidi_programchange(int port, int channel, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_programchange) + { + z_current_instance->z_internal_ptr->z_m_programchange(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP7BIT(value)); + } +} + +void outmidi_pitchbend(int port, int channel, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_pitchbend) + { + z_current_instance->z_internal_ptr->z_m_pitchbend(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP14BIT(value) - 8192); + } +} + +void outmidi_aftertouch(int port, int channel, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_aftertouch) + { + z_current_instance->z_internal_ptr->z_m_aftertouch(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP7BIT(value)); + } +} + +void outmidi_polyaftertouch(int port, int channel, int pitch, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_polyaftertouch) + { + z_current_instance->z_internal_ptr->z_m_polyaftertouch(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIPCHANNEL(channel), + Z_PD_MIDI_CLIP7BIT(pitch), + Z_PD_MIDI_CLIP7BIT(value)); + } +} + +void outmidi_byte(int port, int value) +{ + if(z_current_instance && z_current_instance->z_internal_ptr->z_m_byte) + { + z_current_instance->z_internal_ptr->z_m_byte(z_current_instance, + Z_PD_MIDI_CLIP12BIT(port), + Z_PD_MIDI_CLIP8BIT(value)); + } +} + +#undef Z_PD_MIDI_CLIP +#undef Z_PD_MIDI_CLIP4BIT +#undef Z_PD_MIDI_CLIP7BIT +#undef Z_PD_MIDI_CLIP8BIT +#undef Z_PD_MIDI_CLIP12BIT +#undef Z_PD_MIDI_CLIP14BIT +#undef Z_PD_MIDI_CLIPCHANNEL + diff --git a/Source/Pd/z_pd.h b/Source/Pd/z_pd.h new file mode 100644 index 00000000..d81d6c80 --- /dev/null +++ b/Source/Pd/z_pd.h @@ -0,0 +1,393 @@ +/* +// Copyright (c) 2015 Pierre Guillot. +// For information on usage and redistribution, and for a DISCLAIMER OF ALL +// WARRANTIES, see the file, "LICENSE.txt," in this distribution. +*/ + +// This part of the code is greatly inspired by Pure Data and libPD, and sometimes +// directly copied. None of the authors of Pure Data and libPD is responsible for these +// experiments but you must be aware of their unintended contribution. + +#ifndef z_pd_h +#define z_pd_h + +#include +#include +#include +#include + +#ifdef _WIN32 +#ifdef PD_INTERNAL +#define Z_PD_EXTERN __declspec(dllexport) extern +#else +#define Z_PD_EXTERN __declspec(dllimport) extern +#endif +#else +#define Z_PD_EXTERN extern +#endif + +#if defined(_MSC_VER) && !defined(_LANGUAGE_C_PLUS_PLUS) && !defined(__cplusplus) +#define Z_PD_EXTERN_STRUCT extern struct +#else +#define Z_PD_EXTERN_STRUCT struct +#endif + +Z_PD_EXTERN_STRUCT _symbol; +Z_PD_EXTERN_STRUCT _symbol; +Z_PD_EXTERN_STRUCT _binbuf; +Z_PD_EXTERN_STRUCT _internal; +Z_PD_EXTERN_STRUCT _gpointer; +Z_PD_EXTERN_STRUCT _glist; +Z_PD_EXTERN_STRUCT _text; +Z_PD_EXTERN_STRUCT _iemgui; + +typedef float z_sample; +typedef float z_float; +typedef struct _symbol z_tie; +typedef struct _symbol z_symbol; +typedef struct _list z_list; +typedef struct _internal z_internal; +typedef struct _gpointer z_gpointer; +typedef struct _glist z_patch; +typedef struct _text z_object; +typedef struct _iemgui z_gui; + +typedef enum +{ + Z_NULL, + Z_FLOAT, + Z_SYMBOL, + Z_POINTER +} z_listtype; + +typedef struct _instance +{ + z_internal* z_internal_ptr; +}z_instance; + +typedef void (*z_hook_print)(struct _instance* instance, const char *s); +typedef void (*z_hook_noteon)(struct _instance* instance, int port, int channel, int pitch, int velocity); +typedef void (*z_hook_controlchange)(struct _instance* instance, int port, int channel, int control, int value); +typedef void (*z_hook_programchange)(struct _instance* instance, int port, int channel, int value); +typedef void (*z_hook_pitchbend)(struct _instance* instance, int port, int channel, int value); +typedef void (*z_hook_aftertouch)(struct _instance* instance, int port, int channel, int value); +typedef void (*z_hook_polyaftertouch)(struct _instance* instance, int port, int channel, int pitch, int value); +typedef void (*z_hook_byte)(struct _instance* instance, int port, int value); + +typedef void (*z_hook_bang)(struct _instance* instance, z_tie* tie); +typedef void (*z_hook_float)(struct _instance* instance, z_tie* tie, z_float f); +typedef void (*z_hook_symbol)(struct _instance* instance, z_tie* tie, z_symbol* s); +typedef void (*z_hook_gpointer)(struct _instance* instance, z_tie* tie, z_gpointer *gp); +typedef void (*z_hook_list)(struct _instance* instance, z_tie* tie, z_list *list); +typedef void (*z_hook_anything)(struct _instance* instance, z_tie* tie, z_symbol *s, z_list *list); + + +//! @brief Initializes the Pure Data environment. +//! @details The method should be called only one time at the initialization, before +//! everything else. +Z_PD_EXTERN void z_pd_init(); + +//! @brief Clears the Pure Data environment. +//! @details The method should be called only one time when the Pure Data environment will +//! never be called again. +Z_PD_EXTERN void z_pd_clear(); + + + + + + +//! @brief Gets the major version of Pure Data. +Z_PD_EXTERN unsigned int z_pd_version_getmajor(); + +//! @brief Gets the minor version of Pure Data. +Z_PD_EXTERN unsigned int z_pd_version_getminor(); + +//! @brief Gets the bug version of Pure Data. +Z_PD_EXTERN unsigned int z_pd_version_getbug(); + + + + + + +//! @brief Clears the search path of Pure Data. +Z_PD_EXTERN void z_pd_searchpath_clear(); + +//! @brief Adds a path to the search path of Pure Data. +Z_PD_EXTERN void z_pd_searchpath_add(const char* path); + + + + + + +//! @brief Sends a normal post to the Pure Data console. +Z_PD_EXTERN void z_pd_console_post(char const* message); + +//! @brief Sends a log post to the Pure Data console. +Z_PD_EXTERN void z_pd_console_log(char const* message); + +//! @brief Sends an error to the Pure Data console. +Z_PD_EXTERN void z_pd_console_error(char const* message); + +//! @brief Sends a fatal error to the Pure Data console. +Z_PD_EXTERN void z_pd_console_fatal(char const* message); + + + + + + +//! @brief Creates a new instance. +Z_PD_EXTERN z_instance* z_pd_instance_new(size_t size, + z_hook_print mprint, + z_hook_noteon mnoteon, + z_hook_controlchange mcontrolchange, + z_hook_programchange mprogramchange, + z_hook_pitchbend mpitchbend, + z_hook_aftertouch maftertouch, + z_hook_polyaftertouch mpolyaftertouch, + z_hook_byte mbyte); + +//! @brief Deletes an instance. +Z_PD_EXTERN void z_pd_instance_free(z_instance* instance); + +//! @brief Sets the current instance. +Z_PD_EXTERN void z_pd_instance_set(z_instance* instance); + +//! @brief Binds an instance to a tie. +Z_PD_EXTERN void z_pd_instance_bind(z_instance* instance, z_tie* tie, + z_hook_bang mbang, + z_hook_float mfloat, + z_hook_symbol msymbol, + z_hook_gpointer mgpointer, + z_hook_list mlist, + z_hook_anything manything); + +//! @brief Unbinds an instance to a tie. +Z_PD_EXTERN void z_pd_instance_unbind(z_instance* instance, z_tie* tie); + +//! @brief Prepares the DSP for an instance. +Z_PD_EXTERN void z_pd_instance_dsp_prepare(z_instance* instance, + const int nins, const int nouts, + const int samplerate, const int nsamples); + +//! @brief Performs the DSP for an instance. +Z_PD_EXTERN void z_pd_instance_dsp_perform(z_instance* instance, int nsamples, + const int nins, const z_sample** inputs, + const int nouts, z_sample** outputs); + +//! @brief Releases the DSP for an instance. +Z_PD_EXTERN void z_pd_instance_dsp_release(z_instance* instance); + +//! @brief Gets the sample rate of an instance. +Z_PD_EXTERN int z_pd_instance_get_samplerate(z_instance* instance); + + + + + + + + +//! @brief Creates a new patch. +Z_PD_EXTERN z_patch* z_pd_patch_new(const char* name, const char* path); + +//! @brief Frees a patch. +Z_PD_EXTERN void z_pd_patch_free(z_patch* patch); + +//! @brief Gets the name of a patch. +Z_PD_EXTERN const char* z_pd_patch_get_name(z_patch const* patch); + +//! @brief Gets the path of a patch. +Z_PD_EXTERN const char* z_pd_patch_get_path(z_patch const* patch); + +//! @brief Gets the dollar zero of a patch. +Z_PD_EXTERN int z_pd_patch_get_dollarzero(z_patch const* patch); + +//! @brief Gets the x margin of a patch. +Z_PD_EXTERN int z_pd_patch_get_x(z_patch const* patch); + +//! @brief Gets the x margin of a patch. +Z_PD_EXTERN int z_pd_patch_get_y(z_patch const* patch); + +//! @brief Gets the width of a patch. +Z_PD_EXTERN int z_pd_patch_get_width(z_patch const* patch); + +//! @brief Gets the height of a patch. +Z_PD_EXTERN int z_pd_patch_get_height(z_patch const* patch); + +//! @brief Gets the first object of a patch. +Z_PD_EXTERN z_object* z_pd_patch_get_first_object(z_patch* patch); + +//! @brief Gets the next object of a patch. +Z_PD_EXTERN z_object* z_pd_patch_get_next_object(z_patch* patch, z_object* previous); + + + + +//! @brief Gets the name of an object. +Z_PD_EXTERN z_symbol* z_pd_object_get_name(z_object const* object); + +//! @brief Gets the name of an object. +Z_PD_EXTERN void z_pd_object_get_text(z_object const* object, int* size, char** text); + +//! @brief Gets the bounds of an object. +Z_PD_EXTERN void z_pd_object_get_bounds(z_object const* object, z_patch const* patch, + int* x, int* y, int* width, int* height); + + + + + + + + +//! @brief Gets the label of a gui. +Z_PD_EXTERN z_symbol* z_pd_gui_get_label(z_gui const* gui); + +//! @brief Gets the receive symbol of a gui. +Z_PD_EXTERN z_symbol* z_pd_gui_get_receive_symbol(z_gui const* gui); + +//! @brief Gets the send symbol of a gui. +Z_PD_EXTERN z_symbol* z_pd_gui_get_send_symbol(z_gui const* gui); + +//! @brief Gets the maximum value of a gui. +Z_PD_EXTERN float z_pd_gui_get_maximum_value(z_gui const* gui); + +//! @brief Gets the maximum value of a gui. +Z_PD_EXTERN float z_pd_gui_get_minimum_value(z_gui const* gui); + +//! @brief Gets the number of steps of a gui. +Z_PD_EXTERN int z_pd_gui_get_number_of_steps(z_gui const* gui); + +//! @brief Gets the number of steps of a gui. +Z_PD_EXTERN float z_pd_gui_get_value(z_gui const* gui); + +//! @brief Gets the bounds of a gui. +Z_PD_EXTERN void z_pd_gui_get_label_position(z_gui const* gui, z_patch const* patch, int* x, int* y); + + + + + + +//! @brief Creates an opaque tie that can be understood by Pure Data. +Z_PD_EXTERN z_tie* z_pd_tie_create(const char* name); + +//! @brief Gets an opaque symbol that can be understood by Pure Data. +Z_PD_EXTERN char const* z_pd_tie_get_name(z_tie const* tie); + +//! @brief Creates an opaque symbol that can be understood by Pure Data. +Z_PD_EXTERN z_symbol* z_pd_symbol_create(const char* symbol); + +//! @brief Gets an opaque symbol that can be understood by Pure Data. +Z_PD_EXTERN char const* z_pd_symbol_get_name(z_symbol const* symbol); + + + +//! @brief Creates an opaque list that can be understood by Pure Data. +Z_PD_EXTERN z_list* z_pd_list_create(size_t size); + +//! @brief Clears a list. +Z_PD_EXTERN void z_pd_list_free(z_list *list); + +//! @brief Resizes a list. +Z_PD_EXTERN char z_pd_list_resize(z_list *list, size_t size); + +//! @brief Creates a copy of a list. +Z_PD_EXTERN z_list* z_pd_list_create_copy(z_list const* list); + +//! @brief Copy of a list into another. +Z_PD_EXTERN char z_pd_list_copy(z_list* list1, z_list const* list2); + +//! @brief Gets the size of a list. +Z_PD_EXTERN size_t z_pd_list_get_size(z_list const* list); + +//! @brief Gets the type of a data of the list. +Z_PD_EXTERN z_listtype z_pd_list_get_type(z_list const* list, size_t index); + +//! @brief Gets the float value of a data of the list. +Z_PD_EXTERN z_float z_pd_list_get_float(z_list const* list, size_t index); + +//! @brief Gets the symbol of a data of the list. +Z_PD_EXTERN z_symbol* z_pd_list_get_symbol(z_list const* list, size_t index); + +//! @brief Gets the gpointer of a data of the list. +Z_PD_EXTERN z_gpointer* z_pd_list_get_gpointer(z_list const* list, size_t index); + +//! @brief Sets the float value of a data of the list. +Z_PD_EXTERN void z_pd_list_set_float(z_list *list, size_t index, z_float value); + +//! @brief Sets the symbol of a data of the list. +Z_PD_EXTERN void z_pd_list_set_symbol(z_list *list, size_t index, z_symbol* symbol); + +//! @brief Sets the gpointer of a data of the list. +Z_PD_EXTERN void z_pd_list_set_gpointer(z_list *list, size_t index, z_gpointer* pointer); + + + + + + + + + + +//! @brief Sends a bang to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_bang(z_tie const* tie); + +//! @brief Sends a float to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_float(z_tie const* tie, z_float value); + +//! @brief Sends a gpointer to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_gpointer(z_tie const* tie, z_gpointer const* pointer); + +//! @brief Sends a symbol to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_symbol(z_tie const* tie, z_symbol const* symbol); + +//! @brief Sends a list to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_list(z_tie const* tie, z_list const* list); + +//! @brief Sends a anything to Pure Data. +Z_PD_EXTERN void z_pd_messagesend_anything(z_tie const* tie, z_symbol const* symbol, z_list const* list); + + + + + + + +//! @brief Sends a midi note on event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_noteon(int channel, int pitch, int velocity); + +//! @brief Sends a midi control change event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_controlchange(int channel, int controller, int value); + +//! @brief Sends a midi program change event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_programchange(int channel, int value); + +//! @brief Sends a midi pitch bend event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_pitchbend(int channel, int value); + +//! @brief Sends a midi after touch event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_aftertouch(int channel, int value); + +//! @brief Sends a midi poly after touch event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_polyaftertouch(int channel, int pitch, int value); + +//! @brief Sends a midi byte event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_byte(int port, int byte); + +//! @brief Sends a midi sys ex event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_sysex(int port, int byte); + +//! @brief Sends a midi real time in event to Pure Data. +Z_PD_EXTERN void z_pd_midisend_sysrealtimein(int port, int byte); + + +#undef Z_PD_EXTERN +#undef Z_PD_EXTERN_STRUCT + +#endif /* z_pd_h */ diff --git a/Source/PdGui.cpp b/Source/PdGui.cpp deleted file mode 100644 index 1678720a..00000000 --- a/Source/PdGui.cpp +++ /dev/null @@ -1,392 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "PdGui.hpp" -#include "PdPatch.hpp" -#include "PdInstance.hpp" -#include "Pd.hpp" - -extern "C" -{ -#include "../ThirdParty/PureData/src/m_pd.h" -#include "../ThirdParty/PureData/src/g_canvas.h" -#include "../ThirdParty/PureData/src/s_stuff.h" -#include "../ThirdParty/PureData/src/m_imp.h" -#include "../ThirdParty/PureData/src/g_all_guis.h" -} - -namespace pd -{ - // ==================================================================================== // - // OBJECT // - // ==================================================================================== // - - Gui::Gui() noexcept : m_ptr(nullptr), m_type(Type::Invalid), m_patch() - { - - } - - Gui::Gui(Patch const& patch, Type type, void* ptr) noexcept : - m_ptr(ptr), m_type(type), m_patch(patch) - { - ; - } - - Gui::Gui(Gui const& other) noexcept : - m_ptr(other.m_ptr), m_type(other.m_type), m_patch(other.m_patch) - { - ; - } - - Gui::Gui(Gui&& other) noexcept : - m_ptr(other.m_ptr), m_type(other.m_type), m_patch(other.m_patch) - { - other.m_ptr = nullptr; - other.m_type = Type::Invalid; - other.m_patch = Patch(); - } - - Gui& Gui::operator=(Gui const& other) noexcept - { - m_ptr = other.m_ptr; - m_type = other.m_type; - m_patch = other.m_patch; - return *this; - } - - Gui& Gui::operator=(Gui&& other) noexcept - { - std::swap(m_ptr, other.m_ptr); - std::swap(m_type, other.m_type); - std::swap(m_patch, other.m_patch); - return *this; - } - - Gui::~Gui() noexcept - { - m_ptr = nullptr; - m_patch = Patch(); - } - - bool Gui::isValid() const noexcept - { - return bool(m_ptr) && m_patch.isValid(); - } - - Gui::Type Gui::getType() const noexcept - { - return m_type; - } - - bool Gui::isParameter() const noexcept - { - return isValid() && !getName().empty() && getBindingName() != nullptr; - } - - std::string Gui::getName() const - { - if(isValid()) - { - t_symbol* s = reinterpret_cast(m_ptr)->x_lab; - if(s) - { - std::string name(s->s_name); - if(!name.empty() && name != "empty") - { - auto pos = name.find("_"); - if(pos != std::string::npos) - { - name.erase(name.begin()+pos, name.end()); - } - return name; - } - } - } - return std::string(); - } - - std::string Gui::getLabel() const - { - if(isValid()) - { - t_symbol* s = reinterpret_cast(m_ptr)->x_lab; - if(s) - { - std::string name(s->s_name); - if(!name.empty() && name != "empty") - { - auto pos = name.find("_"); - if(pos != std::string::npos) - { - name.erase(name.begin(), name.begin()+pos+1); - return name; - } - } - } - } - return std::string(); - } - - - BindingName Gui::getBindingName() const - { - if(isValid()) - { - if(reinterpret_cast(m_ptr)->x_rcv != gensym("empty")) - { - return BindingName(reinterpret_cast(m_ptr)->x_rcv); - } - } - return BindingName(nullptr); - } - - size_t Gui::getNumberOfSteps() const noexcept - { - if(isValid()) - { - if(m_type == Type::HorizontalSlider) - { - return 0; - } - else if(m_type == Type::VerticalSlider) - { - return 0; - } - else if(m_type == Type::Number) - { - return 0; - } - else if(m_type == Type::Toggle) - { - return 2; - } - else if(m_type == Type::HorizontalRadio) - { - return reinterpret_cast(m_ptr)->x_number - 1; - } - else if(m_type == Type::VerticalRadio) - { - return reinterpret_cast(m_ptr)->x_number - 1; - } - } - return 0.f; - } - - float Gui::getMinimum() const noexcept - { - if(isValid()) - { - if(m_type == Type::HorizontalSlider) - { - return reinterpret_cast(m_ptr)->x_min; - } - else if(m_type == Type::VerticalSlider) - { - return reinterpret_cast(m_ptr)->x_min; - } - else if(m_type == Type::Number) - { - return reinterpret_cast(m_ptr)->x_min; - } - else if(m_type == Type::Toggle) - { - return 0; - } - else if(m_type == Type::HorizontalRadio) - { - return 0; - } - else if(m_type == Type::VerticalRadio) - { - return 0; - } - } - return 0.f; - } - - float Gui::getMaximum() const noexcept - { - if(isValid()) - { - if(m_type == Type::HorizontalSlider) - { - return reinterpret_cast(m_ptr)->x_max; - } - else if(m_type == Type::VerticalSlider) - { - return reinterpret_cast(m_ptr)->x_max; - } - else if(m_type == Type::Number) - { - return reinterpret_cast(m_ptr)->x_max; - } - else if(m_type == Type::Toggle) - { - return 1; - } - else if(m_type == Type::HorizontalRadio) - { - return reinterpret_cast(m_ptr)->x_number - 1; - } - else if(m_type == Type::VerticalRadio) - { - return reinterpret_cast(m_ptr)->x_number - 1; - } - } - return 1.f; - } - - float Gui::getValue() const noexcept - { - if(isValid()) - { - if(m_type == Type::HorizontalSlider) - { - return reinterpret_cast(m_ptr)->x_fval; - } - else if(m_type == Type::VerticalSlider) - { - return reinterpret_cast(m_ptr)->x_fval; - } - else if(m_type == Type::Number) - { - return reinterpret_cast(m_ptr)->x_val; - } - else if(m_type == Type::Toggle) - { - return reinterpret_cast(m_ptr)->x_on; - } - else if(m_type == Type::HorizontalRadio) - { - return reinterpret_cast(m_ptr)->x_on; - } - else if(m_type == Type::VerticalRadio) - { - return reinterpret_cast(m_ptr)->x_on; - } - } - return 0.f; - } - - std::array Gui::getBounds() const noexcept - { - if(isValid()) - { - return m_patch.getGuiBounds(*this); - } - return {0.f, 0.f, 0.f, 0.f}; - } - - std::array Gui::getLabelPosition() const noexcept - { - if(isValid()) - { - return m_patch.getGuiLabelPosition(*this); - } - return {0.f, 0.f}; - } - - // ==================================================================================== // - // COMMENT // - // ==================================================================================== // - - - Comment::Comment() noexcept : m_ptr(nullptr), m_patch() - { - - } - - Comment::Comment(Patch const& patch, void* ptr) noexcept : - m_ptr(ptr), m_patch(patch) - { - ; - } - - Comment::Comment(Comment const& other) noexcept : - m_ptr(other.m_ptr), m_patch(other.m_patch) - { - ; - } - - Comment::Comment(Comment&& other) noexcept : - m_ptr(other.m_ptr), m_patch(other.m_patch) - { - other.m_ptr = nullptr; - other.m_patch = Patch(); - } - - Comment& Comment::operator=(Comment const& other) noexcept - { - m_ptr = other.m_ptr; - m_patch = other.m_patch; - return *this; - } - - Comment& Comment::operator=(Comment&& other) noexcept - { - std::swap(m_ptr, other.m_ptr); - std::swap(m_patch, other.m_patch); - return *this; - } - - Comment::~Comment() noexcept - { - m_ptr = nullptr; - m_patch = Patch(); - } - - bool Comment::isValid() const noexcept - { - return bool(m_ptr) && m_patch.isValid(); - } - - std::string Comment::getText() const - { - if(isValid()) - { - char* text = nullptr; - int size = 0; - binbuf_gettext(reinterpret_cast(m_ptr)->te_binbuf, &text, &size); - if(text && size) - { - return std::string(text, size); - } - } - return std::string(); - } - - float Comment::getX() const noexcept - { - if(isValid()) - { - std::array margin(m_patch.getMargin()); - return float(reinterpret_cast(m_ptr)->te_xpix) - margin[0]; - } - return 0; - } - - float Comment::getY() const noexcept - { - if(isValid()) - { - std::array margin(m_patch.getMargin()); - return float(reinterpret_cast(m_ptr)->te_ypix) - margin[1]; - } - return 0; - } - - float Comment::getWidth() const noexcept - { - if(isValid()) - { - return float(reinterpret_cast(m_ptr)->te_width); - } - return 0; - } -} - - - diff --git a/Source/PdInstance.cpp b/Source/PdInstance.cpp deleted file mode 100644 index 8b19d0d6..00000000 --- a/Source/PdInstance.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "PdInstance.hpp" -#include "PdPatch.hpp" -#include "Pd.hpp" - -extern "C" -{ -#include "../ThirdParty/PureData/src/m_pd.h" -#include "../ThirdParty/PureData/src/g_canvas.h" -#include "../ThirdParty/PureData/src/s_stuff.h" -#include "../ThirdParty/PureData/src/m_imp.h" -} - -namespace pd -{ - // ==================================================================================== // - // INSTANCE // - // ==================================================================================== // - - Instance::Instance() noexcept : m_ptr(nullptr), m_count(nullptr) - { - - } - - Instance::Instance(void* ptr) noexcept : m_ptr(ptr), m_count(new std::atomic(1)) - { - - } - - Instance::Instance(Instance const& other) noexcept : m_ptr(other.m_ptr), m_count(other.m_count) - { - if(m_ptr && m_count) - { - ++(*m_count); - } - } - - Instance::Instance(Instance&& other) noexcept : m_ptr(other.m_ptr), m_count(other.m_count) - { - other.m_ptr = nullptr; - other.m_count = nullptr; - } - - Instance& Instance::operator=(Instance const& other) noexcept - { - if(m_ptr && m_count && --(*m_count) == 0) - { - Pd::lock(); - releaseDsp(); - delete m_count; - pdinstance_free(reinterpret_cast(m_ptr)); - Pd::unlock(); - - m_ptr = nullptr; - m_count =nullptr; - } - if(other.m_ptr && other.m_count) - { - ++(*m_count); - m_ptr = other.m_ptr; - m_count = other.m_count; - } - return *this; - } - - Instance& Instance::operator=(Instance&& other) noexcept - { - std::swap(m_count, other.m_count); - std::swap(m_ptr, other.m_ptr); - return *this; - } - - Instance::~Instance() noexcept - { - if(m_ptr && m_count && --(*m_count) == 0) - { - Pd::lock(); - releaseDsp(); - delete m_count; - pdinstance_free(reinterpret_cast(m_ptr)); - Pd::unlock(); - - m_ptr = nullptr; - m_count =nullptr; - } - } - - void Instance::prepareDsp(const int nins, const int nouts, const int samplerate, const int nsamples) noexcept - { - t_atom av; - av.a_type = A_FLOAT; - av.a_w.w_float = 1; - pd_typedmess((t_pd *)gensym("pd")->s_thing, gensym("dsp"), 1, &av); - } - - void Instance::performDsp(int nsamples, const int nins, const float** inputs, const int nouts, float** outputs) noexcept - { - for(int i = 0; i < nsamples; i += DEFDACBLKSIZE) - { - for(int j = 0; j < nins; j++) - { - memcpy(sys_soundin+j*DEFDACBLKSIZE, inputs[j]+i, DEFDACBLKSIZE * sizeof(t_sample)); - } - memset(sys_soundout, 0, DEFDACBLKSIZE * sizeof(t_sample) * nouts); - sched_tick(); - for(int j = 0; j < nouts; j++) - { - memcpy(outputs[j]+i, sys_soundout+j*DEFDACBLKSIZE, DEFDACBLKSIZE * sizeof(t_sample)); - } - } - } - - void Instance::releaseDsp() noexcept - { - - } - - void Instance::send(BindingName const& name, float val) const noexcept - { - t_symbol* sy = reinterpret_cast(name.ptr); - if(sy && sy->s_thing) - { - pd_float((t_pd *)sy->s_thing, val); - } - } - - void Instance::lock() noexcept - { - Pd::lock(); - pd_setinstance(reinterpret_cast(m_ptr)); - } - - void Instance::unlock() noexcept - { - Pd::unlock(); - } - - bool Instance::isValid() const noexcept - { - return bool(m_ptr) && bool(m_count); - } - - Patch Instance::createPatch(std::string const& name, std::string const& path) - { - Patch patch; - t_canvas* cnv = nullptr; - Pd::lock(); - pd_setinstance(reinterpret_cast(m_ptr)); - if(!name.empty() && !path.empty()) - { - cnv = reinterpret_cast(glob_evalfile(NULL, gensym(name.c_str()), gensym(path.c_str()))); - cnv->gl_edit = 0; - } - else if(!name.empty()) - { - cnv = reinterpret_cast(glob_evalfile(NULL, gensym(name.c_str()), gensym(""))); - cnv->gl_edit = 0; - } - if(cnv) - { - patch = Patch(*this, cnv, name, path); - } - Pd::unlock(); - return patch; - } - - void Instance::freePatch(Patch &patch) - { - Pd::lock(); - pd_setinstance(reinterpret_cast(m_ptr)); - canvas_free(reinterpret_cast(patch.m_ptr)); - Pd::unlock(); - } - - // From libPD -#define CHECK_CHANNEL if (channel < 0) return; -#define CHECK_PORT if (port < 0 || port > 0x0fff) return; -#define CHECK_RANGE_7BIT(v) if (v < 0 || v > 0x7f) return; -#define CHECK_RANGE_8BIT(v) if (v < 0 || v > 0xff) return; -#define MIDI_PORT (channel >> 4) -#define MIDI_CHANNEL (channel & 0x0f) - - void Instance::sendNoteOn(int channel, int pitch, int velocity) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(pitch) - CHECK_RANGE_7BIT(velocity) - inmidi_noteon(MIDI_PORT, MIDI_CHANNEL, pitch, velocity); - } - - void Instance::sendNoteOff(int channel, int pitch, int velocity) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(pitch) - CHECK_RANGE_7BIT(velocity) - inmidi_noteon(MIDI_PORT, MIDI_CHANNEL, pitch, 0); - } - - void Instance::sendControlChange(int channel, int controller, int value) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(controller) - CHECK_RANGE_7BIT(value) - inmidi_controlchange(MIDI_PORT, MIDI_CHANNEL, controller, value); - } - - void Instance::sendProgramChange(int channel, int value) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(value) - inmidi_programchange(MIDI_PORT, MIDI_CHANNEL, value); - } - - void Instance::sendPitchBend(int channel, int value) { - CHECK_CHANNEL - if (value < -8192 || value > 8191) return; - inmidi_pitchbend(MIDI_PORT, MIDI_CHANNEL, value + 8192); - } - - void Instance::sendAfterTouch(int channel, int value) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(value) - inmidi_aftertouch(MIDI_PORT, MIDI_CHANNEL, value); - } - - void Instance::sendPolyAfterTouch(int channel, int pitch, int value) { - CHECK_CHANNEL - CHECK_RANGE_7BIT(pitch) - CHECK_RANGE_7BIT(value) - inmidi_polyaftertouch(MIDI_PORT, MIDI_CHANNEL, pitch, value); - } - - void Instance::sendMidiByte(int port, int byte) { - CHECK_PORT - CHECK_RANGE_8BIT(byte) - inmidi_byte(port, byte); - } - - void Instance::sendSysEx(int port, int byte) { - CHECK_PORT - CHECK_RANGE_7BIT(byte) - inmidi_sysex(port, byte); - } - - void Instance::sendSysRealtime(int port, int byte) { - CHECK_PORT - CHECK_RANGE_8BIT(byte) - inmidi_realtimein(port, byte); - } - -#undef CHECK_CHANNEL -#undef MIDI_PORT -#undef MIDI_CHANNEL -#undef CHECK_PORT -#undef CHECK_RANGE_7BIT -#undef CHECK_RANGE_8BIT -} - - - diff --git a/Source/PdInstance.hpp b/Source/PdInstance.hpp deleted file mode 100644 index 34e58d49..00000000 --- a/Source/PdInstance.hpp +++ /dev/null @@ -1,152 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#ifndef __CAMOMILE_PD_INSTANCE__ -#define __CAMOMILE_PD_INSTANCE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace pd -{ - class Instance; - class Patch; - class Pd; - - class BindingName - { - public: - BindingName(void *_ptr) : ptr(_ptr) {} - BindingName(BindingName const& other) : ptr(other.ptr) {} - BindingName& operator=(BindingName const& other) {ptr = other.ptr; return *this;} - bool operator!=(void* _ptr) const noexcept {return _ptr != ptr;} - bool operator==(void* _ptr) const noexcept {return _ptr == ptr;} - bool operator!=(BindingName const& other)const noexcept {return other.ptr != ptr;} - bool operator==(BindingName const& other) const noexcept{return other.ptr == ptr;} - private: - void* ptr; - friend class Instance; - }; - - // ==================================================================================== // - // INSTANCE // - // ==================================================================================== // - - //! @brief The Pure Data instance. - //! @details The Instance is a wrapper for the Pure Data's native instance. - //! With the default constructor, the Instance won't be initialized. A valid - //! Instance should be created via Pd. The Instance has some kind of smart - //! pointer behavior so when an Instance object is no more useful the object is deleted. - class Instance - { - public: - - //! @brief The constructor for an empty Instance. - //! @details Creates an Instance that can be used as an empty reference inside - //! another class. - Instance() noexcept; - - //! @brief The copy constructor. - //! Creates a copy of an Instance and increments his counter. - Instance(Instance const& other) noexcept; - - //! @brief The move constructor. - //! @details Creates a copy of an Instance without incrementing his counter. The - //! other Instance will be useless. - Instance(Instance&& other) noexcept; - - //! @brief The copy operator. - //! Copies the Instance and increments his counter. - Instance& operator=(Instance const& other) noexcept; - - //! @brief The move operator. - //! @details Copies the Instance without incrementing his counter. The other - //! Instance will be destroyed if needed. - Instance& operator=(Instance&& other) noexcept; - - //! @brief The destructor. - //! @details The Instance will be destroyed if no other copy exists. - ~Instance() noexcept; - - //! @brief Retrieves if the Instance is valid. - bool isValid() const noexcept; - - protected: - - //! @brief Locks Instance. - void lock() noexcept; - - //! @brief Unlocks Instance. - void unlock() noexcept; - - //! @brief Prepares the digital signal processing chain of the Instance. - //! @details You should locks the Instance to ensure thread safety. - void prepareDsp(const int nins, const int nouts, const int samplerate, const int nsamples) noexcept; - - //! @brief Performs the digital signal processing chain of the Instance. - //! @details You should locks the Instance to ensure thread safety. - void performDsp(int nsamples, const int nins, const float** inputs, const int nouts, float** outputs) noexcept; - - //! @brief Releases the digital signal processing chain of the Instance. - //! @details You should locks the Instance to ensure thread safety. - void releaseDsp() noexcept; - - //! @brief Sends a float to Pure Data. - //! @details You should locks the Instance to ensure thread safety. - void send(BindingName const& name, float val) const noexcept; - - static void sendNoteOn(int channel, int pitch, int velocity); - - static void sendNoteOff(int channel, int pitch, int velocity); - - static void sendControlChange(int channel, int controller, int value); - - static void sendProgramChange(int channel, int value); - - static void sendPitchBend(int channel, int value); - - static void sendAfterTouch(int channel, int value); - - static void sendPolyAfterTouch(int channel, int pitch, int value); - - static void sendMidiByte(int port, int byte); - - static void sendSysEx(int port, int byte); - - static void sendSysRealtime(int port, int byte); - - //! @brief Creates a Patch. - Patch createPatch(std::string const& name, std::string const& path); - - private: - - //! @brief The constructor for a new Instance. - //! Creates a new valid Instance. - Instance(void* ptr) noexcept; - - //! @brief Free a Patch. - void freePatch(Patch& patch); - - void* m_ptr; - std::atomic* m_count; - - friend class Pd; - friend class Patch; - }; - -} - -#endif diff --git a/Source/PdPatch.cpp b/Source/PdPatch.cpp deleted file mode 100644 index b511c1d0..00000000 --- a/Source/PdPatch.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/* -// Copyright (c) 2015 Pierre Guillot. -// For information on usage and redistribution, and for a DISCLAIMER OF ALL -// WARRANTIES, see the file, "LICENSE.txt," in this distribution. -*/ - -#include "PdGui.hpp" - -extern "C" -{ -#include "../ThirdParty/PureData/src/m_pd.h" -#include "../ThirdParty/PureData/src/g_canvas.h" -#include "../ThirdParty/PureData/src/s_stuff.h" -#include "../ThirdParty/PureData/src/m_imp.h" -#include "../ThirdParty/PureData/src/g_all_guis.h" -} - -namespace pd -{ - // ==================================================================================== // - // PATCHER // - // ==================================================================================== // - - Patch::Patch() noexcept : m_ptr(nullptr), m_count(nullptr), m_instance() - { - - } - - Patch::Patch(Instance& instance, void* ptr, std::string const& name, std::string const& path) noexcept : - m_ptr(ptr), m_count(new std::atomic(1)), m_name(name), m_path(path), m_instance(instance) - { - } - - Patch::Patch(Patch const& other) noexcept : - m_ptr(other.m_ptr), m_count(other.m_count), m_name(other.m_name), m_path(other.m_path), m_instance(other.m_instance) - { - if(m_ptr && m_count) - { - ++(*m_count); - } - } - - Patch::Patch(Patch&& other) noexcept : - m_ptr(other.m_ptr), m_count(other.m_count), m_name(other.m_name), m_path(other.m_path), m_instance(other.m_instance) - { - other.m_ptr = nullptr; - other.m_count = nullptr; - other.m_instance = Instance(); - } - - Patch& Patch::operator=(Patch const& other) noexcept - { - if(m_ptr && m_count && --(*m_count) == 0) - { - if(m_instance.isValid()) - { - m_instance.freePatch(*this); - m_instance = Instance(); - } - m_ptr = nullptr; - m_count = nullptr; - } - if(other.m_ptr && other.m_count) - { - ++(*m_count); - m_ptr = other.m_ptr; - m_count = other.m_count; - m_instance = other.m_instance; - } - return *this; - } - - Patch& Patch::operator=(Patch&& other) noexcept - { - std::swap(m_count, other.m_count); - std::swap(m_ptr, other.m_ptr); - std::swap(m_name, other.m_name); - std::swap(m_path, other.m_path); - std::swap(m_instance, other.m_instance); - return *this; - } - - Patch::~Patch() noexcept - { - if(m_ptr && m_count && --(*m_count) == 0) - { - if(m_instance.isValid()) - { - m_instance.freePatch(*this); - m_instance = Instance(); - } - m_ptr = nullptr; - m_count = nullptr; - } - } - - bool Patch::isValid() const noexcept - { - return bool(m_ptr) && bool(m_count) && m_instance.isValid(); - } - - Instance Patch::getInstance() const noexcept - { - return m_instance; - } - - std::string Patch::getName() const - { - return m_name; - } - - std::string Patch::getPath() const - { - return m_path; - } - - std::array Patch::getMargin() const noexcept - { - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - return {static_cast(cnv->gl_xmargin), static_cast(cnv->gl_ymargin)}; - } - return {0.f, 0.f}; - } - - std::array Patch::getSize() const noexcept - { - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - return {static_cast(cnv->gl_pixwidth), static_cast(cnv->gl_pixheight)}; - } - return {0.f, 0.f}; - } - - std::vector Patch::getGuis() const noexcept - { - std::vector objects; - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - t_symbol* hsl = gensym("hsl"); - t_symbol* vsl = gensym("vsl"); - t_symbol* tgl = gensym("tgl"); - t_symbol* nbx = gensym("nbx"); - t_symbol* vra = gensym("vradio"); - t_symbol* hra = gensym("hradio"); - for(t_gobj *y = cnv->gl_list; y; y = y->g_next) - { - if(y->g_pd->c_name == hsl) - { - objects.push_back(Gui(*this, Gui::Type::HorizontalSlider, reinterpret_cast(y))); - } - else if(y->g_pd->c_name == vsl) - { - objects.push_back(Gui(*this, Gui::Type::VerticalSlider, reinterpret_cast(y))); - } - else if(y->g_pd->c_name == tgl) - { - objects.push_back(Gui(*this, Gui::Type::Toggle, reinterpret_cast(y))); - } - else if(y->g_pd->c_name == nbx) - { - objects.push_back(Gui(*this, Gui::Type::Number, reinterpret_cast(y))); - } - else if(y->g_pd->c_name == vra) - { - objects.push_back(Gui(*this, Gui::Type::VerticalRadio, reinterpret_cast(y))); - } - else if(y->g_pd->c_name == hra) - { - objects.push_back(Gui(*this, Gui::Type::HorizontalRadio, reinterpret_cast(y))); - } - } - } - return objects; - } - - std::vector Patch::getComments() const noexcept - { - std::vector objects; - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - t_symbol* txt = gensym("text"); - - for(t_gobj *y = cnv->gl_list; y; y = y->g_next) - { - if(y->g_pd->c_name == txt) - { - objects.push_back(Comment(*this, reinterpret_cast(y))); - } - } - } - return objects; - } - - std::array Patch::getGuiBounds(Gui const& gui) const noexcept - { - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - t_object* obj = reinterpret_cast(gui.m_ptr); - int x1, x2, y1, y2; - obj->te_g.g_pd->c_wb->w_getrectfn(reinterpret_cast(gui.m_ptr), - reinterpret_cast(m_ptr), - &x1, &y1, &x2, &y2); - return {float(x1) - cnv->gl_xmargin, float(y1) - cnv->gl_ymargin, float(x2 - x1), float(y2 - y1)}; - } - return {0.f, 0.f, 0.f, 0.f}; - } - - std::array Patch::getGuiLabelPosition(Gui const& gui) const noexcept - { - if(isValid()) - { - t_canvas* cnv = reinterpret_cast(m_ptr); - t_text* obj = reinterpret_cast(gui.m_ptr); - t_iemgui* gi = reinterpret_cast(gui.m_ptr); - return {float(obj->te_xpix) - cnv->gl_xmargin + gi->x_ldx, float(obj->te_ypix) - cnv->gl_ymargin + + gi->x_ldy}; - } - return {0.f, 0.f}; - } -} - - - diff --git a/Tests/ReaperTest.RPP b/Tests/ReaperTest.RPP index 7b8040b9..8f49fcdd 100644 --- a/Tests/ReaperTest.RPP +++ b/Tests/ReaperTest.RPP @@ -1,4 +1,4 @@ - @@ -40,7 +41,7 @@ ITEMMIX 0 DEFPITCHMODE 589824 TAKELANE 1 - SAMPLERATE 44100 0 0 + SAMPLERATE 44100 1 0 LOCK 1 @@ -95,7 +96,7 @@ BUSCOMP 0 0 SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0 FREEMODE 0 - SEL 0 + SEL 1 REC 0 0 0 0 0 0 0 VU 2 TRACKHEIGHT 94 0 @@ -108,7 +109,7 @@ MAINSEND 1 0 FLOATPOS 374 488 160 149 FXID {D91345D4-E016-1A49-A789-13F3F3CD05EE} @@ -416,9 +417,9 @@ FLOATPOS 0 0 0 0 FXID {2EAB0F42-6A70-134B-BA0B-16D824CE5175} @@ -18202,8 +18203,8 @@ MAINSEND 1 0 - WET 0.009995 + WET 0.039948 FLOATPOS 0 0 0 0 FXID {ED8EF1F8-5A02-0C4F-948D-EC4005D9C908} FLOATPOS 32 618 205 227 FXID {010AD44B-87CA-9044-BBAE-FB807604F407} @@ -18469,9 +18470,8 @@ QUNHUO5e7f4QAAAAAQAAAAAAAAACAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAABAAA AAAAAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAAUAAAAAQAAAAAAAAACAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAQAAAAAAAAACAAAAAAAAAA QAAAAAAAAACAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAAAEAAAAAAAAAAgAAAAAA - AAAEAAAAAAAAAAgAAAAAAKQAAAABAAAAAAAQAFZDMiGbAAAAPENhbW9taWxlU2V0dGluZ3MgbmFtZT0iY2Ftby50cmVtb2xvfi5wZCIgcGF0aD0iL1VzZXJzL1BpZXJy - ZS9HaXRIdWIvQ2Ftb21pbGUvUGF0Y2hlcyI+PHBhcmFtcyBSYXRlPSIwLjk2MTI0MDI5MTU5NTQ1ODk4NDM4IiBEZXB0aD0iMSIvPjwvQ2Ftb21pbGVTZXR0aW5ncz4A - AAAQAAAA + AAAEAAAAAAAAAAgAAAAAAI8AAAABAAAAAAAQAFZDMiGGAAAAPENhbW9taWxlU2V0dGluZ3MgbmFtZT0iY2Ftby50cmVtb2xvfi5wZCIgcGF0aD0iL1VzZXJzL1BpZXJy + ZS9HaXRIdWIvQ2Ftb21pbGUvUGF0Y2hlcyI+PHBhcmFtcyBSYXRlPSIxIiBEZXB0aD0iMSIvPjwvQ2Ftb21pbGVTZXR0aW5ncz4AAAAQAAAA > FLOATPOS 0 0 0 0 FXID {6B2DEC7B-CBE7-9E47-BF52-74413E65B3CF} @@ -18631,6 +18631,17 @@ PT 50.47569161 0.96124029 0 > WAK 0 + BYPASS 0 0 0 + + FLOATPOS 0 0 0 0 + FXID {4779F80F-7956-DB4E-AF70-ECD2B49AE555} + WAK 0 > > > diff --git a/Tests/ReaperTest.RPP-bak b/Tests/ReaperTest.RPP-bak index 7b3c3f67..a2c8fc61 100644 --- a/Tests/ReaperTest.RPP-bak +++ b/Tests/ReaperTest.RPP-bak @@ -1,4 +1,4 @@ - @@ -40,7 +41,7 @@ ITEMMIX 0 DEFPITCHMODE 589824 TAKELANE 1 - SAMPLERATE 44100 0 0 + SAMPLERATE 44100 1 0 LOCK 1 @@ -54,8 +55,8 @@ GLOBAL_AUTO -1 TEMPO 120 4 4 PLAYRATE 1 0 0.25 4 - SELECTION 0.12660098646087 0 - SELECTION2 0.12660098646087 0 + SELECTION 33.43537668096001 56.46863617228802 + SELECTION2 33.43537668096001 56.46863617228802 MASTERAUTOMODE 0 MASTERTRACKHEIGHT 0 MASTERPEAKCOL 16576 @@ -88,57 +89,47 @@ PEAKCOL 16576 BEAT 1 AUTOMODE 4 - VOLPAN 1 0 -1 -1 1 + VOLPAN 3.90998302151219 0 -1 -1 1 MUTESOLO 0 0 0 IPHASE 0 ISBUS 0 0 BUSCOMP 0 0 SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0 FREEMODE 0 - SEL 1 + SEL 0 REC 0 0 0 0 0 0 0 VU 2 TRACKHEIGHT 94 0 INQ 0 0 0 0.5 100 0 0 100 NCHAN 16 - FX 1 + FX 0 TRACKID {DB6B281B-83C2-9746-B00C-7094AF227785} PERF 0 MIDIOUT -1 MAINSEND 1 0 - FLOATPOS 374 488 160 149 FXID {D91345D4-E016-1A49-A789-13F3F3CD05EE} - PARM_TCP 1 WAK 0 @@ -312,14 +292,13 @@ cgAAADxDYW1vbWlsZVNldHRpbmdzIG5hbWU9ImNhbW8uY2hvcnVzfi5wZCIgcGF0aD0iL1VzZXJzL1BpZXJyZS9HaXRIdWIvQ2Ftb21pbGUvUGF0Y2hlcyI+PHBhcmFt cy8+PC9DYW1vbWlsZVNldHRpbmdzPgAAABAAAAA= > - WET 0 FLOATPOS 0 0 0 0 FXID {6585DE3A-98C0-6F4B-9D5A-F2577AB25477} WAK 0 - BYPASS 1 0 0 - FLOATPOS 0 0 0 0 FXID {2EAB0F42-6A70-134B-BA0B-16D824CE5175} + WAK 0 > @@ -18100,7 +18181,7 @@ NAME "" PEAKCOL 16576 BEAT -1 - AUTOMODE 0 + AUTOMODE 4 VOLPAN 0.07000526564469 0 -1 -1 1 MUTESOLO 0 0 0 IPHASE 0 @@ -18108,159 +18189,459 @@ BUSCOMP 0 0 SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0 FREEMODE 0 - SEL 0 + SEL 1 REC 0 0 0 0 0 0 0 VU 2 - TRACKHEIGHT 0 0 + TRACKHEIGHT 103 0 INQ 0 0 0 0.5 100 0 0 100 NCHAN 16 - FX 0 + FX 1 TRACKID {F3EF4685-7878-4E4A-AC47-07A4B075DB37} PERF 0 MIDIOUT -1 MAINSEND 1 0 - WET 0.189899 + WET 0.009995 FLOATPOS 0 0 0 0 FXID {ED8EF1F8-5A02-0C4F-948D-EC4005D9C908} + WAK 0 BYPASS 0 0 0 - FLOATPOS 32 618 205 227 FXID {010AD44B-87CA-9044-BBAE-FB807604F407} + + + WAK 0 BYPASS 0 0 0 - FLOATPOS 0 0 0 0 FXID {6B2DEC7B-CBE7-9E47-BF52-74413E65B3CF} - WAK 0 - BYPASS 1 0 0 - - WET 0 - FLOATPOS 0 0 0 0 - FXID {28A42A1E-3BEB-4943-856D-4AE920E90AD5} - WAK 0 - BYPASS 1 0 0 - - WET 0 - FLOATPOS 32 476 301 369 - FXID {AD7AFC57-251E-9743-8A24-6BDCA245FFE1} - WAK 0 - > - > - - FLOATPOS 0 0 0 0 - FXID {F5477A2C-15BA-DC4E-A205-74379EA3E388} WAK 0 BYPASS 0 0 0 - FLOATPOS 0 0 0 0 - FXID {3120C33A-8DE7-0A47-8C76-6AC5C9A2F503} + FXID {4779F80F-7956-DB4E-AF70-ECD2B49AE555} WAK 0 > > - > diff --git a/Tests/TestOSC.RPP b/Tests/TestOSC.RPP new file mode 100644 index 00000000..affc99ab --- /dev/null +++ b/Tests/TestOSC.RPP @@ -0,0 +1,161 @@ + + + RENDER_FILE "" + RENDER_PATTERN "" + RENDER_FMT 0 2 0 + RENDER_1X 0 + RENDER_RANGE 1 0 0 18 1000 + RENDER_RESAMPLE 3 0 1 + RENDER_ADDTOPROJ 0 + RENDER_STEMS 0 + RENDER_DITHER 0 + TIMELOCKMODE 1 + TEMPOENVLOCKMODE 1 + ITEMMIX 0 + DEFPITCHMODE 589824 + TAKELANE 1 + SAMPLERATE 44100 0 0 + + LOCK 1 + + GLOBAL_AUTO -1 + TEMPO 120 4 4 + PLAYRATE 1 0 0.25 4 + SELECTION 0 0 + SELECTION2 0 0 + MASTERAUTOMODE 0 + MASTERTRACKHEIGHT 0 + MASTERPEAKCOL 16576 + MASTERMUTESOLO 0 + MASTERTRACKVIEW 0 0.6667 0.5 0.5 0 0 0 + MASTERHWOUT 0 0 1 0 0 0 0 -1 + MASTER_NCH 2 2 + MASTER_VOLUME 1 0 -1 -1 1 + MASTER_FX 1 + MASTER_SEL 0 + + + + + FLOATPOS 0 0 0 0 + FXID {B12982C4-38F4-3748-B365-6C525A86D36A} + WAK 0 + BYPASS 0 0 0 + + FLOATPOS 0 0 0 0 + FXID {5EAC8E06-5748-6B4F-8DEC-2BF4B8F1626C} + WAK 0 + BYPASS 1 0 0 + + WET 0.54992 + FLOATPOS 0 0 0 0 + FXID {B1E7CBA4-2BE0-204D-A0AA-70CC7B856143} + WAK 0 + BYPASS 0 0 0 + + FLOATPOS 0 0 0 0 + FXID {95E86F3C-211A-9D46-BF36-23F1A32A8AAD} + WAK 0 + > + > +> diff --git a/Tests/TestOSC.RPP-bak b/Tests/TestOSC.RPP-bak new file mode 100644 index 00000000..d6aaf95a --- /dev/null +++ b/Tests/TestOSC.RPP-bak @@ -0,0 +1,161 @@ + + + RENDER_FILE "" + RENDER_PATTERN "" + RENDER_FMT 0 2 0 + RENDER_1X 0 + RENDER_RANGE 1 0 0 18 1000 + RENDER_RESAMPLE 3 0 1 + RENDER_ADDTOPROJ 0 + RENDER_STEMS 0 + RENDER_DITHER 0 + TIMELOCKMODE 1 + TEMPOENVLOCKMODE 1 + ITEMMIX 0 + DEFPITCHMODE 589824 + TAKELANE 1 + SAMPLERATE 44100 0 0 + + LOCK 1 + + GLOBAL_AUTO -1 + TEMPO 120 4 4 + PLAYRATE 1 0 0.25 4 + SELECTION 0 0 + SELECTION2 0 0 + MASTERAUTOMODE 0 + MASTERTRACKHEIGHT 0 + MASTERPEAKCOL 16576 + MASTERMUTESOLO 0 + MASTERTRACKVIEW 0 0.6667 0.5 0.5 0 0 0 + MASTERHWOUT 0 0 1 0 0 0 0 -1 + MASTER_NCH 2 2 + MASTER_VOLUME 1 0 -1 -1 1 + MASTER_FX 1 + MASTER_SEL 0 + + + + + FLOATPOS 0 0 0 0 + FXID {B12982C4-38F4-3748-B365-6C525A86D36A} + WAK 0 + BYPASS 0 0 0 + + FLOATPOS 0 0 0 0 + FXID {5EAC8E06-5748-6B4F-8DEC-2BF4B8F1626C} + WAK 0 + BYPASS 1 0 0 + + WET 0.54992 + FLOATPOS 0 0 0 0 + FXID {B1E7CBA4-2BE0-204D-A0AA-70CC7B856143} + WAK 0 + BYPASS 0 0 0 + + FLOATPOS 0 0 0 0 + FXID {95E86F3C-211A-9D46-BF36-23F1A32A8AAD} + WAK 0 + > + > +> diff --git a/Tests/TestTracktion/TestTracktion Edit 1.tracktionedit b/Tests/TestTracktion/TestTracktion Edit 1.tracktionedit new file mode 100644 index 00000000..8a4e92f2 --- /dev/null +++ b/Tests/TestTracktion/TestTracktion Edit 1.tracktionedit @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/TestTracktion/TestTracktion.tracktion b/Tests/TestTracktion/TestTracktion.tracktion new file mode 100644 index 00000000..c3b80b1a Binary files /dev/null and b/Tests/TestTracktion/TestTracktion.tracktion differ diff --git a/ThirdParty/Juce b/ThirdParty/Juce index ca8aef4d..118e872b 160000 --- a/ThirdParty/Juce +++ b/ThirdParty/Juce @@ -1 +1 @@ -Subproject commit ca8aef4d3e76e9fb77fd52649423790c037754dc +Subproject commit 118e872bf246afa9b4124907f6d1864b4eedb43b diff --git a/ThirdParty/PureData b/ThirdParty/PureData index d43aee36..f1e0d17d 160000 --- a/ThirdParty/PureData +++ b/ThirdParty/PureData @@ -1 +1 @@ -Subproject commit d43aee365f01272d3a7fcce31826733ff8a4d229 +Subproject commit f1e0d17d70a154e6d794a4cf7f0f457fed6b6a68