diff --git a/.cproject b/.cproject index 9daa9d2..7c7fd4d 100644 --- a/.cproject +++ b/.cproject @@ -98,6 +98,7 @@ @@ -124,7 +125,7 @@ - @@ -218,7 +219,7 @@ - @@ -371,7 +372,7 @@ - diff --git a/CHANGELOG b/CHANGELOG index 9a0cd8c..ac47264 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ * RECENT CHANGES ******************************************************************************* +=== 1.0.24 === +* Updated build scripts and dependencies. + === 1.0.23 === * Updated build scripts and dependencies. diff --git a/dependencies.mk b/dependencies.mk index 3ef6589..7942ad9 100644 --- a/dependencies.mk +++ b/dependencies.mk @@ -44,6 +44,7 @@ DEFAULT_FEATURES = clap doc ladspa lv2 vst2 vst3 xdg LINUX_DEPENDENCIES = \ LIBPTHREAD \ LIBDL \ + LIBRT \ LIBSNDFILE \ LIBCAIRO \ LIBFREETYPE \ @@ -66,6 +67,7 @@ endif BSD_DEPENDENCIES = \ LIBPTHREAD \ LIBDL \ + LIBRT \ LIBSNDFILE \ LIBICONV \ LIBCAIRO \ diff --git a/include/private/meta/spectrum_analyzer.h b/include/private/meta/spectrum_analyzer.h index 2c66186..afc228f 100644 --- a/include/private/meta/spectrum_analyzer.h +++ b/include/private/meta/spectrum_analyzer.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project - * (C) 2021 Vladimir Sadovnikov + * Copyright (C) 2024 Linux Studio Plugins Project + * (C) 2024 Vladimir Sadovnikov * * This file is part of lsp-plugins-spectrum-analyzer * Created on: 22 июн. 2021 г. @@ -38,11 +38,12 @@ namespace lsp static constexpr float FREQ_MIN = SPEC_FREQ_MIN; static constexpr float FREQ_DFL = 1000.0f; static constexpr float FREQ_MAX = SPEC_FREQ_MAX; + static constexpr float CORR_PERIOD = 100.0f; static constexpr size_t PORTS_PER_INPUT = 6; static constexpr size_t RANK_MIN = 10; static constexpr size_t RANK_DFL = 12; - static constexpr size_t RANK_MAX = 14; + static constexpr size_t RANK_MAX = 15; static constexpr size_t MESH_POINTS = 640; static constexpr float THRESH_HI_DB = 0.0f; @@ -64,6 +65,11 @@ namespace lsp static constexpr float SELECTOR_MAX = SPEC_FREQ_MAX; static constexpr float SELECTOR_STEP = 0.005f; + static constexpr float CORRELATION_MIN = -100.0f; + static constexpr float CORRELATION_MAX = 100.0f; + static constexpr float CORRELATION_DFL = 0.0f; + static constexpr float CORRELATION_STEP = 0.1f; + static constexpr float HLINE_MIN = GAIN_AMP_M_72_DB; static constexpr float HLINE_DFL = GAIN_AMP_0_DB; static constexpr float HLINE_MAX = GAIN_AMP_P_24_DB; diff --git a/include/private/plugins/spectrum_analyzer.h b/include/private/plugins/spectrum_analyzer.h index 500d847..25deefe 100644 --- a/include/private/plugins/spectrum_analyzer.h +++ b/include/private/plugins/spectrum_analyzer.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2023 Linux Studio Plugins Project - * (C) 2023 Vladimir Sadovnikov + * Copyright (C) 2024 Linux Studio Plugins Project + * (C) 2024 Vladimir Sadovnikov * * This file is part of lsp-plugins-spectrum-analyzer * Created on: 22 июн. 2021 г. @@ -23,6 +23,7 @@ #define PRIVATE_PLUGINS_SPECTRUM_ANALYZER_H_ #include +#include #include #include #include @@ -62,13 +63,20 @@ namespace lsp typedef struct sa_spectralizer_t { - ssize_t nPortId; // Last port identifier - ssize_t nChannelId; // Channel identifier + int32_t nPortId; // Last port identifier + int32_t nChannelId; // Channel identifier plug::IPort *pPortId; // Port identifier plug::IPort *pFBuffer; // Frame buffer port } sa_spectralizer_t; + typedef struct sa_correlometer_t + { + dspu::Correlometer sCorr; // Correlometer + float fCorrelation; // Measured correlation value + plug::IPort *pCorrelometer; // Correlometer output value + } sa_correlometer_t; + enum mode_t { SA_ANALYZER, @@ -90,8 +98,10 @@ namespace lsp protected: dspu::Analyzer sAnalyzer; dspu::Counter sCounter; - size_t nChannels; + uint32_t nChannels; + uint32_t nCorrelometers; sa_channel_t *vChannels; + sa_correlometer_t *vCorrelometers; // Available correlometers float **vAnalyze; // Analysis buffers float *vFrequences; float *vMaxValues; // Maximum value tracking @@ -152,6 +162,7 @@ namespace lsp void process_multiple(); void process_spectralizer(); void get_spectrum(float *dst, size_t channel, size_t flags); + void measure_correlation(size_t count); void prepare_buffers(size_t count); public: diff --git a/make/tools.mk b/make/tools.mk index cedf900..08c295f 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -76,6 +76,8 @@ ifeq ($(PLATFORM),Solaris) else ifeq ($(PLATFORM),Windows) FLAG_RELRO = FLAG_STDLIB = + CFLAGS_EXT += -DWINVER=0x600 -D_WIN32_WINNT=0x600 + CXXFLAGS_EXT += -DWINVER=0x600 -D_WIN32_WINNT=0x600 EXE_FLAGS_EXT += -static-libgcc -static-libstdc++ SO_FLAGS_EXT += -static-libgcc -static-libstdc++ LDFLAGS_EXT += -T $(CURDIR)/make/ld-windows.script diff --git a/modules.mk b/modules.mk index a73d9ce..80c851a 100644 --- a/modules.mk +++ b/modules.mk @@ -19,93 +19,93 @@ # # Variables that describe dependencies -LSP_3RD_PARTY_VERSION := 1.0.15 +LSP_3RD_PARTY_VERSION := 1.0.16 LSP_3RD_PARTY_NAME := lsp-3rd-party LSP_3RD_PARTY_TYPE := hdr LSP_3RD_PARTY_INC_OPT := -idirafter LSP_3RD_PARTY_URL_RO := https://github.com/lsp-plugins/$(LSP_3RD_PARTY_NAME).git LSP_3RD_PARTY_URL_RW := git@github.com:lsp-plugins/$(LSP_3RD_PARTY_NAME).git -LSP_COMMON_LIB_VERSION := 1.0.34 +LSP_COMMON_LIB_VERSION := 1.0.36 LSP_COMMON_LIB_NAME := lsp-common-lib LSP_COMMON_LIB_TYPE := src LSP_COMMON_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_COMMON_LIB_NAME).git LSP_COMMON_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_COMMON_LIB_NAME).git -LSP_DSP_LIB_VERSION := 1.0.21 +LSP_DSP_LIB_VERSION := 1.0.23 LSP_DSP_LIB_NAME := lsp-dsp-lib LSP_DSP_LIB_TYPE := src LSP_DSP_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_LIB_NAME).git LSP_DSP_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_DSP_LIB_NAME).git -LSP_DSP_UNITS_VERSION := 1.0.20 +LSP_DSP_UNITS_VERSION := 1.0.22 LSP_DSP_UNITS_NAME := lsp-dsp-units LSP_DSP_UNITS_TYPE := src LSP_DSP_UNITS_URL_RO := https://github.com/lsp-plugins/$(LSP_DSP_UNITS_NAME).git LSP_DSP_UNITS_URL_RW := git@github.com:lsp-plugins/$(LSP_DSP_UNITS_NAME).git -LSP_LLTL_LIB_VERSION := 1.0.17 +LSP_LLTL_LIB_VERSION := 1.0.19 LSP_LLTL_LIB_NAME := lsp-lltl-lib LSP_LLTL_LIB_TYPE := src LSP_LLTL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_LLTL_LIB_NAME).git LSP_LLTL_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_LLTL_LIB_NAME).git -LSP_R3D_BASE_LIB_VERSION := 1.0.17 +LSP_R3D_BASE_LIB_VERSION := 1.0.18 LSP_R3D_BASE_LIB_NAME := lsp-r3d-base-lib LSP_R3D_BASE_LIB_TYPE := src LSP_R3D_BASE_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git LSP_R3D_BASE_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_R3D_BASE_LIB_NAME).git -LSP_R3D_IFACE_VERSION := 1.0.17 +LSP_R3D_IFACE_VERSION := 1.0.18 LSP_R3D_IFACE_NAME := lsp-r3d-iface LSP_R3D_IFACE_TYPE := src LSP_R3D_IFACE_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_IFACE_NAME).git LSP_R3D_IFACE_URL_RW := git@github.com:lsp-plugins/$(LSP_R3D_IFACE_NAME).git -LSP_R3D_GLX_LIB_VERSION := 1.0.17 +LSP_R3D_GLX_LIB_VERSION := 1.0.18 LSP_R3D_GLX_LIB_NAME := lsp-r3d-glx-lib LSP_R3D_GLX_LIB_TYPE := bin LSP_R3D_GLX_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git LSP_R3D_GLX_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_R3D_GLX_LIB_NAME).git -LSP_R3D_WGL_LIB_VERSION := 1.0.12 +LSP_R3D_WGL_LIB_VERSION := 1.0.13 LSP_R3D_WGL_LIB_NAME := lsp-r3d-wgl-lib LSP_R3D_WGL_LIB_TYPE := bin LSP_R3D_WGL_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git LSP_R3D_WGL_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_R3D_WGL_LIB_NAME).git -LSP_RUNTIME_LIB_VERSION := 1.0.20 +LSP_RUNTIME_LIB_VERSION := 1.0.22 LSP_RUNTIME_LIB_NAME := lsp-runtime-lib LSP_RUNTIME_LIB_TYPE := src LSP_RUNTIME_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git LSP_RUNTIME_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_RUNTIME_LIB_NAME).git -LSP_TEST_FW_VERSION := 1.0.24 +LSP_TEST_FW_VERSION := 1.0.25 LSP_TEST_FW_NAME := lsp-test-fw LSP_TEST_FW_TYPE := src LSP_TEST_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_TEST_FW_NAME).git LSP_TEST_FW_URL_RW := git@github.com:lsp-plugins/$(LSP_TEST_FW_NAME).git -LSP_TK_LIB_VERSION := 1.0.20 +LSP_TK_LIB_VERSION := 1.0.21 LSP_TK_LIB_NAME := lsp-tk-lib LSP_TK_LIB_TYPE := src LSP_TK_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_TK_LIB_NAME).git LSP_TK_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_TK_LIB_NAME).git -LSP_WS_LIB_VERSION := 1.0.20 +LSP_WS_LIB_VERSION := 1.0.21 LSP_WS_LIB_NAME := lsp-ws-lib LSP_WS_LIB_TYPE := src LSP_WS_LIB_URL_RO := https://github.com/lsp-plugins/$(LSP_WS_LIB_NAME).git LSP_WS_LIB_URL_RW := git@github.com:lsp-plugins/$(LSP_WS_LIB_NAME).git # Plugin-related module dependencies -LSP_PLUGIN_FW_VERSION := 1.0.22 +LSP_PLUGIN_FW_VERSION := 1.0.23 LSP_PLUGIN_FW_NAME := lsp-plugin-fw LSP_PLUGIN_FW_TYPE := src LSP_PLUGIN_FW_URL_RO := https://github.com/lsp-plugins/$(LSP_PLUGIN_FW_NAME).git LSP_PLUGIN_FW_URL_RW := git@github.com:lsp-plugins/$(LSP_PLUGIN_FW_NAME).git -LSP_PLUGINS_SHARED_VERSION := 1.0.21 +LSP_PLUGINS_SHARED_VERSION := 1.0.22 LSP_PLUGINS_SHARED_NAME := lsp-plugins-shared LSP_PLUGINS_SHARED_TYPE := src LSP_PLUGINS_SHARED_URL_RO := https://github.com/lsp-plugins/$(LSP_PLUGINS_SHARED_NAME).git @@ -154,15 +154,15 @@ LIBICONV_NAME := libiconv LIBICONV_TYPE := opt LIBICONV_LDFLAGS := -liconv +LIBJACK_VERSION := system +LIBJACK_NAME := jack +LIBJACK_TYPE := pkg + LIBMPR_VERSION := system LIBMPR_NAME := libmpr LIBMPR_TYPE := opt LIBMPR_LDFLAGS := -lmpr -LIBJACK_VERSION := system -LIBJACK_NAME := jack -LIBJACK_TYPE := pkg - LIBMSACM_VERSION := system LIBMSACM_NAME := libmsacm LIBMSACM_TYPE := opt @@ -183,6 +183,11 @@ LIBPTHREAD_NAME := libpthread LIBPTHREAD_TYPE := opt LIBPTHREAD_LDFLAGS := -lpthread +LIBRT_VERSION := system +LIBRT_NAME := librt +LIBRT_TYPE := opt +LIBRT_LDFLAGS := -lrt + LIBSNDFILE_VERSION := system LIBSNDFILE_NAME := sndfile LIBSNDFILE_TYPE := pkg diff --git a/project.mk b/project.mk index 18901ff..c473300 100644 --- a/project.mk +++ b/project.mk @@ -25,7 +25,7 @@ ARTIFACT_TYPE = plug ARTIFACT_DESC = LSP Spectrum Analyzer Plugin Series ARTIFACT_HEADERS = lsp-plug.in ARTIFACT_EXPORT_HEADERS = 0 -ARTIFACT_VERSION = 1.0.23 +ARTIFACT_VERSION = 1.0.24 diff --git a/res/doc/configs/spectrum_analyzer_x4.cfg b/res/doc/configs/spectrum_analyzer_x4.cfg index 593a266..bc29117 100644 --- a/res/doc/configs/spectrum_analyzer_x4.cfg +++ b/res/doc/configs/spectrum_analyzer_x4.cfg @@ -3,10 +3,11 @@ # Package: test (Test Case) # Package version: 0.0.0-devel # Plugin name: Spektrumanalysator x4 (Spectrum Analyzer x4) -# Plugin version: 1.0.22 +# Plugin version: 1.0.24 # UID: spectrum_analyzer_x4 # LV2 URI: http://lsp-plug.in/plugins/lv2/spectrum_analyzer_x4 -# VST identifier: xzgo +# VST 2.x identifier: xzgo +# VST 3.x identifier: 647370207361342020202020787A676F # LADSPA identifier: 5002070 # LADSPA label: http://lsp-plug.in/plugins/ladspa/spectrum_analyzer_x4 # @@ -124,13 +125,14 @@ mtrack = true # Reset maximum values [boolean]: true/false mreset = false -# FFT Tolerance: 0..4 +# FFT Tolerance: 0..5 # 0: 1024 # 1: 2048 # 2: 4096 # 3: 8192 # 4: 16384 -tol = 2 +# 5: 32768 +tol = 5 # FFT Window: 0..20 # 0: Hann diff --git a/res/doc/screenshots/spectrum_analyzer_x1.png b/res/doc/screenshots/spectrum_analyzer_x1.png index 60e73b5..ed5e0fe 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x1.png and b/res/doc/screenshots/spectrum_analyzer_x1.png differ diff --git a/res/doc/screenshots/spectrum_analyzer_x12.png b/res/doc/screenshots/spectrum_analyzer_x12.png index eb2892b..0c16004 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x12.png and b/res/doc/screenshots/spectrum_analyzer_x12.png differ diff --git a/res/doc/screenshots/spectrum_analyzer_x16.png b/res/doc/screenshots/spectrum_analyzer_x16.png index 59c8f69..30176cc 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x16.png and b/res/doc/screenshots/spectrum_analyzer_x16.png differ diff --git a/res/doc/screenshots/spectrum_analyzer_x2.png b/res/doc/screenshots/spectrum_analyzer_x2.png index dae64d1..5c4cb3b 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x2.png and b/res/doc/screenshots/spectrum_analyzer_x2.png differ diff --git a/res/doc/screenshots/spectrum_analyzer_x4.png b/res/doc/screenshots/spectrum_analyzer_x4.png index b5aacca..20413a4 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x4.png and b/res/doc/screenshots/spectrum_analyzer_x4.png differ diff --git a/res/doc/screenshots/spectrum_analyzer_x8.png b/res/doc/screenshots/spectrum_analyzer_x8.png index ead2031..67ff6f0 100644 Binary files a/res/doc/screenshots/spectrum_analyzer_x8.png and b/res/doc/screenshots/spectrum_analyzer_x8.png differ diff --git a/res/main/ui/analyzer/spectrum/x12.xml b/res/main/ui/analyzer/spectrum/x12.xml index ba86d85..05136ff 100644 --- a/res/main/ui/analyzer/spectrum/x12.xml +++ b/res/main/ui/analyzer/spectrum/x12.xml @@ -379,11 +379,11 @@ - + - - - + + - + @@ -400,6 +400,28 @@