├── .clang-format ├── .clang-tidy ├── .github └── workflows │ ├── auto-format.yml │ ├── bench.yml │ ├── build-teensy.yml │ ├── code-quality.yml │ ├── docs.yml │ ├── examples.yml │ └── run-tests.yml ├── .gitignore ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── bench ├── AbstractTreeBench.cpp ├── BufferBench.cpp ├── CMakeLists.txt ├── ConcurrentScanningBench.cpp ├── DecibelsBench.cpp ├── FIRFilterBench.cpp ├── FloatVectorOperationsBench.cpp ├── IIRFilterBench.cpp ├── LookupTableBench.cpp ├── MatrixOpsBench.cpp ├── PolynomialBench.cpp ├── PowerBench.cpp ├── TrigBench.cpp └── bench_utils.h ├── cmake ├── AddDiagnosticInfo.cmake ├── AddJUCEModules.cmake ├── CPM.cmake ├── Findsamplerate.cmake ├── SetupChowdspLib.cmake ├── SubprojectVersion.cmake └── test │ ├── EnableCoverageFlags.cmake │ ├── SetupBenchmark.cmake │ ├── SetupCatchTest.cmake │ ├── SetupCodeQuality.cmake │ ├── SetupExamplePlugin.cmake │ ├── SetupJuceTest.cmake │ ├── SetupStaticTests.cmake │ └── StaticTest.cmake ├── codecov.yml ├── doxygen ├── Doxyfile ├── Makefile ├── header.html └── logo.png ├── examples ├── AccessiblePlugin │ ├── AccessiblePlugin.cpp │ ├── AccessiblePlugin.h │ ├── AccessiblePluginEditor.cpp │ ├── AccessiblePluginEditor.h │ ├── CMakeLists.txt │ └── TabbedComponent.h ├── AutoWah │ ├── AutoWahPlugin.cpp │ ├── AutoWahPlugin.h │ └── CMakeLists.txt ├── CMakeLists.txt ├── ExampleCompressor │ ├── CMakeLists.txt │ ├── ExampleCompressor.cpp │ ├── ExampleCompressor.h │ ├── Params.h │ ├── PluginEditor.cpp │ └── PluginEditor.h ├── ForwardingTestPlugin │ ├── CMakeLists.txt │ ├── ForwardingTestPlugin.cpp │ ├── ForwardingTestPlugin.h │ ├── InternalPlugins │ │ ├── ARPFilterPlugin.cpp │ │ ├── ARPFilterPlugin.h │ │ ├── BandSplitPlugin.cpp │ │ ├── BandSplitPlugin.h │ │ ├── PlateReverb.cpp │ │ ├── PlateReverb.h │ │ ├── PolygonalOscPlugin.cpp │ │ ├── PolygonalOscPlugin.h │ │ ├── PolyphaseOversamplingPlugin.cpp │ │ ├── PolyphaseOversamplingPlugin.h │ │ ├── WernerFilterPlugin.cpp │ │ └── WernerFilterPlugin.h │ ├── PluginEditor.cpp │ └── PluginEditor.h ├── ModalSpringReverb │ ├── .gitignore │ ├── CMakeLists.txt │ ├── ModalReverbPlugin.cpp │ ├── ModalReverbPlugin.h │ ├── ModeParams.h │ └── impulse_analysis.py ├── README.md ├── SignalGenerator │ ├── CMakeLists.txt │ ├── SignalGeneratorPlugin.cpp │ └── SignalGeneratorPlugin.h ├── SimpleEQ │ ├── CMakeLists.txt │ ├── FilterPlots.cpp │ ├── FilterPlots.h │ ├── PluginEditor.cpp │ ├── PluginEditor.h │ ├── PrototypeEQ.h │ ├── SimpleEQPlugin.cpp │ └── SimpleEQPlugin.h ├── SimpleReverb │ ├── CMakeLists.txt │ ├── SimpleReverbPlugin.cpp │ └── SimpleReverbPlugin.h └── StatefulPlugin │ ├── CMakeLists.txt │ ├── PluginEditor.cpp │ ├── PluginEditor.h │ ├── StatefulPlugin.cpp │ └── StatefulPlugin.h ├── modules ├── common │ ├── chowdsp_core │ │ ├── DataStructures │ │ │ ├── chowdsp_AtomicHelpers.h │ │ │ ├── chowdsp_GraphicsHelpers.h │ │ │ ├── chowdsp_ScopedValue.h │ │ │ └── chowdsp_StringHelpers.h │ │ ├── Functional │ │ │ ├── chowdsp_Bindings.h │ │ │ └── chowdsp_EndOfScopeAction.h │ │ ├── JUCEHelpers │ │ │ ├── dsp │ │ │ │ ├── juce_FastMathApproximations.h │ │ │ │ ├── juce_LookupTable.cpp │ │ │ │ ├── juce_LookupTable.h │ │ │ │ └── juce_ProcessSpec.h │ │ │ ├── juce_CompilerWarnings.h │ │ │ ├── juce_Decibels.h │ │ │ ├── juce_ExtraDefinitions.h │ │ │ ├── juce_FixedSizeFunction.h │ │ │ ├── juce_FloatVectorOperations.cpp │ │ │ ├── juce_FloatVectorOperations.h │ │ │ ├── juce_MathsFunctions.h │ │ │ ├── juce_SmoothedValue.h │ │ │ └── juce_TargetPlatform.h │ │ ├── Memory │ │ │ ├── chowdsp_AlignedAlloc.h │ │ │ └── chowdsp_MemoryAliasing.h │ │ ├── Types │ │ │ ├── chowdsp_TypeHasCheckers.h │ │ │ └── chowdsp_TypeTraits.h │ │ ├── chowdsp_core.cpp │ │ ├── chowdsp_core.h │ │ └── third_party │ │ │ ├── span-lite │ │ │ ├── .editorconfig │ │ │ ├── .gitattributes │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── ci.yml │ │ │ ├── .gitignore │ │ │ ├── .tgitconfig │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── cmake │ │ │ │ ├── span-lite-config-version.cmake.in │ │ │ │ └── span-lite-config.cmake.in │ │ │ ├── conanfile.py │ │ │ ├── example │ │ │ │ ├── 01-basic.cpp │ │ │ │ ├── 02-span.cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── nonstd │ │ │ │ │ └── span.tweak.hpp │ │ │ ├── include │ │ │ │ └── nonstd │ │ │ │ │ └── span.hpp │ │ │ ├── project │ │ │ │ └── CodeBlocks │ │ │ │ │ ├── span-lite.cbp │ │ │ │ │ └── span-lite.workspace │ │ │ ├── script │ │ │ │ ├── create-cov-rpt.py │ │ │ │ ├── create-vcpkg.py │ │ │ │ ├── update-version.py │ │ │ │ └── upload-conan.py │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── lest │ │ │ │ └── lest_cpp03.hpp │ │ │ │ ├── nonstd │ │ │ │ └── span.tweak.hpp │ │ │ │ ├── span-main.t.cpp │ │ │ │ ├── span-main.t.hpp │ │ │ │ ├── span.t.cpp │ │ │ │ ├── t-all.bat │ │ │ │ ├── t.bat │ │ │ │ ├── tc-cl.bat │ │ │ │ ├── tc.bat │ │ │ │ ├── tg-all.bat │ │ │ │ └── tg.bat │ │ │ └── types_list │ │ │ ├── .clang-format │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ ├── macos.yml │ │ │ │ ├── ubuntu.yml │ │ │ │ └── windows.yml │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── example │ │ │ ├── CMakeLists.txt │ │ │ ├── example.cpp │ │ │ └── example_mp11.cpp │ │ │ ├── include │ │ │ └── types_list │ │ │ │ └── types_list.hpp │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── test.cpp │ │ │ └── third_party │ │ │ └── Catch2 │ │ │ ├── LICENSE │ │ │ └── catch.hpp │ ├── chowdsp_data_structures │ │ ├── Allocators │ │ │ ├── chowdsp_ArenaAllocator.h │ │ │ ├── chowdsp_ChainedArenaAllocator.h │ │ │ ├── chowdsp_PoolAllocator.h │ │ │ └── chowdsp_STLArenaAllocator.h │ │ ├── Helpers │ │ │ ├── chowdsp_ArenaHelpers.h │ │ │ ├── chowdsp_ArrayHelpers.h │ │ │ ├── chowdsp_Iterators.h │ │ │ ├── chowdsp_TupleHelpers.h │ │ │ └── chowdsp_VectorHelpers.h │ │ ├── Structures │ │ │ ├── chowdsp_AbstractTree.cpp │ │ │ ├── chowdsp_AbstractTree.h │ │ │ ├── chowdsp_BucketArray.h │ │ │ ├── chowdsp_DestructiblePointer.h │ │ │ ├── chowdsp_DoubleBuffer.h │ │ │ ├── chowdsp_EnumMap.h │ │ │ ├── chowdsp_LocalPointer.h │ │ │ ├── chowdsp_OptionalArray.h │ │ │ ├── chowdsp_OptionalPointer.h │ │ │ ├── chowdsp_OptionalRef.h │ │ │ ├── chowdsp_PackedPointer.h │ │ │ ├── chowdsp_RawObject.h │ │ │ ├── chowdsp_SmallMap.h │ │ │ ├── chowdsp_SmallVector.h │ │ │ └── chowdsp_StringLiteral.h │ │ ├── chowdsp_data_structures.h │ │ └── third_party │ │ │ └── short_alloc.h │ ├── chowdsp_json │ │ ├── JSONUtils │ │ │ ├── chowdsp_JSONUtils.h │ │ │ └── chowdsp_StringAdapter.h │ │ ├── chowdsp_json.h │ │ └── third_party │ │ │ └── nlohmann │ │ │ └── json.hpp │ ├── chowdsp_listeners │ │ ├── chowdsp_listeners.h │ │ └── third_party │ │ │ └── rocket.hpp │ ├── chowdsp_logging │ │ ├── Loggers │ │ │ ├── chowdsp_BaseLogger.cpp │ │ │ ├── chowdsp_BaseLogger.h │ │ │ ├── chowdsp_CrashLogHelpers.cpp │ │ │ ├── chowdsp_CrashLogHelpers.h │ │ │ ├── chowdsp_FormatHelpers.h │ │ │ ├── chowdsp_LogFileHelpers.cpp │ │ │ ├── chowdsp_LogFileHelpers.h │ │ │ ├── chowdsp_Logger.cpp │ │ │ ├── chowdsp_Logger.h │ │ │ ├── chowdsp_PluginLogger.cpp │ │ │ └── chowdsp_PluginLogger.h │ │ ├── chowdsp_logging.cpp │ │ ├── chowdsp_logging.h │ │ └── third_party │ │ │ └── spdlog │ │ │ ├── .clang-format │ │ │ ├── .clang-tidy │ │ │ ├── .git-blame-ignore-revs │ │ │ ├── .gitattributes │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── ci.yml │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── INSTALL │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── bench │ │ │ ├── CMakeLists.txt │ │ │ ├── async_bench.cpp │ │ │ ├── bench.cpp │ │ │ ├── formatter-bench.cpp │ │ │ ├── latency.cpp │ │ │ └── utils.h │ │ │ ├── cmake │ │ │ ├── ide.cmake │ │ │ ├── pch.h.in │ │ │ ├── spdlog.pc.in │ │ │ ├── spdlogCPack.cmake │ │ │ ├── spdlogConfig.cmake.in │ │ │ ├── utils.cmake │ │ │ └── version.rc.in │ │ │ ├── example │ │ │ ├── CMakeLists.txt │ │ │ └── example.cpp │ │ │ ├── include │ │ │ └── spdlog │ │ │ │ ├── async.h │ │ │ │ ├── async_logger-inl.h │ │ │ │ ├── async_logger.h │ │ │ │ ├── cfg │ │ │ │ ├── argv.h │ │ │ │ ├── env.h │ │ │ │ ├── helpers-inl.h │ │ │ │ └── helpers.h │ │ │ │ ├── common-inl.h │ │ │ │ ├── common.h │ │ │ │ ├── details │ │ │ │ ├── backtracer-inl.h │ │ │ │ ├── backtracer.h │ │ │ │ ├── circular_q.h │ │ │ │ ├── console_globals.h │ │ │ │ ├── file_helper-inl.h │ │ │ │ ├── file_helper.h │ │ │ │ ├── fmt_helper.h │ │ │ │ ├── log_msg-inl.h │ │ │ │ ├── log_msg.h │ │ │ │ ├── log_msg_buffer-inl.h │ │ │ │ ├── log_msg_buffer.h │ │ │ │ ├── mpmc_blocking_q.h │ │ │ │ ├── null_mutex.h │ │ │ │ ├── os-inl.h │ │ │ │ ├── os.h │ │ │ │ ├── periodic_worker-inl.h │ │ │ │ ├── periodic_worker.h │ │ │ │ ├── registry-inl.h │ │ │ │ ├── registry.h │ │ │ │ ├── synchronous_factory.h │ │ │ │ ├── tcp_client-windows.h │ │ │ │ ├── tcp_client.h │ │ │ │ ├── thread_pool-inl.h │ │ │ │ ├── thread_pool.h │ │ │ │ ├── udp_client-windows.h │ │ │ │ ├── udp_client.h │ │ │ │ └── windows_include.h │ │ │ │ ├── fmt │ │ │ │ ├── bin_to_hex.h │ │ │ │ ├── bundled │ │ │ │ │ ├── args.h │ │ │ │ │ ├── chrono.h │ │ │ │ │ ├── color.h │ │ │ │ │ ├── compile.h │ │ │ │ │ ├── core.h │ │ │ │ │ ├── fmt.license.rst │ │ │ │ │ ├── format-inl.h │ │ │ │ │ ├── format.h │ │ │ │ │ ├── locale.h │ │ │ │ │ ├── os.h │ │ │ │ │ ├── ostream.h │ │ │ │ │ ├── printf.h │ │ │ │ │ ├── ranges.h │ │ │ │ │ ├── std.h │ │ │ │ │ └── xchar.h │ │ │ │ ├── chrono.h │ │ │ │ ├── compile.h │ │ │ │ ├── fmt.h │ │ │ │ ├── ostr.h │ │ │ │ ├── ranges.h │ │ │ │ ├── std.h │ │ │ │ └── xchar.h │ │ │ │ ├── formatter.h │ │ │ │ ├── fwd.h │ │ │ │ ├── logger-inl.h │ │ │ │ ├── logger.h │ │ │ │ ├── pattern_formatter-inl.h │ │ │ │ ├── pattern_formatter.h │ │ │ │ ├── sinks │ │ │ │ ├── android_sink.h │ │ │ │ ├── ansicolor_sink-inl.h │ │ │ │ ├── ansicolor_sink.h │ │ │ │ ├── base_sink-inl.h │ │ │ │ ├── base_sink.h │ │ │ │ ├── basic_file_sink-inl.h │ │ │ │ ├── basic_file_sink.h │ │ │ │ ├── callback_sink.h │ │ │ │ ├── daily_file_sink.h │ │ │ │ ├── dist_sink.h │ │ │ │ ├── dup_filter_sink.h │ │ │ │ ├── hourly_file_sink.h │ │ │ │ ├── kafka_sink.h │ │ │ │ ├── mongo_sink.h │ │ │ │ ├── msvc_sink.h │ │ │ │ ├── null_sink.h │ │ │ │ ├── ostream_sink.h │ │ │ │ ├── qt_sinks.h │ │ │ │ ├── ringbuffer_sink.h │ │ │ │ ├── rotating_file_sink-inl.h │ │ │ │ ├── rotating_file_sink.h │ │ │ │ ├── sink-inl.h │ │ │ │ ├── sink.h │ │ │ │ ├── stdout_color_sinks-inl.h │ │ │ │ ├── stdout_color_sinks.h │ │ │ │ ├── stdout_sinks-inl.h │ │ │ │ ├── stdout_sinks.h │ │ │ │ ├── syslog_sink.h │ │ │ │ ├── systemd_sink.h │ │ │ │ ├── tcp_sink.h │ │ │ │ ├── udp_sink.h │ │ │ │ ├── win_eventlog_sink.h │ │ │ │ ├── wincolor_sink-inl.h │ │ │ │ └── wincolor_sink.h │ │ │ │ ├── spdlog-inl.h │ │ │ │ ├── spdlog.h │ │ │ │ ├── stopwatch.h │ │ │ │ ├── tweakme.h │ │ │ │ └── version.h │ │ │ ├── logos │ │ │ ├── jetbrains-variant-4.svg │ │ │ └── spdlog.png │ │ │ ├── scripts │ │ │ ├── ci_setup_clang.sh │ │ │ ├── extract_version.py │ │ │ └── format.sh │ │ │ ├── src │ │ │ ├── async.cpp │ │ │ ├── bundled_fmtlib_format.cpp │ │ │ ├── cfg.cpp │ │ │ ├── color_sinks.cpp │ │ │ ├── file_sinks.cpp │ │ │ ├── spdlog.cpp │ │ │ └── stdout_sinks.cpp │ │ │ └── tests │ │ │ ├── CMakeLists.txt │ │ │ ├── includes.h │ │ │ ├── main.cpp │ │ │ ├── test_async.cpp │ │ │ ├── test_backtrace.cpp │ │ │ ├── test_bin_to_hex.cpp │ │ │ ├── test_cfg.cpp │ │ │ ├── test_circular_q.cpp │ │ │ ├── test_create_dir.cpp │ │ │ ├── test_custom_callbacks.cpp │ │ │ ├── test_daily_logger.cpp │ │ │ ├── test_dup_filter.cpp │ │ │ ├── test_errors.cpp │ │ │ ├── test_eventlog.cpp │ │ │ ├── test_file_helper.cpp │ │ │ ├── test_file_logging.cpp │ │ │ ├── test_fmt_helper.cpp │ │ │ ├── test_macros.cpp │ │ │ ├── test_misc.cpp │ │ │ ├── test_mpmc_q.cpp │ │ │ ├── test_pattern_formatter.cpp │ │ │ ├── test_registry.cpp │ │ │ ├── test_sink.h │ │ │ ├── test_stdout_api.cpp │ │ │ ├── test_stopwatch.cpp │ │ │ ├── test_systemd.cpp │ │ │ ├── test_time_point.cpp │ │ │ ├── utils.cpp │ │ │ └── utils.h │ ├── chowdsp_reflection │ │ ├── ReflectionHelpers │ │ │ └── chowdsp_EnumHelpers.h │ │ ├── chowdsp_reflection.h │ │ └── third_party │ │ │ ├── magic_enum │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ └── workflows │ │ │ │ │ ├── macos.yml │ │ │ │ │ ├── ubuntu.yml │ │ │ │ │ └── windows.yml │ │ │ ├── .gitignore │ │ │ ├── BUILD.bazel │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── WORKSPACE │ │ │ ├── doc │ │ │ │ ├── limitations.md │ │ │ │ └── reference.md │ │ │ ├── example │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── enum_flag_example.cpp │ │ │ │ ├── example.cpp │ │ │ │ ├── example_custom_name.cpp │ │ │ │ ├── example_nonascii_name.cpp │ │ │ │ └── example_switch.cpp │ │ │ ├── include │ │ │ │ ├── magic_enum.hpp │ │ │ │ ├── magic_enum_format.hpp │ │ │ │ ├── magic_enum_fuse.hpp │ │ │ │ └── magic_enum_switch.hpp │ │ │ ├── meson.build │ │ │ ├── package.xml │ │ │ └── test │ │ │ │ ├── 3rdparty │ │ │ │ └── Catch2 │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── include │ │ │ │ │ └── catch2 │ │ │ │ │ └── catch.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── test.cpp │ │ │ │ ├── test_aliases.cpp │ │ │ │ └── test_flags.cpp │ │ │ ├── nameof │ │ │ ├── .github │ │ │ │ ├── FUNDING.yml │ │ │ │ └── workflows │ │ │ │ │ ├── macos.yml │ │ │ │ │ ├── ubuntu.yml │ │ │ │ │ └── windows.yml │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc │ │ │ │ ├── limitations.md │ │ │ │ └── reference.md │ │ │ ├── example │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── example.cpp │ │ │ │ └── example_custom_name.cpp │ │ │ ├── include │ │ │ │ └── nameof.hpp │ │ │ └── test │ │ │ │ ├── 3rdparty │ │ │ │ └── Catch2 │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── catch.hpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── test.cpp │ │ │ │ └── test_aliases.cpp │ │ │ └── pfr │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE_1_0.txt │ │ │ ├── README.md │ │ │ ├── doc │ │ │ ├── Jamfile.v2 │ │ │ ├── autodoc_pfr.xml │ │ │ └── pfr.qbk │ │ │ ├── example │ │ │ ├── get.cpp │ │ │ ├── get_name.cpp │ │ │ ├── motivating_example0.cpp │ │ │ ├── quick_examples.cpp │ │ │ └── sample_printing.cpp │ │ │ ├── include │ │ │ ├── pfr.hpp │ │ │ └── pfr │ │ │ │ ├── config.hpp │ │ │ │ ├── core.hpp │ │ │ │ ├── core_name.hpp │ │ │ │ ├── detail │ │ │ │ ├── cast_to_layout_compatible.hpp │ │ │ │ ├── config.hpp │ │ │ │ ├── core.hpp │ │ │ │ ├── core14_classic.hpp │ │ │ │ ├── core14_loophole.hpp │ │ │ │ ├── core17.hpp │ │ │ │ ├── core17_generated.hpp │ │ │ │ ├── core_name.hpp │ │ │ │ ├── core_name14_disabled.hpp │ │ │ │ ├── core_name20_static.hpp │ │ │ │ ├── detectors.hpp │ │ │ │ ├── fake_object.hpp │ │ │ │ ├── fields_count.hpp │ │ │ │ ├── for_each_field_impl.hpp │ │ │ │ ├── functional.hpp │ │ │ │ ├── io.hpp │ │ │ │ ├── make_flat_tuple_of_references.hpp │ │ │ │ ├── make_integer_sequence.hpp │ │ │ │ ├── offset_based_getter.hpp │ │ │ │ ├── possible_reflectable.hpp │ │ │ │ ├── rvalue_t.hpp │ │ │ │ ├── sequence_tuple.hpp │ │ │ │ ├── size_array.hpp │ │ │ │ ├── size_t_.hpp │ │ │ │ ├── stdarray.hpp │ │ │ │ ├── stdtuple.hpp │ │ │ │ ├── tie_from_structure_tuple.hpp │ │ │ │ └── unsafe_declval.hpp │ │ │ │ ├── functions_for.hpp │ │ │ │ ├── functors.hpp │ │ │ │ ├── io.hpp │ │ │ │ ├── io_fields.hpp │ │ │ │ ├── ops.hpp │ │ │ │ ├── ops_fields.hpp │ │ │ │ ├── traits.hpp │ │ │ │ ├── traits_fwd.hpp │ │ │ │ └── tuple_size.hpp │ │ │ ├── index.html │ │ │ └── misc │ │ │ ├── generate_cpp17.py │ │ │ └── generate_fields_names_big.cpp.py │ ├── chowdsp_serialization │ │ ├── Serialization │ │ │ ├── chowdsp_BaseSerializer.h │ │ │ ├── chowdsp_JSONSerializer.h │ │ │ ├── chowdsp_Serialization.h │ │ │ └── chowdsp_XMLSerializer.h │ │ └── chowdsp_serialization.h │ └── chowdsp_units │ │ ├── Units │ │ ├── chowdsp_TimeUnits.h │ │ └── chowdsp_UnitsBase.h │ │ └── chowdsp_units.h ├── dsp │ ├── chowdsp_buffers │ │ ├── Buffers │ │ │ ├── chowdsp_Buffer.cpp │ │ │ ├── chowdsp_Buffer.h │ │ │ ├── chowdsp_BufferHelpers.h │ │ │ ├── chowdsp_BufferIterators.h │ │ │ ├── chowdsp_BufferView.h │ │ │ ├── chowdsp_SIMDAudioBlock.h │ │ │ ├── chowdsp_SIMDBufferHelpers.h │ │ │ ├── chowdsp_StaticBuffer.cpp │ │ │ └── chowdsp_StaticBuffer.h │ │ ├── chowdsp_buffers.cpp │ │ └── chowdsp_buffers.h │ ├── chowdsp_compressor │ │ ├── Compressor │ │ │ ├── chowdsp_CompressorGainComputer.h │ │ │ ├── chowdsp_CompressorLevelDetector.h │ │ │ ├── chowdsp_GainComputerImpls.h │ │ │ ├── chowdsp_LevelDetectorImpls.h │ │ │ └── chowdsp_MonoCompressor.h │ │ └── chowdsp_compressor.h │ ├── chowdsp_dsp_data_structures │ │ ├── LookupTables │ │ │ ├── chowdsp_LookupTableCache.h │ │ │ ├── chowdsp_LookupTableTransform.cpp │ │ │ └── chowdsp_LookupTableTransform.h │ │ ├── Other │ │ │ ├── chowdsp_SmoothedBufferValue.cpp │ │ │ ├── chowdsp_SmoothedBufferValue.h │ │ │ └── chowdsp_UIToAudioPipeline.h │ │ ├── Processors │ │ │ ├── chowdsp_BufferMultiple.h │ │ │ ├── chowdsp_COLAProcessor.cpp │ │ │ ├── chowdsp_COLAProcessor.h │ │ │ ├── chowdsp_RebufferedProcessor.cpp │ │ │ └── chowdsp_RebufferedProcessor.h │ │ ├── chowdsp_dsp_data_structures.cpp │ │ ├── chowdsp_dsp_data_structures.h │ │ └── third_party │ │ │ └── moodycamel │ │ │ ├── LICENSE.md │ │ │ ├── atomicops.h │ │ │ ├── concurrentqueue.h │ │ │ └── readerwriterqueue.h │ ├── chowdsp_dsp_utils │ │ ├── Convolution │ │ │ ├── chowdsp_ConvolutionEngine.cpp │ │ │ ├── chowdsp_ConvolutionEngine.h │ │ │ ├── chowdsp_IRHelpers.cpp │ │ │ ├── chowdsp_IRHelpers.h │ │ │ └── chowdsp_IRTransfer.h │ │ ├── Delay │ │ │ ├── BBD │ │ │ │ ├── chowdsp_BBDDelayLine.h │ │ │ │ ├── chowdsp_BBDDelayWrapper.h │ │ │ │ └── chowdsp_BBDFilterBank.h │ │ │ ├── chowdsp_DelayInterpolation.h │ │ │ ├── chowdsp_DelayLine.cpp │ │ │ ├── chowdsp_DelayLine.h │ │ │ ├── chowdsp_PitchShift.cpp │ │ │ ├── chowdsp_PitchShift.h │ │ │ └── chowdsp_StaticDelayBuffer.h │ │ ├── Processors │ │ │ ├── chowdsp_AudioTimer.cpp │ │ │ ├── chowdsp_AudioTimer.h │ │ │ ├── chowdsp_BypassProcessor.cpp │ │ │ ├── chowdsp_BypassProcessor.h │ │ │ ├── chowdsp_Gain.h │ │ │ ├── chowdsp_LevelDetector.cpp │ │ │ ├── chowdsp_LevelDetector.h │ │ │ ├── chowdsp_LinearPhase3WayCrossover.h │ │ │ ├── chowdsp_OvershootLimiter.h │ │ │ ├── chowdsp_Panner.cpp │ │ │ ├── chowdsp_Panner.h │ │ │ ├── chowdsp_TunerProcessor.h │ │ │ └── chowdsp_WidthPanner.h │ │ ├── Resampling │ │ │ ├── chowdsp_BaseResampler.h │ │ │ ├── chowdsp_Downsampler.h │ │ │ ├── chowdsp_LanczosResampler.h │ │ │ ├── chowdsp_ResampledProcess.h │ │ │ ├── chowdsp_ResamplingProcessor.h │ │ │ ├── chowdsp_SRCResampler.cpp │ │ │ ├── chowdsp_SRCResampler.h │ │ │ ├── chowdsp_Upsampler.h │ │ │ ├── chowdsp_VariableOversampling.cpp │ │ │ └── chowdsp_VariableOversampling.h │ │ ├── chowdsp_dsp_utils.cpp │ │ └── chowdsp_dsp_utils.h │ ├── chowdsp_eq │ │ ├── EQ │ │ │ ├── chowdsp_EQBand.cpp │ │ │ ├── chowdsp_EQBand.h │ │ │ ├── chowdsp_EQParams.h │ │ │ ├── chowdsp_EQProcessor.cpp │ │ │ ├── chowdsp_EQProcessor.h │ │ │ ├── chowdsp_LinearPhaseEQ.cpp │ │ │ ├── chowdsp_LinearPhaseEQ.h │ │ │ ├── chowdsp_StandardEQParameters.cpp │ │ │ └── chowdsp_StandardEQParameters.h │ │ └── chowdsp_eq.h │ ├── chowdsp_filters │ │ ├── HigherOrderFilters │ │ │ ├── chowdsp_ButterworthFilter.h │ │ │ ├── chowdsp_ChebyshevIIFilter.h │ │ │ ├── chowdsp_EllipticFilter.h │ │ │ ├── chowdsp_NthOrderFilter.h │ │ │ └── chowdsp_SOSFilter.h │ │ ├── LowerOrderFilters │ │ │ ├── chowdsp_FirstOrderFilters.h │ │ │ ├── chowdsp_IIRFilter.h │ │ │ ├── chowdsp_ModFilterWrapper.cpp │ │ │ ├── chowdsp_ModFilterWrapper.h │ │ │ ├── chowdsp_SecondOrderFilters.h │ │ │ ├── chowdsp_StateVariableFilter.cpp │ │ │ └── chowdsp_StateVariableFilter.h │ │ ├── Other │ │ │ ├── chowdsp_ARPFilter.h │ │ │ ├── chowdsp_CrossoverFilter.h │ │ │ ├── chowdsp_FIRFilter.cpp │ │ │ ├── chowdsp_FIRFilter.h │ │ │ ├── chowdsp_FIRPolyphaseDecimator.h │ │ │ ├── chowdsp_FIRPolyphaseInterpolator.h │ │ │ ├── chowdsp_FractionalOrderFilter.h │ │ │ ├── chowdsp_HilbertFilter.h │ │ │ ├── chowdsp_LinkwitzRileyFilter.h │ │ │ ├── chowdsp_ThreeWayCrossoverFilter.h │ │ │ └── chowdsp_WernerFilter.h │ │ ├── Utils │ │ │ ├── chowdsp_CoefficientCalculators.h │ │ │ ├── chowdsp_ConformalMaps.h │ │ │ ├── chowdsp_FilterChain.h │ │ │ ├── chowdsp_LinearTransforms.h │ │ │ ├── chowdsp_QValCalcs.h │ │ │ └── chowdsp_VicanekHelpers.h │ │ ├── chowdsp_filters.cpp │ │ └── chowdsp_filters.h │ ├── chowdsp_math │ │ ├── Math │ │ │ ├── chowdsp_BufferMath.cpp │ │ │ ├── chowdsp_BufferMath.h │ │ │ ├── chowdsp_ChebyshevPolynomials.h │ │ │ ├── chowdsp_Combinatorics.h │ │ │ ├── chowdsp_DecibelsApprox.h │ │ │ ├── chowdsp_FloatVectorOperations.cpp │ │ │ ├── chowdsp_FloatVectorOperations.h │ │ │ ├── chowdsp_JacobiElliptic.h │ │ │ ├── chowdsp_LogApprox.h │ │ │ ├── chowdsp_MatrixOps.h │ │ │ ├── chowdsp_OtherMathOps.h │ │ │ ├── chowdsp_Polylogarithm.h │ │ │ ├── chowdsp_Polynomials.h │ │ │ ├── chowdsp_PowApprox.h │ │ │ ├── chowdsp_Power.h │ │ │ ├── chowdsp_RandomFloat.h │ │ │ ├── chowdsp_Ratio.h │ │ │ ├── chowdsp_TanhIntegrals.h │ │ │ └── chowdsp_TrigApprox.h │ │ ├── chowdsp_math.cpp │ │ ├── chowdsp_math.h │ │ └── third_party │ │ │ └── gcem │ │ │ ├── .appveyor.yml │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── main.yml │ │ │ ├── .gitignore │ │ │ ├── .lgtm.yml │ │ │ ├── .readthedocs.requirements.txt │ │ │ ├── .readthedocs.yml │ │ │ ├── .travis.yml │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE │ │ │ ├── NOTICE.txt │ │ │ ├── README.md │ │ │ ├── binder │ │ │ └── environment.yml │ │ │ ├── cmake_files │ │ │ └── gcemConfig.cmake.in │ │ │ ├── contributors.txt │ │ │ ├── include │ │ │ ├── gcem.hpp │ │ │ └── gcem_incl │ │ │ │ ├── abs.hpp │ │ │ │ ├── acos.hpp │ │ │ │ ├── acosh.hpp │ │ │ │ ├── asin.hpp │ │ │ │ ├── asinh.hpp │ │ │ │ ├── atan.hpp │ │ │ │ ├── atan2.hpp │ │ │ │ ├── atanh.hpp │ │ │ │ ├── beta.hpp │ │ │ │ ├── binomial_coef.hpp │ │ │ │ ├── ceil.hpp │ │ │ │ ├── copysign.hpp │ │ │ │ ├── cos.hpp │ │ │ │ ├── cosh.hpp │ │ │ │ ├── erf.hpp │ │ │ │ ├── erf_inv.hpp │ │ │ │ ├── exp.hpp │ │ │ │ ├── expm1.hpp │ │ │ │ ├── factorial.hpp │ │ │ │ ├── find_exponent.hpp │ │ │ │ ├── find_fraction.hpp │ │ │ │ ├── find_whole.hpp │ │ │ │ ├── floor.hpp │ │ │ │ ├── fmod.hpp │ │ │ │ ├── gcd.hpp │ │ │ │ ├── gcem_options.hpp │ │ │ │ ├── incomplete_beta.hpp │ │ │ │ ├── incomplete_beta_inv.hpp │ │ │ │ ├── incomplete_gamma.hpp │ │ │ │ ├── incomplete_gamma_inv.hpp │ │ │ │ ├── inv_sqrt.hpp │ │ │ │ ├── is_even.hpp │ │ │ │ ├── is_finite.hpp │ │ │ │ ├── is_inf.hpp │ │ │ │ ├── is_nan.hpp │ │ │ │ ├── is_odd.hpp │ │ │ │ ├── lbeta.hpp │ │ │ │ ├── lcm.hpp │ │ │ │ ├── lgamma.hpp │ │ │ │ ├── lmgamma.hpp │ │ │ │ ├── log.hpp │ │ │ │ ├── log10.hpp │ │ │ │ ├── log1p.hpp │ │ │ │ ├── log2.hpp │ │ │ │ ├── log_binomial_coef.hpp │ │ │ │ ├── mantissa.hpp │ │ │ │ ├── max.hpp │ │ │ │ ├── min.hpp │ │ │ │ ├── neg_zero.hpp │ │ │ │ ├── pow.hpp │ │ │ │ ├── pow_integral.hpp │ │ │ │ ├── quadrature │ │ │ │ ├── gauss_legendre_30.hpp │ │ │ │ └── gauss_legendre_50.hpp │ │ │ │ ├── round.hpp │ │ │ │ ├── sgn.hpp │ │ │ │ ├── signbit.hpp │ │ │ │ ├── sin.hpp │ │ │ │ ├── sinh.hpp │ │ │ │ ├── sqrt.hpp │ │ │ │ ├── tan.hpp │ │ │ │ ├── tanh.hpp │ │ │ │ ├── tgamma.hpp │ │ │ │ └── trunc.hpp │ │ │ ├── notebooks │ │ │ └── gcem.ipynb │ │ │ └── tests │ │ │ ├── CMakeLists.txt │ │ │ ├── Makefile │ │ │ ├── abs.cpp │ │ │ ├── acos.cpp │ │ │ ├── acosh.cpp │ │ │ ├── asin.cpp │ │ │ ├── asinh.cpp │ │ │ ├── atan.cpp │ │ │ ├── atan2.cpp │ │ │ ├── atanh.cpp │ │ │ ├── binomial_coef.cpp │ │ │ ├── copysign.cpp │ │ │ ├── cos.cpp │ │ │ ├── cosh.cpp │ │ │ ├── cov_check │ │ │ ├── erf.cpp │ │ │ ├── erf_inv.cpp │ │ │ ├── exp.cpp │ │ │ ├── expm1.cpp │ │ │ ├── factorial.cpp │ │ │ ├── fmod.cpp │ │ │ ├── gcd.cpp │ │ │ ├── gcem_tests.hpp │ │ │ ├── incomplete_beta.cpp │ │ │ ├── incomplete_beta_inv.cpp │ │ │ ├── incomplete_gamma.cpp │ │ │ ├── incomplete_gamma_inv.cpp │ │ │ ├── inv_sqrt.cpp │ │ │ ├── is_odd.cpp │ │ │ ├── lcm.cpp │ │ │ ├── lgamma.cpp │ │ │ ├── log.cpp │ │ │ ├── log10.cpp │ │ │ ├── log1p.cpp │ │ │ ├── log2.cpp │ │ │ ├── log_binomial_coef.cpp │ │ │ ├── other.cpp │ │ │ ├── pow.cpp │ │ │ ├── rounding.cpp │ │ │ ├── run_tests │ │ │ ├── signbit.cpp │ │ │ ├── sin.cpp │ │ │ ├── sinh.cpp │ │ │ ├── sqrt.cpp │ │ │ ├── tan.cpp │ │ │ ├── tanh.cpp │ │ │ └── tgamma.cpp │ ├── chowdsp_modal_dsp │ │ ├── ModalFilters │ │ │ ├── chowdsp_ModalFilter.cpp │ │ │ ├── chowdsp_ModalFilter.h │ │ │ ├── chowdsp_ModalFilterBank.cpp │ │ │ └── chowdsp_ModalFilterBank.h │ │ ├── chowdsp_modal_dsp.cpp │ │ └── chowdsp_modal_dsp.h │ ├── chowdsp_reverb │ │ ├── Reverb │ │ │ ├── chowdsp_ConvolutionDiffuser.h │ │ │ ├── chowdsp_DattorroInputNetwork.h │ │ │ ├── chowdsp_DattorroLattice.h │ │ │ ├── chowdsp_DattorroTankNetwork.h │ │ │ ├── chowdsp_Diffuser.cpp │ │ │ ├── chowdsp_Diffuser.h │ │ │ ├── chowdsp_FDN.cpp │ │ │ └── chowdsp_FDN.h │ │ └── chowdsp_reverb.h │ ├── chowdsp_simd │ │ ├── SIMD │ │ │ ├── chowdsp_SIMDAlignmentHelpers.h │ │ │ ├── chowdsp_SIMDComplexMathOps.h │ │ │ ├── chowdsp_SIMDDecibels.h │ │ │ ├── chowdsp_SIMDLogic.h │ │ │ ├── chowdsp_SIMDSmoothedValue.h │ │ │ ├── chowdsp_SIMDSpecialMath.h │ │ │ ├── chowdsp_SIMDUtils.h │ │ │ └── chowdsp_SampleTypeHelpers.h │ │ ├── chowdsp_simd.h │ │ └── third_party │ │ │ └── xsimd │ │ │ ├── .clang-format │ │ │ ├── .github │ │ │ ├── toolchains │ │ │ │ ├── clang-aarch64-linux-gnu.cmake │ │ │ │ ├── clang-arm-linux-gnueabihf.cmake │ │ │ │ ├── clang.cmake │ │ │ │ ├── gcc-aarch64-linux-gnu.cmake │ │ │ │ ├── gcc-arm-linux-gnueabihf.cmake │ │ │ │ └── gcc.cmake │ │ │ └── workflows │ │ │ │ ├── benchmark.yml │ │ │ │ ├── clang-format-check.yml │ │ │ │ ├── cross-sve.yml │ │ │ │ ├── cross.yml │ │ │ │ ├── cxx-versions.yml │ │ │ │ ├── doxygen.yml │ │ │ │ ├── linux.yml │ │ │ │ ├── macos.yml │ │ │ │ └── windows.yml │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── benchmark │ │ │ ├── CMakeLists.txt │ │ │ ├── main.cpp │ │ │ └── xsimd_benchmark.hpp │ │ │ ├── cmake │ │ │ └── JoinPaths.cmake │ │ │ ├── environment.yml │ │ │ ├── examples │ │ │ ├── CMakeLists.txt │ │ │ ├── mandelbrot.cpp │ │ │ └── pico_bench.hpp │ │ │ ├── include │ │ │ └── xsimd │ │ │ │ ├── arch │ │ │ │ ├── generic │ │ │ │ │ ├── xsimd_generic_arithmetic.hpp │ │ │ │ │ ├── xsimd_generic_complex.hpp │ │ │ │ │ ├── xsimd_generic_details.hpp │ │ │ │ │ ├── xsimd_generic_logical.hpp │ │ │ │ │ ├── xsimd_generic_math.hpp │ │ │ │ │ ├── xsimd_generic_memory.hpp │ │ │ │ │ ├── xsimd_generic_rounding.hpp │ │ │ │ │ └── xsimd_generic_trigo.hpp │ │ │ │ ├── xsimd_avx.hpp │ │ │ │ ├── xsimd_avx2.hpp │ │ │ │ ├── xsimd_avx512bw.hpp │ │ │ │ ├── xsimd_avx512cd.hpp │ │ │ │ ├── xsimd_avx512dq.hpp │ │ │ │ ├── xsimd_avx512f.hpp │ │ │ │ ├── xsimd_constants.hpp │ │ │ │ ├── xsimd_fma3_avx.hpp │ │ │ │ ├── xsimd_fma3_avx2.hpp │ │ │ │ ├── xsimd_fma3_sse.hpp │ │ │ │ ├── xsimd_fma4.hpp │ │ │ │ ├── xsimd_generic.hpp │ │ │ │ ├── xsimd_generic_fwd.hpp │ │ │ │ ├── xsimd_isa.hpp │ │ │ │ ├── xsimd_neon.hpp │ │ │ │ ├── xsimd_neon64.hpp │ │ │ │ ├── xsimd_scalar.hpp │ │ │ │ ├── xsimd_sse2.hpp │ │ │ │ ├── xsimd_sse3.hpp │ │ │ │ ├── xsimd_sse4_1.hpp │ │ │ │ ├── xsimd_sse4_2.hpp │ │ │ │ ├── xsimd_ssse3.hpp │ │ │ │ └── xsimd_sve.hpp │ │ │ │ ├── config │ │ │ │ ├── xsimd_arch.hpp │ │ │ │ ├── xsimd_config.hpp │ │ │ │ └── xsimd_cpuid.hpp │ │ │ │ ├── math │ │ │ │ └── xsimd_rem_pio2.hpp │ │ │ │ ├── memory │ │ │ │ ├── xsimd_aligned_allocator.hpp │ │ │ │ └── xsimd_alignment.hpp │ │ │ │ ├── types │ │ │ │ ├── xsimd_all_registers.hpp │ │ │ │ ├── xsimd_api.hpp │ │ │ │ ├── xsimd_avx2_register.hpp │ │ │ │ ├── xsimd_avx512bw_register.hpp │ │ │ │ ├── xsimd_avx512cd_register.hpp │ │ │ │ ├── xsimd_avx512dq_register.hpp │ │ │ │ ├── xsimd_avx512f_register.hpp │ │ │ │ ├── xsimd_avx_register.hpp │ │ │ │ ├── xsimd_batch.hpp │ │ │ │ ├── xsimd_batch_constant.hpp │ │ │ │ ├── xsimd_fma3_avx2_register.hpp │ │ │ │ ├── xsimd_fma3_avx_register.hpp │ │ │ │ ├── xsimd_fma3_sse_register.hpp │ │ │ │ ├── xsimd_fma4_register.hpp │ │ │ │ ├── xsimd_generic_arch.hpp │ │ │ │ ├── xsimd_neon64_register.hpp │ │ │ │ ├── xsimd_neon_register.hpp │ │ │ │ ├── xsimd_register.hpp │ │ │ │ ├── xsimd_sse2_register.hpp │ │ │ │ ├── xsimd_sse3_register.hpp │ │ │ │ ├── xsimd_sse4_1_register.hpp │ │ │ │ ├── xsimd_sse4_2_register.hpp │ │ │ │ ├── xsimd_ssse3_register.hpp │ │ │ │ ├── xsimd_sve_register.hpp │ │ │ │ ├── xsimd_traits.hpp │ │ │ │ └── xsimd_utils.hpp │ │ │ │ └── xsimd.hpp │ │ │ ├── install_sde.sh │ │ │ ├── readthedocs.yml │ │ │ ├── test │ │ │ ├── CMakeLists.txt │ │ │ ├── avx.sh │ │ │ ├── avx2.sh │ │ │ ├── main.cpp │ │ │ ├── sse.sh │ │ │ ├── sse2.sh │ │ │ ├── sse3.sh │ │ │ ├── sse4_1.sh │ │ │ ├── sse4_2.sh │ │ │ ├── ssse3.sh │ │ │ ├── test_api.cpp │ │ │ ├── test_arch.cpp │ │ │ ├── test_basic_math.cpp │ │ │ ├── test_batch.cpp │ │ │ ├── test_batch_bool.cpp │ │ │ ├── test_batch_cast.cpp │ │ │ ├── test_batch_complex.cpp │ │ │ ├── test_batch_constant.cpp │ │ │ ├── test_batch_float.cpp │ │ │ ├── test_batch_int.cpp │ │ │ ├── test_batch_manip.cpp │ │ │ ├── test_bitwise_cast.cpp │ │ │ ├── test_complex_exponential.cpp │ │ │ ├── test_complex_hyperbolic.cpp │ │ │ ├── test_complex_power.cpp │ │ │ ├── test_complex_trigonometric.cpp │ │ │ ├── test_conversion.cpp │ │ │ ├── test_error_gamma.cpp │ │ │ ├── test_explicit_batch_instantiation.cpp │ │ │ ├── test_exponential.cpp │ │ │ ├── test_extract_pair.cpp │ │ │ ├── test_fp_manipulation.cpp │ │ │ ├── test_gnu_source.cpp │ │ │ ├── test_hyperbolic.cpp │ │ │ ├── test_load_store.cpp │ │ │ ├── test_memory.cpp │ │ │ ├── test_poly_evaluation.cpp │ │ │ ├── test_power.cpp │ │ │ ├── test_rounding.cpp │ │ │ ├── test_select.cpp │ │ │ ├── test_shuffle.cpp │ │ │ ├── test_sum.cpp │ │ │ ├── test_sum.hpp │ │ │ ├── test_traits.cpp │ │ │ ├── test_trigonometric.cpp │ │ │ ├── test_utils.hpp │ │ │ └── test_xsimd_api.cpp │ │ │ ├── xsimd.pc.in │ │ │ └── xsimdConfig.cmake.in │ ├── chowdsp_sources │ │ ├── Oscillators │ │ │ ├── chowdsp_AdditiveOscillator.cpp │ │ │ ├── chowdsp_AdditiveOscillator.h │ │ │ ├── chowdsp_PolygonalOscillator.cpp │ │ │ ├── chowdsp_PolygonalOscillator.h │ │ │ ├── chowdsp_SawtoothWave.cpp │ │ │ ├── chowdsp_SawtoothWave.h │ │ │ ├── chowdsp_SineWave.cpp │ │ │ ├── chowdsp_SineWave.h │ │ │ ├── chowdsp_SquareWave.cpp │ │ │ ├── chowdsp_SquareWave.h │ │ │ ├── chowdsp_TriangleWave.cpp │ │ │ └── chowdsp_TriangleWave.h │ │ ├── Other │ │ │ ├── chowdsp_Noise.cpp │ │ │ ├── chowdsp_Noise.h │ │ │ ├── chowdsp_NoiseSynth.h │ │ │ ├── chowdsp_RepitchedSource.cpp │ │ │ └── chowdsp_RepitchedSource.h │ │ └── chowdsp_sources.h │ └── chowdsp_waveshapers │ │ ├── Waveshapers │ │ ├── chowdsp_ADAAFullWaveRectifier.h │ │ ├── chowdsp_ADAAHardClipper.h │ │ ├── chowdsp_ADAASineClipper.h │ │ ├── chowdsp_ADAASoftClipper.h │ │ ├── chowdsp_ADAATanhClipper.h │ │ ├── chowdsp_ADAAWaveshaper.h │ │ ├── chowdsp_SoftClipper.h │ │ ├── chowdsp_WaveMultiplier.h │ │ └── chowdsp_WestCoastWavefolder.h │ │ └── chowdsp_waveshapers.h ├── gui │ ├── chowdsp_foleys │ │ ├── GuiItems │ │ │ ├── chowdsp_InfoItem.h │ │ │ ├── chowdsp_OversamplingMenuItem.h │ │ │ ├── chowdsp_PresetsItem.h │ │ │ ├── chowdsp_TitleItem.h │ │ │ └── chowdsp_TooltipItem.h │ │ ├── chowdsp_MagicGUI.h │ │ └── chowdsp_foleys.h │ ├── chowdsp_gui │ │ ├── Assets │ │ │ ├── RobotoCondensed-Bold.ttf │ │ │ ├── RobotoCondensed-Regular.ttf │ │ │ ├── chowdsp_BinaryData.cpp │ │ │ ├── chowdsp_BinaryData.h │ │ │ ├── knob.svg │ │ │ └── pointer.svg │ │ ├── Helpers │ │ │ ├── chowdsp_ComponentArena.h │ │ │ ├── chowdsp_HostContextProvider.cpp │ │ │ ├── chowdsp_HostContextProvider.h │ │ │ ├── chowdsp_LongPressActionHelper.cpp │ │ │ ├── chowdsp_LongPressActionHelper.h │ │ │ ├── chowdsp_OpenGLHelper.cpp │ │ │ ├── chowdsp_OpenGLHelper.h │ │ │ ├── chowdsp_PopupMenuHelper.cpp │ │ │ └── chowdsp_PopupMenuHelper.h │ │ ├── InfoUtils │ │ │ ├── chowdsp_InfoProvider.cpp │ │ │ ├── chowdsp_InfoProvider.h │ │ │ └── chowdsp_SystemInfo.h │ │ ├── LookAndFeel │ │ │ ├── chowdsp_ChowLNF.cpp │ │ │ └── chowdsp_ChowLNF.h │ │ ├── PluginComponents │ │ │ ├── chowdsp_CPUMeter.cpp │ │ │ ├── chowdsp_CPUMeter.h │ │ │ ├── chowdsp_InfoComp.cpp │ │ │ ├── chowdsp_InfoComp.h │ │ │ ├── chowdsp_OversamplingMenu.cpp │ │ │ ├── chowdsp_OversamplingMenu.h │ │ │ ├── chowdsp_ParametersView.cpp │ │ │ ├── chowdsp_ParametersView.h │ │ │ ├── chowdsp_TitleComp.cpp │ │ │ ├── chowdsp_TitleComp.h │ │ │ ├── chowdsp_TooltipComp.cpp │ │ │ ├── chowdsp_TooltipComp.h │ │ │ └── chowdsp_WindowInPlugin.h │ │ ├── Presets │ │ │ ├── chowdsp_PresetsComp.cpp │ │ │ ├── chowdsp_PresetsComp.h │ │ │ ├── chowdsp_PresetsComponent.cpp │ │ │ └── chowdsp_PresetsComponent.h │ │ ├── chowdsp_gui.cpp │ │ └── chowdsp_gui.h │ └── chowdsp_visualizers │ │ ├── CompressorPlots │ │ ├── chowdsp_GainComputerPlot.cpp │ │ ├── chowdsp_GainComputerPlot.h │ │ ├── chowdsp_GainReductionMeter.cpp │ │ ├── chowdsp_GainReductionMeter.h │ │ ├── chowdsp_LevelDetectorVisualizer.cpp │ │ └── chowdsp_LevelDetectorVisualizer.h │ │ ├── SpectrumPlots │ │ ├── chowdsp_EQFilterPlots.h │ │ ├── chowdsp_EqualizerPlot.cpp │ │ ├── chowdsp_EqualizerPlot.h │ │ ├── chowdsp_GenericFilterPlotter.cpp │ │ ├── chowdsp_GenericFilterPlotter.h │ │ ├── chowdsp_SpectrumPlotBase.cpp │ │ └── chowdsp_SpectrumPlotBase.h │ │ ├── TimeDomain │ │ ├── chowdsp_WaveformView.cpp │ │ └── chowdsp_WaveformView.h │ │ ├── WaveshaperPlot │ │ ├── chowdsp_WaveshaperPlot.cpp │ │ └── chowdsp_WaveshaperPlot.h │ │ ├── chowdsp_visualizers.cpp │ │ └── chowdsp_visualizers.h ├── music │ └── chowdsp_rhythm │ │ └── chowdsp_rhythm.h └── plugin │ ├── chowdsp_clap_extensions │ ├── ParameterExtensions │ │ └── chowdsp_ModParamMixin.h │ ├── PluginExtensions │ │ └── chowdsp_CLAPInfoExtensions.h │ ├── PresetExtensions │ │ ├── chowdsp_CLAPPresetDiscoveryProviders.cpp │ │ └── chowdsp_CLAPPresetDiscoveryProviders.h │ ├── chowdsp_clap_extensions.cpp │ └── chowdsp_clap_extensions.h │ ├── chowdsp_fuzzy_search │ ├── Search │ │ ├── chowdsp_DatabaseWordStorage.h │ │ ├── chowdsp_SearchDatabase.h │ │ └── chowdsp_SearchHelpers.h │ └── chowdsp_fuzzy_search.h │ ├── chowdsp_parameters │ ├── Forwarding │ │ ├── chowdsp_ForwardingParameter.cpp │ │ ├── chowdsp_ForwardingParameter.h │ │ └── chowdsp_ForwardingParametersManager.h │ ├── ParamUtils │ │ ├── chowdsp_ParamUtils.cpp │ │ ├── chowdsp_ParamUtils.h │ │ ├── chowdsp_ParameterConversions.cpp │ │ ├── chowdsp_ParameterConversions.h │ │ ├── chowdsp_ParameterTypes.cpp │ │ ├── chowdsp_ParameterTypes.h │ │ ├── chowdsp_RhythmParameter.cpp │ │ └── chowdsp_RhythmParameter.h │ ├── chowdsp_parameters.cpp │ └── chowdsp_parameters.h │ ├── chowdsp_plugin_base │ ├── PluginBase │ │ ├── chowdsp_DummySynthSound.h │ │ ├── chowdsp_PluginBase.h │ │ ├── chowdsp_PluginDiagnosticInfo.h │ │ ├── chowdsp_ProgramAdapter.h │ │ └── chowdsp_SynthBase.h │ └── chowdsp_plugin_base.h │ ├── chowdsp_plugin_state │ ├── Backend │ │ ├── chowdsp_NonParamState.cpp │ │ ├── chowdsp_NonParamState.h │ │ ├── chowdsp_ParamHolder.cpp │ │ ├── chowdsp_ParamHolder.h │ │ ├── chowdsp_ParameterListeners.cpp │ │ ├── chowdsp_ParameterListeners.h │ │ ├── chowdsp_ParameterTypeHelpers.h │ │ ├── chowdsp_PluginState.h │ │ ├── chowdsp_PluginStateImpl.cpp │ │ ├── chowdsp_PluginStateImpl.h │ │ └── chowdsp_StateValue.h │ ├── Frontend │ │ ├── chowdsp_ButtonAttachment.cpp │ │ ├── chowdsp_ButtonAttachment.h │ │ ├── chowdsp_ComboBoxAttachment.cpp │ │ ├── chowdsp_ComboBoxAttachment.h │ │ ├── chowdsp_ParameterAttachment.cpp │ │ ├── chowdsp_ParameterAttachment.h │ │ ├── chowdsp_ParameterAttachmentHelpers.h │ │ ├── chowdsp_SliderAttachment.cpp │ │ ├── chowdsp_SliderAttachment.h │ │ ├── chowdsp_SliderChoiceAttachment.cpp │ │ └── chowdsp_SliderChoiceAttachment.h │ ├── chowdsp_plugin_state.cpp │ └── chowdsp_plugin_state.h │ ├── chowdsp_plugin_utils │ ├── Files │ │ ├── chowdsp_AudioFileSaveLoadHelper.cpp │ │ ├── chowdsp_AudioFileSaveLoadHelper.h │ │ ├── chowdsp_FileListener.cpp │ │ ├── chowdsp_FileListener.h │ │ ├── chowdsp_TweaksFile.cpp │ │ └── chowdsp_TweaksFile.h │ ├── SharedUtils │ │ ├── chowdsp_GlobalPluginSettings.cpp │ │ ├── chowdsp_GlobalPluginSettings.h │ │ └── chowdsp_LNFAllocator.h │ ├── State │ │ ├── chowdsp_UIState.cpp │ │ └── chowdsp_UIState.h │ ├── Threads │ │ ├── chowdsp_AudioUIBackgroundTask.cpp │ │ ├── chowdsp_AudioUIBackgroundTask.h │ │ └── chowdsp_DeferredMainThreadAction.h │ ├── chowdsp_plugin_utils.cpp │ └── chowdsp_plugin_utils.h │ ├── chowdsp_presets │ ├── Backend │ │ ├── chowdsp_Preset.cpp │ │ ├── chowdsp_Preset.h │ │ ├── chowdsp_PresetManager.cpp │ │ └── chowdsp_PresetManager.h │ ├── chowdsp_presets.cpp │ └── chowdsp_presets.h │ ├── chowdsp_presets_v2 │ ├── Backend │ │ ├── chowdsp_Preset.cpp │ │ ├── chowdsp_Preset.h │ │ ├── chowdsp_PresetManager.cpp │ │ ├── chowdsp_PresetManager.h │ │ ├── chowdsp_PresetSaverLoader.cpp │ │ ├── chowdsp_PresetSaverLoader.h │ │ ├── chowdsp_PresetState.cpp │ │ ├── chowdsp_PresetState.h │ │ ├── chowdsp_PresetTree.cpp │ │ └── chowdsp_PresetTree.h │ ├── Frontend │ │ ├── chowdsp_PresetsClipboardInterface.cpp │ │ ├── chowdsp_PresetsClipboardInterface.h │ │ ├── chowdsp_PresetsFileInterface.cpp │ │ ├── chowdsp_PresetsFileInterface.h │ │ ├── chowdsp_PresetsMenuInterface.cpp │ │ ├── chowdsp_PresetsMenuInterface.h │ │ ├── chowdsp_PresetsNextPreviousInterface.cpp │ │ ├── chowdsp_PresetsNextPreviousInterface.h │ │ ├── chowdsp_PresetsProgramAdapter.cpp │ │ ├── chowdsp_PresetsProgramAdapter.h │ │ ├── chowdsp_PresetsSettingsInterface.cpp │ │ ├── chowdsp_PresetsSettingsInterface.h │ │ ├── chowdsp_PresetsTextInterface.cpp │ │ └── chowdsp_PresetsTextInterface.h │ ├── chowdsp_presets_v2.cpp │ └── chowdsp_presets_v2.h │ └── chowdsp_version │ ├── Version │ ├── chowdsp_Version.cpp │ ├── chowdsp_Version.h │ ├── chowdsp_VersionComparisons.h │ └── chowdsp_VersionDetail.h │ ├── chowdsp_version.cpp │ └── chowdsp_version.h ├── sonar-project.properties └── tests ├── CMakeLists.txt ├── common_tests ├── CMakeLists.txt ├── chowdsp_core_test │ ├── AtomicHelpersTest.cpp │ ├── BindingsTest.cpp │ ├── CMakeLists.txt │ ├── EndOfScopeActionTest.cpp │ ├── MemoryAliasingTest.cpp │ ├── ScopedValueTest.cpp │ ├── TypeCheckersTest.cpp │ ├── TypeTraitsTest.cpp │ └── TypesListTest.cpp ├── chowdsp_data_structures_test │ ├── AbstractTreeTest.cpp │ ├── ArenaAllocatorTest.cpp │ ├── ArrayHelpersTest.cpp │ ├── BucketArrayTest.cpp │ ├── CMakeLists.txt │ ├── ChainedArenaAllocatorTest.cpp │ ├── DoubleBufferTest.cpp │ ├── EnumMapTest.cpp │ ├── IteratorsTest.cpp │ ├── LocalPointerTest.cpp │ ├── OptionalArrayTest.cpp │ ├── OptionalPointerTest.cpp │ ├── OptionalRefTest.cpp │ ├── PackedPointerTest.cpp │ ├── PoolAllocatorTest.cpp │ ├── RawObjectTest.cpp │ ├── STLArenaAllocatorTest.cpp │ ├── SmallMapTest.cpp │ ├── SmallVectorTest.cpp │ ├── StringLiteralTest.cpp │ ├── TupleHelpersTest.cpp │ └── VectorHelpersTest.cpp ├── chowdsp_json_test │ ├── CMakeLists.txt │ └── JSONTest.cpp ├── chowdsp_logging_test │ ├── CMakeLists.txt │ ├── CustomFormattingTest.cpp │ └── PluginLoggerTest.cpp ├── chowdsp_serialization_test │ ├── CMakeLists.txt │ ├── SerializationTest.cpp │ ├── TestSerialBinaryData.cpp │ └── TestSerialBinaryData.h └── chowdsp_units_test │ ├── CMakeLists.txt │ └── TimeUnitsTest.cpp ├── dsp_tests ├── CMakeLists.txt ├── chowdsp_buffers_test │ ├── BufferConversionTest.cpp │ ├── BufferIteratorsTest.cpp │ ├── BufferSpanTest.cpp │ ├── BufferTest.cpp │ ├── BufferViewTest.cpp │ ├── CMakeLists.txt │ ├── JUCEBufferViewTest.cpp │ └── SIMDBufferCopyTest.cpp ├── chowdsp_compressor_test │ ├── CMakeLists.txt │ ├── GainComputerTest.cpp │ ├── LevelDetectorTest.cpp │ └── MonoCompressorTest.cpp ├── chowdsp_dsp_data_structures_test │ ├── BufferMultipleTest.cpp │ ├── CMakeLists.txt │ ├── LookupTableTest.cpp │ ├── RebufferProcessorTest.cpp │ ├── SmoothedBufferValueTest.cpp │ └── UIToAudioPipelineTest.cpp ├── chowdsp_dsp_juce_test │ ├── CMakeLists.txt │ ├── DiffuserTest.cpp │ ├── FIRFilterTest.cpp │ ├── LinearPhaseEQTest.cpp │ ├── convolution_tests │ │ ├── ConvolutionTest.cpp │ │ └── IRHelpersTest.cpp │ ├── data_structures_tests │ │ ├── BufferMathTest.cpp │ │ ├── COLAProcessorTest.cpp │ │ └── SmoothedBufferValueTest.cpp │ ├── resampling_tests │ │ └── VariableOversamplingTest.cpp │ └── source_tests │ │ ├── NoiseSynthTest.cpp │ │ ├── NoiseTest.cpp │ │ └── RepitchedSourceTest.cpp ├── chowdsp_dsp_utils_test │ ├── AudioTimerTest.cpp │ ├── BBDTest.cpp │ ├── BypassTest.cpp │ ├── CMakeLists.txt │ ├── GainTest.cpp │ ├── LevelDetectorTest.cpp │ ├── OvershootLimiterTest.cpp │ ├── PannerTest.cpp │ ├── PitchShiftTest.cpp │ ├── TunerTest.cpp │ ├── WidthPannerTest.cpp │ └── resampling_tests │ │ ├── ResamplerTest.cpp │ │ └── UpsampleDownsampleTest.cpp ├── chowdsp_filters_test │ ├── ButterQsTest.cpp │ ├── ButterworthFilterTest.cpp │ ├── CMakeLists.txt │ ├── ChebyshevIIFilterTest.cpp │ ├── ConformalMapsTest.cpp │ ├── CrossoverFilterTest.cpp │ ├── EllipticFilterTest.cpp │ ├── FIRPolyphaseDecimatorTest.cpp │ ├── FIRPolyphaseInterpolatorTest.cpp │ ├── FilterChainTest.cpp │ ├── FirstOrderFiltersTest.cpp │ ├── FractionalOrderFilterTest.cpp │ ├── HilbertFilterTest.cpp │ ├── LinearTransformsTest.cpp │ ├── ModFilterWrapperTest.cpp │ ├── NthOrderFilterTest.cpp │ ├── SecondOrderFiltersTest.cpp │ ├── ShelfFilterTest.cpp │ ├── StateVariableFilterTest.cpp │ └── WernerFilterTest.cpp ├── chowdsp_math_test │ ├── CMakeLists.txt │ ├── ChebyshevPolynomialTest.cpp │ ├── CombinatoricsTest.cpp │ ├── DecibelsApproxTest.cpp │ ├── FloatVectorOperationsTest.cpp │ ├── JacobiEllipticTest.cpp │ ├── LogApproxTest.cpp │ ├── MatrixOpsTest.cpp │ ├── OtherMathOpsTest.cpp │ ├── PolylogarithmTest.cpp │ ├── PolynomialsTest.cpp │ ├── PowApproxTest.cpp │ ├── PowerTest.cpp │ ├── RandomFloatTest.cpp │ ├── RatioTest.cpp │ └── TrigApproxTest.cpp ├── chowdsp_modal_dsp_test │ ├── CMakeLists.txt │ ├── ModalFilterBankTest.cpp │ └── ModalFilterTest.cpp ├── chowdsp_simd_test │ ├── CMakeLists.txt │ ├── SIMDAlignmentHelpersTest.cpp │ ├── SIMDSmoothedValueTest.cpp │ └── SIMDSpecialMathTest.cpp ├── chowdsp_sources_test │ ├── AdditiveOscTest.cpp │ ├── CMakeLists.txt │ ├── PolygonalTest.cpp │ ├── SawtoothTest.cpp │ ├── SineTest.cpp │ ├── SquareTest.cpp │ └── TriangleTest.cpp └── chowdsp_waveshapers_test │ ├── ADAAFullWaveRectifierTest.cpp │ ├── ADAAHardClipperTest.cpp │ ├── ADAASineClipperTest.cpp │ ├── ADAASoftClipperTest.cpp │ ├── ADAATanhClipperTest.cpp │ ├── CMakeLists.txt │ ├── LookupTableLoadingTest.cpp │ ├── SoftClipperTest.cpp │ ├── WaveMultiplierTest.cpp │ └── WestCoastFolderTest.cpp ├── gui_tests ├── CMakeLists.txt ├── chowdsp_foleys_test │ ├── CMakeLists.txt │ └── FoleysTest.cpp ├── chowdsp_gui_test │ ├── CMakeLists.txt │ ├── ComponentArenaTest.cpp │ ├── HostContextProviderTest.cpp │ ├── LongPressActionTest.cpp │ ├── OpenGLHelperTest.cpp │ ├── OversamplingMenuTest.cpp │ ├── ParametersViewTest.cpp │ ├── PopupMenuHelperTest.cpp │ ├── PresetsCompTest.cpp │ └── WindowInPluginTest.cpp ├── chowdsp_visualizers_test │ ├── CMakeLists.txt │ ├── EQFilterPlotsTest.cpp │ ├── EqualizerPlotTest.cpp │ ├── GainComputerPlotTest.cpp │ ├── GenericFilterPlotTest.cpp │ ├── Images │ │ ├── eq_response_plot.png │ │ ├── freq_grid_plot.png │ │ ├── gain_computer_plot.png │ │ ├── generic_filter_plot.png │ │ ├── level_detector.png │ │ ├── waveform_view.png │ │ └── waveshaper_plot.png │ ├── LevelDetectorTest.cpp │ ├── SpectrumPlotBaseTest.cpp │ ├── VizTestUtils.h │ ├── WaveformViewTest.cpp │ └── WaveshaperPlotTest.cpp └── live_gui_test │ ├── CMakeLists.txt │ └── LiveGUITest.cpp ├── music_tests ├── CMakeLists.txt └── chowdsp_rhythm_test │ ├── CMakeLists.txt │ └── RhythmUtilsTest.cpp ├── plugin_tests ├── CMakeLists.txt ├── chowdsp_fuzzy_search_test │ ├── CMakeLists.txt │ ├── FuzzySearchTest.cpp │ └── TestData.h ├── chowdsp_parameters_test │ ├── CMakeLists.txt │ ├── ForwardingParameterTest.cpp │ ├── ParamHelpersTest.cpp │ ├── ParamModulationTest.cpp │ ├── ParamStringsTest.cpp │ └── RhythmParameterTest.cpp ├── chowdsp_plugin_base_test │ ├── CMakeLists.txt │ ├── PluginBaseTest.cpp │ └── PluginDiagnosticInfoTest.cpp ├── chowdsp_plugin_state_test │ ├── CMakeLists.txt │ ├── ParamHolderTest.cpp │ ├── ParameterAttachmentsTest.cpp │ ├── StateListenersTest.cpp │ ├── StatePluginInterfaceTest.cpp │ ├── StateSerializationTest.cpp │ └── VersionStreamingTest.cpp ├── chowdsp_plugin_utils_test │ ├── AudioFileSaveLoadHelperTest.cpp │ ├── AudioUIBackgroundTaskTest.cpp │ ├── CMakeLists.txt │ ├── DeferredActionTest.cpp │ ├── FileListenerTest.cpp │ ├── GlobalSettingsTest.cpp │ ├── LNFAllocatorTest.cpp │ ├── TweaksFileTest.cpp │ └── UIStateTest.cpp ├── chowdsp_presets_test │ ├── CMakeLists.txt │ ├── PresetManagerTest.cpp │ ├── PresetTest.cpp │ ├── TestPresetBinaryData.cpp │ ├── TestPresetBinaryData.h │ └── test_preset.preset ├── chowdsp_presets_v2_test │ ├── CLAPPresetsDiscoveryTest.cpp │ ├── CMakeLists.txt │ ├── ClipboardInterfaceTest.cpp │ ├── FileInterfaceTest.cpp │ ├── MenuInterfaceTest.cpp │ ├── NextPreviousTest.cpp │ ├── PresetManagerTest.cpp │ ├── PresetTest.cpp │ ├── PresetTreeTest.cpp │ ├── ProgramAdapterTest.cpp │ ├── SettingsInterfaceTest.cpp │ ├── TestPresetBinaryData.cpp │ ├── TestPresetBinaryData.h │ └── TextInterfaceTest.cpp └── chowdsp_version_test │ ├── CMakeLists.txt │ └── VersionUtilsTest.cpp ├── static_tests ├── BypassMismatchedLatencyTypes_fail.cpp ├── CMakeLists.txt ├── ConstexprMath_pass.cpp ├── CorrectContainers_pass.cpp ├── HasMemberMethodTest_pass.cpp ├── HasMemberTest_pass.cpp ├── HasStaticMemberTest_pass.cpp ├── HasStaticMethodTest_pass.cpp ├── LanczosKernel4_pass.cpp ├── LanczosKernel5_fail.cpp ├── ModFilterHighOrder_fail.cpp ├── ModFilterLowOrder_pass.cpp ├── SOSFilterEven_pass.cpp ├── SOSFilterOdd_fail.cpp └── SoftClipperBadOrder_fail.cpp └── test_utils ├── CatchTestRunner.cpp ├── CatchUtils.h ├── CodeQuality.cpp ├── DummyPlugin.h ├── JUCETestRunner.cpp ├── TimedUnitTest.h └── test_utils.h /.github/workflows/auto-format.yml: -------------------------------------------------------------------------------- 1 | name: Auto-formatter 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | paths: 8 | - '**.cpp' 9 | - '**.h' 10 | 11 | workflow_dispatch: 12 | 13 | jobs: 14 | build_and_test: 15 | name: Apply clang-format to pull request 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Install Linux Deps 20 | run: | 21 | sudo apt update 22 | sudo apt -y install clang-format-14 23 | clang-format-14 --version 24 | 25 | - name: Checkout code 26 | uses: actions/checkout@v2 27 | with: 28 | persist-credentials: false 29 | fetch-depth: 0 30 | 31 | - name: Run clang-format 32 | run: find . -iname "*.h" -o -iname "*.cpp" | xargs clang-format-14 -style=file -verbose -i 33 | 34 | - name: Show changes files 35 | run: git diff --name-only 36 | 37 | - name: Commit & Push changes 38 | uses: actions-js/push@master 39 | with: 40 | message: "Apply clang-format" 41 | branch: ${{ github.head_ref }} 42 | github_token: ${{ secrets.GITHUB_TOKEN }} 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *build*/ 2 | cmake-build*/ 3 | .vscode/ 4 | docs/ 5 | .idea/ 6 | Testing/ 7 | 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # chowdsp_utils 2 | 3 | Each module in this repository has its own unique license. If you would like to use code from one of the modules, please check the license of that particular module. 4 | 5 | If you are making a proprietary or closed source app and would like to use code from a module that is under a GPL-style license, please contact chowdsp@gmail.com for non-GPL licensing options. 6 | 7 | All non-module code in this repository (tests, examples, benchmarks, etc.) is licensed under the GPLv3. 8 | -------------------------------------------------------------------------------- /bench/bench_utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace bench_utils 7 | { 8 | template > 9 | inline auto makeRandomVector (int num) 10 | { 11 | std::random_device rnd_device; 12 | std::mt19937 mersenne_engine { rnd_device() }; // Generates random integers 13 | std::normal_distribution dist { (T) 0, (T) 1 }; 14 | 15 | std::vector vec ((size_t) num); 16 | std::generate (vec.begin(), vec.end(), [&dist, &mersenne_engine]() 17 | { return dist (mersenne_engine); }); 18 | 19 | return std::move (vec); 20 | } 21 | } // namespace bench_utils 22 | -------------------------------------------------------------------------------- /cmake/CPM.cmake: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: MIT 2 | # 3 | # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors 4 | 5 | set(CPM_DOWNLOAD_VERSION 0.40.2) 6 | set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d") 7 | 8 | if(CPM_SOURCE_CACHE) 9 | set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") 10 | elseif(DEFINED ENV{CPM_SOURCE_CACHE}) 11 | set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") 12 | else() 13 | set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") 14 | endif() 15 | 16 | # Expand relative path. This is important if the provided path contains a tilde (~) 17 | get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE) 18 | 19 | file(DOWNLOAD 20 | https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake 21 | ${CPM_DOWNLOAD_LOCATION} EXPECTED_HASH SHA256=${CPM_HASH_SUM} 22 | ) 23 | 24 | include(${CPM_DOWNLOAD_LOCATION}) 25 | -------------------------------------------------------------------------------- /cmake/SubprojectVersion.cmake: -------------------------------------------------------------------------------- 1 | # subproject_version( ) 2 | # 3 | # Extract version of a sub-project, which was previously included with add_subdirectory(). 4 | function(subproject_version subproject_name VERSION_VAR) 5 | # Read CMakeLists.txt for subproject and extract project() call(s) from it. 6 | file(STRINGS "${${subproject_name}_SOURCE_DIR}/CMakeLists.txt" project_calls REGEX "[ \t]*project\\(") 7 | # For every project() call try to extract its VERSION option 8 | foreach(project_call ${project_calls}) 9 | string(REGEX MATCH "VERSION[ ]+([^ )]+)" version_param "${project_call}") 10 | if(version_param) 11 | set(version_value "${CMAKE_MATCH_1}") 12 | endif() 13 | endforeach() 14 | if(version_value) 15 | set(${VERSION_VAR} "${version_value}" PARENT_SCOPE) 16 | else() 17 | message("WARNING: Cannot extract version for subproject '${subproject_name}'") 18 | endif() 19 | 20 | endfunction(subproject_version) 21 | -------------------------------------------------------------------------------- /cmake/test/EnableCoverageFlags.cmake: -------------------------------------------------------------------------------- 1 | # enable_coverage_flags() 2 | # 3 | # Enables code coverage flags for this target 4 | function(enable_coverage_flags target) 5 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") 6 | # Add required flags (GCC & LLVM/Clang) 7 | message(STATUS "${target} -- Appending code coverage compiler flags: -O0 -g --coverage") 8 | target_compile_options(${target} PUBLIC 9 | -O0 # no optimization 10 | -g # generate debug info 11 | --coverage # sets all required flags 12 | ) 13 | 14 | target_link_options(${target} PUBLIC --coverage) 15 | else() # MSVC 16 | message(STATUS "${target} -- Appending code coverage compiler flags for MSVC") 17 | target_compile_definitions(${target} PRIVATE 18 | CHOWDSP_MSVC_COVERAGE=1 19 | ) 20 | endif() 21 | endfunction(enable_coverage_flags) -------------------------------------------------------------------------------- /cmake/test/StaticTest.cmake: -------------------------------------------------------------------------------- 1 | option(SHOULD_PASS "Should compilation succeed?" ON) 2 | 3 | execute_process( 4 | COMMAND cmake --build build --parallel --target static_test_dummy_executable 5 | RESULT_VARIABLE res_var 6 | ) 7 | 8 | if(SHOULD_PASS) 9 | if("${res_var}" STREQUAL "0") 10 | message(STATUS "Compiler succeeded as expected.") 11 | else() 12 | message(FATAL_ERROR "Compiler should have succeeded!") 13 | endif() 14 | else() 15 | if("${res_var}" STREQUAL "0") 16 | message(FATAL_ERROR "Compiler should have failed!") 17 | else() 18 | message(STATUS "Compiler failed as expected.") 19 | endif() 20 | endif() 21 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "modules/common/chowdsp_core/JUCEHelpers/**" 3 | - "modules/plugin/chowdsp_presets/**/*.h" 4 | - "modules/plugin/chowdsp_presets/**/*.cpp" 5 | - "modules/gui/chowdsp_foleys" 6 | - "modules/gui/chowdsp_gui/Presets" 7 | - "**/third_party/**" 8 | - "build/**" 9 | - "tests/**" 10 | -------------------------------------------------------------------------------- /doxygen/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all deploy clean 2 | 3 | all: 4 | doxygen Doxyfile 5 | 6 | clean: 7 | rm -Rf ../docs/** 8 | 9 | deploy: all 10 | scp -r ../docs jatin@ccrma-gate.stanford.edu:~/Library/Web/chowdsp/chowdsp_utils 11 | -------------------------------------------------------------------------------- /doxygen/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/doxygen/logo.png -------------------------------------------------------------------------------- /examples/AccessiblePlugin/AccessiblePlugin.cpp: -------------------------------------------------------------------------------- 1 | #include "AccessiblePlugin.h" 2 | #include "AccessiblePluginEditor.h" 3 | 4 | AccessiblePlugin::AccessiblePlugin() = default; 5 | 6 | void AccessiblePlugin::addParameters (Parameters& params) 7 | { 8 | using namespace chowdsp::ParamUtils; 9 | createPercentParameter (params, { "dummy", 100 }, "Dummy", 0.5f); 10 | } 11 | 12 | juce::AudioProcessorEditor* AccessiblePlugin::createEditor() 13 | { 14 | return new AccessiblePluginEditor (*this); 15 | } 16 | 17 | // This creates new instances of the plugin 18 | juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter() 19 | { 20 | return new AccessiblePlugin(); 21 | } 22 | -------------------------------------------------------------------------------- /examples/AccessiblePlugin/AccessiblePlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class AccessiblePlugin : public chowdsp::PluginBase 6 | { 7 | public: 8 | AccessiblePlugin(); 9 | 10 | static void addParameters (Parameters& params); 11 | 12 | void prepareToPlay (double, int) override {} 13 | void releaseResources() override {} 14 | void processAudioBlock (juce::AudioBuffer&) override {} 15 | 16 | juce::AudioProcessorEditor* createEditor() override; 17 | 18 | private: 19 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AccessiblePlugin) 20 | }; 21 | -------------------------------------------------------------------------------- /examples/AccessiblePlugin/AccessiblePluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "AccessiblePlugin.h" 4 | #include "TabbedComponent.h" 5 | 6 | class AccessiblePluginEditor : public juce::AudioProcessorEditor 7 | { 8 | public: 9 | explicit AccessiblePluginEditor (AccessiblePlugin& plugin); 10 | 11 | void resized() override; 12 | void paint (juce::Graphics& g) override; 13 | 14 | private: 15 | AccessiblePlugin& plugin; 16 | 17 | TabbedComponent tabs { juce::TabbedButtonBar::TabsAtTop }; 18 | 19 | juce::Slider slider; 20 | juce::ComboBox menu; 21 | juce::TextButton button; 22 | 23 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AccessiblePluginEditor) 24 | }; 25 | -------------------------------------------------------------------------------- /examples/AccessiblePlugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(AccessiblePlugin Acs4) 2 | 3 | target_sources(AccessiblePlugin 4 | PRIVATE 5 | AccessiblePlugin.cpp 6 | AccessiblePluginEditor.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /examples/AccessiblePlugin/TabbedComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class TabbedComponent : public juce::TabbedComponent 6 | { 7 | public: 8 | explicit TabbedComponent (juce::TabbedButtonBar::Orientation buttonOrientation) : juce::TabbedComponent (buttonOrientation) {} 9 | 10 | protected: 11 | juce::TabBarButton* createTabButton (const juce::String& tabName, int tabIndex) override 12 | { 13 | auto* newButton = juce::TabbedComponent::createTabButton (tabName, tabIndex); 14 | newButton->setAccessible (true); 15 | newButton->setWantsKeyboardFocus (true); 16 | newButton->setDescription ("Tab: " + tabName); 17 | 18 | return newButton; 19 | } 20 | 21 | private: 22 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TabbedComponent) 23 | }; 24 | -------------------------------------------------------------------------------- /examples/AutoWah/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(AutoWah Auw3) 2 | 3 | target_link_libraries(AutoWah 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_dsp_utils 7 | ) 8 | 9 | target_sources(AutoWah 10 | PRIVATE 11 | AutoWahPlugin.cpp 12 | ) 13 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(CPM) 2 | 3 | # download JUCE 4 | CPMAddPackage( 5 | NAME juce 6 | GITHUB_REPOSITORY juce-framework/juce 7 | GIT_TAG 7.0.12 8 | ) 9 | 10 | include(AddJUCEModules) 11 | 12 | # OSX deployment target must be defined at a project level 13 | set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment target" FORCE) 14 | project(chowdsp_utils_examples VERSION 2.3.0) 15 | 16 | # download CLAP extensions 17 | CPMAddPackage( 18 | NAME clap-juce-extensions 19 | GITHUB_REPOSITORY free-audio/clap-juce-extensions 20 | GIT_TAG e72d59a870ab6dea156d4912cbd004b715fca5f7 21 | ) 22 | 23 | include(SetupExamplePlugin) 24 | 25 | # Treat warnings as errors 26 | add_compile_options( 27 | $<$:/WX> 28 | $<$>:-Werror> 29 | ) 30 | 31 | add_subdirectory(SimpleEQ) 32 | add_subdirectory(SimpleReverb) 33 | add_subdirectory(SignalGenerator) 34 | add_subdirectory(ModalSpringReverb) 35 | add_subdirectory(AutoWah) 36 | add_subdirectory(AccessiblePlugin) 37 | add_subdirectory(ForwardingTestPlugin) 38 | add_subdirectory(StatefulPlugin) 39 | add_subdirectory(ExampleCompressor) 40 | -------------------------------------------------------------------------------- /examples/ExampleCompressor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(ExampleCompressor EC0m) 2 | 3 | target_link_libraries(ExampleCompressor 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_compressor 7 | chowdsp::chowdsp_plugin_utils 8 | chowdsp::chowdsp_plugin_state 9 | chowdsp::chowdsp_gui 10 | chowdsp::chowdsp_visualizers 11 | ) 12 | 13 | target_sources(ExampleCompressor 14 | PRIVATE 15 | ExampleCompressor.cpp 16 | PluginEditor.cpp 17 | ) -------------------------------------------------------------------------------- /examples/ForwardingTestPlugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(ForwardingTestPlugin sRvb) 2 | 3 | target_link_libraries(ForwardingTestPlugin 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_reverb 7 | chowdsp::chowdsp_sources 8 | chowdsp::chowdsp_dsp_utils 9 | chowdsp::chowdsp_plugin_state 10 | chowdsp::chowdsp_gui 11 | ) 12 | 13 | target_sources(ForwardingTestPlugin 14 | PRIVATE 15 | ForwardingTestPlugin.cpp 16 | PluginEditor.cpp 17 | 18 | ../SignalGenerator/SignalGeneratorPlugin.cpp 19 | ../SimpleReverb/SimpleReverbPlugin.cpp 20 | 21 | InternalPlugins/WernerFilterPlugin.cpp 22 | InternalPlugins/ARPFilterPlugin.cpp 23 | InternalPlugins/PolygonalOscPlugin.cpp 24 | InternalPlugins/BandSplitPlugin.cpp 25 | InternalPlugins/PlateReverb.cpp 26 | InternalPlugins/PolyphaseOversamplingPlugin.cpp 27 | ) 28 | 29 | target_compile_definitions(ForwardingTestPlugin 30 | PRIVATE 31 | CHOWDSP_BUILDING_FORWARDING_TEST_PLUGIN=1 32 | ) 33 | -------------------------------------------------------------------------------- /examples/ForwardingTestPlugin/InternalPlugins/PolygonalOscPlugin.cpp: -------------------------------------------------------------------------------- 1 | #include "PolygonalOscPlugin.h" 2 | 3 | PolygonalOscPlugin::PolygonalOscPlugin() = default; 4 | 5 | void PolygonalOscPlugin::prepareToPlay (double sampleRate, int samplesPerBlock) 6 | { 7 | const auto spec = juce::dsp::ProcessSpec { sampleRate, (uint32_t) samplesPerBlock, (uint32_t) getMainBusNumInputChannels() }; 8 | oscillator.prepare (spec); 9 | gain.prepare (spec); 10 | gain.setRampDurationSeconds (0.05); 11 | } 12 | 13 | void PolygonalOscPlugin::processAudioBlock (juce::AudioBuffer& buffer) 14 | { 15 | buffer.clear(); 16 | 17 | oscillator.setFrequency (*state.params.freqParam); 18 | oscillator.setOrder (*state.params.orderParam); 19 | oscillator.setTeeth (*state.params.teethParam); 20 | oscillator.processBlock (buffer); 21 | 22 | gain.setGainDecibels (*state.params.gainParam); 23 | gain.process (buffer); 24 | } 25 | -------------------------------------------------------------------------------- /examples/ForwardingTestPlugin/PluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ForwardingTestPlugin.h" 4 | 5 | class PluginEditor : public juce::AudioProcessorEditor 6 | { 7 | public: 8 | explicit PluginEditor (ForwardingTestPlugin& plugin); 9 | ~PluginEditor() override; 10 | 11 | void resized() override; 12 | void paint (juce::Graphics& g) override; 13 | 14 | private: 15 | void updateProcessorEditor (int processorIndex); 16 | 17 | ForwardingTestPlugin& plugin; 18 | 19 | juce::GenericAudioProcessorEditor mainEditor; 20 | std::unique_ptr processorEditor; 21 | 22 | chowdsp::ScopedCallback processorChangedCallback; 23 | 24 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginEditor) 25 | }; 26 | -------------------------------------------------------------------------------- /examples/ModalSpringReverb/.gitignore: -------------------------------------------------------------------------------- 1 | *.wav 2 | -------------------------------------------------------------------------------- /examples/ModalSpringReverb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(ModalSpringReverb msRv) 2 | 3 | target_link_libraries(ModalSpringReverb 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_modal_dsp 7 | chowdsp::chowdsp_sources 8 | chowdsp::chowdsp_plugin_state 9 | ) 10 | 11 | target_sources(ModalSpringReverb 12 | PRIVATE 13 | ModalReverbPlugin.cpp 14 | ) 15 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # chowdsp_utils Examples 2 | 3 | Example plugins to demonstrate how to use these modules in the wild: 4 | - SimpleEQ: A basic 3-band EQ with a linear phase option 5 | - SimpleReverb: A basic Feedback Delay Network reverb 6 | - SignalGenerator: A coupele of oscillators plus oversampling options 7 | - ModalSpringReverb: A modal reverb generated from the modal response of a spring reverb unit 8 | - AutoWah: A filter with audio-rate modulation (see `chowdsp::ModFilterWrapper`) 9 | - AccessiblePlugin: Working example for usage of the JUCE Accessibility API 10 | - ForwardingTestPlugin: An example plugin demonstrating usage of `chowdsp::ForwardingParameter` 11 | -------------------------------------------------------------------------------- /examples/SignalGenerator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(SignalGenerator Sggb) 2 | 3 | target_link_libraries(SignalGenerator 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_dsp_utils 7 | chowdsp::chowdsp_sources 8 | chowdsp::chowdsp_waveshapers 9 | chowdsp::chowdsp_plugin_state 10 | chowdsp::chowdsp_gui 11 | ) 12 | 13 | target_sources(SignalGenerator 14 | PRIVATE 15 | SignalGeneratorPlugin.cpp 16 | ) 17 | 18 | include(AddDiagnosticInfo) 19 | add_diagnostic_info(SignalGenerator) 20 | -------------------------------------------------------------------------------- /examples/SimpleEQ/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(SimpleEQ linP) 2 | 3 | target_link_libraries(SimpleEQ 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_serialization 7 | chowdsp::chowdsp_eq 8 | chowdsp::chowdsp_plugin_state 9 | chowdsp::chowdsp_visualizers 10 | ) 11 | 12 | target_sources(SimpleEQ 13 | PRIVATE 14 | SimpleEQPlugin.cpp 15 | PluginEditor.cpp 16 | FilterPlots.cpp 17 | ) 18 | target_compile_definitions(SimpleEQ 19 | PRIVATE 20 | CHOWDSP_BUFFER_MAX_NUM_CHANNELS=2 21 | ) 22 | -------------------------------------------------------------------------------- /examples/SimpleEQ/FilterPlots.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class FilterPlots : public chowdsp::EQ::EqualizerPlotWithParameters<3> 7 | { 8 | public: 9 | FilterPlots (chowdsp::PluginState& pluginState, chowdsp::EQ::StandardEQParameters<3>& eqParameters); 10 | 11 | void paint (juce::Graphics& g) override; 12 | 13 | private: 14 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FilterPlots) 15 | }; 16 | -------------------------------------------------------------------------------- /examples/SimpleEQ/PluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "SimpleEQPlugin.h" 4 | #include "FilterPlots.h" 5 | 6 | class PluginEditor : public juce::AudioProcessorEditor 7 | { 8 | public: 9 | explicit PluginEditor (SimpleEQPlugin& plugin); 10 | 11 | void paint (juce::Graphics& g) override; 12 | void resized() override; 13 | 14 | private: 15 | SimpleEQPlugin& plugin; 16 | 17 | juce::GenericAudioProcessorEditor genericEditor; 18 | 19 | FilterPlots plots; 20 | 21 | juce::TextButton saveButton { "Save EQ Params" }, loadButton { "Load EQ Params" }; 22 | 23 | std::shared_ptr fileChooser; 24 | 25 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginEditor) 26 | }; 27 | -------------------------------------------------------------------------------- /examples/SimpleReverb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(SimpleReverb sRvb) 2 | 3 | target_link_libraries(SimpleReverb 4 | PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_reverb 7 | chowdsp::chowdsp_sources 8 | chowdsp::chowdsp_plugin_state 9 | chowdsp::chowdsp_gui 10 | ) 11 | 12 | target_sources(SimpleReverb 13 | PRIVATE 14 | SimpleReverbPlugin.cpp 15 | ) 16 | -------------------------------------------------------------------------------- /examples/StatefulPlugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_example_plugin(StatefulPlugin S8fl) 2 | 3 | target_link_libraries(StatefulPlugin 4 | PRIVATE 5 | chowdsp::chowdsp_plugin_state 6 | chowdsp::chowdsp_plugin_utils 7 | chowdsp::chowdsp_presets_v2 8 | chowdsp::chowdsp_gui 9 | ) 10 | 11 | target_sources(StatefulPlugin 12 | PRIVATE 13 | StatefulPlugin.cpp 14 | PluginEditor.cpp 15 | ) 16 | 17 | target_compile_definitions(StatefulPlugin 18 | PUBLIC 19 | JUCE_MODAL_LOOPS_PERMITTED=1 20 | ) 21 | -------------------------------------------------------------------------------- /examples/StatefulPlugin/PluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "StatefulPlugin.h" 5 | 6 | class PluginEditor : public juce::AudioProcessorEditor, 7 | private juce::ChangeListener 8 | { 9 | public: 10 | explicit PluginEditor (StatefulPlugin& plug); 11 | ~PluginEditor() override; 12 | 13 | void resized() override; 14 | 15 | private: 16 | void changeListenerCallback (juce::ChangeBroadcaster* source) override; 17 | 18 | StatefulPlugin& plugin; 19 | 20 | chowdsp::ParametersViewEditor paramsView; 21 | 22 | chowdsp::presets::frontend::FileInterface presetsFileInterface { plugin.getPresetManager(), &(*plugin.presetsSettings) }; 23 | chowdsp::presets::PresetsComponent presetsComp { plugin.getPresetManager(), &presetsFileInterface }; 24 | 25 | void refreshUndoRedoButtons(); 26 | juce::TextButton undoButton { "UNDO" }; 27 | juce::TextButton redoButton { "REDO" }; 28 | 29 | chowdsp::ScopedCallbackList editorStateCallbacks; 30 | 31 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginEditor) 32 | }; 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/DataStructures/chowdsp_ScopedValue.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** 6 | * Scoped object that stores a value from a variable on construction 7 | * and writes the final value back to that variable on deletion. 8 | * 9 | * For tight inner loops in DSP code, accessing member variables 10 | * isn't always ideal, since the compiler can't optimize as much 11 | * as it can for locally stored values. In those situations, construct 12 | * a ScopedValue with the member variable before the loop, and the final 13 | * value will be stored back in the member when it goes out of scope. 14 | */ 15 | template 16 | class ScopedValue 17 | { 18 | public: 19 | explicit ScopedValue (T& val) : value (val), ref (val) {} 20 | 21 | ~ScopedValue() { ref = value; } 22 | 23 | /** Returns a reference to the value */ 24 | inline T& get() { return value; } 25 | 26 | private: 27 | T value; 28 | T& ref; 29 | 30 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ScopedValue) 31 | }; 32 | } // namespace chowdsp 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/DataStructures/chowdsp_StringHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | #if CHOWDSP_USING_JUCE 6 | /** Converts a std::string_view to a juce::String */ 7 | inline juce::String toString (const std::string_view& sv) noexcept 8 | { 9 | return juce::String::fromUTF8 (sv.data(), (int) sv.size()); 10 | } 11 | 12 | inline std::string_view toStringView (const juce::String& str) noexcept 13 | { 14 | return { str.toRawUTF8(), str.getNumBytesAsUTF8() }; 15 | } 16 | #endif 17 | } // namespace chowdsp 18 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/Functional/chowdsp_EndOfScopeAction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** 6 | * A struct that will run some code in it's destructor. 7 | * Inspired by: https://www.gingerbill.org/article/2015/08/19/defer-in-cpp/ 8 | */ 9 | template 10 | struct EndOfScopeAction 11 | { 12 | explicit EndOfScopeAction (Func&& func) : f (std::move (func)) {} 13 | ~EndOfScopeAction() { f(); } 14 | 15 | EndOfScopeAction (const EndOfScopeAction&) = delete; 16 | EndOfScopeAction& operator= (const EndOfScopeAction&) = delete; 17 | 18 | EndOfScopeAction (EndOfScopeAction&&) noexcept = default; 19 | EndOfScopeAction& operator= (EndOfScopeAction&&) noexcept = default; 20 | 21 | private: 22 | Func f; 23 | }; 24 | 25 | /** Helper for creating an EndOfScopeAction */ 26 | template 27 | [[nodiscard]] EndOfScopeAction runAtEndOfScope (Func&& f) 28 | { 29 | return EndOfScopeAction { std::forward (f) }; 30 | } 31 | } // namespace chowdsp 32 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/JUCEHelpers/dsp/juce_ProcessSpec.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace juce::dsp 4 | { 5 | /** Copy of juce::dsp::ProcessSpec */ 6 | struct ProcessSpec 7 | { 8 | /** The sample rate that will be used for the data that is sent to the processor. */ 9 | double sampleRate; 10 | 11 | /** The maximum number of samples that will be in the blocks sent to process() method. */ 12 | uint32_t maximumBlockSize; 13 | 14 | /** The number of channels that the process() method will be expected to handle. */ 15 | uint32_t numChannels; 16 | 17 | // Note: I'd prefer to use `int` for the integer types, but we need `uint32_t` for compatibility with JUCE. 18 | }; 19 | } // namespace juce::dsp 20 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/chowdsp_core.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_core.h" 2 | 3 | #if ! CHOWDSP_USING_JUCE 4 | #include "JUCEHelpers/juce_FloatVectorOperations.cpp" 5 | 6 | #if ! JUCE_MODULE_AVAILABLE_juce_dsp 7 | #include "JUCEHelpers/dsp/juce_LookupTable.cpp" 8 | #endif 9 | #endif 10 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration file for EditorConfig, see https://EditorConfig.org 2 | 3 | # Ignore any other files further up in the file system 4 | root = true 5 | 6 | # All files: 7 | [*] 8 | # Let git determine line ending: end_of_line = lf 9 | charset = utf-8 10 | indent_size = 4 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | # Markdown files: keep trailing space-pair as line-break 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | 19 | # Python scripts: 20 | [*.py] 21 | 22 | # YAML scripts: 23 | [*.yml] 24 | indent_size = 2 25 | 26 | # Makefiles: Tab indentation (no size specified) 27 | [Makefile] 28 | indent_style = tab 29 | 30 | # C, C++ source files: 31 | [*.{h,hpp,c,cpp}] 32 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for CodeBlocks 5 | *.cbp text eol=lf 6 | *.workspace text eol=lf 7 | 8 | # Custom for Visual Studio 9 | *.cs diff=csharp 10 | *.sln merge=union 11 | *.csproj merge=union 12 | *.vbproj merge=union 13 | *.fsproj merge=union 14 | *.dbproj merge=union 15 | 16 | # Standard to msysgit 17 | *.doc diff=astextplain 18 | *.DOC diff=astextplain 19 | *.docx diff=astextplain 20 | *.DOCX diff=astextplain 21 | *.dot diff=astextplain 22 | *.DOT diff=astextplain 23 | *.pdf diff=astextplain 24 | *.PDF diff=astextplain 25 | *.rtf diff=astextplain 26 | *.RTF diff=astextplain 27 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # Buck 31 | /buck-out/ 32 | /.buckd/ 33 | /buckaroo/ 34 | .buckconfig.local 35 | BUCKAROO_DEPS 36 | 37 | # Build folder 38 | /build/ 39 | 40 | # CodeBlocks IDE files 41 | *.layout 42 | 43 | # Visual Studio Code 44 | /.vscode/ 45 | 46 | # Visual Studio 47 | /.vs/ 48 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/.tgitconfig: -------------------------------------------------------------------------------- 1 | [bugtraq] 2 | url = https://github.com/martinmoene/span-lite/issues/%BUGID% 3 | number = true 4 | logregex = "(\\s*(,|and)?\\s*#\\d+)+\n(\\d+)" 5 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/cmake/span-lite-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | # Adapted from write_basic_package_version_file(... COMPATIBILITY SameMajorVersion) output 2 | # ARCH_INDEPENDENT is only present in cmake 3.14 and onwards 3 | 4 | set(PACKAGE_VERSION "@package_version@") 5 | 6 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 7 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 8 | else() 9 | 10 | if("@package_version@" MATCHES "^([0-9]+)\\.") 11 | set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") 12 | else() 13 | set(CVF_VERSION_MAJOR "@package_version@") 14 | endif() 15 | 16 | if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) 17 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 18 | else() 19 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 20 | endif() 21 | 22 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 23 | set(PACKAGE_VERSION_EXACT TRUE) 24 | endif() 25 | endif() 26 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/cmake/span-lite-config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | # Only include targets once: 4 | 5 | if( NOT TARGET @package_nspace@::@package_name@ ) 6 | include( "${CMAKE_CURRENT_LIST_DIR}/@package_target@.cmake" ) 7 | endif() 8 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/conanfile.py: -------------------------------------------------------------------------------- 1 | from conans import ConanFile, CMake 2 | 3 | class SpanLiteConan(ConanFile): 4 | version = "0.10.3" 5 | name = "span-lite" 6 | description = "A C++20-like span for C++98, C++11 and later in a single-file header-only library" 7 | license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt" 8 | url = "https://github.com/martinmoene/span-lite.git" 9 | exports_sources = "include/nonstd/*", "CMakeLists.txt", "cmake/*", "LICENSE.txt" 10 | settings = "compiler", "build_type", "arch" 11 | build_policy = "missing" 12 | author = "Martin Moene" 13 | 14 | def build(self): 15 | """Avoid warning on build step""" 16 | pass 17 | 18 | def package(self): 19 | """Run CMake install""" 20 | cmake = CMake(self) 21 | cmake.definitions["SPAN_LITE_OPT_BUILD_TESTS"] = "OFF" 22 | cmake.definitions["SPAN_LITE_OPT_BUILD_EXAMPLES"] = "OFF" 23 | cmake.configure() 24 | cmake.install() 25 | 26 | def package_info(self): 27 | self.info.header_only() 28 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/example/01-basic.cpp: -------------------------------------------------------------------------------- 1 | // Use span 2 | 3 | #include "nonstd/span.hpp" 4 | #include 5 | #include 6 | #include 7 | 8 | std::ptrdiff_t size (nonstd::span spn) 9 | { 10 | return spn.size(); 11 | } 12 | 13 | int main() 14 | { 15 | int arr[] = { 16 | 1, 17 | }; 18 | 19 | std::cout << "C-array:" << size (arr) << " array:" << size (std::array { 20 | 1, 21 | 2, 22 | }) << " vector:" 23 | << size (std::vector { 24 | 1, 25 | 2, 26 | 3, 27 | }); 28 | } 29 | 30 | #if 0 31 | cl -EHsc -I../include 01-basic.cpp && 01-basic.exe 32 | g++ -std=c++11 -Wall -I../include -o 01-basic.exe 01-basic.cpp && 01-basic.exe 33 | 34 | Output: C-array:1 array:2 vector:3 35 | #endif 36 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/project/CodeBlocks/span-lite.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/test/nonstd/span.tweak.hpp: -------------------------------------------------------------------------------- 1 | #define SPAN_TWEAK_VALUE 42 2 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/span-lite/test/tg-all.bat: -------------------------------------------------------------------------------- 1 | @for %%s in ( c++98 c++03 c++11 c++14 c++17 ) do ( 2 | call tg.bat %%s 3 | ) 4 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/types_list/.gitignore: -------------------------------------------------------------------------------- 1 | # Build artifacts 2 | build*/ 3 | cmake-build*/ 4 | 5 | # IDE configs 6 | .vscode/ 7 | .idea/ 8 | 9 | # Mac extras 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/types_list/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | 3 | project(types_list VERSION "0.1.0" LANGUAGES CXX) 4 | 5 | if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) 6 | set(IS_TOPLEVEL_PROJECT TRUE) 7 | else() 8 | set(IS_TOPLEVEL_PROJECT FALSE) 9 | endif() 10 | 11 | option(TYPESLIST_OPT_BUILD_EXAMPLES "Build types_list examples" ${IS_TOPLEVEL_PROJECT}) 12 | option(TYPESLIST_OPT_BUILD_TESTS "Build and perform types_list tests" ${IS_TOPLEVEL_PROJECT}) 13 | 14 | if(TYPESLIST_OPT_BUILD_EXAMPLES) 15 | add_subdirectory(example) 16 | endif() 17 | 18 | if(TYPESLIST_OPT_BUILD_TESTS) 19 | enable_testing() 20 | add_subdirectory(test) 21 | endif() 22 | 23 | add_library(${PROJECT_NAME} INTERFACE) 24 | add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) 25 | target_include_directories(${PROJECT_NAME} 26 | INTERFACE 27 | ${CMAKE_CURRENT_SOURCE_DIR}/include 28 | ) 29 | -------------------------------------------------------------------------------- /modules/common/chowdsp_core/third_party/types_list/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Jatin Chowdhury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_data_structures/Helpers/chowdsp_ArenaHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::arena 4 | { 5 | template 6 | nonstd::span make_span (Arena& arena, I size, size_t alignment = alignof (T)) 7 | { 8 | return { arena.template allocate (size, alignment), static_cast (size) }; 9 | } 10 | 11 | template 12 | std::string_view alloc_string (Arena& arena, const std::string_view& str) 13 | { 14 | auto* data = arena.template allocate (str.size()); 15 | std::copy (str.begin(), str.end(), data); 16 | return std::string_view { data, str.size() }; // NOLINT 17 | } 18 | 19 | #if CHOWDSP_USING_JUCE 20 | template 21 | std::string_view alloc_string (Arena& arena, const juce::String& str) 22 | { 23 | return alloc_string (arena, toStringView (str)); 24 | } 25 | #endif 26 | } // namespace chowdsp::arena 27 | -------------------------------------------------------------------------------- /modules/common/chowdsp_json/JSONUtils/chowdsp_StringAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef DOXYGEN 4 | namespace nlohmann 5 | { 6 | /** Adapter so that nlohmann::json can serialize juce::String */ 7 | template <> 8 | struct adl_serializer 9 | { 10 | static void to_json (json& j, const juce::String& s) 11 | { 12 | j = s.toUTF8(); 13 | } 14 | 15 | static void from_json (const json& j, juce::String& s) 16 | { 17 | s = j.get(); 18 | } 19 | }; 20 | } // namespace nlohmann 21 | #endif 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_json/chowdsp_json.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_json 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP JSON Utilities 10 | description: JUCE interface for nlohmann::json 11 | dependencies: juce_core 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-Clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | // third party includes 24 | #include "third_party/nlohmann/json.hpp" 25 | 26 | // JUCE includes 27 | #include 28 | 29 | namespace chowdsp 30 | { 31 | /** Alias for nlohmann::json */ 32 | using json = nlohmann::json; 33 | } // namespace chowdsp 34 | 35 | #include "JSONUtils/chowdsp_StringAdapter.h" 36 | 37 | #include "JSONUtils/chowdsp_JSONUtils.h" 38 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/Loggers/chowdsp_BaseLogger.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_BaseLogger.h" 2 | 3 | namespace chowdsp 4 | { 5 | BaseLogger* BaseLogger::global_logger = nullptr; 6 | 7 | void set_global_logger (BaseLogger* logger) 8 | { 9 | BaseLogger::global_logger = logger; 10 | juce::Logger::setCurrentLogger (logger); 11 | } 12 | 13 | BaseLogger* get_global_logger() 14 | { 15 | return BaseLogger::global_logger; 16 | } 17 | } // namespace chowdsp 18 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/Loggers/chowdsp_BaseLogger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | struct BaseLogger : juce::Logger 6 | { 7 | spdlog::logger internal_logger { "chowdsp_log" }; 8 | spdlog::sink_ptr console_sink {}; 9 | Broadcaster onLogMessage {}; 10 | ChainedArenaAllocator arena { 8192 }; 11 | static BaseLogger* global_logger; 12 | 13 | BaseLogger() 14 | { 15 | console_sink = std::make_shared(); 16 | internal_logger.sinks().push_back (console_sink); 17 | 18 | #if JUCE_DEBUG && JUCE_WINDOWS 19 | internal_logger.sinks().push_back (std::make_shared()); 20 | #endif 21 | } 22 | 23 | void logMessage (const juce::String& message) override 24 | { 25 | internal_logger.info (message.toStdString()); 26 | onLogMessage (message); 27 | arena.clear(); 28 | } 29 | }; 30 | 31 | /** Set's a (static) logger to be used globally. */ 32 | void set_global_logger (BaseLogger*); 33 | 34 | /** Returns the global logger, or nullptr if none has been set. */ 35 | BaseLogger* get_global_logger(); 36 | } // namespace chowdsp 37 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/Loggers/chowdsp_CrashLogHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | #ifndef DOXYGEN 6 | namespace CrashLogHelpers 7 | { 8 | using CrashLogAnalysisCallback = std::function; 9 | 10 | void defaultCrashLogAnalyzer (const juce::File& logFile); 11 | 12 | void checkLogFilesForCrashes (const LogFileHelpers::FileArray& logFiles, 13 | const CrashLogAnalysisCallback& callback); 14 | 15 | void signalHandler (void*); // NOSONAR (void* is needed here) 16 | } // namespace CrashLogHelpers 17 | #endif 18 | } // namespace chowdsp 19 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/Loggers/chowdsp_Logger.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | class Logger : private juce::Timer 6 | { 7 | public: 8 | Logger (const juce::String& logFileSubDir, 9 | const juce::String& logFileNameRoot, 10 | CrashLogHelpers::CrashLogAnalysisCallback&& callback = &CrashLogHelpers::defaultCrashLogAnalyzer); 11 | explicit Logger (const LogFileParams& loggerParams, 12 | CrashLogHelpers::CrashLogAnalysisCallback&& callback = &CrashLogHelpers::defaultCrashLogAnalyzer); 13 | ~Logger() override; 14 | 15 | [[nodiscard]] const juce::File& getLogFile() const { return log_file; } 16 | 17 | const LogFileParams params; 18 | 19 | protected: 20 | void timerCallback() override; 21 | 22 | CrashLogHelpers::CrashLogAnalysisCallback crashLogAnalysisCallback = &CrashLogHelpers::defaultCrashLogAnalyzer; 23 | 24 | juce::File log_file {}; 25 | spdlog::sink_ptr file_sink {}; 26 | 27 | BaseLogger logger; 28 | 29 | private: 30 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Logger) 31 | }; 32 | } // namespace chowdsp 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/chowdsp_logging.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_logging.h" 2 | 3 | #include "Loggers/chowdsp_BaseLogger.cpp" 4 | #include "Loggers/chowdsp_LogFileHelpers.cpp" 5 | #include "Loggers/chowdsp_CrashLogHelpers.cpp" 6 | #include "Loggers/chowdsp_Logger.cpp" 7 | #include "Loggers/chowdsp_PluginLogger.cpp" 8 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: Google 4 | AccessModifierOffset: -4 5 | Standard: c++17 6 | IndentWidth: 4 7 | TabWidth: 4 8 | UseTab: Never 9 | ColumnLimit: 100 10 | AlignAfterOpenBracket: Align 11 | BinPackParameters: false 12 | AlignEscapedNewlines: Left 13 | AlwaysBreakTemplateDeclarations: Yes 14 | PackConstructorInitializers: Never 15 | BreakConstructorInitializersBeforeComma: false 16 | IndentPPDirectives: BeforeHash 17 | SortIncludes: Never 18 | ... 19 | 20 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # clang-format 2 | 1a0bfc7a89f2d58e22605a4dc7e18a9a555b65aa 3 | 95c226e9c92928e20ccdac0d060e7241859e282b 4 | 9d52261185b5f2c454c381d626ec5c84d7b195f4 5 | 4b2a8219d5d1b40062d030441adde7d1fb0d4f84 6 | 0a53eafe18d983c7c8ba4cadd02d0cc7f7308f28 7 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=false 2 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/INSTALL: -------------------------------------------------------------------------------- 1 | Header only version: 2 | ================================================================== 3 | Just copy the files to your build tree and use a C++11 compiler. 4 | Or use CMake: 5 | add_executable(example_header_only example.cpp) 6 | target_link_libraries(example_header_only spdlog::spdlog_header_only) 7 | 8 | 9 | Compiled library version: 10 | ================================================================== 11 | CMake: 12 | add_executable(example example.cpp) 13 | target_link_libraries(example spdlog::spdlog) 14 | 15 | Or copy files src/*.cpp to your build tree and pass the -DSPDLOG_COMPILED_LIB to the compiler. 16 | 17 | Tested on: 18 | gcc 4.8.1 and above 19 | clang 3.5 20 | Visual Studio 2013 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/bench/utils.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | namespace utils { 13 | 14 | template 15 | inline std::string format(const T &value) { 16 | static std::locale loc(""); 17 | std::stringstream ss; 18 | ss.imbue(loc); 19 | ss << value; 20 | return ss.str(); 21 | } 22 | 23 | template <> 24 | inline std::string format(const double &value) { 25 | static std::locale loc(""); 26 | std::stringstream ss; 27 | ss.imbue(loc); 28 | ss << std::fixed << std::setprecision(1) << value; 29 | return ss.str(); 30 | } 31 | 32 | } // namespace utils 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/cmake/spdlog.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | includedir=@PKG_CONFIG_INCLUDEDIR@ 4 | libdir=@PKG_CONFIG_LIBDIR@ 5 | 6 | Name: lib@PROJECT_NAME@ 7 | Description: Fast C++ logging library. 8 | URL: https://github.com/gabime/@PROJECT_NAME@ 9 | Version: @SPDLOG_VERSION@ 10 | CFlags: -I${includedir} @PKG_CONFIG_DEFINES@ 11 | Libs: -L${libdir} -lspdlog -pthread 12 | Requires: @PKG_CONFIG_REQUIRES@ 13 | 14 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/cmake/spdlogConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # Copyright(c) 2019 spdlog authors 2 | # Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | @PACKAGE_INIT@ 5 | 6 | find_package(Threads REQUIRED) 7 | 8 | set(SPDLOG_FMT_EXTERNAL @SPDLOG_FMT_EXTERNAL@) 9 | set(SPDLOG_FMT_EXTERNAL_HO @SPDLOG_FMT_EXTERNAL_HO@) 10 | set(config_targets_file @config_targets_file@) 11 | 12 | if(SPDLOG_FMT_EXTERNAL OR SPDLOG_FMT_EXTERNAL_HO) 13 | include(CMakeFindDependencyMacro) 14 | find_dependency(fmt CONFIG) 15 | endif() 16 | 17 | 18 | include("${CMAKE_CURRENT_LIST_DIR}/${config_targets_file}") 19 | 20 | check_required_components(spdlog) 21 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/cmake/version.rc.in: -------------------------------------------------------------------------------- 1 | #define APSTUDIO_READONLY_SYMBOLS 2 | #include 3 | #undef APSTUDIO_READONLY_SYMBOLS 4 | 5 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 6 | 7 | 8 | VS_VERSION_INFO VERSIONINFO 9 | FILEVERSION @SPDLOG_VERSION_MAJOR@,@SPDLOG_VERSION_MINOR@,@SPDLOG_VERSION_PATCH@,0 10 | PRODUCTVERSION @SPDLOG_VERSION_MAJOR@,@SPDLOG_VERSION_MINOR@,@SPDLOG_VERSION_PATCH@,0 11 | FILEFLAGSMASK 0x3fL 12 | #ifdef _DEBUG 13 | FILEFLAGS 0x1L 14 | #else 15 | FILEFLAGS 0x0L 16 | #endif 17 | FILEOS 0x40004L 18 | FILETYPE 0x2L 19 | FILESUBTYPE 0x0L 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904b0" 24 | BEGIN 25 | VALUE "FileDescription", "spdlog dll\0" 26 | VALUE "FileVersion", "@SPDLOG_VERSION@.0\0" 27 | VALUE "InternalName", "spdlog.dll\0" 28 | VALUE "LegalCopyright", "Copyright (C) spdlog\0" 29 | VALUE "ProductName", "spdlog\0" 30 | VALUE "ProductVersion", "@SPDLOG_VERSION@.0\0" 31 | END 32 | END 33 | BLOCK "VarFileInfo" 34 | BEGIN 35 | VALUE "Translation", 0x409, 1200 36 | END 37 | END 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright(c) 2019 spdlog authors Distributed under the MIT License (http://opensource.org/licenses/MIT) 2 | 3 | cmake_minimum_required(VERSION 3.11) 4 | project(spdlog_examples CXX) 5 | 6 | if(NOT TARGET spdlog) 7 | # Stand-alone build 8 | find_package(spdlog REQUIRED) 9 | endif() 10 | 11 | # --------------------------------------------------------------------------------------- 12 | # Example of using pre-compiled library 13 | # --------------------------------------------------------------------------------------- 14 | add_executable(example example.cpp) 15 | target_link_libraries(example PRIVATE spdlog::spdlog $<$:ws2_32>) 16 | 17 | # --------------------------------------------------------------------------------------- 18 | # Example of using header-only library 19 | # --------------------------------------------------------------------------------------- 20 | if(SPDLOG_BUILD_EXAMPLE_HO) 21 | add_executable(example_header_only example.cpp) 22 | target_link_libraries(example_header_only PRIVATE spdlog::spdlog_header_only) 23 | endif() 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/cfg/env.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | // 10 | // Init levels and patterns from env variables SPDLOG_LEVEL 11 | // Inspired from Rust's "env_logger" crate (https://crates.io/crates/env_logger). 12 | // Note - fallback to "info" level on unrecognized levels 13 | // 14 | // Examples: 15 | // 16 | // set global level to debug: 17 | // export SPDLOG_LEVEL=debug 18 | // 19 | // turn off all logging except for logger1: 20 | // export SPDLOG_LEVEL="*=off,logger1=debug" 21 | // 22 | 23 | // turn off all logging except for logger1 and logger2: 24 | // export SPDLOG_LEVEL="off,logger1=debug,logger2=info" 25 | 26 | namespace spdlog { 27 | namespace cfg { 28 | inline void load_env_levels() { 29 | auto env_val = details::os::getenv("SPDLOG_LEVEL"); 30 | if (!env_val.empty()) { 31 | helpers::load_levels(env_val); 32 | } 33 | } 34 | 35 | } // namespace cfg 36 | } // namespace spdlog 37 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/cfg/helpers.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | 9 | namespace spdlog { 10 | namespace cfg { 11 | namespace helpers { 12 | // 13 | // Init levels from given string 14 | // 15 | // Examples: 16 | // 17 | // set global level to debug: "debug" 18 | // turn off all logging except for logger1: "off,logger1=debug" 19 | // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info" 20 | // 21 | SPDLOG_API void load_levels(const std::string &txt); 22 | } // namespace helpers 23 | 24 | } // namespace cfg 25 | } // namespace spdlog 26 | 27 | #ifdef SPDLOG_HEADER_ONLY 28 | #include "helpers-inl.h" 29 | #endif // SPDLOG_HEADER_ONLY 30 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/console_globals.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include "null_mutex.h" 8 | 9 | namespace spdlog { 10 | namespace details { 11 | 12 | struct console_mutex { 13 | using mutex_t = std::mutex; 14 | static mutex_t &mutex() { 15 | static mutex_t s_mutex; 16 | return s_mutex; 17 | } 18 | }; 19 | 20 | struct console_nullmutex { 21 | using mutex_t = null_mutex; 22 | static mutex_t &mutex() { 23 | static mutex_t s_mutex; 24 | return s_mutex; 25 | } 26 | }; 27 | } // namespace details 28 | } // namespace spdlog 29 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/log_msg_buffer.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "log_msg.h" 7 | 8 | namespace spdlog { 9 | namespace details { 10 | 11 | // Extend log_msg with internal buffer to store its payload. 12 | // This is needed since log_msg holds string_views that points to stack data. 13 | 14 | class SPDLOG_API log_msg_buffer : public log_msg { 15 | memory_buf_t buffer; 16 | void update_string_views(); 17 | 18 | public: 19 | log_msg_buffer() = default; 20 | explicit log_msg_buffer(const log_msg &orig_msg); 21 | log_msg_buffer(const log_msg_buffer &other); 22 | log_msg_buffer(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 23 | log_msg_buffer &operator=(const log_msg_buffer &other); 24 | log_msg_buffer &operator=(log_msg_buffer &&other) SPDLOG_NOEXCEPT; 25 | }; 26 | 27 | } // namespace details 28 | } // namespace spdlog 29 | 30 | #ifdef SPDLOG_HEADER_ONLY 31 | #include "log_msg_buffer-inl.h" 32 | #endif 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | // null, no cost dummy "mutex" and dummy "atomic" int 9 | 10 | namespace spdlog { 11 | namespace details { 12 | struct null_mutex { 13 | void lock() const {} 14 | void unlock() const {} 15 | }; 16 | 17 | struct null_atomic_int { 18 | int value; 19 | null_atomic_int() = default; 20 | 21 | explicit null_atomic_int(int new_value) 22 | : value(new_value) {} 23 | 24 | int load(std::memory_order = std::memory_order_relaxed) const { return value; } 25 | 26 | void store(int new_value, std::memory_order = std::memory_order_relaxed) { value = new_value; } 27 | 28 | int exchange(int new_value, std::memory_order = std::memory_order_relaxed) { 29 | std::swap(new_value, value); 30 | return new_value; // return value before the call 31 | } 32 | }; 33 | 34 | } // namespace details 35 | } // namespace spdlog 36 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/periodic_worker-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | namespace spdlog { 11 | namespace details { 12 | 13 | // stop the worker thread and join it 14 | SPDLOG_INLINE periodic_worker::~periodic_worker() { 15 | if (worker_thread_.joinable()) { 16 | { 17 | std::lock_guard lock(mutex_); 18 | active_ = false; 19 | } 20 | cv_.notify_one(); 21 | worker_thread_.join(); 22 | } 23 | } 24 | 25 | } // namespace details 26 | } // namespace spdlog 27 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/synchronous_factory.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "registry.h" 7 | 8 | namespace spdlog { 9 | 10 | // Default logger factory- creates synchronous loggers 11 | class logger; 12 | 13 | struct synchronous_factory { 14 | template 15 | static std::shared_ptr create(std::string logger_name, SinkArgs &&...args) { 16 | auto sink = std::make_shared(std::forward(args)...); 17 | auto new_logger = std::make_shared(std::move(logger_name), std::move(sink)); 18 | details::registry::instance().initialize_logger(new_logger); 19 | return new_logger; 20 | } 21 | }; 22 | } // namespace spdlog 23 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/details/windows_include.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef NOMINMAX 4 | #define NOMINMAX // prevent windows redefining min/max 5 | #endif 6 | 7 | #ifndef WIN32_LEAN_AND_MEAN 8 | #define WIN32_LEAN_AND_MEAN 9 | #endif 10 | 11 | #include 12 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/bundled/locale.h: -------------------------------------------------------------------------------- 1 | #include "xchar.h" 2 | #warning fmt/locale.h is deprecated, include fmt/format.h or fmt/xchar.h instead 3 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/chrono.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's chrono support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/compile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's compile-time support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ostream support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/ranges.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's ranges support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/std.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's std support (for formatting e.g. 9 | // std::filesystem::path, std::thread::id, std::monostate, std::variant, ...) 10 | // 11 | #include 12 | 13 | #if !defined(SPDLOG_USE_STD_FORMAT) 14 | #if !defined(SPDLOG_FMT_EXTERNAL) 15 | #ifdef SPDLOG_HEADER_ONLY 16 | #ifndef FMT_HEADER_ONLY 17 | #define FMT_HEADER_ONLY 18 | #endif 19 | #endif 20 | #include 21 | #else 22 | #include 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fmt/xchar.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // include bundled or external copy of fmtlib's xchar support 9 | // 10 | #include 11 | 12 | #if !defined(SPDLOG_USE_STD_FORMAT) 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | #ifdef SPDLOG_HEADER_ONLY 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #endif 19 | #include 20 | #else 21 | #include 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "details/log_msg.h" 7 | #include "fmt/fmt.h" 8 | 9 | namespace spdlog { 10 | 11 | class formatter { 12 | public: 13 | virtual ~formatter() = default; 14 | virtual void format(const details::log_msg &msg, memory_buf_t &dest) = 0; 15 | virtual std::unique_ptr clone() const = 0; 16 | }; 17 | } // namespace spdlog 18 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/fwd.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | namespace spdlog { 7 | class logger; 8 | class formatter; 9 | 10 | namespace sinks { 11 | class sink; 12 | } 13 | 14 | namespace level { 15 | enum level_enum : int; 16 | } 17 | 18 | } // namespace spdlog 19 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/sinks/sink-inl.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #ifndef SPDLOG_HEADER_ONLY 7 | #include 8 | #endif 9 | 10 | #include "../common.h" 11 | 12 | SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const { 13 | return msg_level >= level_.load(std::memory_order_relaxed); 14 | } 15 | 16 | SPDLOG_INLINE void spdlog::sinks::sink::set_level(level::level_enum log_level) { 17 | level_.store(log_level, std::memory_order_relaxed); 18 | } 19 | 20 | SPDLOG_INLINE spdlog::level::level_enum spdlog::sinks::sink::level() const { 21 | return static_cast(level_.load(std::memory_order_relaxed)); 22 | } 23 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #include "../details/log_msg.h" 7 | #include "../formatter.h" 8 | 9 | namespace spdlog { 10 | 11 | namespace sinks { 12 | class SPDLOG_API sink { 13 | public: 14 | virtual ~sink() = default; 15 | virtual void log(const details::log_msg &msg) = 0; 16 | virtual void flush() = 0; 17 | virtual void set_pattern(const std::string &pattern) = 0; 18 | virtual void set_formatter(std::unique_ptr sink_formatter) = 0; 19 | 20 | void set_level(level::level_enum log_level); 21 | level::level_enum level() const; 22 | bool should_log(level::level_enum msg_level) const; 23 | 24 | protected: 25 | // sink log level - default is all 26 | level_t level_{level::trace}; 27 | }; 28 | 29 | } // namespace sinks 30 | } // namespace spdlog 31 | 32 | #ifdef SPDLOG_HEADER_ONLY 33 | #include "sink-inl.h" 34 | #endif 35 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/include/spdlog/version.h: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #pragma once 5 | 6 | #define SPDLOG_VER_MAJOR 1 7 | #define SPDLOG_VER_MINOR 13 8 | #define SPDLOG_VER_PATCH 0 9 | 10 | #define SPDLOG_TO_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) 11 | #define SPDLOG_VERSION SPDLOG_TO_VERSION(SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR, SPDLOG_VER_PATCH) 12 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/logos/spdlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/modules/common/chowdsp_logging/third_party/spdlog/logos/spdlog.png -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/scripts/ci_setup_clang.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | VERSION=$1 6 | 7 | apt-get update 8 | apt-get install -y libc++-${VERSION}-dev libc++abi-${VERSION}-dev 9 | 10 | if [[ "${VERSION}" -ge 12 ]]; then 11 | apt-get install -y --no-install-recommends libunwind-${VERSION}-dev 12 | fi 13 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/scripts/extract_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import re 5 | 6 | base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 7 | config_h = os.path.join(base_path, 'include', 'spdlog', 'version.h') 8 | data = {'MAJOR': 0, 'MINOR': 0, 'PATCH': 0} 9 | reg = re.compile(r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$') 10 | 11 | with open(config_h, 'r') as fp: 12 | for l in fp: 13 | m = reg.match(l) 14 | if m: 15 | data[m.group(1)] = int(m.group(2)) 16 | 17 | print(f"{data['MAJOR']}.{data['MINOR']}.{data['PATCH']}") 18 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/scripts/format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname "$0")"/.. 4 | pwd 5 | find_sources="find include src tests example bench -not ( -path include/spdlog/fmt/bundled -prune ) -type f -name *\.h -o -name *\.cpp" 6 | echo -n "Running dos2unix " 7 | $find_sources | xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'" 8 | echo 9 | echo -n "Running clang-format " 10 | 11 | $find_sources | xargs -I {} sh -c "clang-format -i {}; echo -n '.'" 12 | 13 | echo 14 | echo -n "Running cmake-format " 15 | find . -type f -name "CMakeLists.txt" -o -name "*\.cmake"|grep -v bundled|grep -v build|xargs -I {} sh -c "cmake-format --line-width 120 --tab-size 4 --max-subgroups-hwrap 4 -i {}; echo -n '.'" 16 | echo 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/src/async.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/src/cfg.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/src/file_sinks.cpp: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2015-present, Gabi Melman & spdlog contributors. 2 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 3 | 4 | #ifndef SPDLOG_COMPILED_LIB 5 | #error Please define SPDLOG_COMPILED_LIB to compile this file. 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | template class SPDLOG_API spdlog::sinks::basic_file_sink; 16 | template class SPDLOG_API spdlog::sinks::basic_file_sink; 17 | 18 | #include 19 | template class SPDLOG_API spdlog::sinks::rotating_file_sink; 20 | template class SPDLOG_API spdlog::sinks::rotating_file_sink; 21 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/tests/includes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(__GNUC__) && __GNUC__ == 12 4 | #pragma GCC diagnostic push 5 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12 6 | #endif 7 | #include 8 | #if defined(__GNUC__) && __GNUC__ == 12 9 | #pragma GCC diagnostic pop 10 | #endif 11 | 12 | #include "utils.h" 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG 25 | 26 | #include "spdlog/spdlog.h" 27 | #include "spdlog/async.h" 28 | #include "spdlog/details/fmt_helper.h" 29 | #include "spdlog/sinks/basic_file_sink.h" 30 | #include "spdlog/sinks/daily_file_sink.h" 31 | #include "spdlog/sinks/null_sink.h" 32 | #include "spdlog/sinks/ostream_sink.h" 33 | #include "spdlog/sinks/rotating_file_sink.h" 34 | #include "spdlog/sinks/stdout_color_sinks.h" 35 | #include "spdlog/sinks/msvc_sink.h" 36 | #include "spdlog/pattern_formatter.h" 37 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/tests/main.cpp: -------------------------------------------------------------------------------- 1 | #if defined(__GNUC__) && __GNUC__ == 12 2 | #pragma GCC diagnostic push 3 | #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12 4 | #endif 5 | 6 | #include 7 | 8 | #if defined(__GNUC__) && __GNUC__ == 12 9 | #pragma GCC diagnostic pop 10 | #endif 11 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/tests/test_systemd.cpp: -------------------------------------------------------------------------------- 1 | #include "includes.h" 2 | #include "spdlog/sinks/systemd_sink.h" 3 | 4 | TEST_CASE("systemd", "[all]") { 5 | auto systemd_sink = std::make_shared(); 6 | spdlog::logger logger("spdlog_systemd_test", systemd_sink); 7 | logger.set_level(spdlog::level::trace); 8 | logger.trace("test spdlog trace"); 9 | logger.debug("test spdlog debug"); 10 | SPDLOG_LOGGER_INFO((&logger), "test spdlog info"); 11 | SPDLOG_LOGGER_WARN((&logger), "test spdlog warn"); 12 | SPDLOG_LOGGER_ERROR((&logger), "test spdlog error"); 13 | SPDLOG_LOGGER_CRITICAL((&logger), "test spdlog critical"); 14 | } 15 | -------------------------------------------------------------------------------- /modules/common/chowdsp_logging/third_party/spdlog/tests/utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | std::size_t count_files(const std::string &folder); 7 | 8 | void prepare_logdir(); 9 | 10 | std::string file_contents(const std::string &filename); 11 | 12 | std::size_t count_lines(const std::string &filename); 13 | 14 | void require_message_count(const std::string &filename, const std::size_t messages); 15 | 16 | std::size_t get_filesize(const std::string &filename); 17 | 18 | bool ends_with(std::string const &value, std::string const &ending); -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["paypal.me/Neargye", "btc.com/btc/address/bc1qzevldln8tqz5xf4lyufu9msgl7t97xstth9zq8", "etherscan.io/address/0xbb42fdef9204fa6f3d535d202b088dee35fcbd31"] 2 | liberapay: neargye 3 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: macos 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ${{matrix.config.os}} 8 | strategy: 9 | fail-fast: false 10 | matrix: 11 | config: 12 | - { os: macos-11 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode 13 | - { os: macos-12 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#xcode 14 | 15 | name: "${{matrix.config.os}}" 16 | steps: 17 | - uses: actions/checkout@v2 18 | 19 | - name: Build Release 20 | run: | 21 | rm -rf build 22 | mkdir build 23 | cd build 24 | cmake .. -DCMAKE_BUILD_TYPE=Release 25 | cmake --build . --config Release 26 | ctest --output-on-failure -C Release 27 | 28 | - name: Build Debug 29 | run: | 30 | rm -rf build 31 | mkdir build 32 | cd build 33 | cmake .. -DCMAKE_BUILD_TYPE=Debug 34 | cmake --build . --config Debug 35 | ctest --output-on-failure -C Debug 36 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .vscode/ 3 | .vs/ 4 | 5 | ### C++ gitignore ### 6 | # Prerequisites 7 | *.d 8 | 9 | # Compiled Object files 10 | *.slo 11 | *.lo 12 | *.o 13 | *.obj 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Compiled Dynamic libraries 20 | *.so 21 | *.dylib 22 | *.dll 23 | 24 | # Fortran module files 25 | *.mod 26 | *.smod 27 | 28 | # Compiled Static libraries 29 | *.lai 30 | *.la 31 | *.a 32 | *.lib 33 | 34 | # Executables 35 | *.exe 36 | *.out 37 | *.app 38 | 39 | ### CMake gitignore ### 40 | CMakeLists.txt.user 41 | CMakeCache.txt 42 | CMakeFiles 43 | CMakeScripts 44 | Testing 45 | Makefile 46 | cmake_install.cmake 47 | install_manifest.txt 48 | compile_commands.json 49 | CTestTestfile.cmake 50 | _deps 51 | 52 | ### Bazel build artifacts ### 53 | /bazel-* 54 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 - 2022 Daniil Goncharov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/WORKSPACE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/modules/common/chowdsp_reflection/third_party/magic_enum/WORKSPACE -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(CheckCXXCompilerFlag) 2 | 3 | if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) 4 | set(OPTIONS -Wall -Wextra -pedantic-errors -Werror) 5 | elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") 6 | set(OPTIONS /W4 /WX) 7 | if(HAS_PERMISSIVE_FLAG) 8 | set(OPTIONS ${OPTIONS} /permissive-) 9 | endif() 10 | endif() 11 | 12 | function(make_example target) 13 | add_executable(${target} ${target}.cpp) 14 | set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF) 15 | target_compile_features(${target} PRIVATE cxx_std_17) 16 | target_compile_options(${target} PRIVATE ${OPTIONS}) 17 | target_link_libraries(${target} PRIVATE ${CMAKE_PROJECT_NAME}) 18 | endfunction() 19 | 20 | make_example(example) 21 | make_example(enum_flag_example) 22 | make_example(example_custom_name) 23 | make_example(example_switch) 24 | if(MAGIC_ENUM_OPT_ENABLE_NONASCII) 25 | set(OPTIONS ${OPTIONS} -DMAGIC_ENUM_ENABLE_NONASCII) 26 | make_example(example_nonascii_name) 27 | endif() 28 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/meson.build: -------------------------------------------------------------------------------- 1 | project( 2 | 'magic_enum', ['cpp'], 3 | default_options: ['cpp_std=c++17'], 4 | version: '0.8.1', 5 | ) 6 | 7 | magic_enum_include = include_directories('include') 8 | 9 | magic_enum_dep = declare_dependency( 10 | include_directories: magic_enum_include, 11 | ) -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/magic_enum/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | magic_enum 8 | 0.8.1 9 | 10 | Static reflection for enums (to string, from string, iteration) for modern C++, 11 | work with any enum type without any macro or boilerplate code 12 | 13 | 14 | Neargye 15 | MIT 16 | 17 | cmake 18 | 19 | 20 | cmake 21 | 22 | 23 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/nameof/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["paypal.me/Neargye", "btc.com/btc/address/bc1qzevldln8tqz5xf4lyufu9msgl7t97xstth9zq8", "etherscan.io/address/0xbb42fdef9204fa6f3d535d202b088dee35fcbd31"] 2 | liberapay: neargye 3 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/nameof/.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: macos 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ${{matrix.config.os}} 8 | strategy: 9 | fail-fast: false 10 | matrix: 11 | config: 12 | - { os: macos-11 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode 13 | - { os: macos-12 } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#xcode 14 | 15 | name: "${{matrix.config.os}}" 16 | steps: 17 | - uses: actions/checkout@v2 18 | 19 | - name: Build Release 20 | run: | 21 | rm -rf build 22 | mkdir build 23 | cd build 24 | cmake .. -DCMAKE_BUILD_TYPE=Release 25 | cmake --build . --config Release 26 | ctest --output-on-failure -C Release 27 | 28 | - name: Build Debug 29 | run: | 30 | rm -rf build 31 | mkdir build 32 | cd build 33 | cmake .. -DCMAKE_BUILD_TYPE=Debug 34 | cmake --build . --config Debug 35 | ctest --output-on-failure -C Debug 36 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/nameof/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .vscode/ 3 | .vs/ 4 | 5 | ### C++ gitignore ### 6 | # Prerequisites 7 | *.d 8 | 9 | # Compiled Object files 10 | *.slo 11 | *.lo 12 | *.o 13 | *.obj 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Compiled Dynamic libraries 20 | *.so 21 | *.dylib 22 | *.dll 23 | 24 | # Fortran module files 25 | *.mod 26 | *.smod 27 | 28 | # Compiled Static libraries 29 | *.lai 30 | *.la 31 | *.a 32 | *.lib 33 | 34 | # Executables 35 | *.exe 36 | *.out 37 | *.app 38 | 39 | ### CMake gitignore ### 40 | CMakeLists.txt.user 41 | CMakeCache.txt 42 | CMakeFiles 43 | CMakeScripts 44 | Testing 45 | Makefile 46 | cmake_install.cmake 47 | install_manifest.txt 48 | compile_commands.json 49 | CTestTestfile.cmake 50 | _deps 51 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/nameof/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 - 2022 Daniil Goncharov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/nameof/example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include(CheckCXXCompilerFlag) 2 | 3 | if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) 4 | set(OPTIONS -Wall -Wextra -pedantic-errors -Werror) 5 | elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") 6 | set(OPTIONS /W4 /WX) 7 | if(HAS_PERMISSIVE_FLAG) 8 | set(OPTIONS ${OPTIONS} /permissive-) 9 | endif() 10 | endif() 11 | 12 | function(make_example target) 13 | add_executable(${target} ${target}.cpp) 14 | set_target_properties(${target} PROPERTIES CXX_EXTENSIONS OFF) 15 | target_compile_features(${target} PRIVATE cxx_std_17) 16 | target_compile_options(${target} PRIVATE ${OPTIONS}) 17 | target_link_libraries(${target} PRIVATE ${CMAKE_PROJECT_NAME}) 18 | endfunction() 19 | 20 | make_example(example) 21 | make_example(example_custom_name) 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Generated by `boostdep --cmake pfr` 2 | # Copyright 2020 Peter Dimov 3 | # Distributed under the Boost Software License, Version 1.0. 4 | # https://www.boost.org/LICENSE_1_0.txt 5 | 6 | cmake_minimum_required(VERSION 3.5...3.16) 7 | 8 | project(boost_pfr VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) 9 | 10 | add_library(boost_pfr INTERFACE) 11 | add_library(Boost::pfr ALIAS boost_pfr) 12 | 13 | target_include_directories(boost_pfr INTERFACE include) 14 | 15 | if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") 16 | 17 | add_subdirectory(test) 18 | 19 | endif() 20 | 21 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/example/motivating_example0.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-2023 Antony Polukhin 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | //[pfr_motivating_example 7 | #include 8 | #include 9 | 10 | #include "pfr.hpp" 11 | 12 | struct some_person 13 | { 14 | std::string name; 15 | unsigned birth_year; 16 | }; 17 | 18 | int main() 19 | { 20 | some_person val { "Edgar Allan Poe", 1809 }; 21 | 22 | std::cout << pfr::get<0> (val) // No macro! 23 | << " was born in " << pfr::get<1> (val); // Works with any aggregate initializables! 24 | 25 | std::cout << pfr::io (val); // Outputs: {"Edgar Allan Poe", 1809} 26 | } 27 | //] 28 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-2023 Antony Polukhin 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef PFR_HPP 7 | #define PFR_HPP 8 | 9 | /// \file pfr.hpp 10 | /// Includes all the Boost.PFR headers 11 | 12 | #include "pfr/config.hpp" 13 | #include "pfr/core.hpp" 14 | #include "pfr/core_name.hpp" 15 | #include "pfr/functions_for.hpp" 16 | #include "pfr/functors.hpp" 17 | #include "pfr/io.hpp" 18 | #include "pfr/io_fields.hpp" 19 | #include "pfr/ops.hpp" 20 | #include "pfr/ops_fields.hpp" 21 | #include "pfr/tuple_size.hpp" 22 | #include "pfr/traits_fwd.hpp" 23 | #include "pfr/traits.hpp" 24 | 25 | #endif // PFR_HPP 26 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/detail/config.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-2023 Antony Polukhin 2 | // Copyright (c) 2022 Denis Mikhailov 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #ifndef PFR_DETAIL_CONFIG_HPP 8 | #define PFR_DETAIL_CONFIG_HPP 9 | #pragma once 10 | 11 | #include "../config.hpp" 12 | 13 | #if !PFR_ENABLED 14 | 15 | #error Boost.PFR library is not supported in your environment. \ 16 | Try one of the possible solutions: \ 17 | 1. try to take away an '-DPFR_ENABLED=0', if it exists \ 18 | 2. enable C++14; \ 19 | 3. enable C++17; \ 20 | 4. update your compiler; \ 21 | or disable this error by '-DPFR_ENABLED=1' if you really know what are you doing. 22 | 23 | #endif // !PFR_ENABLED 24 | 25 | #endif // PFR_DETAIL_CONFIG_HPP 26 | 27 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/detail/core.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-2023 Antony Polukhin 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef PFR_DETAIL_CORE_HPP 7 | #define PFR_DETAIL_CORE_HPP 8 | #pragma once 9 | 10 | #include "config.hpp" 11 | 12 | // Each core provides `pfr::detail::tie_as_tuple` and 13 | // `pfr::detail::for_each_field_dispatcher` functions. 14 | // 15 | // The whole PFR library is build on top of those two functions. 16 | #if PFR_USE_CPP17 17 | # include "core17.hpp" 18 | #elif PFR_USE_LOOPHOLE 19 | # include "core14_loophole.hpp" 20 | #else 21 | # include "core14_classic.hpp" 22 | #endif 23 | 24 | #endif // PFR_DETAIL_CORE_HPP 25 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/detail/core_name.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023 Bela Schaum, X-Ryl669, Denis Mikhailov. 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | 7 | // Initial implementation by Bela Schaum, https://github.com/schaumb 8 | // The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669 9 | // 10 | 11 | #ifndef PFR_DETAIL_CORE_NAME_HPP 12 | #define PFR_DETAIL_CORE_NAME_HPP 13 | #pragma once 14 | 15 | #include "config.hpp" 16 | 17 | // Each core_name provides `pfr::detail::get_name` and 18 | // `pfr::detail::tie_as_names_tuple` functions. 19 | // 20 | // The whole functional of extracting field's names is build on top of those 21 | // two functions. 22 | #if PFR_CORE_NAME_ENABLED 23 | #include "core_name20_static.hpp" 24 | #else 25 | #include "core_name14_disabled.hpp" 26 | #endif 27 | 28 | #endif // PFR_DETAIL_CORE_NAME_HPP 29 | 30 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/detail/fake_object.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2023 Bela Schaum, X-Ryl669, Denis Mikhailov. 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | 7 | // Initial implementation by Bela Schaum, https://github.com/schaumb 8 | // The way to make it union and UB free by X-Ryl669, https://github.com/X-Ryl669 9 | // 10 | 11 | #ifndef PFR_DETAIL_FAKE_OBJECT_HPP 12 | #define PFR_DETAIL_FAKE_OBJECT_HPP 13 | #pragma once 14 | 15 | #include "config.hpp" 16 | 17 | namespace pfr { namespace detail { 18 | 19 | template 20 | extern const T fake_object; 21 | 22 | }} // namespace pfr::detail 23 | 24 | #endif // PFR_DETAIL_FAKE_OBJECT_HPP 25 | 26 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/detail/size_t_.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016-2023 Antony Polukhin 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef PFR_DETAIL_SIZE_T_HPP 7 | #define PFR_DETAIL_SIZE_T_HPP 8 | #pragma once 9 | 10 | namespace pfr { namespace detail { 11 | 12 | ///////////////////// General utility stuff 13 | template 14 | using size_t_ = std::integral_constant; 15 | 16 | }} // namespace pfr::detail 17 | 18 | #endif // PFR_DETAIL_SIZE_T_HPP 19 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/include/pfr/traits_fwd.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022 Denis Mikhailov 2 | // 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef PFR_DETAIL_TRAITS_FWD_HPP 7 | #define PFR_DETAIL_TRAITS_FWD_HPP 8 | #pragma once 9 | 10 | #include "detail/config.hpp" 11 | 12 | namespace pfr { 13 | 14 | template 15 | struct is_reflectable; 16 | 17 | } // namespace pfr 18 | 19 | #endif // PFR_DETAIL_TRAITS_FWD_HPP 20 | 21 | 22 | -------------------------------------------------------------------------------- /modules/common/chowdsp_reflection/third_party/pfr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | Boost.Stacktrace 17 | 27 | 28 | 29 |

30 | Automatic redirection failed, please go to 31 | ../../doc/html/boost_pfr.html 32 |

33 |

34 | © 2014-2023 Antony Polukhin 35 |

36 | 37 | 38 | -------------------------------------------------------------------------------- /modules/common/chowdsp_serialization/chowdsp_serialization.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_serialization 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP Serialization Utilities 10 | description: Utility methods for serializing data structures into XML, JSON, or some other format 11 | dependencies: juce_core, chowdsp_core, chowdsp_json, chowdsp_reflection 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-Clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | // JUCE includes 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "Serialization/chowdsp_BaseSerializer.h" 30 | #include "Serialization/chowdsp_Serialization.h" 31 | #include "Serialization/chowdsp_JSONSerializer.h" 32 | #include "Serialization/chowdsp_XMLSerializer.h" 33 | -------------------------------------------------------------------------------- /modules/common/chowdsp_units/chowdsp_units.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_units 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP Units 10 | description: Unit types and conversion utilities 11 | dependencies: 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-Clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | namespace chowdsp 29 | { 30 | /** Namespacing containing useful types and conversion methods for working with units */ 31 | namespace Units 32 | { 33 | } 34 | } // namespace chowdsp 35 | 36 | #include "Units/chowdsp_UnitsBase.h" 37 | #include "Units/chowdsp_TimeUnits.h" 38 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_buffers/chowdsp_buffers.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_buffers.h" 2 | 3 | #include "Buffers/chowdsp_Buffer.cpp" 4 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_dsp_data_structures/chowdsp_dsp_data_structures.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_dsp_data_structures.h" 2 | 3 | #include "Other/chowdsp_SmoothedBufferValue.cpp" 4 | #include "Processors/chowdsp_RebufferedProcessor.cpp" 5 | #include "LookupTables/chowdsp_LookupTableTransform.cpp" 6 | 7 | #if JUCE_MODULE_AVAILABLE_juce_dsp 8 | #include "Processors/chowdsp_COLAProcessor.cpp" 9 | #endif 10 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_dsp_utils/Processors/chowdsp_AudioTimer.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_AudioTimer.h" 2 | 3 | namespace chowdsp 4 | { 5 | void AudioTimer::prepare (double sampleRate) 6 | { 7 | sampleTimeSeconds = 1.0 / sampleRate; 8 | sampleTimeMilliseconds = 1000.0 * sampleTimeSeconds; 9 | 10 | reset(); 11 | } 12 | 13 | void AudioTimer::reset() 14 | { 15 | counter = 0; 16 | } 17 | 18 | void AudioTimer::advance (int numSamples) 19 | { 20 | counter += numSamples; 21 | } 22 | 23 | juce::int64 AudioTimer::getTimeSamples() const noexcept 24 | { 25 | return counter; 26 | } 27 | 28 | double AudioTimer::getTimeMilliseconds() const noexcept 29 | { 30 | return (double) counter * sampleTimeMilliseconds; 31 | } 32 | 33 | double AudioTimer::getTimeSeconds() const noexcept 34 | { 35 | return (double) counter * sampleTimeSeconds; 36 | } 37 | } // namespace chowdsp 38 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_dsp_utils/Processors/chowdsp_AudioTimer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** A timer to be used within audio callbacks */ 6 | class AudioTimer 7 | { 8 | public: 9 | /** Default constructor */ 10 | AudioTimer() = default; 11 | 12 | /** Prepares the timer to run at a new sample rate. */ 13 | void prepare (double sampleRate); 14 | 15 | /** Resets the timer back to zero. */ 16 | void reset(); 17 | 18 | /** Advances the timer by a given number of samples. */ 19 | void advance (int numSamples); 20 | 21 | /** Return the current time in samples. */ 22 | [[nodiscard]] juce::int64 getTimeSamples() const noexcept; 23 | 24 | /** Return the current time in milliseconds. */ 25 | [[nodiscard]] double getTimeMilliseconds() const noexcept; 26 | 27 | /** Return the current time in seconds. */ 28 | [[nodiscard]] double getTimeSeconds() const noexcept; 29 | 30 | private: 31 | double sampleTimeSeconds = 0.0; 32 | double sampleTimeMilliseconds = 0.0; 33 | juce::int64 counter = 0; 34 | 35 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioTimer) 36 | }; 37 | } // namespace chowdsp 38 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_dsp_utils/chowdsp_dsp_utils.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_dsp_utils.h" 2 | 3 | // processors 4 | #include "Processors/chowdsp_AudioTimer.cpp" 5 | #include "Processors/chowdsp_Panner.cpp" 6 | 7 | // resamplers 8 | #include "Resampling/chowdsp_SRCResampler.cpp" 9 | 10 | #if CHOWDSP_USING_JUCE 11 | // resamplers 12 | #include "Resampling/chowdsp_VariableOversampling.cpp" 13 | 14 | // convolution 15 | #include "Convolution/chowdsp_IRHelpers.cpp" 16 | #endif 17 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_eq/chowdsp_eq.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_eq 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP EQ 10 | description: EQ utilities for ChowDSP plugins 11 | dependencies: chowdsp_reflection, chowdsp_dsp_utils 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: GPLv3 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | 26 | namespace chowdsp 27 | { 28 | /** ChowDSP EQ utilities */ 29 | namespace EQ 30 | { 31 | } 32 | } // namespace chowdsp 33 | 34 | #include "EQ/chowdsp_EQBand.h" 35 | #include "EQ/chowdsp_EQProcessor.h" 36 | #include "EQ/chowdsp_EQParams.h" 37 | 38 | #if CHOWDSP_USING_JUCE 39 | #include "EQ/chowdsp_LinearPhaseEQ.h" 40 | #endif 41 | 42 | #if JUCE_MODULE_AVAILABLE_chowdsp_parameters 43 | #include "EQ/chowdsp_StandardEQParameters.h" 44 | #endif 45 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_filters/Utils/chowdsp_LinearTransforms.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wsign-conversion") 4 | 5 | namespace chowdsp 6 | { 7 | /** Transforming filters with some linear transformations */ 8 | namespace LinearTransforms 9 | { 10 | /** Transforms a filter with some amount of feedback. */ 11 | template 12 | inline void transformFeedback (T (&b_coeffs)[Order + 1], T (&a_coeffs)[Order + 1], T G) 13 | { 14 | const auto a0 = a_coeffs[0] - G * b_coeffs[0]; 15 | const auto a0_inv = normalize ? (T) 1 / a0 : (T) 1; 16 | 17 | a_coeffs[0] = normalize ? (T) 1 : a0; 18 | for (int i = 1; i <= Order; ++i) 19 | a_coeffs[i] = (a_coeffs[i] - G * b_coeffs[i]) * a0_inv; 20 | 21 | for (int i = 0; i <= Order; ++i) 22 | b_coeffs[i] = b_coeffs[i] * a0_inv; 23 | } 24 | } // namespace LinearTransforms 25 | } // namespace chowdsp 26 | 27 | JUCE_END_IGNORE_WARNINGS_GCC_LIKE 28 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_filters/Utils/chowdsp_QValCalcs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Useful methods for computing Q values for filters */ 6 | namespace QValCalcs 7 | { 8 | /** Computes Q values for a Butterworth filter of order N */ 9 | template 10 | constexpr std::array butterworth_Qs() 11 | { 12 | std::array qVals {}; 13 | 14 | size_t k = 1; 15 | const auto lim = N / 2; 16 | 17 | while (k <= lim) 18 | { 19 | auto b = static_cast (-2) * gcem::cos ((T (2 * k) + N - 1) * juce::MathConstants::pi / ((T) 2 * N)); 20 | qVals[k - 1] = static_cast (1) / b; 21 | k += 1; 22 | } 23 | 24 | return qVals; 25 | } 26 | } // namespace QValCalcs 27 | } // namespace chowdsp 28 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_filters/chowdsp_filters.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_filters.h" 2 | 3 | #include "Other/chowdsp_FIRFilter.cpp" 4 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/Math/chowdsp_Combinatorics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Implementations of methods commonly used in combinatorics */ 6 | namespace Combinatorics 7 | { 8 | /** Computes the factorial of n using recursion */ 9 | constexpr int factorial (int x) 10 | { 11 | return x <= 1 ? 1 : x * factorial (x - 1); 12 | } 13 | 14 | /** Computes the permutation of n and k */ 15 | constexpr int permutation (int n, int k) 16 | { 17 | return factorial (n) / factorial (n - k); 18 | } 19 | 20 | /** Computes the combination of n and k ("n choose k") */ 21 | constexpr int combination (int n, int k) 22 | { 23 | return permutation (n, k) / factorial (k); 24 | } 25 | } // namespace Combinatorics 26 | } // namespace chowdsp 27 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/Math/chowdsp_TanhIntegrals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Anti-derivatives of the tanh function */ 6 | namespace TanhIntegrals 7 | { 8 | /** First anti-derivative of tanh */ 9 | template 10 | inline T tanhAD1 (T x) noexcept 11 | { 12 | // It might be possible to optimize this with something like 13 | // return std::log ((T) 0.5) + x + std::log ((T) 1 + std::exp ((T) -2 * x)); 14 | // but I haven't been able to measure a performance gain, so we'll 15 | // stick with the more readable version: 16 | 17 | return std::log (std::cosh (x)); 18 | } 19 | 20 | /** Second anti-derivative of tanh */ 21 | template 22 | inline T tanhAD2 (T x) noexcept 23 | { 24 | using Polylogarithm::Li2, Power::ipow; 25 | const auto expVal = std::exp ((T) -2 * x); 26 | return (T) 0.5 * (Li2 (-expVal) - x * (x + (T) 2 * std::log (expVal + (T) 1) - (T) 2 * std::log (std::cosh (x)))) + (ipow<2> (juce::MathConstants::pi) / (T) 24); 27 | } 28 | } // namespace TanhIntegrals 29 | } // namespace chowdsp 30 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/chowdsp_math.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_math.h" 2 | 3 | // Copy of JUCE macros for Apple vDSP library 4 | #ifndef JUCE_USE_VDSP_FRAMEWORK 5 | #define JUCE_USE_VDSP_FRAMEWORK 1 6 | #endif 7 | 8 | #if (JUCE_MAC || JUCE_IOS) && JUCE_USE_VDSP_FRAMEWORK 9 | #include 10 | #else 11 | #undef JUCE_USE_VDSP_FRAMEWORK 12 | #endif 13 | 14 | #include "Math/chowdsp_FloatVectorOperations.cpp" 15 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .ipynb_checkpoints 3 | .Rproj.user 4 | .Rhistory 5 | build 6 | docs/xml 7 | *.dll 8 | *.exe 9 | *.log 10 | *.lp 11 | *.o 12 | *.so 13 | *.test 14 | *.vscode 15 | *.gcda 16 | *.gcno 17 | *.gcov 18 | *.dSYM -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/.lgtm.yml: -------------------------------------------------------------------------------- 1 | path_classifiers: 2 | test: 3 | - tests 4 | extraction: 5 | cpp: 6 | index: 7 | build_command: 8 | - cd ./tests 9 | - make 10 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/.readthedocs.requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx == 2.4.4 2 | breathe == 4.11.0 3 | sphinxcontrib-katex == 0.6.0 4 | sphinxcontrib-contentui == 0.2.5 5 | docutils == 0.16 -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/.readthedocs.yml: -------------------------------------------------------------------------------- 1 | requirements_file: .readthedocs.requirements.txt 2 | 3 | # conda: 4 | # file: docs/environment.yml 5 | 6 | python: 7 | version: 3.6 8 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/NOTICE.txt: -------------------------------------------------------------------------------- 1 | GCE-Math: A C++ generalized constant expression-based math library 2 | Copyright 2016-2022 Keith O'Hara 3 | 4 | This product includes software developed by Keith O'Hara (http://www.kthohr.com) -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/binder/environment.yml: -------------------------------------------------------------------------------- 1 | # For use with Binder 2 | name: statslib 3 | channels: 4 | - conda-forge 5 | dependencies: 6 | - xeus-cling=0.8.1 7 | - notebook -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/cmake_files/gcemConfig.cmake.in: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | ## 3 | ## Copyright (C) 2016-2022 Keith O'Hara 4 | ## 5 | ## This file is part of the GCE-Math C++ library. 6 | ## 7 | ## Licensed under the Apache License, Version 2.0 (the "License"); 8 | ## you may not use this file except in compliance with the License. 9 | ## You may obtain a copy of the License at 10 | ## 11 | ## http://www.apache.org/licenses/LICENSE-2.0 12 | ## 13 | ## Unless required by applicable law or agreed to in writing, software 14 | ## distributed under the License is distributed on an "AS IS" BASIS, 15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ## See the License for the specific language governing permissions and 17 | ## limitations under the License. 18 | ## 19 | ################################################################################ 20 | 21 | @PACKAGE_INIT@ 22 | 23 | if(NOT TARGET @PROJECT_NAME@) 24 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 25 | get_target_property(@PROJECT_NAME@_INCLUDE_DIRS gcem INTERFACE_INCLUDE_DIRECTORIES) 26 | endif() 27 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/contributors.txt: -------------------------------------------------------------------------------- 1 | External contributions to GCEM 2 | ---- 3 | 4 | 2018-08-02 @jonathansharman 5 | - atan2 implementation 6 | 7 | 2018-07-13 @cpsauer 8 | - fix bug in binomial_coef 9 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/tests/cov_check: -------------------------------------------------------------------------------- 1 | 2 | echo "SHOULD_RUN_COVERAGE: ${SHOULD_RUN_COVERAGE}" 3 | 4 | if [[ "${SHOULD_RUN_COVERAGE}" == "y" ]]; then 5 | 6 | if [ -z ${CCOV+x} ]; then 7 | CCOV=gcov 8 | fi 9 | 10 | echo "CCOV set to ${CCOV}" 11 | 12 | for t in ./*.cpp; do 13 | $CCOV "$t" > /dev/null 2>&1 14 | done 15 | 16 | ./pow.test > /dev/null 2>&1 17 | $CCOV pow.cpp > /dev/null 2>&1 18 | ./exp.test > /dev/null 2>&1 19 | $CCOV exp.cpp > /dev/null 2>&1 20 | ./log.test > /dev/null 2>&1 21 | $CCOV log.cpp > /dev/null 2>&1 22 | fi 23 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_math/third_party/gcem/tests/run_tests: -------------------------------------------------------------------------------- 1 | 2 | for t in ./*.test; do 3 | "$t" 4 | done 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_modal_dsp/chowdsp_modal_dsp.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_modal_dsp.h" 2 | 3 | #include "ModalFilters/chowdsp_ModalFilter.cpp" 4 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_modal_dsp/chowdsp_modal_dsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_modal_dsp 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP Modal Signal Processin Utilities 10 | description: Modal signal processing tools for ChowDSP plugins 11 | dependencies: chowdsp_dsp_data_structures 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: GPLv3 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | // STL includes 24 | #include 25 | 26 | // JUCE includes 27 | #include 28 | 29 | #include "ModalFilters/chowdsp_ModalFilter.h" 30 | #include "ModalFilters/chowdsp_ModalFilterBank.h" 31 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/SIMD/chowdsp_SIMDAlignmentHelpers.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::SIMDUtils 4 | { 5 | /** Returns true if the pointer is aligned to its required SIMD byte boundary. */ 6 | template 7 | static bool isAligned (const T* p) noexcept 8 | { 9 | static constexpr auto RegisterSize = sizeof (xsimd::batch); 10 | uintptr_t bitmask = RegisterSize - 1; 11 | return ((uintptr_t) p & bitmask) == 0; 12 | } 13 | 14 | /** 15 | * A handy function to round up a pointer to the nearest multiple of a given number of bytes. 16 | * alignmentBytes must be a power of two. 17 | */ 18 | template 19 | inline Type* snapPointerToAlignment (Type* basePointer, IntegerType alignmentBytes) noexcept 20 | { 21 | return (Type*) ((((size_t) basePointer) + (alignmentBytes - 1)) & ~(alignmentBytes - 1)); 22 | } 23 | 24 | /** Returns the next aligned pointer after this one. */ 25 | template 26 | static T* getNextAlignedPtr (T* p) noexcept 27 | { 28 | static constexpr auto RegisterSize = sizeof (xsimd::batch>); 29 | return snapPointerToAlignment (p, RegisterSize); 30 | } 31 | } // namespace chowdsp::SIMDUtils 32 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/SIMD/chowdsp_SIMDUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if ! CHOWDSP_NO_XSIMD 4 | /** Simplified way of `using` the same function from both `std::` and `xsimd::` */ 5 | #define CHOWDSP_USING_XSIMD_STD(func) \ 6 | using std::func; \ 7 | using xsimd::func 8 | #else 9 | #define CHOWDSP_USING_XSIMD_STD(func) \ 10 | using std::func 11 | #endif 12 | 13 | namespace chowdsp 14 | { 15 | /** Useful methods for working with SIMD batches via XSIMD */ 16 | namespace SIMDUtils 17 | { 18 | #if ! CHOWDSP_NO_XSIMD 19 | /** Default byte alignment to use for SIMD-aligned data. */ 20 | constexpr auto defaultSIMDAlignment = xsimd::default_arch::alignment(); 21 | #else 22 | /** Default byte alignment to use for SIMD-aligned data. */ 23 | constexpr size_t defaultSIMDAlignment = 16; 24 | #endif 25 | } // namespace SIMDUtils 26 | } // namespace chowdsp 27 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: WebKit 3 | AlignAfterOpenBracket: Align 4 | AlignConsecutiveDeclarations: 'false' 5 | BreakBeforeBraces: Allman 6 | NamespaceIndentation: All 7 | 8 | ... 9 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/clang-aarch64-linux-gnu.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_PROCESSOR aarch64) 2 | set(triple aarch64-linux-gnu) 3 | 4 | include(${CMAKE_CURRENT_LIST_DIR}/clang.cmake) 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/clang-arm-linux-gnueabihf.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_PROCESSOR armv7-a) 2 | set(triple arm-linux-gnueabihf) 3 | 4 | include(${CMAKE_CURRENT_LIST_DIR}/clang.cmake) 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/clang.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Linux) 2 | 3 | set(CMAKE_C_COMPILER clang) 4 | set(CMAKE_C_COMPILER_TARGET ${triple}) 5 | set(CMAKE_CXX_COMPILER clang++) 6 | set(CMAKE_CXX_COMPILER_TARGET ${triple}) 7 | 8 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 9 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 10 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 11 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 12 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/gcc-aarch64-linux-gnu.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_PROCESSOR aarch64) 2 | set(triple aarch64-linux-gnu) 3 | 4 | include(${CMAKE_CURRENT_LIST_DIR}/gcc.cmake) 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/gcc-arm-linux-gnueabihf.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_PROCESSOR armv7-a) 2 | set(triple arm-linux-gnueabihf) 3 | 4 | include(${CMAKE_CURRENT_LIST_DIR}/gcc.cmake) 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/toolchains/gcc.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Linux) 2 | 3 | set(CMAKE_C_COMPILER ${triple}-gcc) 4 | set(CMAKE_CXX_COMPILER ${triple}-g++) 5 | 6 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 7 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 8 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 9 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 10 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/workflows/benchmark.yml: -------------------------------------------------------------------------------- 1 | name: benchmark & examples 2 | on: [ push, pull_request ] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Install dependencies 12 | run: | 13 | sudo apt install g++ cmake 14 | - name: Setup 15 | run: | 16 | mkdir _build 17 | cd _build && cmake .. -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release 18 | - name: Build 19 | run: cmake --build _build 20 | - name: Testing sequential 21 | run: cmake --build _build --target xbenchmark 22 | 23 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/workflows/clang-format-check.yml: -------------------------------------------------------------------------------- 1 | name: clang-format 2 | on: [ push, pull_request ] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | jobs: 7 | formatting-check: 8 | name: Format check 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | - name: Run clang-format style check for C/C++ programs. 13 | uses: jidicula/clang-format-action@v4.2.0 14 | with: 15 | clang-format-version: '13' 16 | exclude-regex: 'doctest.h' 17 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/workflows/cxx-versions.yml: -------------------------------------------------------------------------------- 1 | name: C++ compatibility build 2 | on: [ push, pull_request ] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | cxx-version: [ 11, 14, 17, 20 ] 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Install dependencies 15 | run: | 16 | sudo apt install g++ cmake 17 | - name: Setup 18 | run: | 19 | mkdir _build 20 | cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.cxx-version}} 21 | - name: Build 22 | run: cmake --build _build 23 | 24 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | name: doc 2 | on: [ push, pull_request ] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Install dependencies 12 | run: sudo apt install doxygen python3-breathe python3-sphinx-rtd-theme 13 | - name: Render 14 | run: make -C docs 15 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: macOS build 2 | on: [ push, pull_request ] 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | jobs: 7 | build: 8 | strategy: 9 | matrix: 10 | os: 11 | - 11 12 | - 12 13 | runs-on: macos-${{ matrix.os }} 14 | name: 'macos-${{ matrix.os }}' 15 | steps: 16 | - uses: actions/checkout@v2 17 | - name: Setup 18 | run: | 19 | mkdir _build 20 | cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" 21 | - name: Build 22 | run: cmake --build _build 23 | - name: Testing sequential 24 | run: cmake --build _build --target xbenchmark 25 | - name: Testing xsimd 26 | run: ${{github.workspace}}/_build/test/test_xsimd 27 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated pkg-config files 2 | *.pc 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | 22 | # Compiled Static libraries 23 | *.lai 24 | *.la 25 | *.a 26 | *.lib 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | 33 | # Vim tmp files 34 | *.swp 35 | 36 | # Build folder 37 | build/ 38 | 39 | # Documentation build artefacts 40 | docs/CMakeCache.txt 41 | docs/xml/ 42 | docs/build/ 43 | 44 | # VSCode / clangd IntelliSense 45 | .vscode/ 46 | .cache/ 47 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to xsimd 2 | 3 | First, thanks for being there! Welcome on board, we will try to make your 4 | contributing journey as good an experience as it can be. 5 | 6 | # Submitting patches 7 | 8 | Patches should be submitted through Github PR. We di put some effort to setup a 9 | decent Continuous Integration coverage, please try to make it green ;-) 10 | 11 | We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to keep 12 | the coding style consistent, a ``.clang-format`` file is shipped within the 13 | source, feel free to use it! 14 | 15 | # Extending the API 16 | 17 | We are open to extending the API, as long as it has been discussed either in an 18 | Issue or a PR. The only constraint is to add testing for new functions, and make 19 | sure they work on all supported architectures, not only your favorite one! 20 | 21 | # Licensing 22 | 23 | We use a shared copyright model that enables all contributors to maintain the 24 | copyright on their contributions. Stated otherwise, there's no copyright 25 | assignment. 26 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/cmake/JoinPaths.cmake: -------------------------------------------------------------------------------- 1 | # This module provides function for joining paths 2 | # known from from most languages 3 | # 4 | # Original license: 5 | # SPDX-License-Identifier: (MIT OR CC0-1.0) 6 | # Explicit permission given to distribute this module under 7 | # the terms of the project as described in /LICENSE.rst. 8 | # Copyright 2020 Jan Tojnar 9 | # https://github.com/jtojnar/cmake-snips 10 | # 11 | # Modelled after Python’s os.path.join 12 | # https://docs.python.org/3.7/library/os.path.html#os.path.join 13 | # Windows not supported 14 | function(join_paths joined_path first_path_segment) 15 | set(temp_path "${first_path_segment}") 16 | foreach (current_segment IN LISTS ARGN) 17 | if (NOT ("${current_segment}" STREQUAL "")) 18 | if (IS_ABSOLUTE "${current_segment}") 19 | set(temp_path "${current_segment}") 20 | else () 21 | set(temp_path "${temp_path}/${current_segment}") 22 | endif () 23 | endif () 24 | endforeach () 25 | set(${joined_path} "${temp_path}" PARENT_SCOPE) 26 | endfunction() 27 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/environment.yml: -------------------------------------------------------------------------------- 1 | name: xsimd 2 | channels: 3 | - conda-forge 4 | dependencies: 5 | - ninja 6 | - xtl 7 | - doctest 8 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/include/xsimd/arch/xsimd_avx512cd.hpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * 3 | * Martin Renou * 4 | * Copyright (c) QuantStack * 5 | * Copyright (c) Serge Guelton * 6 | * * 7 | * Distributed under the terms of the BSD 3-Clause License. * 8 | * * 9 | * The full license is in the file LICENSE, distributed with this software. * 10 | ****************************************************************************/ 11 | 12 | #ifndef XSIMD_AVX512CD_HPP 13 | #define XSIMD_AVX512CD_HPP 14 | 15 | #include "../types/xsimd_avx512cd_register.hpp" 16 | 17 | namespace xsimd 18 | { 19 | 20 | namespace kernel 21 | { 22 | // Nothing there yet. 23 | 24 | } 25 | 26 | } 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/install_sde.sh: -------------------------------------------------------------------------------- 1 | #git clone https://github.com/marehr/intel-sde-downloader 2 | #cd intel-sde-downloader 3 | #pip install -r requirements.txt 4 | #python ./intel-sde-downloader.py sde-external-8.35.0-2019-03-11-lin.tar.bz2 5 | #wget http://software.intel.com/content/dam/develop/external/us/en/protected/sde-external-8.50.0-2020-03-26-lin.tar.bz2 6 | 7 | wget --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36" https://software.intel.com/content/dam/develop/external/us/en/documents/sde-external-8.56.0-2020-07-05-lin.tar.bz2 8 | 9 | tar xvf sde-external-8.56.0-2020-07-05-lin.tar.bz2 10 | sudo sh -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" 11 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/readthedocs.yml: -------------------------------------------------------------------------------- 1 | conda: 2 | file: docs/environment.yml 3 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/main.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * 3 | * Martin Renou * 4 | * Copyright (c) QuantStack * 5 | * Copyright (c) Serge Guelton * 6 | * * 7 | * Distributed under the terms of the BSD 3-Clause License. * 8 | * * 9 | * The full license is in the file LICENSE, distributed with this software. * 10 | ****************************************************************************/ 11 | 12 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN 13 | #include "doctest/doctest.h" 14 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/sse3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit_code=0 3 | for instr in `grep -o -E '^_mm_[a-z1Z0-9_]+' $0` 4 | do 5 | if ! grep -q -r $instr ../include-refactoring 6 | then 7 | echo $instr 8 | exit_code=1 9 | fi 10 | done 11 | exit $exit_code 12 | 13 | # Instructions below starting with a # are known to be unused in xsimd 14 | #_mm_addsub_pd 15 | #_mm_addsub_ps 16 | _mm_hadd_pd 17 | _mm_hadd_ps 18 | #_mm_hsub_pd 19 | #_mm_hsub_ps 20 | #_mm_lddqu_si128 21 | #_mm_loaddup_pd 22 | #_mm_movedup_pd 23 | #_mm_movehdup_ps 24 | #_mm_moveldup_ps 25 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/sse4_2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit_code=0 3 | for instr in `grep -o -E '^_mm_[a-z1Z0-9_]+' $0` 4 | do 5 | if ! grep -q -r $instr ../include-refactoring 6 | then 7 | echo $instr 8 | exit_code=1 9 | fi 10 | done 11 | exit $exit_code 12 | 13 | # Instructions below starting with a # are known to be unused in xsimd 14 | #_mm_cmpestra 15 | #_mm_cmpestrc 16 | #_mm_cmpestri 17 | #_mm_cmpestrm 18 | #_mm_cmpestro 19 | #_mm_cmpestrs 20 | #_mm_cmpestrz 21 | _mm_cmpgt_epi64 22 | #_mm_cmpistra 23 | #_mm_cmpistrc 24 | #_mm_cmpistri 25 | #_mm_cmpistrm 26 | #_mm_cmpistro 27 | #_mm_cmpistrs 28 | #_mm_cmpistrz 29 | #_mm_crc32_u16 30 | #_mm_crc32_u32 31 | #_mm_crc32_u64 32 | #_mm_crc32_u8 33 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/ssse3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit_code=0 3 | for instr in `grep -o -E '^_mm_[a-z1Z0-9_]+' $0` 4 | do 5 | if ! grep -q -r $instr ../include-refactoring 6 | then 7 | echo $instr 8 | exit_code=1 9 | fi 10 | done 11 | exit $exit_code 12 | 13 | # Instructions below starting with a # are known to be unused in xsimd 14 | _mm_abs_epi16 15 | _mm_abs_epi32 16 | _mm_abs_epi8 17 | #_mm_abs_pi16 18 | #_mm_abs_pi32 19 | #_mm_abs_pi8 20 | #_mm_alignr_epi8 21 | #_mm_alignr_pi8 22 | _mm_hadd_epi16 23 | _mm_hadd_epi32 24 | #_mm_hadd_pi16 25 | #_mm_hadd_pi32 26 | #_mm_hadds_epi16 27 | #_mm_hadds_pi16 28 | #_mm_hsub_epi16 29 | #_mm_hsub_epi32 30 | #_mm_hsub_pi16 31 | #_mm_hsub_pi32 32 | #_mm_hsubs_epi16 33 | #_mm_hsubs_pi16 34 | #_mm_maddubs_epi16 35 | #_mm_maddubs_pi16 36 | #_mm_mulhrs_epi16 37 | #_mm_mulhrs_pi16 38 | #_mm_shuffle_epi8 39 | #_mm_shuffle_pi8 40 | #_mm_sign_epi16 41 | #_mm_sign_epi32 42 | #_mm_sign_epi8 43 | #_mm_sign_pi16 44 | #_mm_sign_pi32 45 | #_mm_sign_pi8 46 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/test_sum.cpp: -------------------------------------------------------------------------------- 1 | #include "test_sum.hpp" 2 | #if XSIMD_WITH_AVX 3 | template float sum::operator()(xsimd::avx, float const*, unsigned); 4 | #endif 5 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/test/test_sum.hpp: -------------------------------------------------------------------------------- 1 | #ifndef XSIMD_TEST_SUM_HPP 2 | #define XSIMD_TEST_SUM_HPP 3 | #include "xsimd/xsimd.hpp" 4 | #ifndef XSIMD_NO_SUPPORTED_ARCHITECTURE 5 | 6 | struct sum 7 | { 8 | // NOTE: no inline definition here otherwise extern template instantiation 9 | // doesn't prevent implicit instantiation. 10 | template 11 | T operator()(Arch, T const* data, unsigned size); 12 | }; 13 | 14 | template 15 | T sum::operator()(Arch, T const* data, unsigned size) 16 | { 17 | using batch = xsimd::batch; 18 | batch acc(static_cast(0)); 19 | const unsigned n = size / batch::size * batch::size; 20 | for (unsigned i = 0; i != n; i += batch::size) 21 | acc += batch::load_unaligned(data + i); 22 | T star_acc = xsimd::reduce_add(acc); 23 | for (unsigned i = n; i < size; ++i) 24 | star_acc += data[i]; 25 | return star_acc; 26 | } 27 | 28 | #if XSIMD_WITH_AVX 29 | extern template float sum::operator()(xsimd::avx, float const*, unsigned); 30 | #endif 31 | 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_simd/third_party/xsimd/xsimd.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=@libdir_for_pc_file@ 3 | includedir=@includedir_for_pc_file@ 4 | 5 | Name: xsimd 6 | Description: xsimd provides a unified means for using SIMD features for library authors.. 7 | Version: @xsimd_VERSION@ 8 | Cflags: -I${includedir} 9 | -------------------------------------------------------------------------------- /modules/dsp/chowdsp_waveshapers/Waveshapers/chowdsp_ADAATanhClipper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** 6 | * Tanh soft clipper implemented with 2nd-order integrated waveshaping (ADAA). 7 | * 8 | * Note that this processor adds one sample of latency to the signal. 9 | */ 10 | template 11 | class ADAATanhClipper : public ADAAWaveshaper 12 | { 13 | public: 14 | explicit ADAATanhClipper (LookupTableCache* lutCache = nullptr, T range = (T) 10, int N = 1 << 18) : ADAAWaveshaper (lutCache, "chowdsp_tanh_clipper") 15 | { 16 | using namespace TanhIntegrals; 17 | this->initialise ( 18 | [] (auto x) 19 | { return std::tanh (x); }, 20 | [] (auto x) 21 | { return tanhAD1 (x); }, 22 | [] (auto x) 23 | { return tanhAD2 (x); }, 24 | -range, 25 | range, 26 | N); 27 | } 28 | 29 | private: 30 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ADAATanhClipper) 31 | }; 32 | } // namespace chowdsp 33 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_foleys/GuiItems/chowdsp_TooltipItem.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Foley's GUI wrapper for TooltipComponent */ 6 | class TooltipItem : public foleys::GuiItem 7 | { 8 | public: 9 | FOLEYS_DECLARE_GUI_FACTORY (TooltipItem) 10 | 11 | TooltipItem (foleys::MagicGUIBuilder& builder, const juce::ValueTree& node) : foleys::GuiItem (builder, node) 12 | { 13 | setColourTranslation ({ 14 | { "tooltip-background", TooltipComponent::backgroundColourID }, 15 | { "tooltip-text", TooltipComponent::textColourID }, 16 | { "tooltip-name", TooltipComponent::nameColourID }, 17 | }); 18 | 19 | addAndMakeVisible (tooltipComp); 20 | } 21 | 22 | void update() override 23 | { 24 | } 25 | 26 | juce::Component* getWrappedComponent() override 27 | { 28 | return &tooltipComp; 29 | } 30 | 31 | private: 32 | TooltipComponent tooltipComp; 33 | 34 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TooltipItem) 35 | }; 36 | } // namespace chowdsp 37 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/Assets/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/modules/gui/chowdsp_gui/Assets/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/Assets/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/modules/gui/chowdsp_gui/Assets/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/Assets/chowdsp_BinaryData.h: -------------------------------------------------------------------------------- 1 | /* (Auto-generated binary data file). */ 2 | 3 | #pragma once 4 | 5 | namespace chowdsp_BinaryData 6 | { 7 | extern const char* knob_svg; 8 | const int knob_svgSize = 725; 9 | 10 | extern const char* pointer_svg; 11 | const int pointer_svgSize = 383; 12 | 13 | extern const char* LeftArrow_svg; 14 | const int LeftArrow_svgSize = 179; 15 | 16 | extern const char* RightArrow_svg; 17 | const int RightArrow_svgSize = 159; 18 | 19 | extern const char* RobotoCondensedBold_ttf; 20 | const int RobotoCondensedBold_ttfSize = 169352; 21 | 22 | extern const char* RobotoCondensedRegular_ttf; 23 | const int RobotoCondensedRegular_ttfSize = 169848; 24 | 25 | } // namespace chowdsp_BinaryData 26 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/Assets/knob.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/Assets/pointer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/InfoUtils/chowdsp_InfoProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_InfoProvider.h" 2 | 3 | namespace chowdsp 4 | { 5 | juce::String StandardInfoProvider::getManufacturerString() 6 | { 7 | #if defined JucePlugin_Manufacturer 8 | return JucePlugin_Manufacturer; 9 | #else 10 | return "Manu"; 11 | #endif 12 | } 13 | 14 | juce::URL StandardInfoProvider::getManufacturerWebsiteURL() 15 | { 16 | #if defined JucePlugin_ManufacturerWebsite 17 | return juce::URL { JucePlugin_ManufacturerWebsite }; 18 | #else 19 | return juce::URL { "https://chowdsp.com" }; 20 | #endif 21 | } 22 | 23 | juce::String StandardInfoProvider::getPlatformString() 24 | { 25 | return toString (SystemInfo::getOSDescription()) + "-" + toString (SystemInfo::getProcArch()); 26 | } 27 | 28 | juce::String StandardInfoProvider::getVersionString() 29 | { 30 | #if defined JucePlugin_VersionString 31 | return "v" + juce::String (JucePlugin_VersionString); 32 | #else 33 | return juce::String ("No Version"); 34 | #endif 35 | } 36 | } // namespace chowdsp 37 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/InfoUtils/chowdsp_SystemInfo.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Methods for retreiving information about the target system. */ 6 | namespace SystemInfo 7 | { 8 | /** Returns the current operating system and bit-depth. */ 9 | constexpr std::string_view getOSDescription() 10 | { 11 | #if JUCE_WINDOWS 12 | #if JUCE_64BIT 13 | return "Win64"; 14 | #elif JUCE_32BIT 15 | return "Win32"; 16 | #endif 17 | #elif JUCE_MAC 18 | return "Mac"; 19 | #elif JUCE_IOS 20 | return "IOS"; 21 | #elif JUCE_LINUX 22 | #if JUCE_64BIT 23 | return "Linux64"; 24 | #elif JUCE_32BIT 25 | return "Linux32"; 26 | #endif 27 | #endif 28 | } 29 | 30 | /** 31 | * Returns the target system architecture. 32 | * Currently only "Intel" or "ARM". 33 | */ 34 | constexpr std::string_view getProcArch() 35 | { 36 | #if JUCE_INTEL 37 | return "Intel"; 38 | #elif JUCE_ARM 39 | return "ARM"; 40 | #else 41 | return "N/A"; 42 | #endif 43 | } 44 | } // namespace SystemInfo 45 | } // namespace chowdsp 46 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/PluginComponents/chowdsp_CPUMeter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if JUCE_MODULE_AVAILABLE_juce_dsp 4 | JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wimplicit-const-int-float-conversion") 5 | #include 6 | JUCE_END_IGNORE_WARNINGS_GCC_LIKE 7 | 8 | namespace chowdsp 9 | { 10 | /** Simple progress bar to visualize CPU usage */ 11 | class CPUMeter : public juce::Component, 12 | private juce::Timer 13 | { 14 | public: 15 | explicit CPUMeter (const juce::AudioProcessLoadMeasurer& loadMeasurer); 16 | ~CPUMeter() override; 17 | 18 | void colourChanged() override; 19 | void resized() override; 20 | 21 | private: 22 | void timerCallback() override; 23 | 24 | double loadProportion = 0.0; 25 | juce::ProgressBar progress { loadProportion }; 26 | juce::dsp::BallisticsFilter smoother; 27 | 28 | const juce::AudioProcessLoadMeasurer& loadMeasurer; 29 | 30 | std::unique_ptr cpuMeterLNF; 31 | 32 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CPUMeter) 33 | }; 34 | } // namespace chowdsp 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/PluginComponents/chowdsp_InfoComp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** A simple component to display the type, version, and manufacturer of a plugin */ 6 | template 7 | class InfoComp : public juce::Component 8 | { 9 | public: 10 | /** Creates an Info component for the given plugin wrapper type */ 11 | explicit InfoComp (const ProcType& processor); 12 | 13 | enum ColourIDs 14 | { 15 | text1ColourID, /**< Colour used for plugin type text */ 16 | text2ColourID, /**< Colour used for web link */ 17 | }; 18 | 19 | void paint (juce::Graphics& g) override; 20 | void resized() override; 21 | 22 | private: 23 | const ProcType& proc; 24 | juce::HyperlinkButton linkButton { InfoProvider::getManufacturerString(), InfoProvider::getManufacturerWebsiteURL() }; 25 | 26 | int linkX = 0; 27 | 28 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InfoComp) 29 | }; 30 | } // namespace chowdsp 31 | 32 | #include "chowdsp_InfoComp.cpp" 33 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/PluginComponents/chowdsp_TitleComp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** A simple component to dislay the title and subtitle of a plugin */ 6 | class TitleComp : public juce::Component, 7 | public juce::SettableTooltipClient 8 | { 9 | public: 10 | TitleComp(); 11 | 12 | enum ColourIDs 13 | { 14 | text1ColourID, /**< Colour to use for plugin title */ 15 | text2ColourID, /**< Colour to use for plugin subtitle */ 16 | }; 17 | 18 | void paint (juce::Graphics& g) override; 19 | 20 | /** Sets the strings to use for the plugin title 21 | * 22 | * @param newTitle Main plugin title 23 | * @param newSubtitle Secondary plugin title 24 | * @param font Font size to use for drawing the title 25 | */ 26 | void setStrings (const juce::String& newTitle, const juce::String& newSubtitle, float font); 27 | 28 | private: 29 | juce::String title; 30 | juce::String subtitle; 31 | float font = 0.0f; 32 | 33 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TitleComp) 34 | }; 35 | } // namespace chowdsp 36 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/PluginComponents/chowdsp_TooltipComp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Component to display the name and tooltip of whatever component is under the mouse. */ 6 | class TooltipComponent : public juce::Component, 7 | private juce::Timer 8 | { 9 | public: 10 | TooltipComponent(); 11 | 12 | enum ColourIDs 13 | { 14 | backgroundColourID, /**< Background colour for the component */ 15 | textColourID, /**< Colour to use for the tooltip text */ 16 | nameColourID, /**< Colour to use for the tooltip name */ 17 | }; 18 | 19 | void paint (juce::Graphics& g) override; 20 | void timerCallback() override; 21 | static void getTipFor (juce::Component& c, juce::String& newTip, juce::String& newName); 22 | 23 | protected: 24 | juce::String name, tip; 25 | std::atomic_bool showTip { false }; 26 | 27 | private: 28 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TooltipComponent) 29 | }; 30 | } // namespace chowdsp 31 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_gui/chowdsp_gui.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_gui.h" 2 | 3 | #include "Assets/chowdsp_BinaryData.cpp" 4 | #include "LookAndFeel/chowdsp_ChowLNF.cpp" 5 | 6 | #include "Helpers/chowdsp_LongPressActionHelper.cpp" 7 | #include "Helpers/chowdsp_PopupMenuHelper.cpp" 8 | #include "Helpers/chowdsp_OpenGLHelper.cpp" 9 | #include "Helpers/chowdsp_HostContextProvider.cpp" 10 | 11 | #include "InfoUtils/chowdsp_InfoProvider.cpp" 12 | 13 | #include "PluginComponents/chowdsp_TitleComp.cpp" 14 | #include "PluginComponents/chowdsp_TooltipComp.cpp" 15 | 16 | #if JUCE_MODULE_AVAILABLE_juce_dsp 17 | #include "PluginComponents/chowdsp_CPUMeter.cpp" 18 | #endif 19 | 20 | #if JUCE_MODULE_AVAILABLE_chowdsp_plugin_state 21 | #include "PluginComponents/chowdsp_ParametersView.cpp" 22 | #endif 23 | 24 | #if CHOWDSP_USING_JUCE && JUCE_MODULE_AVAILABLE_chowdsp_dsp_utils 25 | #include "PluginComponents/chowdsp_OversamplingMenu.cpp" 26 | #endif 27 | 28 | #if JUCE_MODULE_AVAILABLE_chowdsp_presets 29 | #include "Presets/chowdsp_PresetsComp.cpp" 30 | #endif 31 | 32 | #if JUCE_MODULE_AVAILABLE_chowdsp_presets_v2 33 | #include "Presets/chowdsp_PresetsComponent.cpp" 34 | #endif 35 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_visualizers/CompressorPlots/chowdsp_LevelDetectorVisualizer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::compressor 4 | { 5 | /** A waveform view that can be used to visualize level detector data */ 6 | class LevelDetectorVisualizer : public WaveformView<2> 7 | { 8 | public: 9 | using WaveformView<2>::WaveformView; 10 | 11 | double secondsToVisualize = 2.0; 12 | 13 | juce::Colour audioColour = juce::Colours::dodgerblue; 14 | juce::Colour levelColour = juce::Colours::red; 15 | 16 | struct Params 17 | { 18 | float yMin = -1.0f; 19 | float yMax = 1.0f; 20 | }; 21 | Params params; 22 | 23 | protected: 24 | void paintChannel (int channelIndex, 25 | juce::Graphics& g, 26 | juce::Rectangle area, 27 | const juce::Range* levels, 28 | int numLevels, 29 | int nextSample) override; 30 | 31 | private: 32 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LevelDetectorVisualizer) 33 | }; 34 | } // namespace chowdsp::compressor 35 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_visualizers/SpectrumPlots/chowdsp_SpectrumPlotBase.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_SpectrumPlotBase.h" 2 | 3 | namespace chowdsp 4 | { 5 | SpectrumPlotBase::SpectrumPlotBase (SpectrumPlotParams&& plotParams) : params (std::move (plotParams)) 6 | { 7 | } 8 | 9 | float SpectrumPlotBase::getXCoordinateForFrequency (float freqHz) const 10 | { 11 | const auto xNorm = std::log (freqHz / params.minFrequencyHz) / params.frequencyScale; 12 | return xNorm * (float) getWidth(); 13 | } 14 | 15 | float SpectrumPlotBase::getFrequencyForXCoordinate (float xCoord) const 16 | { 17 | const auto xNorm = xCoord / (float) getWidth(); 18 | return std::exp (xNorm * params.frequencyScale) * params.minFrequencyHz; 19 | } 20 | 21 | float SpectrumPlotBase::getYCoordinateForDecibels (float gainDB) const 22 | { 23 | return (float) getHeight() * (params.maxMagnitudeDB - gainDB) / params.rangeDB; 24 | } 25 | } // namespace chowdsp 26 | -------------------------------------------------------------------------------- /modules/gui/chowdsp_visualizers/chowdsp_visualizers.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_visualizers.h" 2 | 3 | #include "SpectrumPlots/chowdsp_SpectrumPlotBase.cpp" 4 | #include "SpectrumPlots/chowdsp_GenericFilterPlotter.cpp" 5 | 6 | #include "WaveshaperPlot/chowdsp_WaveshaperPlot.cpp" 7 | 8 | #include "CompressorPlots/chowdsp_GainReductionMeter.cpp" 9 | #include "CompressorPlots/chowdsp_GainComputerPlot.cpp" 10 | #include "CompressorPlots/chowdsp_LevelDetectorVisualizer.cpp" 11 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_clap_extensions/ParameterExtensions/chowdsp_ModParamMixin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // LCOV_EXCL_START 4 | 5 | namespace chowdsp::ParamUtils 6 | { 7 | /** Mixin for parameters that recognize some form of modulation. */ 8 | struct ModParameterMixin : public clap_juce_extensions::clap_juce_parameter_capabilities 9 | { 10 | ~ModParameterMixin() override = default; 11 | 12 | /** Base function for applying monophonic modulation to a parameter. */ 13 | [[maybe_unused]] void applyMonophonicModulation (double /*value*/) override 14 | { 15 | } 16 | 17 | /** Base function for applying polyphonic modulation to a parameter. */ 18 | [[maybe_unused]] void applyPolyphonicModulation (int32_t /*note_id*/, int16_t /*port_index*/, int16_t /*channel*/, int16_t /*key*/, double /*value*/) override 19 | { 20 | } 21 | }; 22 | } // namespace chowdsp::ParamUtils 23 | 24 | // LCOV_EXCL_END 25 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_clap_extensions/PluginExtensions/chowdsp_CLAPInfoExtensions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // LCOV_EXCL_START 4 | 5 | namespace chowdsp::CLAPExtensions 6 | { 7 | /** Interface for clap_juce_extensions::clap_properties */ 8 | struct CLAPInfoExtensions : public clap_juce_extensions::clap_properties 9 | { 10 | /** 11 | * Returns juce::AudioProcessor::getWrapperTypeDescription(), unless 12 | * the plugin is a CLAP, in which case the method will return "CLAP". 13 | */ 14 | [[nodiscard]] juce::String getPluginTypeString (juce::AudioProcessor::WrapperType wrapperType) const 15 | { 16 | if (wrapperType == juce::AudioProcessor::wrapperType_Undefined && is_clap) 17 | return "CLAP"; 18 | 19 | return juce::AudioProcessor::getWrapperTypeDescription (wrapperType); 20 | } 21 | }; 22 | } // namespace chowdsp::CLAPExtensions 23 | 24 | // LCOV_EXCL_END 25 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_clap_extensions/chowdsp_clap_extensions.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_clap_extensions.h" 2 | 3 | // LCOV_EXCL_START 4 | #if JUCE_MODULE_AVAILABLE_chowdsp_presets_v2 5 | #include "PresetExtensions/chowdsp_CLAPPresetDiscoveryProviders.cpp" 6 | #endif 7 | // LCOV_EXCL_END 8 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_fuzzy_search/chowdsp_fuzzy_search.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_fuzzy_search 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP Fuzzy Search 10 | description: ChowDSP module useful for doing fuzzy searches on databases of tagged presets or similar 11 | dependencies: chowdsp_core, chowdsp_data_structures 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-Clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "Search/chowdsp_SearchHelpers.h" 26 | #include "Search/chowdsp_DatabaseWordStorage.h" 27 | #include "Search/chowdsp_SearchDatabase.h" 28 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_parameters/ParamUtils/chowdsp_ParameterConversions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::ParamUtils 4 | { 5 | juce::String freqValToString (float freqVal); 6 | float stringToFreqVal (const juce::String& s); 7 | 8 | juce::String percentValToString (float percentVal); 9 | float stringToPercentVal (const juce::String& s); 10 | 11 | juce::String gainValToString (float gainVal); 12 | float stringToGainVal (const juce::String& s); 13 | 14 | juce::String ratioValToString (float ratioVal); 15 | float stringToRatioVal (const juce::String& s); 16 | 17 | juce::String timeMsValToString (float timeMsVal); 18 | float stringToTimeMsVal (const juce::String& s); 19 | 20 | juce::String semitonesValToString (float semitonesVal, bool snapToInt); 21 | float stringToSemitonesVal (const juce::String& s); 22 | 23 | juce::String floatValToString (float floatVal); 24 | template 25 | juce::String floatValToStringDecimal (float floatVal) 26 | { 27 | return { floatVal, NumDecimalPlaces, false }; 28 | } 29 | float stringToFloatVal (const juce::String& s); 30 | } // namespace chowdsp::ParamUtils 31 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_parameters/chowdsp_parameters.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_parameters.h" 2 | 3 | #include "ParamUtils/chowdsp_ParameterConversions.cpp" 4 | #include "ParamUtils/chowdsp_ParamUtils.cpp" 5 | #include "chowdsp_parameters/Forwarding/chowdsp_ForwardingParameter.cpp" 6 | #include "ParamUtils/chowdsp_ParameterTypes.cpp" 7 | 8 | #if JUCE_MODULE_AVAILABLE_chowdsp_rhythm 9 | #include "ParamUtils/chowdsp_RhythmParameter.cpp" 10 | #endif 11 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_base/PluginBase/chowdsp_DummySynthSound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** A dummy synthesiser sound that applies to all notes and channels */ 6 | struct DummySound : public juce::SynthesiserSound 7 | { 8 | DummySound() = default; 9 | 10 | bool appliesToNote (int) override { return true; } 11 | bool appliesToChannel (int) override { return true; } 12 | }; 13 | 14 | } // namespace chowdsp 15 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_state/chowdsp_plugin_state.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_plugin_state.h" 2 | 3 | #include "Backend/chowdsp_ParameterListeners.cpp" 4 | 5 | #include "Frontend/chowdsp_SliderAttachment.cpp" 6 | #include "Frontend/chowdsp_SliderChoiceAttachment.cpp" 7 | #include "Frontend/chowdsp_ComboBoxAttachment.cpp" 8 | #include "Frontend/chowdsp_ButtonAttachment.cpp" 9 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_utils/Files/chowdsp_FileListener.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_FileListener.h" 2 | 3 | namespace chowdsp 4 | { 5 | FileListener::FileListener (const juce::File& file, int timerSeconds) : fileToListenTo (file) 6 | { 7 | fileModificationTime = fileToListenTo.getLastModificationTime().toMilliseconds(); 8 | if (timerSeconds > 0) 9 | startTimer (timerSeconds * 1000); 10 | } 11 | 12 | FileListener::~FileListener() 13 | { 14 | if (isTimerRunning()) 15 | stopTimer(); 16 | } 17 | 18 | void FileListener::timerCallback() 19 | { 20 | auto newModificationTime = fileToListenTo.getLastModificationTime().toMilliseconds(); 21 | 22 | if (newModificationTime < fileModificationTime) 23 | { 24 | jassertfalse; // file modification time moved backwards? 25 | return; 26 | } 27 | 28 | if (newModificationTime == fileModificationTime) 29 | return; // everything up-to-date 30 | 31 | // needs update! 32 | fileModificationTime = newModificationTime; 33 | listenerFileChanged(); 34 | } 35 | } // namespace chowdsp 36 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_utils/Files/chowdsp_FileListener.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Abstract class to allow the derived class to listen for changes to a file. */ 6 | class FileListener : public juce::Timer 7 | { 8 | public: 9 | /** 10 | * Initialize this FileListener for a given file and update time. 11 | * 12 | * If the given update time is less than or equal to zero, then 13 | * the timer will not be started. 14 | */ 15 | FileListener (const juce::File& file, int timerSeconds); 16 | 17 | ~FileListener() override; 18 | 19 | /** Override this class to do something when the file has changed. */ 20 | virtual void listenerFileChanged() = 0; 21 | 22 | /** Returns the file that is currently being listened to. */ 23 | [[nodiscard]] const juce::File& getListenerFile() const noexcept { return fileToListenTo; } 24 | 25 | private: 26 | void timerCallback() override; 27 | 28 | const juce::File fileToListenTo; 29 | juce::int64 fileModificationTime = 0; 30 | 31 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FileListener) 32 | }; 33 | } // namespace chowdsp 34 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_utils/State/chowdsp_UIState.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp 4 | { 5 | /** Manages the state of the plugin UI */ 6 | class UIState : private juce::ComponentListener 7 | { 8 | public: 9 | /** Constructor */ 10 | explicit UIState (juce::AudioProcessorValueTreeState& vts, int defaultWidth = 400, int defaultHeight = 400); 11 | 12 | /** Attaches the state to the plugin editor */ 13 | virtual void attachToComponent (juce::AudioProcessorEditor& comp); 14 | 15 | /** Returns the previous editor size */ 16 | [[nodiscard]] juce::Rectangle getLastEditorSize() const; 17 | 18 | protected: 19 | void componentBeingDeleted (juce::Component& component) override; 20 | void componentMovedOrResized (juce::Component& component, bool wasMoved, bool wasResized) override; 21 | 22 | juce::AudioProcessorValueTreeState& vts; 23 | 24 | private: 25 | void setLastEditorSize (const juce::Rectangle& bounds); 26 | 27 | const int defaultWidth; 28 | const int defaultHeight; 29 | 30 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UIState) 31 | }; 32 | } // namespace chowdsp 33 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_plugin_utils/chowdsp_plugin_utils.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_plugin_utils.h" 2 | 3 | #include "Files/chowdsp_AudioFileSaveLoadHelper.cpp" 4 | #include "Files/chowdsp_FileListener.cpp" 5 | #include "Files/chowdsp_TweaksFile.cpp" 6 | #include "SharedUtils/chowdsp_GlobalPluginSettings.cpp" 7 | #include "State/chowdsp_UIState.cpp" 8 | #include "Threads/chowdsp_AudioUIBackgroundTask.cpp" 9 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets/chowdsp_presets.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_presets.h" 2 | 3 | #include "Backend/chowdsp_Preset.cpp" 4 | #include "Backend/chowdsp_PresetManager.cpp" 5 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets/chowdsp_presets.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_presets 7 | vendor: Chowdhury DSP 8 | version: 1.3.0 9 | name: ChowDSP Presets Utilities 10 | description: Presets management system for ChowDSP plugins 11 | dependencies: juce_core, juce_audio_utils, chowdsp_version 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | // STL includes 24 | #include 25 | 26 | // JUCE includes 27 | #include 28 | #include 29 | #include 30 | 31 | #include "Backend/chowdsp_Preset.h" 32 | #include "Backend/chowdsp_PresetManager.h" 33 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsClipboardInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_PresetsClipboardInterface.h" 2 | 3 | namespace chowdsp::presets::frontend 4 | { 5 | ClipboardInterface::ClipboardInterface (PresetManager& manager) : presetManager (manager) 6 | { 7 | } 8 | 9 | void ClipboardInterface::copyCurrentPreset() const 10 | { 11 | jassert (presetManager.getCurrentPreset() != nullptr && presetManager.getCurrentPreset()->isValid()); 12 | juce::SystemClipboard::copyTextToClipboard (presetManager.getCurrentPreset()->toJson().dump()); 13 | } 14 | 15 | bool ClipboardInterface::tryToPastePreset() 16 | { 17 | try 18 | { 19 | Preset newPreset { nlohmann::json::parse (juce::SystemClipboard::getTextFromClipboard().toStdString()) }; 20 | if (! newPreset.isValid()) 21 | return false; 22 | 23 | presetManager.loadPreset (newPreset); 24 | return true; 25 | } 26 | catch (std::exception& e) //NOSONAR 27 | { 28 | juce::Logger::writeToLog (juce::String { "Unable to load pasted preset! " } + e.what()); 29 | jassertfalse; 30 | return false; 31 | } 32 | } 33 | 34 | } // namespace chowdsp::presets::frontend 35 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsClipboardInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::presets::frontend 4 | { 5 | /** Interface for interacting with presets from the system clipboard. */ 6 | class ClipboardInterface 7 | { 8 | public: 9 | explicit ClipboardInterface (PresetManager& manager); 10 | 11 | /** Copies the current preset to the system clipboard. */ 12 | void copyCurrentPreset() const; 13 | 14 | /** Tries to load the system clipboard contents as a preset. */ 15 | bool tryToPastePreset(); 16 | 17 | private: 18 | PresetManager& presetManager; 19 | 20 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ClipboardInterface) 21 | }; 22 | } // namespace chowdsp::presets::frontend 23 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsProgramAdapter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../chowdsp_plugin_base/PluginBase/chowdsp_ProgramAdapter.h" 4 | 5 | namespace chowdsp::presets::frontend 6 | { 7 | /** Interface between chowdsp::PresetManager and the juce::AudioProcessor program API */ 8 | class PresetsProgramAdapter : public ProgramAdapter::BaseProgramAdapter 9 | { 10 | public: 11 | explicit PresetsProgramAdapter (std::unique_ptr& manager); 12 | 13 | int getNumPrograms() override; 14 | int getCurrentProgram() override; 15 | void setCurrentProgram (int index) override; 16 | const juce::String getProgramName (int index) override; // NOLINT(readability-const-return-type): Needs to return a const String for override compatibility 17 | 18 | private: 19 | std::unique_ptr& presetManager; 20 | 21 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PresetsProgramAdapter) 22 | }; 23 | } // namespace chowdsp::presets::frontend 24 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsSettingsInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if JUCE_MODULE_AVAILABLE_chowdsp_plugin_utils 4 | 5 | #include 6 | 7 | namespace chowdsp::presets::frontend 8 | { 9 | /** Interface for interacting with a presets system from a GlobalPluginSettings object. */ 10 | class SettingsInterface 11 | { 12 | using SettingID = GlobalPluginSettings::SettingID; 13 | 14 | public: 15 | SettingsInterface (PresetManager& manager, 16 | GlobalPluginSettings& settings, 17 | const juce::File& userPresetsDir); 18 | 19 | /** Set's the user preset path as a plugin setting. */ 20 | void setUserPresetsPath (const juce::File& userPresetsPath); 21 | 22 | static constexpr SettingID userPresetsDirID = "chowdsp_presets_user_presets_dir"; 23 | 24 | private: 25 | void globalSettingChanged (SettingID); 26 | 27 | PresetManager& presetManager; 28 | GlobalPluginSettings& pluginSettings; 29 | 30 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SettingsInterface) 31 | }; 32 | } // namespace chowdsp::presets::frontend 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsTextInterface.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_PresetsTextInterface.h" 2 | 3 | namespace chowdsp::presets::frontend 4 | { 5 | TextInterface::TextInterface (PresetManager& manager) : presetManager (manager) 6 | { 7 | listeners += { 8 | presetManager.getSaveLoadHelper().presetChangedBroadcaster.connect ([this] 9 | { updateText(); }), 10 | presetManager.getSaveLoadHelper().presetDirtyStatusBroadcaster.connect ([this] 11 | { updateText(); }), 12 | }; 13 | 14 | updateText(); 15 | } 16 | 17 | void TextInterface::updateText() 18 | { 19 | presetText = {}; 20 | if (auto* currentPreset = presetManager.getCurrentPreset()) 21 | { 22 | if (currentPreset->isValid()) 23 | { 24 | presetText = currentPreset->getName(); 25 | if (presetManager.getIsPresetDirty()) 26 | presetText += "*"; 27 | } 28 | } 29 | 30 | presetTextChangedBroadcaster (presetText); 31 | } 32 | } // namespace chowdsp::presets::frontend 33 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/Frontend/chowdsp_PresetsTextInterface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace chowdsp::presets::frontend 4 | { 5 | /** Interface for getting the text associated with the preset manager's state. */ 6 | class TextInterface 7 | { 8 | public: 9 | explicit TextInterface (PresetManager& manager); 10 | 11 | /** Returns the text associated with the current preset. */ 12 | [[nodiscard]] juce::String getPresetText() const noexcept { return presetText; } 13 | 14 | /** Called whenever the preset text is changed. */ 15 | Broadcaster presetTextChangedBroadcaster; 16 | 17 | private: 18 | void updateText(); 19 | 20 | PresetManager& presetManager; 21 | juce::String presetText {}; 22 | 23 | ScopedCallbackList listeners; 24 | 25 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TextInterface) 26 | }; 27 | } // namespace chowdsp::presets::frontend 28 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_presets_v2/chowdsp_presets_v2.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_presets_v2.h" 2 | 3 | #include "Backend/chowdsp_Preset.cpp" 4 | #include "Backend/chowdsp_PresetState.cpp" 5 | #include "Backend/chowdsp_PresetTree.cpp" 6 | #include "Backend/chowdsp_PresetSaverLoader.cpp" 7 | #include "Backend/chowdsp_PresetManager.cpp" 8 | 9 | #include "Frontend/chowdsp_PresetsProgramAdapter.cpp" 10 | #include "Frontend/chowdsp_PresetsNextPreviousInterface.cpp" 11 | #include "Frontend/chowdsp_PresetsTextInterface.cpp" 12 | #include "Frontend/chowdsp_PresetsMenuInterface.cpp" 13 | #include "Frontend/chowdsp_PresetsFileInterface.cpp" 14 | #include "Frontend/chowdsp_PresetsClipboardInterface.cpp" 15 | #include "Frontend/chowdsp_PresetsSettingsInterface.cpp" 16 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_version/Version/chowdsp_Version.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_Version.h" 2 | 3 | namespace chowdsp 4 | { 5 | Version::Version (const juce::String& versionStr) 6 | { 7 | int numDots = 0; 8 | for (auto ch : versionStr) 9 | if (ch == '.') 10 | numDots++; 11 | 12 | // Valid version strings must have two dots! 13 | jassert (numDots == 2); 14 | 15 | auto trimmedStr = versionStr.retainCharacters ("1234567890."); 16 | 17 | juce::StringArray tokens; 18 | int numTokens = tokens.addTokens (trimmedStr, ".", ""); 19 | jassert (numTokens == 3); 20 | juce::ignoreUnused (numTokens, numDots); 21 | 22 | major = tokens[0].getIntValue(); 23 | minor = tokens[1].getIntValue(); 24 | patch = tokens[2].getIntValue(); 25 | } 26 | 27 | juce::String Version::getVersionString() const 28 | { 29 | return juce::String (major) + "." + juce::String (minor) + "." + juce::String (patch); 30 | } 31 | } // namespace chowdsp 32 | -------------------------------------------------------------------------------- /modules/plugin/chowdsp_version/chowdsp_version.cpp: -------------------------------------------------------------------------------- 1 | #include "chowdsp_version.h" 2 | 3 | #include "Version/chowdsp_Version.cpp" -------------------------------------------------------------------------------- /modules/plugin/chowdsp_version/chowdsp_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | BEGIN_JUCE_MODULE_DECLARATION 5 | 6 | ID: chowdsp_version 7 | vendor: Chowdhury DSP 8 | version: 2.3.0 9 | name: ChowDSP Plugin Versioning 10 | description: Versioning system for ChowDSP plugins 11 | dependencies: juce_core 12 | 13 | website: https://ccrma.stanford.edu/~jatin/chowdsp 14 | license: BSD 3-clause 15 | 16 | END_JUCE_MODULE_DECLARATION 17 | 18 | ============================================================================== 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "Version/chowdsp_VersionDetail.h" 26 | #include "Version/chowdsp_Version.h" 27 | #include "Version/chowdsp_VersionComparisons.h" 28 | 29 | namespace chowdsp 30 | { 31 | 32 | /** Tools for working with software versioning. */ 33 | namespace VersionUtils 34 | { 35 | /** Utility class to manage version strings. */ 36 | using Version = ::chowdsp::Version; 37 | } // namespace VersionUtils 38 | } // namespace chowdsp 39 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectName=chowdsp_utils 2 | sonar.projectKey=Chowdhury-DSP_chowdsp_utils 3 | sonar.organization=chowdhury-dsp 4 | sonar.projectVersion=2.3.0 5 | 6 | sonar.sources=modules 7 | sonar.sourceEncoding=UTF-8 8 | sonar.exclusions=modules/**/third_party/**,modules/**/chowdsp_SIMDAudioBlock.h,modules/**BinaryData.* 9 | 10 | # sonar.cfamily.threads=4 11 | # sonar.cfamily.compile-commands=build/compile_commands.json 12 | sonar.cfamily.reportingCppStandardOverride=c++17 13 | sonar.cfamily.cache.enabled=true 14 | sonar.cfamily.cache.path=sonar_cfamily_cache 15 | sonar.python.version=3.9 16 | 17 | sonar.issue.ignore.multicriteria=e1,e2 18 | sonar.issue.ignore.multicriteria.e1.ruleKey=cpp:S5945 # C-Style Arrays 19 | sonar.issue.ignore.multicriteria.e1.resourceKey=* 20 | sonar.issue.ignore.multicriteria.e2.ruleKey=cpp:S5812 # non-concatenated namespaces 21 | sonar.issue.ignore.multicriteria.e2.resourceKey=* 22 | -------------------------------------------------------------------------------- /tests/common_tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_juce_lib(common_tests_lib 2 | juce::juce_gui_basics 3 | chowdsp::chowdsp_core 4 | chowdsp::chowdsp_data_structures 5 | chowdsp::chowdsp_serialization 6 | chowdsp::chowdsp_logging 7 | chowdsp::chowdsp_json 8 | chowdsp::chowdsp_units 9 | ) 10 | 11 | add_subdirectory(chowdsp_core_test) 12 | add_subdirectory(chowdsp_data_structures_test) 13 | add_subdirectory(chowdsp_json_test) 14 | add_subdirectory(chowdsp_serialization_test) 15 | add_subdirectory(chowdsp_logging_test) 16 | add_subdirectory(chowdsp_units_test) 17 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_core_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_core_test common_tests_lib) 2 | 3 | target_sources(chowdsp_core_test 4 | PRIVATE 5 | AtomicHelpersTest.cpp 6 | MemoryAliasingTest.cpp 7 | TypesListTest.cpp 8 | TypeCheckersTest.cpp 9 | TypeTraitsTest.cpp 10 | BindingsTest.cpp 11 | ScopedValueTest.cpp 12 | EndOfScopeActionTest.cpp 13 | ) 14 | 15 | target_compile_features(chowdsp_core_test PRIVATE cxx_std_20) 16 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_core_test/EndOfScopeActionTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("End Of Scope Action Test", "[common][functional]") 5 | { 6 | int x = 4; 7 | { 8 | const auto _ = chowdsp::runAtEndOfScope ([&x] 9 | { x = 0; }); 10 | REQUIRE (x == 4); 11 | } 12 | REQUIRE (x == 0); 13 | } 14 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_core_test/ScopedValueTest.cpp: -------------------------------------------------------------------------------- 1 | #include "CatchUtils.h" 2 | #include "chowdsp_core/chowdsp_core.h" 3 | 4 | TEST_CASE ("Scoped Value Test", "[common][data-structures]") 5 | { 6 | SECTION ("Read/Write Test") 7 | { 8 | constexpr float testVal1 = 2.0f; 9 | float x = 0.0f; 10 | { 11 | chowdsp::ScopedValue x_scoped { x }; 12 | REQUIRE_MESSAGE (juce::exactlyEqual (x_scoped.get(), x), "Initial value is incorrect!"); 13 | 14 | x_scoped.get() = testVal1; 15 | REQUIRE_MESSAGE (juce::exactlyEqual (x_scoped.get(), testVal1), "Set value is incorrect!"); 16 | } 17 | 18 | REQUIRE_MESSAGE (juce::exactlyEqual (x, testVal1), "Value after scope is incorrect!"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_data_structures_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_data_structures_test common_tests_lib) 2 | 3 | target_sources(chowdsp_data_structures_test 4 | PRIVATE 5 | AbstractTreeTest.cpp 6 | ArrayHelpersTest.cpp 7 | BucketArrayTest.cpp 8 | DoubleBufferTest.cpp 9 | IteratorsTest.cpp 10 | LocalPointerTest.cpp 11 | OptionalPointerTest.cpp 12 | SmallVectorTest.cpp 13 | ArenaAllocatorTest.cpp 14 | ChainedArenaAllocatorTest.cpp 15 | StringLiteralTest.cpp 16 | TupleHelpersTest.cpp 17 | VectorHelpersTest.cpp 18 | SmallMapTest.cpp 19 | STLArenaAllocatorTest.cpp 20 | RawObjectTest.cpp 21 | EnumMapTest.cpp 22 | OptionalRefTest.cpp 23 | OptionalArrayTest.cpp 24 | PoolAllocatorTest.cpp 25 | PackedPointerTest.cpp 26 | ) 27 | 28 | target_compile_features(chowdsp_data_structures_test PRIVATE cxx_std_20) 29 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_data_structures_test/STLArenaAllocatorTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("STL Arena Allocator Test", "[common][data-structures]") 5 | { 6 | using Arena = chowdsp::ArenaAllocator<>; 7 | Arena arena { 512 }; 8 | 9 | using Alloc = chowdsp::STLArenaAllocator; 10 | Alloc alloc { arena }; 11 | 12 | using custom_vector = std::vector; 13 | custom_vector vec { { 1, 2, 3, 4 }, alloc }; 14 | REQUIRE (vec.size() == 4); 15 | REQUIRE (vec.front() == 1); 16 | REQUIRE (vec.back() == 4); 17 | 18 | vec.push_back (5); 19 | REQUIRE (vec.size() == 5); 20 | REQUIRE (vec.back() == 5); 21 | 22 | vec.erase (vec.begin()); 23 | REQUIRE (vec.size() == 4); 24 | vec.insert (vec.begin(), 0); 25 | REQUIRE (vec.size() == 5); 26 | REQUIRE (vec.front() == 0); 27 | } 28 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_json_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_json_test common_tests_lib) 2 | 3 | target_sources(chowdsp_json_test PRIVATE 4 | JSONTest.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_logging_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_logging_test common_tests_lib) 2 | 3 | target_sources(chowdsp_logging_test PRIVATE 4 | PluginLoggerTest.cpp 5 | CustomFormattingTest.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_serialization_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_serialization_test common_tests_lib) 2 | 3 | target_sources(chowdsp_serialization_test PRIVATE 4 | SerializationTest.cpp 5 | TestSerialBinaryData.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_serialization_test/TestSerialBinaryData.cpp: -------------------------------------------------------------------------------- 1 | /* ==================================== JUCER_BINARY_RESOURCE ==================================== 2 | 3 | This is an auto-generated file: Any edits you make may be overwritten! 4 | 5 | */ 6 | 7 | namespace BinaryData 8 | { 9 | //================== test_json.json ================== 10 | static const unsigned char temp_binary_data_0[] = 11 | "[40,-33.3,0.55,\"test_data\"]\n"; 12 | 13 | const char* test_json_json = (const char*) temp_binary_data_0; 14 | 15 | //================== test_xml.xml ================== 16 | static const unsigned char temp_binary_data_1[] = 17 | "\n" 18 | "\n" 19 | "\n" 20 | " \n" 21 | " \n" 22 | " \n" 23 | " \n" 24 | "\n"; 25 | 26 | const char* test_xml_xml = (const char*) temp_binary_data_1; 27 | 28 | } // namespace BinaryData 29 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_serialization_test/TestSerialBinaryData.h: -------------------------------------------------------------------------------- 1 | /* ========================================================================================= 2 | 3 | This is an auto-generated file: Any edits you make may be overwritten! 4 | 5 | */ 6 | 7 | #pragma once 8 | 9 | namespace BinaryData 10 | { 11 | extern const char* test_json_json; 12 | const int test_json_jsonSize = 27; 13 | 14 | extern const char* test_xml_xml; 15 | const int test_xml_xmlSize = 128; 16 | } // namespace BinaryData 17 | -------------------------------------------------------------------------------- /tests/common_tests/chowdsp_units_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_units_test common_tests_lib) 2 | 3 | target_sources(chowdsp_units_test 4 | PRIVATE 5 | TimeUnitsTest.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /tests/dsp_tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_chowdsp_lib(dsp_tests_lib 2 | MODULES 3 | chowdsp_dsp_data_structures 4 | chowdsp_filters 5 | chowdsp_sources 6 | chowdsp_dsp_utils 7 | chowdsp_math 8 | chowdsp_modal_dsp 9 | chowdsp_simd 10 | chowdsp_waveshapers 11 | ) 12 | # Setting this to 1 can be useful for debugging! 13 | target_compile_definitions(dsp_tests_lib PUBLIC CHOWDSP_JASSERT_IS_CASSERT=0) 14 | 15 | setup_juce_lib(dsp_juce_tests_lib 16 | juce::juce_dsp 17 | chowdsp::chowdsp_dsp_data_structures 18 | chowdsp::chowdsp_eq 19 | chowdsp::chowdsp_reverb 20 | chowdsp::chowdsp_sources 21 | chowdsp::chowdsp_plugin_base 22 | ) 23 | 24 | add_subdirectory(chowdsp_buffers_test) 25 | add_subdirectory(chowdsp_compressor_test) 26 | add_subdirectory(chowdsp_dsp_data_structures_test) 27 | add_subdirectory(chowdsp_dsp_juce_test) 28 | add_subdirectory(chowdsp_dsp_utils_test) 29 | add_subdirectory(chowdsp_filters_test) 30 | add_subdirectory(chowdsp_math_test) 31 | add_subdirectory(chowdsp_modal_dsp_test) 32 | add_subdirectory(chowdsp_simd_test) 33 | add_subdirectory(chowdsp_sources_test) 34 | add_subdirectory(chowdsp_waveshapers_test) 35 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_buffers_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_buffers_test dsp_juce_tests_lib) 2 | 3 | target_sources(chowdsp_buffers_test 4 | PRIVATE 5 | # Don't need JUCE 6 | BufferTest.cpp 7 | BufferSpanTest.cpp 8 | BufferViewTest.cpp 9 | 10 | # Needs JUCE 11 | SIMDBufferCopyTest.cpp 12 | JUCEBufferViewTest.cpp 13 | BufferConversionTest.cpp 14 | BufferIteratorsTest.cpp 15 | ) 16 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_compressor_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_compressor_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_compressor_test 4 | PRIVATE 5 | GainComputerTest.cpp 6 | LevelDetectorTest.cpp 7 | MonoCompressorTest.cpp 8 | ) 9 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_compressor_test/MonoCompressorTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace chow_comp = chowdsp::compressor; 5 | TEST_CASE ("Mono Compressor Test", "[dsp][compressor]") 6 | { 7 | chow_comp::MonoCompressor, 9 | chow_comp::GainComputer> 10 | compressor; 11 | compressor.prepare ({ 48000.0, 8192, 2 }); 12 | compressor.params.attackMs = 10.0f; 13 | compressor.params.releaseMs = 100.0f; 14 | compressor.params.thresholdDB = -6.0f; 15 | compressor.params.ratio = 2.0f; 16 | compressor.params.kneeDB = 0.0f; 17 | compressor.params.autoMakeup = false; 18 | 19 | chowdsp::StaticBuffer buffer { 2, 8192 }; 20 | for (auto [_, data] : chowdsp::buffer_iters::channels (buffer)) 21 | std::fill (data.begin(), data.end(), 1.0f); 22 | compressor.processBlock (buffer, buffer); 23 | 24 | for (auto [_, data] : chowdsp::buffer_iters::channels (buffer)) 25 | REQUIRE (data.back() == Catch::Approx { 0.7071f }.margin (0.001f)); 26 | } 27 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_dsp_data_structures_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_dsp_data_structures_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_dsp_data_structures_test 4 | PRIVATE 5 | LookupTableTest.cpp 6 | RebufferProcessorTest.cpp 7 | SmoothedBufferValueTest.cpp 8 | UIToAudioPipelineTest.cpp 9 | BufferMultipleTest.cpp 10 | ) 11 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_dsp_juce_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_dsp_juce_test dsp_juce_tests_lib) 2 | 3 | target_sources(chowdsp_dsp_juce_test 4 | PRIVATE 5 | # Data Structures Tests 6 | data_structures_tests/COLAProcessorTest.cpp 7 | data_structures_tests/SmoothedBufferValueTest.cpp 8 | data_structures_tests/BufferMathTest.cpp 9 | 10 | # Convolution Tests 11 | convolution_tests/ConvolutionTest.cpp 12 | convolution_tests/IRHelpersTest.cpp 13 | 14 | # Sources Tests 15 | source_tests/NoiseTest.cpp 16 | source_tests/NoiseSynthTest.cpp 17 | source_tests/RepitchedSourceTest.cpp 18 | 19 | DiffuserTest.cpp 20 | FIRFilterTest.cpp 21 | LinearPhaseEQTest.cpp 22 | resampling_tests/VariableOversamplingTest.cpp 23 | ) 24 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_dsp_utils_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_dsp_utils_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_dsp_utils_test 4 | PRIVATE 5 | AudioTimerTest.cpp 6 | BypassTest.cpp 7 | GainTest.cpp 8 | PannerTest.cpp 9 | TunerTest.cpp 10 | LevelDetectorTest.cpp 11 | OvershootLimiterTest.cpp 12 | WidthPannerTest.cpp 13 | 14 | BBDTest.cpp 15 | PitchShiftTest.cpp 16 | 17 | resampling_tests/UpsampleDownsampleTest.cpp 18 | resampling_tests/ResamplerTest.cpp 19 | ) 20 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_dsp_utils_test/OvershootLimiterTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("Overshoot Limiter Test", "[dsp][misc]") 5 | { 6 | constexpr double fs = 48000.0; 7 | constexpr int N = 4800; 8 | 9 | chowdsp::OvershootLimiter limiter { 64 }; 10 | limiter.prepare ({ fs, (uint32_t) N, 1 }); 11 | REQUIRE (limiter.getLatencySamples() == 64); 12 | 13 | auto signal = test_utils::makeSineWave (100.0f, (float) fs, N); 14 | 15 | SECTION ("Ceiling == 1") 16 | { 17 | chowdsp::BufferMath::applyGain (signal, 1.1f); 18 | 19 | limiter.setCeiling (1.0f); 20 | limiter.processBlock (signal); 21 | REQUIRE (chowdsp::BufferMath::getMagnitude (signal) <= 1.0f); 22 | } 23 | 24 | SECTION ("Ceiling == 0.5") 25 | { 26 | limiter.setCeiling (0.5f); 27 | limiter.processBlock (signal); 28 | REQUIRE (chowdsp::BufferMath::getMagnitude (signal) <= 0.5f); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_filters_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_filters_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_filters_test 4 | PRIVATE 5 | ConformalMapsTest.cpp 6 | FirstOrderFiltersTest.cpp 7 | ShelfFilterTest.cpp 8 | SecondOrderFiltersTest.cpp 9 | StateVariableFilterTest.cpp 10 | ModFilterWrapperTest.cpp 11 | FilterChainTest.cpp 12 | NthOrderFilterTest.cpp 13 | ButterworthFilterTest.cpp 14 | ChebyshevIIFilterTest.cpp 15 | EllipticFilterTest.cpp 16 | FractionalOrderFilterTest.cpp 17 | HilbertFilterTest.cpp 18 | WernerFilterTest.cpp 19 | ButterQsTest.cpp 20 | LinearTransformsTest.cpp 21 | CrossoverFilterTest.cpp 22 | FIRPolyphaseDecimatorTest.cpp 23 | FIRPolyphaseInterpolatorTest.cpp 24 | ) 25 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_math_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_math_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_math_test 4 | PRIVATE 5 | CombinatoricsTest.cpp 6 | FloatVectorOperationsTest.cpp 7 | MatrixOpsTest.cpp 8 | PolynomialsTest.cpp 9 | ChebyshevPolynomialTest.cpp 10 | PowerTest.cpp 11 | OtherMathOpsTest.cpp 12 | JacobiEllipticTest.cpp 13 | PolylogarithmTest.cpp 14 | RatioTest.cpp 15 | LogApproxTest.cpp 16 | PowApproxTest.cpp 17 | DecibelsApproxTest.cpp 18 | TrigApproxTest.cpp 19 | RandomFloatTest.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_math_test/RatioTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("Constexpr Ratio Test", "[dsp][math]") 5 | { 6 | SECTION ("Ratio Test") 7 | { 8 | static_assert (juce::exactlyEqual (chowdsp::Ratio<33, 100>::value, 0.33f)); 9 | static_assert (juce::exactlyEqual (chowdsp::Ratio<100, 1>::value, 100.0)); 10 | static_assert (juce::exactlyEqual (chowdsp::Ratio<25, 50>::value, 0.5f)); 11 | static_assert (juce::exactlyEqual (chowdsp::Ratio<12, 10>::value, 1.2f)); 12 | } 13 | 14 | SECTION ("Scientific Ratio Test") 15 | { 16 | static_assert (juce::exactlyEqual (chowdsp::ScientificRatio<33, 0>::value, 33.0f)); 17 | static_assert (juce::exactlyEqual (chowdsp::ScientificRatio<12, -5>::value, 12.0e-5f)); 18 | static_assert (juce::exactlyEqual (chowdsp::ScientificRatio<42, 10>::value, 42.0e10)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_modal_dsp_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_modal_dsp_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_modal_dsp_test 4 | PRIVATE 5 | ModalFilterTest.cpp 6 | ModalFilterBankTest.cpp 7 | ) 8 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_simd_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_simd_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_simd_test 4 | PRIVATE 5 | SIMDSmoothedValueTest.cpp 6 | SIMDSpecialMathTest.cpp 7 | SIMDAlignmentHelpersTest.cpp 8 | ) 9 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_simd_test/SIMDAlignmentHelpersTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace chowdsp::SIMDUtils; 5 | 6 | TEMPLATE_TEST_CASE ("SIMD Alignment Helpers Test", "[dsp][simd]", float, double) 7 | { 8 | SECTION ("isAligned() Test") 9 | { 10 | alignas (defaultSIMDAlignment) float data[4]; 11 | REQUIRE (isAligned (data)); 12 | REQUIRE (! isAligned (data + 1)); 13 | } 14 | 15 | SECTION ("getNextAlignedPtr() Test") 16 | { 17 | alignas (defaultSIMDAlignment) float data[32]; 18 | 19 | const auto unalignedPtr = data + 1; 20 | REQUIRE (! isAligned (unalignedPtr)); 21 | 22 | const auto nextAlignedPtr = getNextAlignedPtr (unalignedPtr); 23 | REQUIRE (isAligned (nextAlignedPtr)); 24 | REQUIRE (nextAlignedPtr - unalignedPtr > 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_sources_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_sources_test dsp_tests_lib) 2 | 3 | target_sources(chowdsp_sources_test 4 | PRIVATE 5 | SineTest.cpp 6 | SawtoothTest.cpp 7 | SquareTest.cpp 8 | TriangleTest.cpp 9 | PolygonalTest.cpp 10 | AdditiveOscTest.cpp 11 | ) 12 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_waveshapers_test/ADAASineClipperTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | namespace Constants 5 | { 6 | constexpr int N = 1000; 7 | constexpr float maxErr = 1.0e-2f; 8 | } // namespace Constants 9 | 10 | TEST_CASE ("ADAA Sine Clipper Test", "[dsp][waveshapers]") 11 | { 12 | chowdsp::ADAASineClipper clipper; 13 | clipper.prepare (1); 14 | 15 | chowdsp::Buffer testBuffer (1, Constants::N); 16 | float expYs[Constants::N]; 17 | for (int i = 0; i < Constants::N; ++i) 18 | { 19 | const auto testX = 2.5f * std::sin (juce::MathConstants::twoPi * (float) i * 500.0f / 48000.0f); 20 | testBuffer.getWritePointer (0)[i] = testX; 21 | expYs[i] = std::sin (juce::MathConstants::halfPi * juce::jlimit (-1.0f, 1.0f, testX)); 22 | } 23 | 24 | clipper.processBlock (testBuffer); 25 | for (int i = 2; i < Constants::N - 1; ++i) 26 | { 27 | float actualY = testBuffer.getReadPointer (0)[i]; 28 | REQUIRE_MESSAGE (actualY == Catch::Approx (expYs[i - 1]).margin (Constants::maxErr), "Sine Clipper value is incorrect!"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_waveshapers_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_waveshapers_test dsp_tests_lib) 2 | 3 | # These tests take _forever_ on Windows CI, so let's skip most of them for now. 4 | if (WIN32) 5 | target_sources(chowdsp_waveshapers_test 6 | PRIVATE 7 | ADAAFullWaveRectifierTest.cpp 8 | ADAAHardClipperTest.cpp 9 | ADAATanhClipperTest.cpp 10 | ADAASoftClipperTest.cpp 11 | ADAASineClipperTest.cpp 12 | ) 13 | else() 14 | target_sources(chowdsp_waveshapers_test 15 | PRIVATE 16 | SoftClipperTest.cpp 17 | ADAAFullWaveRectifierTest.cpp 18 | ADAAHardClipperTest.cpp 19 | ADAATanhClipperTest.cpp 20 | ADAASoftClipperTest.cpp 21 | ADAASineClipperTest.cpp 22 | WaveMultiplierTest.cpp 23 | WestCoastFolderTest.cpp 24 | LookupTableLoadingTest.cpp 25 | ) 26 | endif() 27 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_waveshapers_test/WaveMultiplierTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | TEST_CASE ("Wave Multiplier Test", "[dsp][waveshapers]") 6 | { 7 | SECTION ("Process Test") 8 | { 9 | chowdsp::WaveMultiplier folder; 10 | folder.prepare (1); 11 | 12 | static constexpr size_t N = 20; 13 | std::array inputVals {}; 14 | std::array expVals { 0.0f, 0.00000270857777f, -0.0291773807f, 1.16696322f, -3.44325686f, 5.96103f, -7.11124039f, 6.43918467f, -4.06395102f, 1.56404686f, -0.00069783628f, 0.190425128f, -0.0000017228499f, -0.188422918f, -0.188428909f, 0.00000622259586f, 0.188418567f, 0.18843393f, -0.0000069831076f, -0.188420907f }; 15 | std::array actualVals {}; 16 | 17 | for (size_t i = 0; i < N; ++i) 18 | { 19 | inputVals[i] = 10.0f * std::sin (juce::MathConstants::twoPi * (float) i * 8000.0f / 48000.0f); 20 | actualVals[i] = folder.processSample (inputVals[i]); 21 | 22 | REQUIRE (actualVals[i] == Catch::Approx (expVals[i]).margin (1.0e-6)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/dsp_tests/chowdsp_waveshapers_test/WestCoastFolderTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("West Coast Folder Test", "[dsp][waveshapers]") 5 | { 6 | SECTION ("Process Test") 7 | { 8 | chowdsp::WestCoastWavefolder folder; 9 | folder.prepare (1); 10 | 11 | static constexpr size_t N = 20; 12 | std::array inputVals {}; 13 | std::array expVals { 0.0f, -2.37976718f, 3.30801344f, 3.30801296f, -3.39300186E-7f, -3.30801439f, -3.30801249f, -2.05490551E-7f, 3.30801439f, 3.30801105f, 0.00000159522051f, -3.30801916f, -3.30800867f, -0.00000129507316f, 3.3080163f, 3.30801058f, -0.00000283613736f, -3.30801249f, -3.30801105f, 5.12237932E-8f }; 14 | std::array actualVals {}; 15 | 16 | for (size_t i = 0; i < N; ++i) 17 | { 18 | inputVals[i] = 10.0f * std::sin (juce::MathConstants::twoPi * (float) i * 8000.0f / 48000.0f); 19 | actualVals[i] = folder.processSample (inputVals[i]); 20 | 21 | REQUIRE (actualVals[i] == Catch::Approx (expVals[i]).margin (1.0e-6)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/gui_tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_juce_lib(gui_tests_lib 2 | juce::juce_dsp 3 | chowdsp::chowdsp_dsp_utils 4 | chowdsp::chowdsp_gui 5 | chowdsp::chowdsp_visualizers 6 | chowdsp::chowdsp_eq 7 | chowdsp::chowdsp_plugin_state 8 | chowdsp::chowdsp_plugin_base 9 | ) 10 | 11 | add_subdirectory(chowdsp_gui_test) 12 | add_subdirectory(chowdsp_foleys_test) 13 | add_subdirectory(chowdsp_visualizers_test) 14 | 15 | if(CHOWDSP_BUILD_LIVE_GUI_TEST) 16 | add_subdirectory(live_gui_test) 17 | endif() 18 | -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_foleys_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(chowdsp_foleys_test) 2 | setup_juce_test(chowdsp_foleys_test) 3 | 4 | target_link_libraries(chowdsp_foleys_test PRIVATE 5 | foleys_gui_magic 6 | chowdsp_foleys 7 | chowdsp_plugin_base 8 | chowdsp_presets 9 | ) 10 | 11 | target_sources(chowdsp_foleys_test PRIVATE 12 | FoleysTest.cpp 13 | ) 14 | -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_gui_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_gui_test gui_tests_lib) 2 | 3 | target_sources(chowdsp_gui_test PRIVATE 4 | LongPressActionTest.cpp 5 | OpenGLHelperTest.cpp 6 | PopupMenuHelperTest.cpp 7 | WindowInPluginTest.cpp 8 | HostContextProviderTest.cpp 9 | ComponentArenaTest.cpp 10 | ParametersViewTest.cpp 11 | ) 12 | -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_visualizers_test gui_tests_lib) 2 | 3 | target_sources(chowdsp_visualizers_test PRIVATE 4 | SpectrumPlotBaseTest.cpp 5 | EQFilterPlotsTest.cpp 6 | EqualizerPlotTest.cpp 7 | GenericFilterPlotTest.cpp 8 | WaveshaperPlotTest.cpp 9 | WaveformViewTest.cpp 10 | LevelDetectorTest.cpp 11 | GainComputerPlotTest.cpp 12 | ) 13 | -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/eq_response_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/eq_response_plot.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/freq_grid_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/freq_grid_plot.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/gain_computer_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/gain_computer_plot.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/generic_filter_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/generic_filter_plot.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/level_detector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/level_detector.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/waveform_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/waveform_view.png -------------------------------------------------------------------------------- /tests/gui_tests/chowdsp_visualizers_test/Images/waveshaper_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Chowdhury-DSP/chowdsp_utils/ffc70ba399f9afaeefb996eb14e55a1d487270b8/tests/gui_tests/chowdsp_visualizers_test/Images/waveshaper_plot.png -------------------------------------------------------------------------------- /tests/gui_tests/live_gui_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | juce_add_gui_app(live_gui_test) 2 | setup_juce_test(live_gui_test) 3 | 4 | target_link_libraries(live_gui_test PRIVATE 5 | juce::juce_dsp 6 | chowdsp::chowdsp_gui 7 | chowdsp::chowdsp_plugin_base 8 | chowdsp::chowdsp_presets 9 | chowdsp::chowdsp_plugin_utils 10 | ) 11 | 12 | target_sources(live_gui_test PRIVATE 13 | LiveGUITest.cpp 14 | ) -------------------------------------------------------------------------------- /tests/music_tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(chowdsp_rhythm_test) 2 | -------------------------------------------------------------------------------- /tests/music_tests/chowdsp_rhythm_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_test(chowdsp_rhythm_test MODULES chowdsp_rhythm) 2 | 3 | target_sources(chowdsp_rhythm_test 4 | PRIVATE 5 | RhythmUtilsTest.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /tests/music_tests/chowdsp_rhythm_test/RhythmUtilsTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace chowdsp::RhythmUtils; 5 | 6 | TEST_CASE ("Rhythm Utils Test") 7 | { 8 | SECTION ("Rhythm Time Test") 9 | { 10 | STATIC_REQUIRE (QUARTER.getTimeSeconds (60.0) == 1.0); 11 | } 12 | 13 | SECTION ("Label Test") 14 | { 15 | REQUIRE_MESSAGE (QUARTER.getLabel() == "1/4", "Quarter Note label is incorrect!"); 16 | } 17 | 18 | SECTION ("Equality Test") 19 | { 20 | STATIC_REQUIRE (QUARTER == QUARTER); 21 | STATIC_REQUIRE (QUARTER != QUARTER_DOT); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_fuzzy_search_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_fuzzy_search_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_fuzzy_search_test PRIVATE 4 | FuzzySearchTest.cpp 5 | ) 6 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_parameters_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_parameters_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_parameters_test PRIVATE 4 | ForwardingParameterTest.cpp 5 | ParamHelpersTest.cpp 6 | ParamModulationTest.cpp 7 | ParamStringsTest.cpp 8 | RhythmParameterTest.cpp 9 | ) 10 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_parameters_test/RhythmParameterTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("Rhythm Parameter Test", "[plugin][parameters]") 5 | { 6 | SECTION ("Rhythm Parameter Test") 7 | { 8 | auto&& param = chowdsp::RhythmParameter ("rhythm", "Rhythm"); 9 | REQUIRE_MESSAGE (param.getCurrentChoiceName() == juce::String ("1/4"), "Parameter choice label is incorrect!"); 10 | REQUIRE_MESSAGE (juce::approximatelyEqual (param.getRhythmTimeSeconds (60.0), 1.0), "Quarter Note rhythm time is incorrect!"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_plugin_base_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_plugin_base_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_plugin_base_test PRIVATE 4 | PluginBaseTest.cpp 5 | PluginDiagnosticInfoTest.cpp 6 | ) 7 | 8 | include(AddDiagnosticInfo) 9 | add_diagnostic_info(chowdsp_plugin_base_test) 10 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_plugin_base_test/PluginDiagnosticInfoTest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE ("Plugin Diagnostic Info Test", "[plugin]") 5 | { 6 | static constexpr auto sampleRate = 44100.0; 7 | static constexpr int blockSize = 256; 8 | 9 | struct Params : chowdsp::ParamHolder 10 | { 11 | }; 12 | 13 | struct DummyPlugin : chowdsp::PluginBase> 14 | { 15 | void releaseResources() override {} 16 | void processAudioBlock (juce::AudioBuffer&) override {} 17 | juce::AudioProcessorEditor* createEditor() override { return nullptr; } 18 | }; 19 | 20 | DummyPlugin plugin; 21 | plugin.prepareToPlay (sampleRate, blockSize); 22 | const auto diagString = chowdsp::PluginDiagnosticInfo::getDiagnosticsString (plugin); 23 | juce::Logger::writeToLog (diagString); 24 | 25 | REQUIRE_MESSAGE (diagString.contains ("Version: TestPlugin 9.9.9"), "Diag name/version is incorrect!"); 26 | REQUIRE_MESSAGE (diagString.contains ("running at sample rate 44.1 kHz with block size 256"), "Diag sample rate info is incorrect!"); 27 | } 28 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_plugin_state_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_plugin_state_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_plugin_state_test 4 | PRIVATE 5 | StateSerializationTest.cpp 6 | StateListenersTest.cpp 7 | ParameterAttachmentsTest.cpp 8 | ParamHolderTest.cpp 9 | StatePluginInterfaceTest.cpp 10 | VersionStreamingTest.cpp 11 | ) 12 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_plugin_utils_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_plugin_utils_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_plugin_utils_test PRIVATE 4 | AudioFileSaveLoadHelperTest.cpp 5 | AudioUIBackgroundTaskTest.cpp 6 | DeferredActionTest.cpp 7 | FileListenerTest.cpp 8 | GlobalSettingsTest.cpp 9 | LNFAllocatorTest.cpp 10 | UIStateTest.cpp 11 | TweaksFileTest.cpp 12 | ) 13 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_presets_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(chowdsp_presets_test) 2 | setup_juce_test(chowdsp_presets_test) 3 | 4 | if(CHOWDSP_BUILD_LIVE_GUI_TEST) 5 | juce_add_binary_data(chowdsp_presets_test_BinaryData SOURCES 6 | test_preset.preset 7 | ) 8 | endif() 9 | 10 | target_link_libraries(chowdsp_presets_test PRIVATE 11 | chowdsp_plugin_base 12 | chowdsp_presets 13 | ) 14 | 15 | target_sources(chowdsp_presets_test PRIVATE 16 | PresetTest.cpp 17 | PresetManagerTest.cpp 18 | 19 | TestPresetBinaryData.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_presets_test/test_preset.preset: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_presets_v2_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_presets_v2_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_presets_v2_test 4 | PRIVATE 5 | PresetTest.cpp 6 | PresetTreeTest.cpp 7 | PresetManagerTest.cpp 8 | 9 | NextPreviousTest.cpp 10 | ProgramAdapterTest.cpp 11 | TextInterfaceTest.cpp 12 | ClipboardInterfaceTest.cpp 13 | SettingsInterfaceTest.cpp 14 | MenuInterfaceTest.cpp 15 | FileInterfaceTest.cpp 16 | 17 | CLAPPresetsDiscoveryTest.cpp 18 | 19 | TestPresetBinaryData.cpp 20 | ) 21 | -------------------------------------------------------------------------------- /tests/plugin_tests/chowdsp_version_test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | setup_catch_lib_test(chowdsp_version_test plugin_tests_lib) 2 | 3 | target_sources(chowdsp_version_test 4 | PRIVATE 5 | VersionUtilsTest.cpp 6 | ) 7 | -------------------------------------------------------------------------------- /tests/static_tests/BypassMismatchedLatencyTypes_fail.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | chowdsp::BypassProcessor bypass; 7 | 8 | // Setting a floating point value for lateny should fail when not using delay-line interp. 9 | bypass.setLatencySamples (0.5f); 10 | 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /tests/static_tests/ConstexprMath_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() 4 | { 5 | static constexpr auto butterQs = chowdsp::QValCalcs::butterworth_Qs(); 6 | juce::ignoreUnused (butterQs); 7 | 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /tests/static_tests/CorrectContainers_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main() 6 | { 7 | using namespace chowdsp::TypeTraits; 8 | 9 | struct Dummy 10 | { 11 | int x; 12 | float y; 13 | 14 | void begin() {} 15 | }; 16 | 17 | // these are containers! 18 | static_assert (IsIterable>); 19 | static_assert (IsIterable>); 20 | static_assert (IsIterable>); 21 | static_assert (IsIterable>); 22 | static_assert (IsIterable); 23 | static_assert (IsIterable); 24 | 25 | // these are NOT containers! 26 | static_assert (! IsIterable); 27 | static_assert (! IsIterable); 28 | 29 | // these are map-like 30 | static_assert (IsMapLike>); 31 | static_assert (IsMapLike>); 32 | 33 | // these are not map-like 34 | static_assert (! IsMapLike); 35 | static_assert (! IsMapLike>); 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /tests/static_tests/HasMemberTest_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct Test 5 | { 6 | inline static int x = 4; 7 | const std::string_view y = "asdklfjhasljk"; 8 | float zz = 0.0f; 9 | }; 10 | 11 | CHOWDSP_CHECK_HAS_MEMBER (HasX, x) 12 | CHOWDSP_CHECK_HAS_MEMBER (HasY, y) 13 | CHOWDSP_CHECK_HAS_MEMBER (HasZ, z) 14 | CHOWDSP_CHECK_HAS_MEMBER (HasZZ, zz) 15 | 16 | int main() 17 | { 18 | static_assert (! HasX, "x is static!"); 19 | static_assert (HasY, "y should exist!"); 20 | static_assert (! HasZ, "z should not exist!"); 21 | static_assert (HasZZ, "zz should exist!"); 22 | 23 | Test t {}; 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/static_tests/HasStaticMemberTest_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | struct Test 5 | { 6 | inline static int x = 4; 7 | static constexpr std::string_view y = "asdklfjhasljk"; 8 | float zz = 0.0f; 9 | }; 10 | 11 | CHOWDSP_CHECK_HAS_STATIC_MEMBER (HasX, x) 12 | CHOWDSP_CHECK_HAS_STATIC_MEMBER (HasY, y) 13 | CHOWDSP_CHECK_HAS_STATIC_MEMBER (HasZ, z) 14 | CHOWDSP_CHECK_HAS_STATIC_MEMBER (HasZZ, zz) 15 | 16 | int main() 17 | { 18 | static_assert (HasX, "x should exist!"); 19 | static_assert (HasY, "y should exist!"); 20 | static_assert (! HasZ, "z should not exist!"); 21 | static_assert (! HasZZ, "zz is not static!"); 22 | 23 | Test t {}; 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/static_tests/LanczosKernel4_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // Four is a multiple of the SIMD register width on most architectures, so this should compile. 7 | chowdsp::ResamplingTypes::LanczosResampler<4096, 4> resampler; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /tests/static_tests/LanczosKernel5_fail.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // Five is not a multiple of the SIMD register width on most architectures, so this NOT should compile. 7 | chowdsp::ResamplingTypes::LanczosResampler<4096, 5> resampler; 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /tests/static_tests/ModFilterHighOrder_fail.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // ModFilterWrapper for filter order higher than 2 should fail! 7 | chowdsp::ModFilterWrapper> modButter; 8 | 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /tests/static_tests/ModFilterLowOrder_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // ModFilterWrapper for filter with order 1 or 2 should work fine! 7 | chowdsp::ModFilterWrapper> modShelf; 8 | chowdsp::ModFilterWrapper> modPeak; 9 | 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /tests/static_tests/SOSFilterEven_pass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // Even-order SOS filters should compile fine 7 | chowdsp::ButterworthFilter<2> filter2; 8 | chowdsp::ButterworthFilter<4> filter4; 9 | chowdsp::ButterworthFilter<8> filter8; 10 | chowdsp::ButterworthFilter<10> filter10; 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /tests/static_tests/SOSFilterOdd_fail.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // Odd-order SOS filters should NOT compile 7 | chowdsp::EllipticFilter<3> filter3; 8 | chowdsp::EllipticFilter<5> filter5; 9 | chowdsp::EllipticFilter<9> filter9; 10 | chowdsp::EllipticFilter<11> filter11; 11 | 12 | chowdsp::NthOrderFilter nthOrderFilter5; 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /tests/static_tests/SoftClipperBadOrder_fail.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | // SoftClipper order must be an odd number, larger than 2 7 | chowdsp::SoftClipper<-1> clipperm1; 8 | chowdsp::SoftClipper<0> clipper0; 9 | chowdsp::SoftClipper<2> clipper2; 10 | chowdsp::SoftClipper<6> clipper6; 11 | 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /tests/test_utils/CatchTestRunner.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #if JUCE_MODULE_AVAILABLE_juce_events 3 | #include 4 | #endif 5 | 6 | int main (int argc, char* argv[]) 7 | { 8 | // your setup ... 9 | #if JUCE_MODULE_AVAILABLE_juce_events 10 | juce::ScopedJuceInitialiser_GUI scopedJuce {}; 11 | #endif 12 | 13 | int result = Catch::Session().run (argc, argv); 14 | 15 | // your clean-up... 16 | 17 | return result; 18 | } 19 | -------------------------------------------------------------------------------- /tests/test_utils/TimedUnitTest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class TimedUnitTest : public juce::UnitTest 6 | { 7 | public: 8 | explicit TimedUnitTest (const juce::String& _name, const juce::String& _category = {}) : UnitTest (_name, _category) 9 | { 10 | } 11 | 12 | virtual void runTestTimed() = 0; 13 | 14 | void runTest() override 15 | { 16 | auto startTime = juce::Time::getMillisecondCounter(); 17 | 18 | runTestTimed(); 19 | 20 | const auto relTime = juce::RelativeTime::milliseconds (static_cast (juce::Time::getMillisecondCounter() - startTime)); 21 | logMessage ("Time taken to run " + getName() + ": " + relTime.getDescription()); 22 | } 23 | 24 | private: 25 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TimedUnitTest) 26 | }; 27 | --------------------------------------------------------------------------------