├── CHANGELOG.md ├── LICENSE-examples.txt ├── LICENSE.txt ├── README.md ├── cmake ├── macos │ ├── Spectrex-debug.cmake │ ├── Spectrex-release.cmake │ └── Spectrex.cmake └── msvc │ ├── v142 │ ├── MD │ │ ├── Win32 │ │ │ ├── Spectrex-debug.cmake │ │ │ ├── Spectrex-release.cmake │ │ │ └── Spectrex.cmake │ │ └── x64 │ │ │ ├── Spectrex-debug.cmake │ │ │ ├── Spectrex-release.cmake │ │ │ └── Spectrex.cmake │ └── MT │ │ ├── Win32 │ │ ├── Spectrex-debug.cmake │ │ ├── Spectrex-release.cmake │ │ └── Spectrex.cmake │ │ └── x64 │ │ ├── Spectrex-debug.cmake │ │ ├── Spectrex-release.cmake │ │ └── Spectrex.cmake │ └── v143 │ ├── MD │ ├── Win32 │ │ ├── Spectrex-debug.cmake │ │ ├── Spectrex-release.cmake │ │ └── Spectrex.cmake │ └── x64 │ │ ├── Spectrex-debug.cmake │ │ ├── Spectrex-release.cmake │ │ └── Spectrex.cmake │ └── MT │ ├── Win32 │ ├── Spectrex-debug.cmake │ ├── Spectrex-release.cmake │ └── Spectrex.cmake │ └── x64 │ ├── Spectrex-debug.cmake │ ├── Spectrex-release.cmake │ └── Spectrex.cmake ├── docs ├── doxygen │ └── html │ │ ├── _component_8hpp_source.html │ │ ├── _context_8hpp_source.html │ │ ├── _data_8hpp_source.html │ │ ├── _exception_8hpp_source.html │ │ ├── _mini_processor_8hpp_source.html │ │ ├── _parameters_8hpp_source.html │ │ ├── _processor_8hpp_source.html │ │ ├── _ring_buffer_8hpp_source.html │ │ ├── _spectrogram_8hpp_source.html │ │ ├── _utility_8hpp_source.html │ │ ├── _waveform_8hpp_source.html │ │ ├── annotated.html │ │ ├── bc_s.png │ │ ├── bc_sd.png │ │ ├── classes.html │ │ ├── classspectrex_1_1_exception-members.html │ │ ├── classspectrex_1_1_exception.html │ │ ├── classspectrex_1_1_k_component-members.html │ │ ├── classspectrex_1_1_k_component.html │ │ ├── classspectrex_1_1_k_component.png │ │ ├── classspectrex_1_1_k_context-members.html │ │ ├── classspectrex_1_1_k_context.html │ │ ├── classspectrex_1_1_k_processor-members.html │ │ ├── classspectrex_1_1_k_processor.html │ │ ├── classspectrex_1_1_k_spectrogram_component-members.html │ │ ├── classspectrex_1_1_k_spectrogram_component.html │ │ ├── classspectrex_1_1_k_spectrogram_component.png │ │ ├── classspectrex_1_1_k_waveform_component-members.html │ │ ├── classspectrex_1_1_k_waveform_component.html │ │ ├── classspectrex_1_1_k_waveform_component.png │ │ ├── classspectrex_1_1_mini_processor-members.html │ │ ├── classspectrex_1_1_mini_processor.html │ │ ├── classspectrex_1_1_processor_parameters-members.html │ │ ├── classspectrex_1_1_processor_parameters.html │ │ ├── classspectrex_1_1_ring_buffer-members.html │ │ ├── classspectrex_1_1_ring_buffer.html │ │ ├── classspectrex_1_1_ring_buffer.png │ │ ├── clipboard.js │ │ ├── closed.png │ │ ├── cookie.js │ │ ├── dir_00476c7612082a2ea337592096689087.html │ │ ├── dir_03223e5d16191004a8cef135a83368eb.html │ │ ├── dir_49e56c817e5e54854c35e136979f97ca.html │ │ ├── dir_4c291a68664e4432a22058616f5e4e52.html │ │ ├── dir_5b798d21554aadddca858521ec157964.html │ │ ├── dir_a47411af17e4acc7291c20de6e0cef6e.html │ │ ├── dir_d44c64559bbebec7f509842c48db8b23.html │ │ ├── doc.svg │ │ ├── docd.svg │ │ ├── doxygen.css │ │ ├── doxygen.svg │ │ ├── doxygen_crawl.html │ │ ├── dynsections.js │ │ ├── extra_8h_source.html │ │ ├── files.html │ │ ├── folderclosed.svg │ │ ├── folderclosedd.svg │ │ ├── folderopen.svg │ │ ├── folderopend.svg │ │ ├── functions.html │ │ ├── functions_enum.html │ │ ├── functions_func.html │ │ ├── functions_type.html │ │ ├── functions_vars.html │ │ ├── hierarchy.html │ │ ├── index.html │ │ ├── jquery.js │ │ ├── menu.js │ │ ├── menudata.js │ │ ├── minus.svg │ │ ├── minusd.svg │ │ ├── nav_f.png │ │ ├── nav_fd.png │ │ ├── nav_g.png │ │ ├── nav_h.png │ │ ├── nav_hd.png │ │ ├── navtree.css │ │ ├── open.png │ │ ├── pages.html │ │ ├── plus.svg │ │ ├── plusd.svg │ │ ├── req.html │ │ ├── resize.js │ │ ├── search │ │ ├── all_0.js │ │ ├── all_1.js │ │ ├── all_10.js │ │ ├── all_11.js │ │ ├── all_12.js │ │ ├── all_13.js │ │ ├── all_2.js │ │ ├── all_3.js │ │ ├── all_4.js │ │ ├── all_5.js │ │ ├── all_6.js │ │ ├── all_7.js │ │ ├── all_8.js │ │ ├── all_9.js │ │ ├── all_a.js │ │ ├── all_b.js │ │ ├── all_c.js │ │ ├── all_d.js │ │ ├── all_e.js │ │ ├── all_f.js │ │ ├── classes_0.js │ │ ├── classes_1.js │ │ ├── classes_2.js │ │ ├── classes_3.js │ │ ├── classes_4.js │ │ ├── classes_5.js │ │ ├── classes_6.js │ │ ├── classes_7.js │ │ ├── close.svg │ │ ├── enums_0.js │ │ ├── enums_1.js │ │ ├── enums_2.js │ │ ├── enumvalues_0.js │ │ ├── enumvalues_1.js │ │ ├── enumvalues_2.js │ │ ├── enumvalues_3.js │ │ ├── enumvalues_4.js │ │ ├── enumvalues_5.js │ │ ├── enumvalues_6.js │ │ ├── enumvalues_7.js │ │ ├── enumvalues_8.js │ │ ├── functions_0.js │ │ ├── functions_1.js │ │ ├── functions_2.js │ │ ├── functions_3.js │ │ ├── functions_4.js │ │ ├── functions_5.js │ │ ├── functions_6.js │ │ ├── functions_7.js │ │ ├── functions_8.js │ │ ├── functions_9.js │ │ ├── functions_a.js │ │ ├── functions_b.js │ │ ├── functions_c.js │ │ ├── functions_d.js │ │ ├── mag.svg │ │ ├── mag_d.svg │ │ ├── mag_sel.svg │ │ ├── mag_seld.svg │ │ ├── pages_0.js │ │ ├── pages_1.js │ │ ├── pages_2.js │ │ ├── search.css │ │ ├── search.js │ │ ├── searchdata.js │ │ ├── typedefs_0.js │ │ ├── typedefs_1.js │ │ ├── variables_0.js │ │ ├── variables_1.js │ │ ├── variables_2.js │ │ ├── variables_3.js │ │ ├── variables_4.js │ │ ├── variables_5.js │ │ ├── variables_6.js │ │ ├── variables_7.js │ │ ├── variables_8.js │ │ ├── variables_9.js │ │ └── variables_a.js │ │ ├── splitbar.png │ │ ├── splitbard.png │ │ ├── structspectrex_1_1_non_copyable-members.html │ │ ├── structspectrex_1_1_non_copyable.html │ │ ├── structspectrex_1_1_non_copyable.png │ │ ├── structspectrex_1_1_spectrogram_component_properties-members.html │ │ ├── structspectrex_1_1_spectrogram_component_properties.html │ │ ├── structspectrex_1_1_spectrogram_info-members.html │ │ ├── structspectrex_1_1_spectrogram_info.html │ │ ├── structspectrex_1_1_spectrum_value-members.html │ │ ├── structspectrex_1_1_spectrum_value.html │ │ ├── structspectrex_1_1_sync_info-members.html │ │ ├── structspectrex_1_1_sync_info.html │ │ ├── structspectrex_1_1_waveform_bin-members.html │ │ ├── structspectrex_1_1_waveform_bin.html │ │ ├── structspectrex_1_1_waveform_component_properties-members.html │ │ ├── structspectrex_1_1_waveform_component_properties.html │ │ ├── structspectrex_1_1_waveform_info-members.html │ │ ├── structspectrex_1_1_waveform_info.html │ │ ├── sync_off.png │ │ ├── sync_on.png │ │ ├── tab_a.png │ │ ├── tab_ad.png │ │ ├── tab_b.png │ │ ├── tab_bd.png │ │ ├── tab_h.png │ │ ├── tab_hd.png │ │ ├── tab_s.png │ │ ├── tab_sd.png │ │ └── tabs.css └── examples │ ├── viz2dapp.png │ ├── viz3dapp_1.png │ ├── viz3dapp_2.png │ └── viz3dapp_3.png ├── examples ├── .clang-format ├── CMakeLists.txt ├── README.md ├── Viz2DApp │ ├── CMakeLists.txt │ ├── ParameterWindow │ │ ├── ParameterDisplay.cpp │ │ ├── ParameterDisplay.h │ │ ├── ParameterWindow.cpp │ │ └── ParameterWindow.h │ ├── Parameters.h │ ├── PluginEditor.cpp │ ├── PluginEditor.h │ ├── PluginProcessor.cpp │ ├── PluginProcessor.h │ ├── UI │ │ ├── Cursor.cpp │ │ ├── Cursor.h │ │ ├── Visualization2DComponent.cpp │ │ ├── Visualization2DComponent.h │ │ ├── VisualizationComponent.cpp │ │ └── VisualizationComponent.h │ ├── Utility.h │ ├── WindowOpenGLContext.cpp │ ├── WindowOpenGLContext.h │ └── entitlements.plist └── Viz3DApp │ ├── CMakeLists.txt │ ├── ParameterWindow │ ├── ParameterDisplay.cpp │ ├── ParameterDisplay.h │ ├── ParameterWindow.cpp │ └── ParameterWindow.h │ ├── Parameters.h │ ├── PluginEditor.cpp │ ├── PluginEditor.h │ ├── PluginProcessor.cpp │ ├── PluginProcessor.h │ ├── Renderer.cpp │ ├── Renderer.h │ ├── Rendering.cpp │ ├── Rendering.h │ ├── UI │ ├── Cursor.cpp │ ├── Cursor.h │ ├── VisualizationComponent.cpp │ ├── VisualizationComponent.h │ ├── Visualizers2D.cpp │ └── Visualizers2D.h │ ├── Utility.h │ ├── WindowOpenGLContext.cpp │ ├── WindowOpenGLContext.h │ ├── entitlements.plist │ └── shaders │ ├── CMakeLists.txt │ ├── ToHeader.py │ ├── Visual1.frag │ ├── Visual1.vert │ ├── Visual2.frag │ ├── Visual3.frag │ ├── Visual3.geom │ └── Visual3.vert ├── include └── Spectrex │ ├── Components │ ├── Component.hpp │ ├── Spectrogram.hpp │ └── Waveform.hpp │ ├── MiniProcessor.hpp │ ├── Processing │ ├── Data.hpp │ ├── Parameters.hpp │ └── Processor.hpp │ ├── Rendering │ └── Context.hpp │ ├── Utility │ ├── Exception.hpp │ ├── RingBuffer.hpp │ └── Utility.hpp │ └── extra.h ├── lib ├── macos │ ├── Debug │ │ └── libSpectrex.a │ └── Release │ │ └── libSpectrex.a └── msvc │ ├── v142 │ ├── MD │ │ ├── Win32 │ │ │ ├── Debug │ │ │ │ └── Spectrex.lib │ │ │ └── Release │ │ │ │ └── Spectrex.lib │ │ └── x64 │ │ │ ├── Debug │ │ │ └── Spectrex.lib │ │ │ └── Release │ │ │ └── Spectrex.lib │ └── MT │ │ ├── Win32 │ │ ├── Debug │ │ │ └── Spectrex.lib │ │ └── Release │ │ │ └── Spectrex.lib │ │ └── x64 │ │ ├── Debug │ │ └── Spectrex.lib │ │ └── Release │ │ └── Spectrex.lib │ └── v143 │ ├── MD │ ├── Win32 │ │ ├── Debug │ │ │ └── Spectrex.lib │ │ └── Release │ │ │ └── Spectrex.lib │ └── x64 │ │ ├── Debug │ │ └── Spectrex.lib │ │ └── Release │ │ └── Spectrex.lib │ └── MT │ ├── Win32 │ ├── Debug │ │ └── Spectrex.lib │ └── Release │ │ └── Spectrex.lib │ └── x64 │ ├── Debug │ └── Spectrex.lib │ └── Release │ └── Spectrex.lib └── src └── Spectrex └── MiniProcessor.cpp /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 1.0.0 4 | 5 | - Initial release. 6 | -------------------------------------------------------------------------------- /LICENSE-examples.txt: -------------------------------------------------------------------------------- 1 | SDK LICENSING TERMS 2 | 3 | This license applies to the `examples` directory, specifically KoalaDSP's open source example code, excluding any third party software included in that directory for which the licenses are available from their respective directories. 4 | 5 | --- 6 | 7 | Spectrex Examples 8 | 9 | Copyright (c) 2024 KoalaDSP B.V. All rights reserved. 10 | 11 | This code is licensed under the MIT License (MIT). 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 17 | of the Software, and to permit persons to whom the Software is furnished to do 18 | so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 29 | THE SOFTWARE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🐨 Spectrex 2 | 3 | KoalaDSP's Spectrex is a Software Development Kit that lets you build GPU accelerated 2D and 3D spectrum visualizers. 4 | 5 | ![Viz3DApp](docs/examples/viz3dapp_1.png) ![Viz3DApp](docs/examples/viz3dapp_2.png) ![Viz3DApp](docs/examples/viz3dapp_3.png) 6 | 7 | Making visualization products with real-time spectrum analysis is not easy. We want to give audio developers a chance to create cool audio visualizations in their own apps and to be creative with audio signals and spectrums. This is why we've opened up a big part of our own library called **Spectrex**, free to use. 8 | 9 | Spectrex supports OpenGL and JUCE, and has already shipped in various software products out there. The library is shipped precompiled, compatible with CMake, and its examples are fully open-source and built using JUCE. The library can be used with other frameworks as well. 10 | 11 | 🚀🚀🚀 12 | 13 | #### Community Edition 14 | 15 | This repository is the Community Edition, and is meant for fancy visualizations with aesthetic value. 16 | 17 | The Community Edition is free to use in any application, and has the following features: 18 | 19 | * 🐥 _High-level interface_: 2D real-time pan/zoom spectrogram + waveform that are fully synchronized. 20 | * 🔮 _Low-level interface_: real-time processing that ties in with graphics APIs such as OpenGL. 21 | * 📚 _JUCE examples_: 2D spectrogram + waveform, 3D spectrum visualizers using custom OpenGL shaders. 22 | * 💻 _macOS and Windows_: Microsoft Visual Studio 2019, 2022 (Windows 7+) and latest Xcode (macOS 10.13+). 23 | 24 | #### Enhanced Edition 25 | 26 | If you're looking for more extensive applications involving accurate spectrum analysis, we also offer an Enhanced Edition. 27 | 28 | The Enhanced Edition contains a few more exclusive features intended for more extensive applications, such as: 29 | 30 | * 🌟 _FFT_: sizes up to 8192. (Community Edition: 256, 512) 31 | * 🌟 _Waveform_: Stereo (2x), Left, Right, Mid, Side views. (Community Edition: 1x downmixed waveform) 32 | * 🌟 _Override mode_: lets the Spectrogram and Waveform wrap from left to right. 33 | * 🌟 _Playhead sync_: syncs the Spectrogram and Waveform position with the DAW playhead and in bars. 34 | * 🌟 _Signal metering components_: CorrelationMeter, Goniometer and more visualization components. 35 | * 🌟 _Customization_: More customization functions and properties for various classes. 36 | 37 | Contact us to find out more. 38 | 39 | ### Documentation 40 | 41 | For documentation, refer to the code (extensively documented), any included generated documentation, or the examples. 42 | 43 | ### Licensing 44 | 45 | When including the precompiled libraries into your released products, please make sure to include the third-party attributions in `LICENSE.txt` somewhere in your software, installer or distribution. 46 | 47 | The examples in `examples` are licensed using the open-source MIT license. 48 | 49 | ### Examples 50 | 51 | ![Viz2DApp](docs/examples/viz2dapp.png) 52 | 53 | The `examples` directory contains two examples built for JUCE: a real-time 2D spectrogram and waveform visualizer (`Viz2DApp`), and a real-time 3D spectrum visualizer using custom OpenGL shaders (`Viz3DApp`). 54 | 55 | ### Get in touch 56 | 57 | Visit https://koaladsp.com or check out our [Discord](https://discord.gg/QndSN2w74S). 58 | -------------------------------------------------------------------------------- /cmake/macos/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/macos/Debug/libSpectrex.a" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/macos/Debug/libSpectrex.a" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/macos/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/macos/Release/libSpectrex.a" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/macos/Release/libSpectrex.a" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MD/Win32/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v142/MD/Win32/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MD/Win32/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MD/Win32/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v142/MD/Win32/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MD/Win32/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MD/x64/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v142/MD/x64/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MD/x64/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MD/x64/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v142/MD/x64/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MD/x64/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MT/Win32/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v142/MT/Win32/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MT/Win32/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MT/Win32/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v142/MT/Win32/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MT/Win32/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MT/x64/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v142/MT/x64/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MT/x64/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v142/MT/x64/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v142/MT/x64/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v142/MT/x64/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MD/Win32/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v143/MD/Win32/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MD/Win32/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MD/Win32/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v143/MD/Win32/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MD/Win32/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MD/x64/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v143/MD/x64/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MD/x64/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MD/x64/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v143/MD/x64/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MD/x64/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MT/Win32/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v143/MT/Win32/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MT/Win32/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MT/Win32/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v143/MT/Win32/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MT/Win32/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MT/x64/Spectrex-debug.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Debug". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Debug" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" 12 | IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/msvc/v143/MT/x64/Debug/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MT/x64/Debug/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /cmake/msvc/v143/MT/x64/Spectrex-release.cmake: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------------- 2 | # Generated CMake target import file for configuration "Release". 3 | #---------------------------------------------------------------- 4 | 5 | # Commands may need to know the format version. 6 | set(CMAKE_IMPORT_FILE_VERSION 1) 7 | 8 | # Import target "Spectrex::Spectrex" for configuration "Release" 9 | set_property(TARGET Spectrex::Spectrex APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) 10 | set_target_properties(Spectrex::Spectrex PROPERTIES 11 | IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX" 12 | IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/msvc/v143/MT/x64/Release/Spectrex.lib" 13 | ) 14 | 15 | list(APPEND _cmake_import_check_targets Spectrex::Spectrex ) 16 | list(APPEND _cmake_import_check_files_for_Spectrex::Spectrex "${_IMPORT_PREFIX}/lib/msvc/v143/MT/x64/Release/Spectrex.lib" ) 17 | 18 | # Commands beyond this point should not need to know the version. 19 | set(CMAKE_IMPORT_FILE_VERSION) 20 | -------------------------------------------------------------------------------- /docs/doxygen/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/bc_s.png -------------------------------------------------------------------------------- /docs/doxygen/html/bc_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/bc_sd.png -------------------------------------------------------------------------------- /docs/doxygen/html/classspectrex_1_1_k_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/classspectrex_1_1_k_component.png -------------------------------------------------------------------------------- /docs/doxygen/html/classspectrex_1_1_k_spectrogram_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/classspectrex_1_1_k_spectrogram_component.png -------------------------------------------------------------------------------- /docs/doxygen/html/classspectrex_1_1_k_waveform_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/classspectrex_1_1_k_waveform_component.png -------------------------------------------------------------------------------- /docs/doxygen/html/classspectrex_1_1_ring_buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/classspectrex_1_1_ring_buffer.png -------------------------------------------------------------------------------- /docs/doxygen/html/clipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | The code below is based on the Doxygen Awesome project, see 4 | https://github.com/jothepro/doxygen-awesome-css 5 | 6 | MIT License 7 | 8 | Copyright (c) 2021 - 2022 jothepro 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | */ 29 | 30 | let clipboard_title = "Copy to clipboard" 31 | let clipboard_icon = `` 32 | let clipboard_successIcon = `` 33 | let clipboard_successDuration = 1000 34 | 35 | $(function() { 36 | if(navigator.clipboard) { 37 | const fragments = document.getElementsByClassName("fragment") 38 | for(const fragment of fragments) { 39 | const clipboard_div = document.createElement("div") 40 | clipboard_div.classList.add("clipboard") 41 | clipboard_div.innerHTML = clipboard_icon 42 | clipboard_div.title = clipboard_title 43 | $(clipboard_div).click(function() { 44 | const content = this.parentNode.cloneNode(true) 45 | // filter out line number and folded fragments from file listings 46 | content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) 47 | let text = content.textContent 48 | // remove trailing newlines and trailing spaces from empty lines 49 | text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') 50 | navigator.clipboard.writeText(text); 51 | this.classList.add("success") 52 | this.innerHTML = clipboard_successIcon 53 | window.setTimeout(() => { // switch back to normal icon after timeout 54 | this.classList.remove("success") 55 | this.innerHTML = clipboard_icon 56 | }, clipboard_successDuration); 57 | }) 58 | fragment.insertBefore(clipboard_div, fragment.firstChild) 59 | } 60 | } 61 | }) 62 | -------------------------------------------------------------------------------- /docs/doxygen/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/closed.png -------------------------------------------------------------------------------- /docs/doxygen/html/cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Cookie helper functions 3 | Copyright (c) 2023 Dimitri van Heesch 4 | Released under MIT license. 5 | */ 6 | let Cookie = { 7 | cookie_namespace: 'doxygen_', 8 | 9 | readSetting(cookie,defVal) { 10 | if (window.chrome) { 11 | const val = localStorage.getItem(this.cookie_namespace+cookie) || 12 | sessionStorage.getItem(this.cookie_namespace+cookie); 13 | if (val) return val; 14 | } else { 15 | let myCookie = this.cookie_namespace+cookie+"="; 16 | if (document.cookie) { 17 | const index = document.cookie.indexOf(myCookie); 18 | if (index != -1) { 19 | const valStart = index + myCookie.length; 20 | let valEnd = document.cookie.indexOf(";", valStart); 21 | if (valEnd == -1) { 22 | valEnd = document.cookie.length; 23 | } 24 | return document.cookie.substring(valStart, valEnd); 25 | } 26 | } 27 | } 28 | return defVal; 29 | }, 30 | 31 | writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete 32 | if (window.chrome) { 33 | if (days==0) { 34 | sessionStorage.setItem(this.cookie_namespace+cookie,val); 35 | } else { 36 | localStorage.setItem(this.cookie_namespace+cookie,val); 37 | } 38 | } else { 39 | let date = new Date(); 40 | date.setTime(date.getTime()+(days*24*60*60*1000)); 41 | const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; 42 | document.cookie = this.cookie_namespace + cookie + "=" + 43 | val + "; SameSite=Lax;" + expiration + "path=/"; 44 | } 45 | }, 46 | 47 | eraseSetting(cookie) { 48 | if (window.chrome) { 49 | if (localStorage.getItem(this.cookie_namespace+cookie)) { 50 | localStorage.removeItem(this.cookie_namespace+cookie); 51 | } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { 52 | sessionStorage.removeItem(this.cookie_namespace+cookie); 53 | } 54 | } else { 55 | this.writeSetting(cookie,'',-1); 56 | } 57 | }, 58 | } 59 | -------------------------------------------------------------------------------- /docs/doxygen/html/dir_49e56c817e5e54854c35e136979f97ca.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | KoalaDSP Spectrex: docs Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 31 | 32 | 33 |
28 |
KoalaDSP Spectrex 29 |
30 |
34 |
35 | 36 | 37 | 42 | 47 | 48 | 49 | 57 | 58 | 63 | 64 |
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 |
76 |
Loading...
77 |
Searching...
78 |
No Matches
79 |
80 |
81 |
82 |
83 | 84 | 88 |
89 |
90 |
91 |
docs Directory Reference
92 |
93 |
94 |
95 | 96 | 99 |
100 | 101 | 102 | -------------------------------------------------------------------------------- /docs/doxygen/html/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/doxygen/html/docd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/doxygen/html/folderclosed.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/doxygen/html/folderclosedd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/doxygen/html/folderopen.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/doxygen/html/folderopend.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/doxygen/html/functions_type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | KoalaDSP Spectrex: Class Members - Typedefs 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 31 | 32 | 33 |
28 |
KoalaDSP Spectrex 29 |
30 |
34 |
35 | 36 | 37 | 42 | 47 | 48 | 49 | 57 | 58 |
59 |
60 | 65 | 66 |
70 |
71 | 72 | 73 |
74 |
75 |
76 |
77 |
78 |
Loading...
79 |
Searching...
80 |
No Matches
81 |
82 |
83 |
84 |
85 | 86 |
87 |
Here is a list of all documented typedefs with links to the class documentation for each member:
91 |
92 | 93 | 96 |
97 | 98 | 99 | -------------------------------------------------------------------------------- /docs/doxygen/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | KoalaDSP Spectrex: 🐨 Spectrex 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 31 | 32 | 33 |
28 |
KoalaDSP Spectrex 29 |
30 |
34 |
35 | 36 | 37 | 42 | 47 | 48 | 49 | 57 | 58 |
59 |
60 | 65 | 66 |
70 |
71 | 72 | 73 |
74 |
75 |
76 |
77 |
78 |
Loading...
79 |
Searching...
80 |
No Matches
81 |
82 |
83 |
84 |
85 | 86 |
87 |
🐨 Spectrex
88 |
89 |
90 |

KoalaDSP's Spectrex is a Software Development Kit that lets you build GPU accelerated 2D and 3D spectrum visualizers.

91 |

Have a look at the Class List to get started.

92 |
93 | 94 |
95 | 96 | 99 |
100 | 101 | 102 | -------------------------------------------------------------------------------- /docs/doxygen/html/menudata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | var menudata={children:[ 26 | {text:"Main Page",url:"index.html"}, 27 | {text:"Related Pages",url:"pages.html"}, 28 | {text:"Classes",url:"annotated.html",children:[ 29 | {text:"Class List",url:"annotated.html"}, 30 | {text:"Class Index",url:"classes.html"}, 31 | {text:"Class Hierarchy",url:"hierarchy.html"}, 32 | {text:"Class Members",url:"functions.html",children:[ 33 | {text:"All",url:"functions.html",children:[ 34 | {text:"a",url:"functions.html#index_a"}, 35 | {text:"b",url:"functions.html#index_b"}, 36 | {text:"c",url:"functions.html#index_c"}, 37 | {text:"d",url:"functions.html#index_d"}, 38 | {text:"e",url:"functions.html#index_e"}, 39 | {text:"f",url:"functions.html#index_f"}, 40 | {text:"g",url:"functions.html#index_g"}, 41 | {text:"h",url:"functions.html#index_h"}, 42 | {text:"i",url:"functions.html#index_i"}, 43 | {text:"k",url:"functions.html#index_k"}, 44 | {text:"m",url:"functions.html#index_m"}, 45 | {text:"o",url:"functions.html#index_o"}, 46 | {text:"p",url:"functions.html#index_p"}, 47 | {text:"r",url:"functions.html#index_r"}, 48 | {text:"s",url:"functions.html#index_s"}, 49 | {text:"t",url:"functions.html#index_t"}, 50 | {text:"v",url:"functions.html#index_v"}, 51 | {text:"w",url:"functions.html#index_w"}]}, 52 | {text:"Functions",url:"functions_func.html",children:[ 53 | {text:"a",url:"functions_func.html#index_a"}, 54 | {text:"b",url:"functions_func.html#index_b"}, 55 | {text:"c",url:"functions_func.html#index_c"}, 56 | {text:"d",url:"functions_func.html#index_d"}, 57 | {text:"e",url:"functions_func.html#index_e"}, 58 | {text:"g",url:"functions_func.html#index_g"}, 59 | {text:"h",url:"functions_func.html#index_h"}, 60 | {text:"i",url:"functions_func.html#index_i"}, 61 | {text:"k",url:"functions_func.html#index_k"}, 62 | {text:"o",url:"functions_func.html#index_o"}, 63 | {text:"p",url:"functions_func.html#index_p"}, 64 | {text:"r",url:"functions_func.html#index_r"}, 65 | {text:"s",url:"functions_func.html#index_s"}, 66 | {text:"w",url:"functions_func.html#index_w"}]}, 67 | {text:"Variables",url:"functions_vars.html"}, 68 | {text:"Typedefs",url:"functions_type.html"}, 69 | {text:"Enumerations",url:"functions_enum.html"}]}]}, 70 | {text:"Files",url:"files.html",children:[ 71 | {text:"File List",url:"files.html"}]}]} 72 | -------------------------------------------------------------------------------- /docs/doxygen/html/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/doxygen/html/minusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/doxygen/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/nav_f.png -------------------------------------------------------------------------------- /docs/doxygen/html/nav_fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/nav_fd.png -------------------------------------------------------------------------------- /docs/doxygen/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/nav_g.png -------------------------------------------------------------------------------- /docs/doxygen/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/nav_h.png -------------------------------------------------------------------------------- /docs/doxygen/html/nav_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/nav_hd.png -------------------------------------------------------------------------------- /docs/doxygen/html/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: var(--nav-text-active-color); 26 | text-shadow: var(--nav-text-active-shadow); 27 | } 28 | 29 | #nav-tree .selected .arrow { 30 | color: var(--nav-arrow-selected-color); 31 | text-shadow: none; 32 | } 33 | 34 | #nav-tree img { 35 | margin:0px; 36 | padding:0px; 37 | border:0px; 38 | vertical-align: middle; 39 | } 40 | 41 | #nav-tree a { 42 | text-decoration:none; 43 | padding:0px; 44 | margin:0px; 45 | } 46 | 47 | #nav-tree .label { 48 | margin:0px; 49 | padding:0px; 50 | font: 12px var(--font-family-nav); 51 | } 52 | 53 | #nav-tree .label a { 54 | padding:2px; 55 | } 56 | 57 | #nav-tree .selected a { 58 | text-decoration:none; 59 | color:var(--nav-text-active-color); 60 | } 61 | 62 | #nav-tree .children_ul { 63 | margin:0px; 64 | padding:0px; 65 | } 66 | 67 | #nav-tree .item { 68 | margin:0px; 69 | padding:0px; 70 | } 71 | 72 | #nav-tree { 73 | padding: 0px 0px; 74 | font-size:14px; 75 | overflow:auto; 76 | } 77 | 78 | #doc-content { 79 | overflow:auto; 80 | display:block; 81 | padding:0px; 82 | margin:0px; 83 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 84 | } 85 | 86 | #side-nav { 87 | padding:0 6px 0 0; 88 | margin: 0px; 89 | display:block; 90 | position: absolute; 91 | left: 0px; 92 | width: $width; 93 | overflow : hidden; 94 | } 95 | 96 | .ui-resizable .ui-resizable-handle { 97 | display:block; 98 | } 99 | 100 | .ui-resizable-e { 101 | background-image:var(--nav-splitbar-image); 102 | background-size:100%; 103 | background-repeat:repeat-y; 104 | background-attachment: scroll; 105 | cursor:ew-resize; 106 | height:100%; 107 | right:0; 108 | top:0; 109 | width:6px; 110 | } 111 | 112 | .ui-resizable-handle { 113 | display:none; 114 | font-size:0.1px; 115 | position:absolute; 116 | z-index:1; 117 | } 118 | 119 | #nav-tree-contents { 120 | margin: 6px 0px 0px 0px; 121 | } 122 | 123 | #nav-tree { 124 | background-repeat:repeat-x; 125 | background-color: var(--nav-background-color); 126 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 127 | } 128 | 129 | #nav-sync { 130 | position:absolute; 131 | top:5px; 132 | right:24px; 133 | z-index:0; 134 | } 135 | 136 | #nav-sync img { 137 | opacity:0.3; 138 | } 139 | 140 | #nav-sync img:hover { 141 | opacity:0.9; 142 | } 143 | 144 | @media print 145 | { 146 | #nav-tree { display: none; } 147 | div.ui-resizable-handle { display: none; position: relative; } 148 | } 149 | 150 | -------------------------------------------------------------------------------- /docs/doxygen/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/open.png -------------------------------------------------------------------------------- /docs/doxygen/html/pages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | KoalaDSP Spectrex: Related Pages 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 31 | 32 | 33 |
28 |
KoalaDSP Spectrex 29 |
30 |
34 |
35 | 36 | 37 | 42 | 47 | 48 | 49 | 57 | 58 |
59 |
60 | 65 | 66 |
70 |
71 | 72 | 73 |
74 |
75 |
76 |
77 |
78 |
Loading...
79 |
Searching...
80 |
No Matches
81 |
82 |
83 |
84 |
85 | 86 |
87 |
Related Pages
88 |
89 |
90 |
Here is a list of all related documentation pages:
91 | 92 | 93 |
 Threads
94 |
95 |
96 | 97 | 100 |
101 | 102 | 103 | -------------------------------------------------------------------------------- /docs/doxygen/html/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/plusd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['advance_0',['advance',['../classspectrex_1_1_ring_buffer.html#afbbcf5f1a023a6f9703bdac358761101',1,'spectrex::RingBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['backgroundcolor_0',['BackgroundColor',['../structspectrex_1_1_spectrogram_component_properties.html#a3458edd80ccff58839511598a1ea2b29',1,'spectrex::SpectrogramComponentProperties::BackgroundColor'],['../structspectrex_1_1_waveform_component_properties.html#a90f952831cd18422483bab378696b31f',1,'spectrex::WaveformComponentProperties::BackgroundColor']]], 4 | ['beginframe_1',['beginFrame',['../classspectrex_1_1_k_processor.html#a8830a017e492cd219fab832f1467dd06',1,'spectrex::KProcessor']]], 5 | ['bpm_2',['Bpm',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720aa29f406867e1acbda958fbfcfac290aa',1,'spectrex::ProcessorParameters']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_10.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['threads_0',['Threads',['../req.html',1,'']]], 4 | ['timefactor_1',['TimeFactor',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720add6e7faa6774b440ee6c74a7222e638f',1,'spectrex::ProcessorParameters']]], 5 | ['timemultiplier_2',['TimeMultiplier',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a3397cb1b5dbc9575cd50cdbd6b9f580b',1,'spectrex::ProcessorParameters']]], 6 | ['timeoffset_3',['TimeOffset',['../structspectrex_1_1_spectrogram_info.html#a2fd97914e8bf4cb9c3bd5fb79914b3c0',1,'spectrex::SpectrogramInfo']]], 7 | ['timesignaturenumerator_4',['TimeSignatureNumerator',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720ad6654250b76b2d89113892f3fd202105',1,'spectrex::ProcessorParameters']]], 8 | ['timeunit_5',['TimeUnit',['../classspectrex_1_1_k_processor.html#a8ab313a497460348e62ca356ccd18fc2',1,'spectrex::KProcessor']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_11.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['value_0',['Value',['../structspectrex_1_1_spectrum_value.html#aa7087401d12bf63c05063d644c5e415b',1,'spectrex::SpectrumValue']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_12.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['waveformbin_0',['WaveformBin',['../structspectrex_1_1_waveform_bin.html',1,'spectrex']]], 4 | ['waveformcomponentproperties_1',['WaveformComponentProperties',['../structspectrex_1_1_waveform_component_properties.html',1,'spectrex']]], 5 | ['waveforminfo_2',['WaveformInfo',['../structspectrex_1_1_waveform_info.html',1,'spectrex::WaveformInfo'],['../structspectrex_1_1_waveform_info.html#a8fc8f20ac84a2eee769dac88de9d7ae0',1,'spectrex::WaveformInfo::WaveformInfo() noexcept'],['../structspectrex_1_1_waveform_info.html#acff86f1992a1b564d5e72e45f5e3dfa7',1,'spectrex::WaveformInfo::WaveformInfo(size_t height, size_t writePointer) noexcept']]], 6 | ['width_3',['Width',['../structspectrex_1_1_spectrogram_info.html#a4c716d37ef9bf4277960411cf29bfd06',1,'spectrex::SpectrogramInfo::Width'],['../structspectrex_1_1_sync_info.html#a823840094b17bd3dd52666500c3601e8',1,'spectrex::SyncInfo::Width']]], 7 | ['window_4',['Window',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720ac89686a387d2b12b3c729ce35a0bcb5b',1,'spectrex::ProcessorParameters']]], 8 | ['writepointer_5',['WritePointer',['../structspectrex_1_1_waveform_info.html#adb9b61621afbb2532228c90bac253737',1,'spectrex::WaveformInfo']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_13.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['🐨_20spectrex_0',['🐨 Spectrex',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['cachesyncwaveformspectrogram_0',['cacheSyncWaveformSpectrogram',['../classspectrex_1_1_k_processor.html#abeceb92199890d069d4039cd39ea5152',1,'spectrex::KProcessor']]], 4 | ['clear_1',['Clear',['../structspectrex_1_1_sync_info.html#a09dd4ab5dc13e9ddbe69dc26ce29a0a8',1,'spectrex::SyncInfo']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['direction_0',['Direction',['../classspectrex_1_1_k_component.html#ad23da2a4735d3c16a6588d2022dc0216',1,'spectrex::KComponent']]], 4 | ['directionflag_1',['DirectionFlag',['../classspectrex_1_1_k_component.html#ac52d274b4daf7c00c49d464032172650',1,'spectrex::KComponent']]], 5 | ['draw_2',['draw',['../classspectrex_1_1_k_component.html#a2076ae5704633c2c730975793cedc070',1,'spectrex::KComponent::draw()'],['../classspectrex_1_1_k_spectrogram_component.html#ac750d5230c48333dcc9dc12ba99e650b',1,'spectrex::KSpectrogramComponent::draw()'],['../classspectrex_1_1_k_waveform_component.html#aa4b2cc34ef62a7a0937bc3f40869a4ac',1,'spectrex::KWaveformComponent::draw()']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['exception_0',['Exception',['../classspectrex_1_1_exception.html',1,'spectrex::Exception'],['../classspectrex_1_1_exception.html#a39682f4df2aef1f12d8d78316d9f0222',1,'spectrex::Exception::Exception()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flatten_0',['Flatten',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a4adae1c15e93fd1abd85fcdd8b948e10',1,'spectrex::ProcessorParameters']]], 4 | ['frequency_1',['Frequency',['../structspectrex_1_1_waveform_bin.html#a71b5edc353110a9876fbbc2321890287',1,'spectrex::WaveformBin']]], 5 | ['ftsize_2',['FtSize',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a3f774122a786f83355759e08e6a23d97',1,'spectrex::ProcessorParameters']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['hasnewvalue_0',['hasNewValue',['../classspectrex_1_1_processor_parameters.html#a156ae60aba697baf406ca2222744b17a',1,'spectrex::ProcessorParameters']]], 4 | ['hasvalue_1',['hasValue',['../classspectrex_1_1_processor_parameters.html#a5b7407021cab1a3cfb263ff6ae7cda83',1,'spectrex::ProcessorParameters']]], 5 | ['height_2',['Height',['../structspectrex_1_1_spectrogram_info.html#a597ea8d914b17d9db78c1012b2993988',1,'spectrex::SpectrogramInfo::Height'],['../structspectrex_1_1_waveform_info.html#a7d9b3de5eddf1705e992f84c22d28997',1,'spectrex::WaveformInfo::Height'],['../structspectrex_1_1_sync_info.html#afdfab942bbffd5c88d090070f9479a60',1,'spectrex::SyncInfo::Height']]], 6 | ['highlight_3',['Highlight',['../structspectrex_1_1_spectrum_value.html#a72c9dbd5b7edd2c1525ee3fbc1996f45',1,'spectrex::SpectrumValue']]], 7 | ['history_4',['History',['../structspectrex_1_1_spectrum_value.html#a21a3640e11249e37cacd6f62204e33b7',1,'spectrex::SpectrumValue']]], 8 | ['hold_5',['Hold',['../structspectrex_1_1_spectrum_value.html#a15c899015052e5859f46f545b13d7cdc',1,'spectrex::SpectrumValue']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initializegl_0',['initializeGL',['../classspectrex_1_1_k_context.html#a3bf84cc819e4dece84be46377a32e04b',1,'spectrex::KContext']]], 4 | ['isinitialposition_1',['isInitialPosition',['../classspectrex_1_1_k_processor.html#a217bb273a00862d33a2176bb02e530e5',1,'spectrex::KProcessor']]], 5 | ['isvalid_2',['isValid',['../structspectrex_1_1_sync_info.html#acc2214aa58f13b383b983faaa75d2632',1,'spectrex::SyncInfo::isValid()'],['../classspectrex_1_1_k_processor.html#ab53584a77d59c965678fb38eb1a361e3',1,'spectrex::KProcessor::isValid()']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['k_5fexpectedblocksize_0',['k_expectedBlockSize',['../classspectrex_1_1_k_processor.html#ad3d750f617b3672a2f0ba430b5b17f5b',1,'spectrex::KProcessor']]], 4 | ['kcomponent_1',['KComponent',['../classspectrex_1_1_k_component.html',1,'spectrex']]], 5 | ['kcontext_2',['KContext',['../classspectrex_1_1_k_context.html',1,'spectrex']]], 6 | ['key_3',['Key',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720',1,'spectrex::ProcessorParameters']]], 7 | ['kprocessor_4',['KProcessor',['../classspectrex_1_1_k_processor.html',1,'spectrex::KProcessor'],['../classspectrex_1_1_k_processor.html#a518923bc5c0510b4cde5fb2064a354c0',1,'spectrex::KProcessor::KProcessor()']]], 8 | ['kspectrogramcomponent_5',['KSpectrogramComponent',['../classspectrex_1_1_k_spectrogram_component.html',1,'spectrex::KSpectrogramComponent'],['../classspectrex_1_1_k_spectrogram_component.html#a9e48b426744eb7adf6ad497237e76cbe',1,'spectrex::KSpectrogramComponent::KSpectrogramComponent()']]], 9 | ['kwaveformcomponent_6',['KWaveformComponent',['../classspectrex_1_1_k_waveform_component.html',1,'spectrex::KWaveformComponent'],['../classspectrex_1_1_k_waveform_component.html#a745b34d83b4fc7bda4e6f90732949ab4',1,'spectrex::KWaveformComponent::KWaveformComponent()']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['max_0',['Max',['../structspectrex_1_1_waveform_bin.html#a709bba1c39322d7f0c8bfa136ceb32c3',1,'spectrex::WaveformBin']]], 4 | ['maxfrequency_1',['MaxFrequency',['../structspectrex_1_1_spectrogram_info.html#a0efd6ff735d6625199f6fef3d2be6d34',1,'spectrex::SpectrogramInfo']]], 5 | ['min_2',['Min',['../structspectrex_1_1_waveform_bin.html#a6618bf49891eccfe2eb6733b9804038c',1,'spectrex::WaveformBin']]], 6 | ['minfrequency_3',['MinFrequency',['../structspectrex_1_1_spectrogram_info.html#acb4d1bff778ad3309623924681f249c4',1,'spectrex::SpectrogramInfo']]], 7 | ['miniprocessor_4',['MiniProcessor',['../classspectrex_1_1_mini_processor.html',1,'spectrex']]], 8 | ['mixmode_5',['MixMode',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720aeac58524ac9aac2141d1d67b8371a432',1,'spectrex::ProcessorParameters']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['noncopyable_0',['NonCopyable',['../structspectrex_1_1_non_copyable.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onmousedoubleclick_0',['onMouseDoubleClick',['../classspectrex_1_1_k_component.html#ae5dd0b5fcc1bcd2dd9a6350ab77634a1',1,'spectrex::KComponent']]], 4 | ['onmousedrag_1',['onMouseDrag',['../classspectrex_1_1_k_component.html#a5c664693ea82aed7d452e618533f0688',1,'spectrex::KComponent']]], 5 | ['onmouseend_2',['onMouseEnd',['../classspectrex_1_1_k_component.html#ac19412b94363ed5d27c0e532194d46a3',1,'spectrex::KComponent']]], 6 | ['onmousemove_3',['onMouseMove',['../classspectrex_1_1_k_component.html#a2160ffd292daf59b4d9b8686b1caf895',1,'spectrex::KComponent']]], 7 | ['onmouseshiftdoubleclick_4',['onMouseShiftDoubleClick',['../classspectrex_1_1_k_component.html#a8dc97a011685bd59a204d6d8e66ce62e',1,'spectrex::KComponent']]], 8 | ['onmouseshiftdrag_5',['onMouseShiftDrag',['../classspectrex_1_1_k_component.html#a82712f9e4309ef1a178f32578886c497',1,'spectrex::KComponent']]], 9 | ['onmousestart_6',['onMouseStart',['../classspectrex_1_1_k_component.html#a0acde6bd72dffb88c3b85b308a6d4b15',1,'spectrex::KComponent']]], 10 | ['onmousewheel_7',['onMouseWheel',['../classspectrex_1_1_k_component.html#a88803564e939a0b2884558774fbe602e',1,'spectrex::KComponent']]], 11 | ['operator_20bool_8',['operator bool',['../classspectrex_1_1_processor_parameters.html#ac5641f6567403e9375b37c4f0cd236d9',1,'spectrex::ProcessorParameters']]], 12 | ['operator_2b_3d_9',['operator+=',['../structspectrex_1_1_spectrum_value.html#ac4e71485e7f8b7bfb7d30f10101800ef',1,'spectrex::SpectrumValue']]], 13 | ['operator_3c_3c_10',['operator<<',['../classspectrex_1_1_exception.html#a2e589e15d50841e2bbd8faec6b1aec05',1,'spectrex::Exception']]], 14 | ['override_11',['Override',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a6da8e67225fdcfa78c3ea5dc3154b849',1,'spectrex::ProcessorParameters']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['playheadsynced_0',['PlayHeadSynced',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a362d3bc9620da63f845034a26fc42592',1,'spectrex::ProcessorParameters']]], 4 | ['pointer_1',['Pointer',['../structspectrex_1_1_sync_info.html#ac438855d0bcb5d76c78c5924d921f974',1,'spectrex::SyncInfo']]], 5 | ['position_2',['Position',['../structspectrex_1_1_spectrogram_info.html#a9437742fe5acf63c6a8121e09bb5a8e8',1,'spectrex::SpectrogramInfo']]], 6 | ['prepare_3',['prepare',['../classspectrex_1_1_k_processor.html#ab9045b8be18d083e28c1028ab7e9ad5c',1,'spectrex::KProcessor']]], 7 | ['preparetoplay_4',['prepareToPlay',['../classspectrex_1_1_mini_processor.html#a569f067a9138d2b74c06065cf8b330b9',1,'spectrex::MiniProcessor']]], 8 | ['process_5',['process',['../classspectrex_1_1_k_processor.html#a5f38706a243c716ad4661714c2f16f38',1,'spectrex::KProcessor']]], 9 | ['processblock_6',['processBlock',['../classspectrex_1_1_mini_processor.html#a44d7f8ab12741d30efefe8967e3110c0',1,'spectrex::MiniProcessor']]], 10 | ['processorparameters_7',['ProcessorParameters',['../classspectrex_1_1_processor_parameters.html',1,'spectrex::ProcessorParameters'],['../classspectrex_1_1_processor_parameters.html#a6973da2a16be05aa4d210b03a139fea9',1,'spectrex::ProcessorParameters::ProcessorParameters()']]], 11 | ['push_8',['push',['../classspectrex_1_1_ring_buffer.html#ae26646aaba5d158b6395bd46060ea079',1,'spectrex::RingBuffer']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/all_e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['read_0',['read',['../classspectrex_1_1_ring_buffer.html#aa0f55b15cb8fc80fab04ab01a4c15101',1,'spectrex::RingBuffer']]], 4 | ['reset_1',['reset',['../classspectrex_1_1_ring_buffer.html#a29e7348f1179716896366c5daf4c3434',1,'spectrex::RingBuffer']]], 5 | ['resetindices_2',['resetIndices',['../classspectrex_1_1_ring_buffer.html#a261e661fc1da371e94e5fe270ee69cd2',1,'spectrex::RingBuffer']]], 6 | ['resetposition_3',['resetPosition',['../classspectrex_1_1_k_processor.html#ae2e4e9df4c1750619a44f5773724993e',1,'spectrex::KProcessor']]], 7 | ['ringbuffer_4',['RingBuffer',['../classspectrex_1_1_ring_buffer.html',1,'spectrex::RingBuffer< T >'],['../classspectrex_1_1_ring_buffer.html#a3e6749e4397552c7e233b31eb3beda82',1,'spectrex::RingBuffer::RingBuffer()']]], 8 | ['rotate_5',['Rotate',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a8d2de5368588552fbae54044ac5c7b3d',1,'spectrex::ProcessorParameters']]], 9 | ['rowindex_6',['RowIndex',['../structspectrex_1_1_sync_info.html#a757a96953891dbe6e374bf9ee12f7b5b',1,'spectrex::SyncInfo']]], 10 | ['rows_7',['Rows',['../structspectrex_1_1_spectrogram_info.html#a784217015dd069c9f2c133ff71624efc',1,'spectrex::SpectrogramInfo']]], 11 | ['rowswritten_8',['RowsWritten',['../structspectrex_1_1_spectrogram_info.html#a4eaa3da4c3a503e19a4c58e7ec151a16',1,'spectrex::SpectrogramInfo']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['exception_0',['Exception',['../classspectrex_1_1_exception.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['kcomponent_0',['KComponent',['../classspectrex_1_1_k_component.html',1,'spectrex']]], 4 | ['kcontext_1',['KContext',['../classspectrex_1_1_k_context.html',1,'spectrex']]], 5 | ['kprocessor_2',['KProcessor',['../classspectrex_1_1_k_processor.html',1,'spectrex']]], 6 | ['kspectrogramcomponent_3',['KSpectrogramComponent',['../classspectrex_1_1_k_spectrogram_component.html',1,'spectrex']]], 7 | ['kwaveformcomponent_4',['KWaveformComponent',['../classspectrex_1_1_k_waveform_component.html',1,'spectrex']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['miniprocessor_0',['MiniProcessor',['../classspectrex_1_1_mini_processor.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['noncopyable_0',['NonCopyable',['../structspectrex_1_1_non_copyable.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['processorparameters_0',['ProcessorParameters',['../classspectrex_1_1_processor_parameters.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['ringbuffer_0',['RingBuffer',['../classspectrex_1_1_ring_buffer.html',1,'spectrex']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['spectrogramcomponentproperties_0',['SpectrogramComponentProperties',['../structspectrex_1_1_spectrogram_component_properties.html',1,'spectrex']]], 4 | ['spectrograminfo_1',['SpectrogramInfo',['../structspectrex_1_1_spectrogram_info.html',1,'spectrex']]], 5 | ['spectrumvalue_2',['SpectrumValue',['../structspectrex_1_1_spectrum_value.html',1,'spectrex']]], 6 | ['syncinfo_3',['SyncInfo',['../structspectrex_1_1_sync_info.html',1,'spectrex']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/classes_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['waveformbin_0',['WaveformBin',['../structspectrex_1_1_waveform_bin.html',1,'spectrex']]], 4 | ['waveformcomponentproperties_1',['WaveformComponentProperties',['../structspectrex_1_1_waveform_component_properties.html',1,'spectrex']]], 5 | ['waveforminfo_2',['WaveformInfo',['../structspectrex_1_1_waveform_info.html',1,'spectrex']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enums_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['directionflag_0',['DirectionFlag',['../classspectrex_1_1_k_component.html#ac52d274b4daf7c00c49d464032172650',1,'spectrex::KComponent']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enums_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['key_0',['Key',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enums_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timeunit_0',['TimeUnit',['../classspectrex_1_1_k_processor.html#a8ab313a497460348e62ca356ccd18fc2',1,'spectrex::KProcessor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['bpm_0',['Bpm',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720aa29f406867e1acbda958fbfcfac290aa',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['flatten_0',['Flatten',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a4adae1c15e93fd1abd85fcdd8b948e10',1,'spectrex::ProcessorParameters']]], 4 | ['ftsize_1',['FtSize',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a3f774122a786f83355759e08e6a23d97',1,'spectrex::ProcessorParameters']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['mixmode_0',['MixMode',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720aeac58524ac9aac2141d1d67b8371a432',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['override_0',['Override',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a6da8e67225fdcfa78c3ea5dc3154b849',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['playheadsynced_0',['PlayHeadSynced',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a362d3bc9620da63f845034a26fc42592',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['rotate_0',['Rotate',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a8d2de5368588552fbae54044ac5c7b3d',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['samplerate_0',['SampleRate',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720ab8b9b97682808000fc715cdd731e6165',1,'spectrex::ProcessorParameters']]], 4 | ['stftoverlap_1',['StftOverlap',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a75ea8ce59d2019036bb2e59b8bf6b44a',1,'spectrex::ProcessorParameters']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timefactor_0',['TimeFactor',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720add6e7faa6774b440ee6c74a7222e638f',1,'spectrex::ProcessorParameters']]], 4 | ['timemultiplier_1',['TimeMultiplier',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720a3397cb1b5dbc9575cd50cdbd6b9f580b',1,'spectrex::ProcessorParameters']]], 5 | ['timesignaturenumerator_2',['TimeSignatureNumerator',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720ad6654250b76b2d89113892f3fd202105',1,'spectrex::ProcessorParameters']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/enumvalues_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['window_0',['Window',['../classspectrex_1_1_processor_parameters.html#ac1030da171494e02c6c54512c37d9720ac89686a387d2b12b3c729ce35a0bcb5b',1,'spectrex::ProcessorParameters']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['advance_0',['advance',['../classspectrex_1_1_ring_buffer.html#afbbcf5f1a023a6f9703bdac358761101',1,'spectrex::RingBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beginframe_0',['beginFrame',['../classspectrex_1_1_k_processor.html#a8830a017e492cd219fab832f1467dd06',1,'spectrex::KProcessor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['cachesyncwaveformspectrogram_0',['cacheSyncWaveformSpectrogram',['../classspectrex_1_1_k_processor.html#abeceb92199890d069d4039cd39ea5152',1,'spectrex::KProcessor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['draw_0',['draw',['../classspectrex_1_1_k_component.html#a2076ae5704633c2c730975793cedc070',1,'spectrex::KComponent::draw()'],['../classspectrex_1_1_k_spectrogram_component.html#ac750d5230c48333dcc9dc12ba99e650b',1,'spectrex::KSpectrogramComponent::draw()'],['../classspectrex_1_1_k_waveform_component.html#aa4b2cc34ef62a7a0937bc3f40869a4ac',1,'spectrex::KWaveformComponent::draw()']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['exception_0',['Exception',['../classspectrex_1_1_exception.html#a39682f4df2aef1f12d8d78316d9f0222',1,'spectrex::Exception']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['hasnewvalue_0',['hasNewValue',['../classspectrex_1_1_processor_parameters.html#a156ae60aba697baf406ca2222744b17a',1,'spectrex::ProcessorParameters']]], 4 | ['hasvalue_1',['hasValue',['../classspectrex_1_1_processor_parameters.html#a5b7407021cab1a3cfb263ff6ae7cda83',1,'spectrex::ProcessorParameters']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initializegl_0',['initializeGL',['../classspectrex_1_1_k_context.html#a3bf84cc819e4dece84be46377a32e04b',1,'spectrex::KContext']]], 4 | ['isinitialposition_1',['isInitialPosition',['../classspectrex_1_1_k_processor.html#a217bb273a00862d33a2176bb02e530e5',1,'spectrex::KProcessor']]], 5 | ['isvalid_2',['isValid',['../structspectrex_1_1_sync_info.html#acc2214aa58f13b383b983faaa75d2632',1,'spectrex::SyncInfo::isValid()'],['../classspectrex_1_1_k_processor.html#ab53584a77d59c965678fb38eb1a361e3',1,'spectrex::KProcessor::isValid()']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['kprocessor_0',['KProcessor',['../classspectrex_1_1_k_processor.html#a518923bc5c0510b4cde5fb2064a354c0',1,'spectrex::KProcessor']]], 4 | ['kspectrogramcomponent_1',['KSpectrogramComponent',['../classspectrex_1_1_k_spectrogram_component.html#a9e48b426744eb7adf6ad497237e76cbe',1,'spectrex::KSpectrogramComponent']]], 5 | ['kwaveformcomponent_2',['KWaveformComponent',['../classspectrex_1_1_k_waveform_component.html#a745b34d83b4fc7bda4e6f90732949ab4',1,'spectrex::KWaveformComponent']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onmousedoubleclick_0',['onMouseDoubleClick',['../classspectrex_1_1_k_component.html#ae5dd0b5fcc1bcd2dd9a6350ab77634a1',1,'spectrex::KComponent']]], 4 | ['onmousedrag_1',['onMouseDrag',['../classspectrex_1_1_k_component.html#a5c664693ea82aed7d452e618533f0688',1,'spectrex::KComponent']]], 5 | ['onmouseend_2',['onMouseEnd',['../classspectrex_1_1_k_component.html#ac19412b94363ed5d27c0e532194d46a3',1,'spectrex::KComponent']]], 6 | ['onmousemove_3',['onMouseMove',['../classspectrex_1_1_k_component.html#a2160ffd292daf59b4d9b8686b1caf895',1,'spectrex::KComponent']]], 7 | ['onmouseshiftdoubleclick_4',['onMouseShiftDoubleClick',['../classspectrex_1_1_k_component.html#a8dc97a011685bd59a204d6d8e66ce62e',1,'spectrex::KComponent']]], 8 | ['onmouseshiftdrag_5',['onMouseShiftDrag',['../classspectrex_1_1_k_component.html#a82712f9e4309ef1a178f32578886c497',1,'spectrex::KComponent']]], 9 | ['onmousestart_6',['onMouseStart',['../classspectrex_1_1_k_component.html#a0acde6bd72dffb88c3b85b308a6d4b15',1,'spectrex::KComponent']]], 10 | ['onmousewheel_7',['onMouseWheel',['../classspectrex_1_1_k_component.html#a88803564e939a0b2884558774fbe602e',1,'spectrex::KComponent']]], 11 | ['operator_20bool_8',['operator bool',['../classspectrex_1_1_processor_parameters.html#ac5641f6567403e9375b37c4f0cd236d9',1,'spectrex::ProcessorParameters']]], 12 | ['operator_2b_3d_9',['operator+=',['../structspectrex_1_1_spectrum_value.html#ac4e71485e7f8b7bfb7d30f10101800ef',1,'spectrex::SpectrumValue']]], 13 | ['operator_3c_3c_10',['operator<<',['../classspectrex_1_1_exception.html#a2e589e15d50841e2bbd8faec6b1aec05',1,'spectrex::Exception']]] 14 | ]; 15 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prepare_0',['prepare',['../classspectrex_1_1_k_processor.html#ab9045b8be18d083e28c1028ab7e9ad5c',1,'spectrex::KProcessor']]], 4 | ['preparetoplay_1',['prepareToPlay',['../classspectrex_1_1_mini_processor.html#a569f067a9138d2b74c06065cf8b330b9',1,'spectrex::MiniProcessor']]], 5 | ['process_2',['process',['../classspectrex_1_1_k_processor.html#a5f38706a243c716ad4661714c2f16f38',1,'spectrex::KProcessor']]], 6 | ['processblock_3',['processBlock',['../classspectrex_1_1_mini_processor.html#a44d7f8ab12741d30efefe8967e3110c0',1,'spectrex::MiniProcessor']]], 7 | ['processorparameters_4',['ProcessorParameters',['../classspectrex_1_1_processor_parameters.html#a6973da2a16be05aa4d210b03a139fea9',1,'spectrex::ProcessorParameters']]], 8 | ['push_5',['push',['../classspectrex_1_1_ring_buffer.html#ae26646aaba5d158b6395bd46060ea079',1,'spectrex::RingBuffer']]] 9 | ]; 10 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['read_0',['read',['../classspectrex_1_1_ring_buffer.html#aa0f55b15cb8fc80fab04ab01a4c15101',1,'spectrex::RingBuffer']]], 4 | ['reset_1',['reset',['../classspectrex_1_1_ring_buffer.html#a29e7348f1179716896366c5daf4c3434',1,'spectrex::RingBuffer']]], 5 | ['resetindices_2',['resetIndices',['../classspectrex_1_1_ring_buffer.html#a261e661fc1da371e94e5fe270ee69cd2',1,'spectrex::RingBuffer']]], 6 | ['resetposition_3',['resetPosition',['../classspectrex_1_1_k_processor.html#ae2e4e9df4c1750619a44f5773724993e',1,'spectrex::KProcessor']]], 7 | ['ringbuffer_4',['RingBuffer',['../classspectrex_1_1_ring_buffer.html#a3e6749e4397552c7e233b31eb3beda82',1,'spectrex::RingBuffer']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/functions_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['waveforminfo_0',['WaveformInfo',['../structspectrex_1_1_waveform_info.html#a8fc8f20ac84a2eee769dac88de9d7ae0',1,'spectrex::WaveformInfo::WaveformInfo() noexcept'],['../structspectrex_1_1_waveform_info.html#acff86f1992a1b564d5e72e45f5e3dfa7',1,'spectrex::WaveformInfo::WaveformInfo(size_t height, size_t writePointer) noexcept']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/mag.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/mag_d.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/mag_sel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/mag_seld.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['spectrex_0',['🐨 Spectrex',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/pages_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['threads_0',['Threads',['../req.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/pages_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['🐨_20spectrex_0',['🐨 Spectrex',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "abcdefghikmnoprstvw🐨", 4 | 1: "ekmnprsw", 5 | 2: "abcdeghikoprsw", 6 | 3: "bcfhkmprtvw", 7 | 4: "ds", 8 | 5: "dkt", 9 | 6: "bfmoprstw", 10 | 7: "st🐨" 11 | }; 12 | 13 | var indexSectionNames = 14 | { 15 | 0: "all", 16 | 1: "classes", 17 | 2: "functions", 18 | 3: "variables", 19 | 4: "typedefs", 20 | 5: "enums", 21 | 6: "enumvalues", 22 | 7: "pages" 23 | }; 24 | 25 | var indexSectionLabels = 26 | { 27 | 0: "All", 28 | 1: "Classes", 29 | 2: "Functions", 30 | 3: "Variables", 31 | 4: "Typedefs", 32 | 5: "Enumerations", 33 | 6: "Enumerator", 34 | 7: "Pages" 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['direction_0',['Direction',['../classspectrex_1_1_k_component.html#ad23da2a4735d3c16a6588d2022dc0216',1,'spectrex::KComponent']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/typedefs_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['synchandler_0',['SyncHandler',['../classspectrex_1_1_k_processor.html#a143ee43afe0a8cb26dd8baca8109c96f',1,'spectrex::KProcessor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['backgroundcolor_0',['BackgroundColor',['../structspectrex_1_1_spectrogram_component_properties.html#a3458edd80ccff58839511598a1ea2b29',1,'spectrex::SpectrogramComponentProperties::BackgroundColor'],['../structspectrex_1_1_waveform_component_properties.html#a90f952831cd18422483bab378696b31f',1,'spectrex::WaveformComponentProperties::BackgroundColor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['clear_0',['Clear',['../structspectrex_1_1_sync_info.html#a09dd4ab5dc13e9ddbe69dc26ce29a0a8',1,'spectrex::SyncInfo']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['frequency_0',['Frequency',['../structspectrex_1_1_waveform_bin.html#a71b5edc353110a9876fbbc2321890287',1,'spectrex::WaveformBin']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['height_0',['Height',['../structspectrex_1_1_spectrogram_info.html#a597ea8d914b17d9db78c1012b2993988',1,'spectrex::SpectrogramInfo::Height'],['../structspectrex_1_1_waveform_info.html#a7d9b3de5eddf1705e992f84c22d28997',1,'spectrex::WaveformInfo::Height'],['../structspectrex_1_1_sync_info.html#afdfab942bbffd5c88d090070f9479a60',1,'spectrex::SyncInfo::Height']]], 4 | ['highlight_1',['Highlight',['../structspectrex_1_1_spectrum_value.html#a72c9dbd5b7edd2c1525ee3fbc1996f45',1,'spectrex::SpectrumValue']]], 5 | ['history_2',['History',['../structspectrex_1_1_spectrum_value.html#a21a3640e11249e37cacd6f62204e33b7',1,'spectrex::SpectrumValue']]], 6 | ['hold_3',['Hold',['../structspectrex_1_1_spectrum_value.html#a15c899015052e5859f46f545b13d7cdc',1,'spectrex::SpectrumValue']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['k_5fexpectedblocksize_0',['k_expectedBlockSize',['../classspectrex_1_1_k_processor.html#ad3d750f617b3672a2f0ba430b5b17f5b',1,'spectrex::KProcessor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['max_0',['Max',['../structspectrex_1_1_waveform_bin.html#a709bba1c39322d7f0c8bfa136ceb32c3',1,'spectrex::WaveformBin']]], 4 | ['maxfrequency_1',['MaxFrequency',['../structspectrex_1_1_spectrogram_info.html#a0efd6ff735d6625199f6fef3d2be6d34',1,'spectrex::SpectrogramInfo']]], 5 | ['min_2',['Min',['../structspectrex_1_1_waveform_bin.html#a6618bf49891eccfe2eb6733b9804038c',1,'spectrex::WaveformBin']]], 6 | ['minfrequency_3',['MinFrequency',['../structspectrex_1_1_spectrogram_info.html#acb4d1bff778ad3309623924681f249c4',1,'spectrex::SpectrogramInfo']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pointer_0',['Pointer',['../structspectrex_1_1_sync_info.html#ac438855d0bcb5d76c78c5924d921f974',1,'spectrex::SyncInfo']]], 4 | ['position_1',['Position',['../structspectrex_1_1_spectrogram_info.html#a9437742fe5acf63c6a8121e09bb5a8e8',1,'spectrex::SpectrogramInfo']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['rowindex_0',['RowIndex',['../structspectrex_1_1_sync_info.html#a757a96953891dbe6e374bf9ee12f7b5b',1,'spectrex::SyncInfo']]], 4 | ['rows_1',['Rows',['../structspectrex_1_1_spectrogram_info.html#a784217015dd069c9f2c133ff71624efc',1,'spectrex::SpectrogramInfo']]], 5 | ['rowswritten_2',['RowsWritten',['../structspectrex_1_1_spectrogram_info.html#a4eaa3da4c3a503e19a4c58e7ec151a16',1,'spectrex::SpectrogramInfo']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['timeoffset_0',['TimeOffset',['../structspectrex_1_1_spectrogram_info.html#a2fd97914e8bf4cb9c3bd5fb79914b3c0',1,'spectrex::SpectrogramInfo']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['value_0',['Value',['../structspectrex_1_1_spectrum_value.html#aa7087401d12bf63c05063d644c5e415b',1,'spectrex::SpectrumValue']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/doxygen/html/search/variables_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['width_0',['Width',['../structspectrex_1_1_spectrogram_info.html#a4c716d37ef9bf4277960411cf29bfd06',1,'spectrex::SpectrogramInfo::Width'],['../structspectrex_1_1_sync_info.html#a823840094b17bd3dd52666500c3601e8',1,'spectrex::SyncInfo::Width']]], 4 | ['writepointer_1',['WritePointer',['../structspectrex_1_1_waveform_info.html#adb9b61621afbb2532228c90bac253737',1,'spectrex::WaveformInfo']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/doxygen/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/splitbar.png -------------------------------------------------------------------------------- /docs/doxygen/html/splitbard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/splitbard.png -------------------------------------------------------------------------------- /docs/doxygen/html/structspectrex_1_1_non_copyable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/structspectrex_1_1_non_copyable.png -------------------------------------------------------------------------------- /docs/doxygen/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/sync_off.png -------------------------------------------------------------------------------- /docs/doxygen/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/sync_on.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_a.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_ad.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_b.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_bd.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_h.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_hd.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_s.png -------------------------------------------------------------------------------- /docs/doxygen/html/tab_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/doxygen/html/tab_sd.png -------------------------------------------------------------------------------- /docs/examples/viz2dapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/examples/viz2dapp.png -------------------------------------------------------------------------------- /docs/examples/viz3dapp_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/examples/viz3dapp_1.png -------------------------------------------------------------------------------- /docs/examples/viz3dapp_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/examples/viz3dapp_2.png -------------------------------------------------------------------------------- /docs/examples/viz3dapp_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/docs/examples/viz3dapp_3.png -------------------------------------------------------------------------------- /examples/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Mozilla 3 | IndentWidth: '4' 4 | ColumnLimit: 150 5 | 6 | ... 7 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.18) 2 | 3 | # ExternalProject cmake dependency 4 | include(ExternalProject) 5 | 6 | # macOS specific project settings 7 | if(APPLE) 8 | # Set minimum required OSX deployment version 9 | set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version") 10 | # Intel and M1 architectures 11 | set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE) 12 | endif() 13 | 14 | project(ExampleApp 15 | LANGUAGES CXX C 16 | VERSION 1.0.0 17 | ) 18 | 19 | # C++ Standard 20 | set(CMAKE_CXX_STANDARD 20) 21 | set(CMAKE_CXX_STANDARD_REQUIRED True) 22 | 23 | # Statically link runtimes on Windows (either MultiThreaded or MultiThreadedDebug depending on configuration) 24 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") 25 | set(MSVC_RUNTIME "MT") 26 | 27 | ### JUCE dependency 28 | add_subdirectory(3rd/JUCE) 29 | 30 | ###### Spectrex BEGIN 31 | 32 | ### Third party dependencies 33 | # glad 34 | set(GLAD_PROFILE "core" CACHE STRING "" FORCE) 35 | set(GLAD_API "gl=4.1" CACHE STRING "" FORCE) 36 | set(GLAD_GENERATOR "c" CACHE STRING "" FORCE) 37 | set(GLAD_EXTENSIONS "" CACHE STRING "" FORCE) 38 | set(GLAD_SPEC "gl" CACHE STRING "" FORCE) 39 | add_subdirectory(3rd/glad) 40 | 41 | # GLM 42 | add_subdirectory(3rd/glm) 43 | 44 | # GSL 45 | add_subdirectory(3rd/GSL) 46 | 47 | # ipp 48 | if(WIN32) 49 | add_subdirectory(3rd/ipp/2021.1.1-windows) 50 | elseif(APPLE) 51 | # It so happens that one of the BLAS providers on MacOS, supported by CMake's FindBLAS is the Accelerate 52 | # framework, which also provides VDSP 53 | set(BLAS_VENDOR Apple) 54 | find_package(BLAS REQUIRED) 55 | endif() 56 | 57 | ### Spectrex package 58 | set(SPECTREX_PATH ${PROJECT_SOURCE_DIR}/..) # Should point to the root directory of the spectrex SDK 59 | if(MSVC) 60 | if(NOT CMAKE_VS_PLATFORM_NAME) 61 | message(FATAL_ERROR "Please use -A Win32 or -A x64 to specify whether you're building for 32-bit or 64-bit!") 62 | endif() 63 | include(${SPECTREX_PATH}/cmake/msvc/v${MSVC_TOOLSET_VERSION}/${MSVC_RUNTIME}/${CMAKE_VS_PLATFORM_NAME}/Spectrex.cmake) 64 | elseif(APPLE) 65 | include(${SPECTREX_PATH}/cmake/macos/Spectrex.cmake) 66 | endif() 67 | 68 | # For project importing this library: Debug configuration uses Debug, all others use Release 69 | set_target_properties(Spectrex::Spectrex PROPERTIES 70 | MAP_IMPORTED_CONFIG_DEBUG Debug 71 | MAP_IMPORTED_CONFIG_RELEASE Release 72 | MAP_IMPORTED_CONFIG_MINSIZEREL Release 73 | MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release 74 | ) 75 | add_library(Spectrex ALIAS Spectrex::Spectrex) 76 | 77 | ###### Spectrex END 78 | 79 | if(MINGW) 80 | # Enable static libc++ linking if using llvm-mingw 81 | set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-pdb=") 82 | endif() 83 | 84 | # Examples 85 | add_subdirectory(Viz2DApp) 86 | add_subdirectory(Viz3DApp) 87 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # Spectrex Examples for JUCE 2 | 3 | This directory contains a few different examples that showcase how to use the Spectrex SDK in your own app, using the JUCE 7.x framework. 4 | 5 | All of these examples can be built as standalone, VST3, VST2, AU, AAX or other formats using JUCE. 6 | 7 | #### Viz2DApp 8 | 9 | A real-time 2D spectrogram application with a spectrogram and waveform. 10 | 11 | ![Viz2DApp](../docs/examples/viz2dapp.png) 12 | 13 | The app uses the high-level `KComponent` classes provided by the SDK, so you don't have to implement your own analyzers and meters. 14 | 15 | * Fully synchronized spectrogram and waveform. 16 | * Live parameter tweaking. 17 | * Zooming and panning, lets you zoom into the data. 18 | * Start and stop functionality. 19 | 20 | #### Viz3DApp 21 | 22 | A real-time 3D spectrum application that uses GL shaders to visualize the audio spectrum in different creative ways. 23 | 24 | ![Viz2DApp](../docs/examples/viz3dapp_1.png) ![Viz2DApp](../docs/examples/viz3dapp_2.png) ![Viz2DApp](../docs/examples/viz3dapp_3.png) 25 | 26 | The app uses a lower level approach that lets you build your own shaders to visualize the synchronized spectrum data yourself. The examples includes vertex, geometry and fragment shaders to adjust. You can build any type of shader that leverages the real-time spectrum data, knock yourself out! 27 | 28 | * A few colourful and retro 3D spectrum visualizers. 29 | * Custom shaders to process incoming spectrogram data. 30 | * Live parameter tweaking. 31 | -------------------------------------------------------------------------------- /examples/Viz2DApp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Product 2 | juce_add_plugin(Viz2DApp 3 | COMPANY_NAME "KoalaDSP" 4 | COPY_PLUGIN_AFTER_BUILD TRUE 5 | FORMATS Standalone VST3 6 | PRODUCT_NAME "Viz2DApp" 7 | PLUGIN_NAME "Spectrex 2D Example App" 8 | IS_SYNTH FALSE 9 | NEEDS_MIDI_INPUT FALSE 10 | NEEDS_MIDI_OUTPUT FALSE 11 | IS_MIDI_EFFECT FALSE 12 | EDITOR_WANTS_KEYBOARD_FOCUS FALSE 13 | 14 | MICROPHONE_PERMISSION_ENABLED TRUE 15 | MICROPHONE_PERMISSION_TEXT "This app needs permissions to use your microphone." 16 | HARDENED_RUNTIME_OPTIONS com.apple.security.device.audio-input 17 | ) 18 | target_compile_definitions(Viz2DApp 19 | PUBLIC 20 | # JUCE 21 | JUCE_VST3_CAN_REPLACE_VST2=0 22 | ) 23 | set_target_properties(Viz2DApp PROPERTIES 24 | XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/entitlements.plist") 25 | 26 | # Sources 27 | target_sources(Viz2DApp 28 | PRIVATE 29 | # Headers 30 | PluginEditor.h 31 | PluginProcessor.h 32 | Parameters.h 33 | Utility.h 34 | WindowOpenGLContext.h 35 | ParameterWindow/ParameterWindow.h 36 | ParameterWindow/ParameterDisplay.h 37 | UI/Cursor.h 38 | UI/Visualization2DComponent.h 39 | UI/VisualizationComponent.h 40 | 41 | # Sources 42 | PluginEditor.cpp 43 | PluginProcessor.cpp 44 | WindowOpenGLContext.cpp 45 | ParameterWindow/ParameterWindow.cpp 46 | ParameterWindow/ParameterDisplay.cpp 47 | UI/Cursor.cpp 48 | UI/Visualization2DComponent.cpp 49 | UI/VisualizationComponent.cpp 50 | ) 51 | 52 | # Link dependencies 53 | target_link_libraries(Viz2DApp 54 | PRIVATE 55 | # Spectrex dependencies 56 | Spectrex 57 | glm 58 | GSL 59 | glad 60 | $<$:ipp> 61 | 62 | # JUCE 63 | $ 64 | $ 65 | $ 66 | ) 67 | -------------------------------------------------------------------------------- /examples/Viz2DApp/ParameterWindow/ParameterDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "../Parameters.h" 5 | 6 | // GLM 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | struct ParameterType 18 | { 19 | enum Type 20 | { 21 | SLIDER, 22 | COLOR, 23 | TOGGLE, 24 | BUTTON, 25 | COMBO_BOX, 26 | }; 27 | 28 | struct SliderRange 29 | { 30 | float minimum = 0; 31 | float maximum = 1; 32 | float interval = 0.1; 33 | }; 34 | 35 | struct ComboBox 36 | { 37 | std::vector options; 38 | }; 39 | 40 | Type type{ ParameterType::Type::SLIDER }; 41 | std::variant value{ nullptr }; 42 | }; 43 | 44 | static const std::vector>>> PARAMETER_ORDERED_DISPLAY_NAMES = { { 45 | { "spectrogram", 46 | { 47 | { "pause", { ParameterType::TOGGLE, false } }, 48 | { "min_frequency", { ParameterType::SLIDER, ParameterType::SliderRange{ 100, 24000, 100 } } }, 49 | { "max_frequency", { ParameterType::SLIDER, ParameterType::SliderRange{ 100, 24000, 100 } } }, 50 | { "min_db", { ParameterType::SLIDER, ParameterType::SliderRange{ -80, -1, 1 } } }, 51 | { "max_db", { ParameterType::SLIDER, ParameterType::SliderRange{ -80, -1, 1 } } }, 52 | { "window", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "None", "Hann", "Blackman" } } } }, 53 | { "stft_overlap", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "1/2", "3/4", "7/8" } } } }, 54 | { "time_multiplier", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "1", "2", "4", "8", "16" } } } }, 55 | 56 | #ifdef ENHANCED_FEATURES 57 | // @enhanced 58 | { "mix", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "stereo", "left", "right", "mid", "side" } } } }, 59 | { "ft_size", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "256", "512", "1024", "2048", "4096", "8192" } } } } 60 | #else 61 | { "mix", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "mid" } } } }, 62 | { "ft_size", { ParameterType::COMBO_BOX, ParameterType::ComboBox{ { "256", "512" } } } } 63 | #endif 64 | } } 65 | } }; 66 | 67 | float 68 | getSliderValue(const Parameters& parameters, const std::string& name); 69 | 70 | glm::vec3 71 | getColorValue(const Parameters& parameters, const std::string& name); 72 | 73 | bool 74 | getToggleValue(const Parameters& parameters, const std::string& name); 75 | 76 | unsigned int 77 | getComboBoxValue(const Parameters& parameters, const std::string& name); 78 | 79 | void 80 | setSliderValue(Parameters& parameters, const std::string& name, float value); 81 | 82 | void 83 | setColorValue(Parameters& parameters, const std::string& name, const glm::vec3& value); 84 | 85 | void 86 | setToggleValue(Parameters& parameters, const std::string& name, bool value); 87 | 88 | void 89 | setButtonValue(Parameters& parameters, const std::string& name); 90 | 91 | void 92 | setComboBoxValue(Parameters& parameters, const std::string& name, unsigned int value); -------------------------------------------------------------------------------- /examples/Viz2DApp/ParameterWindow/ParameterWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "ParameterDisplay.h" 5 | 6 | // JUCE 7 | #include "juce_gui_basics/juce_gui_basics.h" 8 | #include 9 | 10 | /* Forward Declarations */ 11 | 12 | class ParameterWindow; 13 | class ColorParameter; 14 | class SliderParameter; 15 | 16 | class SliderParameter : public juce::Slider 17 | { 18 | public: 19 | SliderParameter(std::string name, const ParameterType::SliderRange& range); 20 | 21 | void setParameterValue(Parameters& parameters) noexcept; 22 | 23 | void syncParameterValue(const Parameters& parameters) noexcept; 24 | 25 | private: 26 | std::string m_name; 27 | }; 28 | 29 | /* ColorPicker */ 30 | 31 | class ColorPicker final : public juce::ColourSelector 32 | { 33 | public: 34 | ColorPicker(ColorParameter& parent, int flags, std::string name) noexcept; 35 | 36 | void setParameterValue(Parameters& parameters) noexcept; 37 | 38 | private: 39 | ColorParameter& m_parent; 40 | std::string m_name; 41 | }; 42 | 43 | /* ColorParameter */ 44 | 45 | class ColorParameter : public juce::ShapeButton 46 | { 47 | public: 48 | ColorParameter(ParameterWindow* window, std::string name) noexcept; 49 | 50 | void syncParameterValue(const Parameters& parameters) noexcept; 51 | 52 | void clicked() override; 53 | 54 | private: 55 | ParameterWindow* m_window; 56 | 57 | std::string m_name; 58 | 59 | juce::Colour m_currentColor; 60 | }; 61 | 62 | class ToggleParameter : public juce::TextButton 63 | { 64 | public: 65 | ToggleParameter(std::string name); 66 | 67 | void setParameterValue(Parameters& parameters) noexcept; 68 | 69 | void syncParameterValue(const Parameters& parameters) noexcept; 70 | 71 | void clicked() override; 72 | 73 | private: 74 | std::string m_name; 75 | }; 76 | 77 | class ComboBoxParameter : public juce::ComboBox 78 | { 79 | public: 80 | ComboBoxParameter(std::string name, const ParameterType::ComboBox& comboBox); 81 | 82 | void setParameterValue(Parameters& parameters) noexcept; 83 | 84 | void syncParameterValue(const Parameters& parameters) noexcept; 85 | 86 | private: 87 | std::string m_name; 88 | }; 89 | 90 | class ButtonParameter : public juce::TextButton 91 | { 92 | public: 93 | ButtonParameter(std::string name); 94 | 95 | void setParameterValue(Parameters& parameters) noexcept; 96 | 97 | private: 98 | std::string m_name; 99 | }; 100 | 101 | /* ParameterWindow */ 102 | 103 | class ParameterWindow final 104 | : public juce::DocumentWindow 105 | , public juce::Slider::Listener 106 | , public juce::Button::Listener 107 | , public juce::ComboBox::Listener 108 | , public juce::ChangeListener 109 | , public juce::KeyListener 110 | { 111 | private: 112 | class ParameterWindowComponent final : public juce::Component 113 | { 114 | public: 115 | ParameterWindowComponent(ParameterWindow* window, const Parameters& parameters); 116 | 117 | void syncAll() noexcept; 118 | 119 | void paint(juce::Graphics& graphics) override; 120 | 121 | private: 122 | const Parameters& m_parameters; 123 | 124 | /* Parameter Components */ 125 | 126 | std::vector> m_sectionLabels; 127 | std::vector> m_parameterLabels; 128 | 129 | std::vector> m_sliderParameters; 130 | std::vector> m_colorParameters; 131 | std::vector> m_toggleParameters; 132 | std::vector> m_buttonParameters; 133 | std::vector> m_comboBoxParameters; 134 | }; 135 | 136 | public: 137 | ParameterWindow(Parameters& parameters); 138 | 139 | void sliderValueChanged(juce::Slider* slider) override; 140 | 141 | void changeListenerCallback(juce::ChangeBroadcaster* source) override; 142 | 143 | void buttonClicked(juce::Button* source) override; 144 | 145 | void comboBoxChanged(juce::ComboBox* source) override; 146 | 147 | bool keyPressed(const juce::KeyPress& key, juce::Component* originatingComponent) override; 148 | 149 | private: 150 | Parameters& m_parameters; 151 | 152 | ParameterWindowComponent* m_parameterWindowComponent; 153 | juce::Viewport* m_viewportComponent; 154 | }; 155 | -------------------------------------------------------------------------------- /examples/Viz2DApp/Parameters.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Spectrex 4 | #include 5 | 6 | // GLM 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | #include 12 | 13 | struct Parameters 14 | { 15 | // 16 | // Listener functionality 17 | // 18 | struct Listener 19 | { 20 | virtual void parameterChanged(const Parameters& parameters, const std::string& name) noexcept = 0; 21 | }; 22 | 23 | private: 24 | std::list m_listeners; 25 | 26 | public: 27 | void addListener(Listener* listener) noexcept 28 | { 29 | if (listener != nullptr) { 30 | m_listeners.push_back(listener); 31 | } 32 | } 33 | void removeListener(Listener* listener) noexcept 34 | { 35 | if (listener != nullptr) { 36 | m_listeners.remove(listener); 37 | } 38 | } 39 | void onParameterChanged(const std::string& name) noexcept 40 | { 41 | for (auto p : m_listeners) { 42 | p->parameterChanged(*this, name); 43 | } 44 | } 45 | void all() noexcept 46 | { 47 | // Launch callbacks for all the available parameters 48 | const std::string params[] = { "pause", "min_frequency", "max_frequency", "min_db", "max_db", 49 | "window", "stft_overlap", "time_multiplier", "mix", "ft_size" }; 50 | for (const auto p : params) { 51 | onParameterChanged(p); 52 | } 53 | } 54 | 55 | // 56 | // Parameters 57 | // 58 | 59 | /* spectrogram */ 60 | bool pause = false; 61 | 62 | float min_frequency = 100.f; 63 | float max_frequency = 20000.f; 64 | 65 | float min_db = -48.f; 66 | float max_db = -6.f; 67 | 68 | // Also see ProcessorParameters::ProcessorParameters() 69 | spectrex::Window window = spectrex::Window::WindowBlackman; 70 | float stft_overlap = 7.0f / 8.0f; 71 | float time_multiplier = 1.0f; 72 | spectrex::MixMode mix = spectrex::MixMode::Mid; 73 | spectrex::FtSize ft_size = spectrex::FtSize::Size512; 74 | }; 75 | -------------------------------------------------------------------------------- /examples/Viz2DApp/PluginEditor.cpp: -------------------------------------------------------------------------------- 1 | #include "PluginEditor.h" 2 | 3 | // Plugin 4 | #include "PluginProcessor.h" 5 | 6 | PluginEditor::PluginEditor(PluginAudioProcessor& p) 7 | : AudioProcessorEditor(&p) 8 | , m_processor(p) 9 | { 10 | setSize(1000, 600); 11 | setResizable(true, false); 12 | 13 | // OpenGL context 14 | m_openGLContext.setTopLevelParentComponent(*this); 15 | m_openGLContext.setBeginFrameCallback(std::bind(&PluginEditor::beginGLDrawFrame, this)); 16 | 17 | // Set up callback in case of GL failure 18 | m_openGLContext.setFailureCallback([this]() { assert(false); }); 19 | 20 | // Initialize visualization container component 21 | m_viz2DComponent = std::make_unique(m_openGLContext, p, m_parameters); 22 | addAndMakeVisible(*m_viz2DComponent); 23 | 24 | // 30 Hz frame rate enforcement to force-render JUCE UI 25 | startTimerHz(30); 26 | 27 | // Parameter window 28 | { 29 | #ifdef PARAMETER_WINDOW 30 | m_parameterWindow = std::make_unique(m_parameters); 31 | #endif 32 | } 33 | 34 | resized(); 35 | } 36 | 37 | PluginEditor::~PluginEditor() 38 | { 39 | m_openGLContext.detachTopLevelParentComponent(); 40 | } 41 | 42 | void 43 | PluginEditor::paint(juce::Graphics& g) 44 | { 45 | } 46 | 47 | void 48 | PluginEditor::resized() 49 | { 50 | auto b = getLocalBounds(); 51 | if (m_viz2DComponent) { 52 | m_viz2DComponent->setBounds(b); 53 | } 54 | } 55 | 56 | void 57 | PluginEditor::timerCallback() 58 | { 59 | // Force redraw 60 | repaint(getLocalBounds()); 61 | } 62 | 63 | void 64 | PluginEditor::beginGLDrawFrame() 65 | { 66 | // Single synchronization point to gather any data from the 67 | // processors that can be used consistently throughout the entire 68 | // frame. 69 | m_processor.getSpectrexMiniProcessor().getProcessor().cacheSyncWaveformSpectrogram(); 70 | } 71 | -------------------------------------------------------------------------------- /examples/Viz2DApp/PluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define PARAMETER_WINDOW 4 | 5 | // Plugin 6 | #include "UI/Visualization2DComponent.h" 7 | 8 | // Parameters 9 | #include "Parameters.h" 10 | #ifdef PARAMETER_WINDOW 11 | #include "ParameterWindow/ParameterWindow.h" 12 | #endif 13 | 14 | // JUCE 15 | #include 16 | #include 17 | 18 | // Spectrex 19 | #include 20 | 21 | // Stdlib 22 | #include 23 | 24 | class PluginAudioProcessor; 25 | 26 | class PluginEditor 27 | : public juce::AudioProcessorEditor 28 | , public juce::Timer 29 | { 30 | public: 31 | PluginEditor(PluginAudioProcessor& p); 32 | ~PluginEditor(); 33 | 34 | // juce::Component 35 | virtual void paint(juce::Graphics& g) override; 36 | virtual void resized() override; 37 | 38 | // juce::Timer 39 | virtual void timerCallback() override; 40 | 41 | private: 42 | /// Called at the beginning of a GL frame before any drawing has been 43 | /// done, used as a single synchronization point to gather any data from the 44 | /// processors that can be used consistently throughout the entire frame. 45 | void beginGLDrawFrame(); 46 | 47 | private: 48 | PluginAudioProcessor& m_processor; 49 | 50 | utility::WindowOpenGLContext m_openGLContext; 51 | 52 | Parameters m_parameters; 53 | 54 | std::unique_ptr m_viz2DComponent; 55 | 56 | #ifdef PARAMETER_WINDOW 57 | std::unique_ptr m_parameterWindow; 58 | #endif 59 | 60 | spectrex::MiniProcessor m_spectrexMiniProcessor; 61 | 62 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginEditor) 63 | }; 64 | -------------------------------------------------------------------------------- /examples/Viz2DApp/PluginProcessor.cpp: -------------------------------------------------------------------------------- 1 | #include "PluginProcessor.h" 2 | 3 | // Plugin 4 | #include "PluginEditor.h" 5 | 6 | // JUCE 7 | #include 8 | 9 | void 10 | PluginAudioProcessor::changeProgramName(int index, const juce::String& newName) 11 | { 12 | } 13 | 14 | void 15 | PluginAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) 16 | { 17 | m_spectrexProcessor.prepareToPlay(sampleRate, samplesPerBlock); 18 | } 19 | 20 | void 21 | PluginAudioProcessor::releaseResources() 22 | { 23 | } 24 | 25 | void 26 | PluginAudioProcessor::processBlock(juce::AudioSampleBuffer& buffer, juce::MidiBuffer& midiMessages) 27 | { 28 | m_spectrexProcessor.processBlock(playHead, buffer, midiMessages); 29 | } 30 | 31 | juce::AudioProcessorEditor* 32 | PluginAudioProcessor::createEditor() 33 | { 34 | return new PluginEditor(*this); 35 | } 36 | 37 | auto 38 | PluginAudioProcessor::acceptsMidi() const -> bool 39 | { 40 | return false; 41 | } 42 | 43 | auto 44 | PluginAudioProcessor::producesMidi() const -> bool 45 | { 46 | return false; 47 | } 48 | 49 | auto 50 | PluginAudioProcessor::silenceInProducesSilenceOut() const -> bool 51 | { 52 | return false; 53 | } 54 | 55 | auto 56 | PluginAudioProcessor::hasEditor() const -> bool 57 | { 58 | return true; 59 | } 60 | 61 | auto 62 | PluginAudioProcessor::isInputChannelStereoPair(int index) const -> bool 63 | { 64 | return true; 65 | } 66 | 67 | auto 68 | PluginAudioProcessor::isOutputChannelStereoPair(int index) const -> bool 69 | { 70 | return true; 71 | } 72 | 73 | auto 74 | PluginAudioProcessor::getName() const -> const juce::String 75 | { 76 | return JucePlugin_Name; 77 | } 78 | 79 | auto 80 | PluginAudioProcessor::getInputChannelName(int channelIndex) const -> const juce::String 81 | { 82 | return juce::String(channelIndex + 1); 83 | } 84 | 85 | auto 86 | PluginAudioProcessor::getOutputChannelName(int channelIndex) const -> const juce::String 87 | { 88 | return juce::String(channelIndex + 1); 89 | } 90 | 91 | auto 92 | PluginAudioProcessor::getTailLengthSeconds() const -> double 93 | { 94 | return 0.0; 95 | } 96 | 97 | auto 98 | PluginAudioProcessor::getNumPrograms() -> int 99 | { 100 | return 1; 101 | } 102 | 103 | auto 104 | PluginAudioProcessor::getCurrentProgram() -> int 105 | { 106 | return 0; 107 | } 108 | 109 | auto 110 | PluginAudioProcessor::getProgramName(int index) -> const juce::String 111 | { 112 | return juce::String(); 113 | } 114 | 115 | void 116 | PluginAudioProcessor::getStateInformation(juce::MemoryBlock& destData) 117 | { 118 | } 119 | 120 | void 121 | PluginAudioProcessor::setCurrentProgram(int index) 122 | { 123 | } 124 | 125 | void 126 | PluginAudioProcessor::setStateInformation(const void* data, int sizeInBytes) 127 | { 128 | } 129 | 130 | PluginAudioProcessor::PluginAudioProcessor() 131 | : juce::AudioProcessor( 132 | BusesProperties().withInput("Input", juce::AudioChannelSet::stereo(), true).withOutput("Output", juce::AudioChannelSet::stereo(), true)) 133 | , m_spectrexProcessor() 134 | { 135 | juce::AudioFormatManager formatManager; 136 | formatManager.registerBasicFormats(); 137 | } 138 | 139 | PluginAudioProcessor::~PluginAudioProcessor() {} 140 | 141 | juce::AudioProcessor* JUCE_CALLTYPE 142 | createPluginFilter() 143 | { 144 | return new PluginAudioProcessor(); 145 | } 146 | -------------------------------------------------------------------------------- /examples/Viz2DApp/PluginProcessor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // JUCE 4 | #include 5 | 6 | // Spectrex 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | 12 | class PluginAudioProcessor : public juce::AudioProcessor 13 | { 14 | public: 15 | void changeProgramName(int index, const juce::String& newName) override; 16 | 17 | void prepareToPlay(double sampleRate, int samplesPerBlock) override; 18 | void releaseResources() override; 19 | 20 | void processBlock(juce::AudioSampleBuffer&, juce::MidiBuffer&) override; 21 | 22 | auto createEditor() -> juce::AudioProcessorEditor* override; 23 | 24 | auto acceptsMidi() const -> bool override; 25 | auto producesMidi() const -> bool override; 26 | auto silenceInProducesSilenceOut() const -> bool override; 27 | 28 | auto hasEditor() const -> bool override; 29 | 30 | auto isInputChannelStereoPair(int index) const -> bool override; 31 | auto isOutputChannelStereoPair(int index) const -> bool override; 32 | 33 | auto getName() const -> const juce::String override; 34 | auto getInputChannelName(int channelIndex) const -> const juce::String override; 35 | auto getOutputChannelName(int channelIndex) const -> const juce::String override; 36 | auto getTailLengthSeconds() const -> double override; 37 | auto getNumPrograms() -> int override; 38 | auto getCurrentProgram() -> int override; 39 | auto getProgramName(int index) -> const juce::String override; 40 | void getStateInformation(juce::MemoryBlock& destData) override; 41 | 42 | void setCurrentProgram(int index) override; 43 | 44 | void setStateInformation(const void* data, int sizeInBytes) override; 45 | 46 | // Spectrex 47 | spectrex::MiniProcessor& getSpectrexMiniProcessor() noexcept { return m_spectrexProcessor; } 48 | 49 | PluginAudioProcessor(); 50 | ~PluginAudioProcessor(); 51 | 52 | private: 53 | spectrex::MiniProcessor m_spectrexProcessor; 54 | 55 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginAudioProcessor) 56 | }; -------------------------------------------------------------------------------- /examples/Viz2DApp/UI/Cursor.cpp: -------------------------------------------------------------------------------- 1 | #include "Cursor.h" 2 | 3 | auto 4 | Cursor::get() noexcept -> Cursor& 5 | { 6 | static Cursor ret; 7 | return ret; 8 | } 9 | 10 | auto 11 | Cursor::getPosition() const noexcept -> glm::vec2 12 | { 13 | return m_position; 14 | } 15 | 16 | auto 17 | Cursor::getZoom() const noexcept -> glm::vec2 18 | { 19 | return m_zoom; 20 | } 21 | 22 | auto 23 | Cursor::getWheel() const noexcept -> glm::vec2 24 | { 25 | return m_wheel; 26 | } 27 | 28 | void 29 | Cursor::setPosition(glm::vec2 position) noexcept 30 | { 31 | m_position = position; 32 | } 33 | 34 | void 35 | Cursor::setZoom(glm::vec2 zoom) noexcept 36 | { 37 | m_zoom = zoom; 38 | } 39 | 40 | void 41 | Cursor::setWheel(glm::vec2 wheel) noexcept 42 | { 43 | m_wheel = wheel; 44 | } 45 | 46 | void 47 | Cursor::reset() noexcept 48 | { 49 | m_position = glm::vec2{ 0.0f, 0.0f }; 50 | m_zoom = glm::vec2{ 1.0f, 1.0f }; 51 | m_wheel = glm::vec2{ 0.0f, 0.0f }; 52 | } 53 | 54 | Cursor::Cursor() noexcept 55 | { 56 | reset(); 57 | } 58 | -------------------------------------------------------------------------------- /examples/Viz2DApp/UI/Cursor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // GLM 4 | #include 5 | 6 | // Stdlib 7 | #include 8 | 9 | /// @brief The cursor captures the position and zoom level of some the 10 | /// visualizations. 11 | class Cursor final 12 | { 13 | public: 14 | /// @brief Returns a singleton instance. 15 | /// @return Global camera. 16 | static auto get() noexcept -> Cursor&; 17 | 18 | /// @brief Returns a copy of the position. 19 | /// @return Position. 20 | auto getPosition() const noexcept -> glm::vec2; 21 | 22 | /// @brief Returns a copy of the scale. 23 | /// @return Zoom. 24 | auto getZoom() const noexcept -> glm::vec2; 25 | 26 | /// @brief Gets the linear wheel vector. 27 | /// @return Linear wheel vector. 28 | auto getWheel() const noexcept -> glm::vec2; 29 | 30 | /// @brief Sets the position. 31 | /// @param position New position. 32 | void setPosition(glm::vec2 position) noexcept; 33 | 34 | /// @brief Sets the zoom. 35 | /// @param zoom New zoom. 36 | void setZoom(glm::vec2 zoom) noexcept; 37 | 38 | /// @brief Sets the linear wheel vector. 39 | /// @param wheel Linear wheel vector. 40 | void setWheel(glm::vec2 wheel) noexcept; 41 | 42 | /// @brief Resets the cursor to its initial state. 43 | void reset() noexcept; 44 | 45 | private: 46 | Cursor() noexcept; 47 | 48 | private: 49 | std::atomic m_position; 50 | std::atomic m_zoom; 51 | std::atomic m_wheel; 52 | }; 53 | -------------------------------------------------------------------------------- /examples/Viz2DApp/UI/Visualization2DComponent.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "../Parameters.h" 5 | #include "../WindowOpenGLContext.h" 6 | #include "VisualizationComponent.h" 7 | 8 | // Spectrex 9 | #include 10 | #include 11 | #include 12 | 13 | // JUCE 14 | #include 15 | #include 16 | 17 | // Stdlib 18 | #include 19 | #include 20 | 21 | class Processor; 22 | class PluginAudioProcessor; 23 | 24 | class Visualization2DComponent : public juce::Component 25 | { 26 | public: 27 | void resized() override; 28 | void paint(juce::Graphics& g) override; 29 | void mouseMove(const juce::MouseEvent& event) override; 30 | void mouseExit(const juce::MouseEvent& event) override; 31 | 32 | Visualization2DComponent(utility::WindowOpenGLContext& context, PluginAudioProcessor& processor, Parameters& parameters); 33 | virtual ~Visualization2DComponent() override; 34 | 35 | private: 36 | PluginAudioProcessor& m_pluginProcessor; 37 | spectrex::KProcessor& m_processor; 38 | Parameters& m_parameters; 39 | 40 | std::unique_ptr m_waveformComponent; 41 | std::unique_ptr m_spectrogramComponent; 42 | }; 43 | -------------------------------------------------------------------------------- /examples/Viz2DApp/WindowOpenGLContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "Utility.h" 5 | 6 | // Spectrex 7 | #include 8 | 9 | // JUCE 10 | #include 11 | 12 | // Stdlib 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | namespace utility { 19 | 20 | class WindowOpenGLContext : private juce::OpenGLRenderer 21 | { 22 | public: 23 | void setTopLevelParentComponent(juce::Component& topLevelComponent) noexcept; 24 | 25 | void detachTopLevelParentComponent() noexcept; 26 | 27 | void addRenderingTarget(juce::OpenGLRenderer* newTarget) noexcept; 28 | 29 | void removeRenderingTarget(juce::OpenGLRenderer* targetToRemove) noexcept; 30 | 31 | auto getViewportScale() noexcept -> double; 32 | 33 | void executeOnGLThread(std::function&& lambdaToExecute) noexcept; 34 | 35 | void executeOnGLThreadMultipleTimes(std::function&& lambdaToExecute, const int repetitions) noexcept; 36 | 37 | void setBeginFrameCallback(std::function callback) noexcept; 38 | void setFailureCallback(std::function callback) noexcept; 39 | 40 | auto getContext() noexcept -> juce::OpenGLContext&; 41 | 42 | auto isFailed() const noexcept -> bool { return m_failed; } 43 | 44 | // Our own context 45 | auto getVisualizationContext() noexcept -> spectrex::KContext&; 46 | 47 | auto getFrameTimeInMs() const noexcept -> double; 48 | 49 | // @thread ui 50 | // @return Clipping bounds relative to GL render target. 51 | auto updateViewportSize(juce::Component* targetComponent) noexcept -> juce::Rectangle; 52 | 53 | WindowOpenGLContext() noexcept; 54 | ~WindowOpenGLContext(); 55 | 56 | private: 57 | void newOpenGLContextCreated() noexcept override; 58 | 59 | void renderOpenGL() noexcept override; 60 | 61 | void openGLContextClosing() noexcept override; 62 | 63 | private: 64 | /* Properties */ 65 | 66 | bool m_failed = false; 67 | 68 | double m_viewportScale; 69 | 70 | MovingAverageTimer m_timer; 71 | 72 | /* Context */ 73 | 74 | juce::OpenGLContext m_openGLContext; 75 | 76 | std::atomic m_openGLContextCreated = false; 77 | 78 | /* Render Targets */ 79 | 80 | juce::Array m_renderingTargets; 81 | 82 | /* Mutex */ 83 | 84 | std::mutex m_renderingTargetsLock; 85 | 86 | std::mutex m_executeInRenderCallbackLock; 87 | 88 | /* Callback */ 89 | 90 | std::vector> m_executeInRenderCallback; 91 | 92 | std::function m_beginFrameCallback; 93 | std::function m_failureCallback; 94 | 95 | std::unique_ptr m_visualizationContext; 96 | }; 97 | 98 | } // namespace utility 99 | -------------------------------------------------------------------------------- /examples/Viz2DApp/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.device.audio-input 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Viz3DApp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Shader compilation 2 | add_subdirectory(shaders) 3 | 4 | # Product 5 | juce_add_plugin(Viz3DApp 6 | COMPANY_NAME "KoalaDSP" 7 | COPY_PLUGIN_AFTER_BUILD TRUE 8 | FORMATS Standalone VST3 9 | PRODUCT_NAME "Viz3DApp" 10 | PLUGIN_NAME "Spectrex 3D Example App" 11 | IS_SYNTH FALSE 12 | NEEDS_MIDI_INPUT FALSE 13 | NEEDS_MIDI_OUTPUT FALSE 14 | IS_MIDI_EFFECT FALSE 15 | EDITOR_WANTS_KEYBOARD_FOCUS FALSE 16 | 17 | MICROPHONE_PERMISSION_ENABLED TRUE 18 | MICROPHONE_PERMISSION_TEXT "This app needs permissions to use your microphone." 19 | HARDENED_RUNTIME_OPTIONS com.apple.security.device.audio-input 20 | ) 21 | target_compile_definitions(Viz3DApp 22 | PUBLIC 23 | # JUCE 24 | JUCE_VST3_CAN_REPLACE_VST2=0 25 | ) 26 | set_target_properties(Viz3DApp PROPERTIES 27 | XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/entitlements.plist") 28 | 29 | # Sources 30 | target_sources(Viz3DApp 31 | PRIVATE 32 | # Headers 33 | Renderer.h 34 | Rendering.h 35 | PluginEditor.h 36 | PluginProcessor.h 37 | Parameters.h 38 | Utility.h 39 | ParameterWindow/ParameterWindow.h 40 | ParameterWindow/ParameterDisplay.h 41 | 42 | # Sources 43 | Renderer.cpp 44 | Rendering.cpp 45 | PluginEditor.cpp 46 | PluginProcessor.cpp 47 | ParameterWindow/ParameterWindow.cpp 48 | ParameterWindow/ParameterDisplay.cpp 49 | ) 50 | 51 | # Link dependencies 52 | target_link_libraries(Viz3DApp 53 | PRIVATE 54 | # Spectrex dependencies 55 | Spectrex 56 | Viz3DShaders 57 | glm 58 | GSL 59 | glad 60 | $<$:ipp> 61 | 62 | # JUCE 63 | $ 64 | $ 65 | $ 66 | ) 67 | -------------------------------------------------------------------------------- /examples/Viz3DApp/ParameterWindow/ParameterDisplay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "../Parameters.h" 5 | 6 | // GLM 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | struct ParameterType 18 | { 19 | enum Type 20 | { 21 | SLIDER, 22 | COLOR, 23 | TOGGLE, 24 | BUTTON, 25 | COMBO_BOX, 26 | }; 27 | 28 | struct SliderRange 29 | { 30 | float minimum = 0; 31 | float maximum = 1; 32 | float interval = 0.1; 33 | }; 34 | 35 | struct ComboBox 36 | { 37 | std::vector options; 38 | }; 39 | 40 | Type type{ ParameterType::Type::SLIDER }; 41 | std::variant value{ nullptr }; 42 | }; 43 | 44 | static const std::vector>>> PARAMETER_ORDERED_DISPLAY_NAMES = { { 45 | { "spectrogram", 46 | { 47 | { "min_desired_frequency", { ParameterType::SLIDER, ParameterType::SliderRange{ 100, 24000, 100 } } }, 48 | { "max_desired_frequency", { ParameterType::SLIDER, ParameterType::SliderRange{ 100, 24000, 100 } } }, 49 | { "min_db", { ParameterType::SLIDER, ParameterType::SliderRange{ -80, -1, 1 } } }, 50 | { "max_db", { ParameterType::SLIDER, ParameterType::SliderRange{ -80, -1, 1 } } }, 51 | { "attack_seconds", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 2, 0.001f } } }, 52 | { "release_seconds", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 2, 0.001f } } }, 53 | } }, 54 | { "visual", 55 | { 56 | { "visual", { ParameterType::Type::COMBO_BOX, ParameterType::ComboBox{ { "1", "2", "3" } } } }, 57 | } }, 58 | { "visual 1", 59 | { 60 | { "width", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 5, 0.25 } } }, 61 | { "length", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 5, 0.25 } } }, 62 | { "height", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 5, 0.25 } } }, 63 | { "global_scale", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 2.5, 0.1 } } }, 64 | { "y_displacement", { ParameterType::SLIDER, ParameterType::SliderRange{ -2.5, 2.5, 0.1 } } }, 65 | { "num_lines", { ParameterType::SLIDER, ParameterType::SliderRange{ 1, 100, 1 } } }, 66 | { "line_thickness", { ParameterType::SLIDER, ParameterType::SliderRange{ 0.001, 0.1, 0.001 } } }, 67 | { "line_color_1", { ParameterType::COLOR } }, 68 | { "line_color_2", { ParameterType::COLOR } }, 69 | { "background_color", { ParameterType::COLOR } }, 70 | { "gradient_position", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 1, 0.05 } } }, 71 | { "gradient_intensity", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 1, 0.05 } } }, 72 | } }, 73 | { "visual 2", 74 | { 75 | { "2_line_color_1", { ParameterType::COLOR } }, 76 | { "2_line_color_2", { ParameterType::COLOR } }, 77 | { "2_background_color", { ParameterType::COLOR } }, 78 | { "2_gradient_position", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 1, 0.05 } } }, 79 | { "2_gradient_intensity", { ParameterType::SLIDER, ParameterType::SliderRange{ 0, 1, 0.05 } } }, 80 | } }, 81 | { "visual 3", 82 | { 83 | { "3_background_color", { ParameterType::COLOR } }, 84 | { "3_x_amount", { ParameterType::SLIDER, ParameterType::SliderRange{ 1, 50, 1 } } }, 85 | { "3_z_amount", { ParameterType::SLIDER, ParameterType::SliderRange{ 1, 50, 1 } } }, 86 | } }, 87 | } }; 88 | 89 | float 90 | getSliderValue(const Parameters& parameters, const std::string& name); 91 | 92 | glm::vec3 93 | getColorValue(const Parameters& parameters, const std::string& name); 94 | 95 | bool 96 | getToggleValue(const Parameters& parameters, const std::string& name); 97 | 98 | unsigned int 99 | getComboBoxValue(const Parameters& parameters, const std::string& name); 100 | 101 | void 102 | setSliderValue(Parameters& parameters, const std::string& name, float value); 103 | 104 | void 105 | setColorValue(Parameters& parameters, const std::string& name, const glm::vec3& value); 106 | 107 | void 108 | setToggleValue(Parameters& parameters, const std::string& name, bool value); 109 | 110 | void 111 | setButtonValue(Parameters& parameters, const std::string& name); 112 | 113 | void 114 | setComboBoxValue(Parameters& parameters, const std::string& name, unsigned int value); -------------------------------------------------------------------------------- /examples/Viz3DApp/ParameterWindow/ParameterWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "ParameterDisplay.h" 5 | 6 | // JUCE 7 | #include "juce_gui_basics/juce_gui_basics.h" 8 | #include 9 | 10 | /* Forward Declarations */ 11 | 12 | class ParameterWindow; 13 | class ColorParameter; 14 | class SliderParameter; 15 | 16 | class SliderParameter : public juce::Slider 17 | { 18 | public: 19 | SliderParameter(std::string name, const ParameterType::SliderRange& range); 20 | 21 | void setParameterValue(Parameters& parameters) noexcept; 22 | 23 | void syncParameterValue(const Parameters& parameters) noexcept; 24 | 25 | private: 26 | std::string m_name; 27 | }; 28 | 29 | /* ColorPicker */ 30 | 31 | class ColorPicker final : public juce::ColourSelector 32 | { 33 | public: 34 | ColorPicker(ColorParameter& parent, int flags, std::string name) noexcept; 35 | 36 | void setParameterValue(Parameters& parameters) noexcept; 37 | 38 | private: 39 | ColorParameter& m_parent; 40 | std::string m_name; 41 | }; 42 | 43 | /* ColorParameter */ 44 | 45 | class ColorParameter : public juce::ShapeButton 46 | { 47 | public: 48 | ColorParameter(ParameterWindow* window, std::string name) noexcept; 49 | 50 | void syncParameterValue(const Parameters& parameters) noexcept; 51 | 52 | void clicked() override; 53 | 54 | private: 55 | ParameterWindow* m_window; 56 | 57 | std::string m_name; 58 | 59 | juce::Colour m_currentColor; 60 | }; 61 | 62 | class ToggleParameter : public juce::TextButton 63 | { 64 | public: 65 | ToggleParameter(std::string name); 66 | 67 | void setParameterValue(Parameters& parameters) noexcept; 68 | 69 | void syncParameterValue(const Parameters& parameters) noexcept; 70 | 71 | void clicked() override; 72 | 73 | private: 74 | std::string m_name; 75 | }; 76 | 77 | class ComboBoxParameter : public juce::ComboBox 78 | { 79 | public: 80 | ComboBoxParameter(std::string name, const ParameterType::ComboBox& comboBox); 81 | 82 | void setParameterValue(Parameters& parameters) noexcept; 83 | 84 | void syncParameterValue(const Parameters& parameters) noexcept; 85 | 86 | private: 87 | std::string m_name; 88 | }; 89 | 90 | class ButtonParameter : public juce::TextButton 91 | { 92 | public: 93 | ButtonParameter(std::string name); 94 | 95 | void setParameterValue(Parameters& parameters) noexcept; 96 | 97 | private: 98 | std::string m_name; 99 | }; 100 | 101 | /* ParameterWindow */ 102 | 103 | class ParameterWindow final 104 | : public juce::DocumentWindow 105 | , public juce::Slider::Listener 106 | , public juce::Button::Listener 107 | , public juce::ComboBox::Listener 108 | , public juce::ChangeListener 109 | , public juce::KeyListener 110 | { 111 | private: 112 | class ParameterWindowComponent final : public juce::Component 113 | { 114 | public: 115 | ParameterWindowComponent(ParameterWindow* window, const Parameters& parameters); 116 | 117 | void syncAll() noexcept; 118 | 119 | void paint(juce::Graphics& graphics) override; 120 | 121 | private: 122 | const Parameters& m_parameters; 123 | 124 | /* Parameter Components */ 125 | 126 | std::vector> m_sectionLabels; 127 | std::vector> m_parameterLabels; 128 | 129 | std::vector> m_sliderParameters; 130 | std::vector> m_colorParameters; 131 | std::vector> m_toggleParameters; 132 | std::vector> m_buttonParameters; 133 | std::vector> m_comboBoxParameters; 134 | }; 135 | 136 | public: 137 | ParameterWindow(Parameters& parameters); 138 | 139 | void sliderValueChanged(juce::Slider* slider) override; 140 | 141 | void changeListenerCallback(juce::ChangeBroadcaster* source) override; 142 | 143 | void buttonClicked(juce::Button* source) override; 144 | 145 | void comboBoxChanged(juce::ComboBox* source) override; 146 | 147 | bool keyPressed(const juce::KeyPress& key, juce::Component* originatingComponent) override; 148 | 149 | private: 150 | Parameters& m_parameters; 151 | 152 | ParameterWindowComponent* m_parameterWindowComponent; 153 | juce::Viewport* m_viewportComponent; 154 | }; 155 | -------------------------------------------------------------------------------- /examples/Viz3DApp/Parameters.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // GLM 4 | #include 5 | 6 | struct Parameters 7 | { 8 | /* spectrogram */ 9 | float min_desired_frequency = 200.f; 10 | float max_desired_frequency = 8000.f; 11 | 12 | float min_db = -48.f; 13 | float max_db = -6.f; 14 | 15 | float attack_seconds = 0.2f; 16 | float release_seconds = 0.2f; 17 | /* ----- */ 18 | 19 | unsigned int visual = 0; 20 | 21 | /* visual 1 */ 22 | // lines 23 | float width = 2.5f; 24 | float length = 3.f; 25 | float height = 1.5f; 26 | float global_scale = 1.f; 27 | float y_displacement = -0.2f; 28 | float num_lines = 40.f; 29 | float line_thickness = 0.025f; 30 | 31 | // camera 32 | float cam_angle = 20.f; 33 | float cam_zoom = -2.5f; 34 | 35 | // colors 36 | glm::vec3 color_1 = { 28.f / 255.f, 71.f / 255.f, 119.f / 255.f }; 37 | glm::vec3 color_2 = { 130.f / 255.f, 183.f / 255.f, 33.f / 255.f }; 38 | glm::vec3 background_color = { 18.f / 255.f, 19.f / 255.f, 20.f / 255.f }; 39 | 40 | float gradient_position = 0.2f; 41 | float gradient_intensity = 0.5f; 42 | /* ----- */ 43 | 44 | /* visual 2 */ 45 | 46 | struct Visual2 47 | { 48 | float width = 2.5f; 49 | float length = 20.f; 50 | float height = 2.f; 51 | float num_lines = 100.f; 52 | float line_thickness = 0.025f; 53 | 54 | float y_displacement = -0.2f; 55 | 56 | glm::vec3 color_1 = { 125.f / 255.f, 29.f / 255.f, 169.f / 255.f }; 57 | glm::vec3 color_2 = { 59.f / 255.f, 179.f / 255.f, 187.f / 255.f }; 58 | glm::vec3 background_color = { 7.f / 255.f, 7.f / 255.f, 7.f / 255.f }; 59 | 60 | float gradient_position = 0.2f; 61 | float gradient_intensity = 0.5f; 62 | } visual_2; 63 | 64 | /* ----- */ 65 | 66 | /* visual 3 */ 67 | 68 | struct Visual3 69 | { 70 | float x_amount = 25; 71 | float z_amount = 25; 72 | 73 | float base_height = 0.05f; 74 | float height = 1.f; 75 | 76 | glm::vec3 background_color = { 224.f / 255.f, 221.f / 255.f, 207.f / 255.f }; 77 | } visual_3; 78 | 79 | /* ----- */ 80 | 81 | // debug 82 | bool disable_msaa = false; 83 | }; -------------------------------------------------------------------------------- /examples/Viz3DApp/PluginEditor.cpp: -------------------------------------------------------------------------------- 1 | // Plugin 2 | #include "PluginEditor.h" 3 | #include "PluginProcessor.h" 4 | 5 | PluginEditor::PluginEditor(PluginAudioProcessor& p) 6 | : AudioProcessorEditor(&p) 7 | , m_processor(p) 8 | { 9 | setSize(800, 600); 10 | 11 | // Set up OpenGL rendering 12 | m_openGLContext.setOpenGLVersionRequired(juce::OpenGLContext::openGL4_1); 13 | m_openGLContext.setRenderer(this); 14 | m_openGLContext.setContinuousRepainting(true); 15 | m_openGLContext.setComponentPaintingEnabled(true); 16 | m_openGLContext.attachTo(*this); 17 | 18 | // enable msaa 19 | m_openGLContext.setMultisamplingEnabled(true); 20 | juce::OpenGLPixelFormat pixelFormat; 21 | pixelFormat.multisamplingLevel = 8; 22 | m_openGLContext.setPixelFormat(pixelFormat); 23 | 24 | // Parameter window 25 | { 26 | #ifdef PARAMETER_WINDOW 27 | m_parameterWindow = std::make_unique(m_parameters); 28 | #endif 29 | } 30 | } 31 | 32 | PluginEditor::~PluginEditor() 33 | { 34 | m_openGLContext.detach(); 35 | } 36 | 37 | void 38 | PluginEditor::newOpenGLContextCreated() 39 | { 40 | m_renderer = std::make_unique(m_processor, m_parameters); 41 | } 42 | 43 | void 44 | PluginEditor::renderOpenGL() 45 | { 46 | // A very naive but simple way of updating parameters by bruteforcing them before rendering 47 | // Ideally, just use a proper parameter manager that detects changes instead, 48 | // and only set state parameters here that don't cause any performance side-effects! 49 | m_processor.getSpectrexMiniProcessor().getProcessor().setSpectrogramAttack(m_parameters.attack_seconds); 50 | m_processor.getSpectrexMiniProcessor().getProcessor().setSpectrogramRelease(m_parameters.release_seconds); 51 | 52 | m_renderer->render(getWidth(), getHeight()); 53 | } 54 | 55 | void 56 | PluginEditor::openGLContextClosing() 57 | { 58 | m_renderer.reset(); 59 | } 60 | -------------------------------------------------------------------------------- /examples/Viz3DApp/PluginEditor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define PARAMETER_WINDOW 4 | 5 | // Parameters 6 | #include "Parameters.h" 7 | #ifdef PARAMETER_WINDOW 8 | #include "ParameterWindow/ParameterWindow.h" 9 | #endif 10 | 11 | // Renderer 12 | #include "Renderer.h" 13 | 14 | // JUCE 15 | #include 16 | #include 17 | #include 18 | 19 | // Spectrex 20 | #include 21 | 22 | // Stdlib 23 | #include 24 | 25 | class PluginAudioProcessor; 26 | 27 | class PluginEditor 28 | : public juce::AudioProcessorEditor 29 | , private juce::OpenGLRenderer 30 | { 31 | public: 32 | PluginEditor(PluginAudioProcessor& p); 33 | ~PluginEditor(); 34 | 35 | private: 36 | /// Called at the beginning of a GL frame before any drawing has been 37 | /// done, used as a single synchronization point to gather any data from the 38 | /// processors that can be used consistently throughout the entire frame. 39 | void beginGLDrawFrame(); 40 | 41 | /* OpenGL */ 42 | void newOpenGLContextCreated() override; 43 | void renderOpenGL() override; 44 | void openGLContextClosing() override; 45 | 46 | private: 47 | PluginAudioProcessor& m_processor; 48 | 49 | juce::OpenGLContext m_openGLContext; 50 | 51 | // 3D Visualizers 52 | std::unique_ptr m_renderer; 53 | Parameters m_parameters; 54 | 55 | #ifdef PARAMETER_WINDOW 56 | std::unique_ptr m_parameterWindow; 57 | #endif 58 | 59 | spectrex::MiniProcessor m_spectrexMiniProcessor; 60 | 61 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginEditor) 62 | }; -------------------------------------------------------------------------------- /examples/Viz3DApp/PluginProcessor.cpp: -------------------------------------------------------------------------------- 1 | // Plugin 2 | #include "PluginProcessor.h" 3 | #include "PluginEditor.h" 4 | 5 | // JUCE 6 | #include 7 | 8 | void 9 | PluginAudioProcessor::changeProgramName(int index, const juce::String& newName) 10 | { 11 | } 12 | 13 | void 14 | PluginAudioProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) 15 | { 16 | m_spectrexProcessor.prepareToPlay(sampleRate, samplesPerBlock); 17 | } 18 | 19 | void 20 | PluginAudioProcessor::releaseResources() 21 | { 22 | } 23 | 24 | void 25 | PluginAudioProcessor::processBlock(juce::AudioSampleBuffer& buffer, juce::MidiBuffer& midiMessages) 26 | { 27 | m_spectrexProcessor.processBlock(playHead, buffer, midiMessages); 28 | } 29 | 30 | juce::AudioProcessorEditor* 31 | PluginAudioProcessor::createEditor() 32 | { 33 | return new PluginEditor(*this); 34 | } 35 | 36 | auto 37 | PluginAudioProcessor::acceptsMidi() const -> bool 38 | { 39 | return false; 40 | } 41 | 42 | auto 43 | PluginAudioProcessor::producesMidi() const -> bool 44 | { 45 | return false; 46 | } 47 | 48 | auto 49 | PluginAudioProcessor::silenceInProducesSilenceOut() const -> bool 50 | { 51 | return false; 52 | } 53 | 54 | auto 55 | PluginAudioProcessor::hasEditor() const -> bool 56 | { 57 | return true; 58 | } 59 | 60 | auto 61 | PluginAudioProcessor::isInputChannelStereoPair(int index) const -> bool 62 | { 63 | return true; 64 | } 65 | 66 | auto 67 | PluginAudioProcessor::isOutputChannelStereoPair(int index) const -> bool 68 | { 69 | return true; 70 | } 71 | 72 | auto 73 | PluginAudioProcessor::getName() const -> const juce::String 74 | { 75 | return JucePlugin_Name; 76 | } 77 | 78 | auto 79 | PluginAudioProcessor::getInputChannelName(int channelIndex) const -> const juce::String 80 | { 81 | return juce::String(channelIndex + 1); 82 | } 83 | 84 | auto 85 | PluginAudioProcessor::getOutputChannelName(int channelIndex) const -> const juce::String 86 | { 87 | return juce::String(channelIndex + 1); 88 | } 89 | 90 | auto 91 | PluginAudioProcessor::getTailLengthSeconds() const -> double 92 | { 93 | return 0.0; 94 | } 95 | 96 | auto 97 | PluginAudioProcessor::getNumPrograms() -> int 98 | { 99 | return 1; 100 | } 101 | 102 | auto 103 | PluginAudioProcessor::getCurrentProgram() -> int 104 | { 105 | return 0; 106 | } 107 | 108 | auto 109 | PluginAudioProcessor::getProgramName(int index) -> const juce::String 110 | { 111 | return juce::String(); 112 | } 113 | 114 | void 115 | PluginAudioProcessor::getStateInformation(juce::MemoryBlock& destData) 116 | { 117 | } 118 | 119 | void 120 | PluginAudioProcessor::setCurrentProgram(int index) 121 | { 122 | } 123 | 124 | void 125 | PluginAudioProcessor::setStateInformation(const void* data, int sizeInBytes) 126 | { 127 | } 128 | 129 | PluginAudioProcessor::PluginAudioProcessor() 130 | : juce::AudioProcessor( 131 | BusesProperties().withInput("Input", juce::AudioChannelSet::stereo(), true).withOutput("Output", juce::AudioChannelSet::stereo(), true)) 132 | , m_spectrexProcessor() 133 | { 134 | juce::AudioFormatManager formatManager; 135 | formatManager.registerBasicFormats(); 136 | } 137 | 138 | PluginAudioProcessor::~PluginAudioProcessor() {} 139 | 140 | juce::AudioProcessor* JUCE_CALLTYPE 141 | createPluginFilter() 142 | { 143 | return new PluginAudioProcessor(); 144 | } -------------------------------------------------------------------------------- /examples/Viz3DApp/PluginProcessor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // JUCE 4 | #include 5 | 6 | // spectrex 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | 12 | class PluginAudioProcessor : public juce::AudioProcessor 13 | { 14 | public: 15 | void changeProgramName(int index, const juce::String& newName) override; 16 | 17 | void prepareToPlay(double sampleRate, int samplesPerBlock) override; 18 | void releaseResources() override; 19 | 20 | void processBlock(juce::AudioSampleBuffer&, juce::MidiBuffer&) override; 21 | 22 | auto createEditor() -> juce::AudioProcessorEditor* override; 23 | 24 | auto acceptsMidi() const -> bool override; 25 | auto producesMidi() const -> bool override; 26 | auto silenceInProducesSilenceOut() const -> bool override; 27 | 28 | auto hasEditor() const -> bool override; 29 | 30 | auto isInputChannelStereoPair(int index) const -> bool override; 31 | auto isOutputChannelStereoPair(int index) const -> bool override; 32 | 33 | auto getName() const -> const juce::String override; 34 | auto getInputChannelName(int channelIndex) const -> const juce::String override; 35 | auto getOutputChannelName(int channelIndex) const -> const juce::String override; 36 | auto getTailLengthSeconds() const -> double override; 37 | auto getNumPrograms() -> int override; 38 | auto getCurrentProgram() -> int override; 39 | auto getProgramName(int index) -> const juce::String override; 40 | void getStateInformation(juce::MemoryBlock& destData) override; 41 | 42 | void setCurrentProgram(int index) override; 43 | 44 | void setStateInformation(const void* data, int sizeInBytes) override; 45 | 46 | // spectrex 47 | spectrex::MiniProcessor& getSpectrexMiniProcessor() noexcept { return m_spectrexProcessor; } 48 | 49 | PluginAudioProcessor(); 50 | ~PluginAudioProcessor(); 51 | 52 | private: 53 | spectrex::MiniProcessor m_spectrexProcessor; 54 | 55 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(PluginAudioProcessor) 56 | }; -------------------------------------------------------------------------------- /examples/Viz3DApp/Renderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Plugin 4 | #include "Parameters.h" 5 | 6 | // GLM 7 | #include 8 | 9 | // JUCE 10 | #include 11 | 12 | // spectrex 13 | #include 14 | 15 | // Stdlib 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | /* Forward Declarations */ 23 | 24 | class PluginAudioProcessor; 25 | 26 | class Program; 27 | class OrbitCamera; 28 | class RenderTarget; 29 | class Rectangle; 30 | class Texture; 31 | class Buffer; 32 | 33 | /* Renderer */ 34 | 35 | class Renderer final 36 | { 37 | public: 38 | void render(int width, int height) noexcept; 39 | 40 | explicit Renderer(PluginAudioProcessor& processor, Parameters& parameters) noexcept; 41 | 42 | ~Renderer(); 43 | 44 | private: 45 | double m_time = 0.0; 46 | 47 | std::chrono::high_resolution_clock::time_point m_lastTime; 48 | 49 | Parameters& m_parameters; 50 | 51 | // Processor 52 | PluginAudioProcessor& m_processor; 53 | 54 | // Rendering resources 55 | std::unique_ptr m_program_1; 56 | std::unique_ptr m_program_2; 57 | std::unique_ptr m_program_3; 58 | 59 | std::unique_ptr m_spectrum_geometry; 60 | std::unique_ptr m_spectrum_geometry_2; 61 | 62 | // Spectrex 63 | std::unique_ptr m_spectrogramBuffer; 64 | std::unique_ptr m_spectrogramTexture; 65 | 66 | void visual_1(int width, int height, spectrex::SpectrogramInfo info); 67 | 68 | void visual_2(int width, int height, spectrex::SpectrogramInfo info); 69 | 70 | void visual_3(int width, int height, spectrex::SpectrogramInfo info); 71 | }; -------------------------------------------------------------------------------- /examples/Viz3DApp/UI/Cursor.cpp: -------------------------------------------------------------------------------- 1 | // Plugin 2 | #include "Cursor.h" 3 | 4 | auto 5 | Cursor::get() noexcept -> Cursor& 6 | { 7 | static Cursor ret; 8 | return ret; 9 | } 10 | 11 | auto 12 | Cursor::getPosition() const noexcept -> glm::vec2 13 | { 14 | return m_position; 15 | } 16 | 17 | auto 18 | Cursor::getZoom() const noexcept -> glm::vec2 19 | { 20 | return m_zoom; 21 | } 22 | 23 | auto 24 | Cursor::getWheel() const noexcept -> glm::vec2 25 | { 26 | return m_wheel; 27 | } 28 | 29 | void 30 | Cursor::setPosition(glm::vec2 position) noexcept 31 | { 32 | m_position = position; 33 | } 34 | 35 | void 36 | Cursor::setZoom(glm::vec2 zoom) noexcept 37 | { 38 | m_zoom = zoom; 39 | } 40 | 41 | void 42 | Cursor::setWheel(glm::vec2 wheel) noexcept 43 | { 44 | m_wheel = wheel; 45 | } 46 | 47 | void 48 | Cursor::reset() noexcept 49 | { 50 | m_position = glm::vec2{ 0.0f, 0.0f }; 51 | m_zoom = glm::vec2{ 1.0f, 1.0f }; 52 | m_wheel = glm::vec2{ 0.0f, 0.0f }; 53 | } 54 | 55 | Cursor::Cursor() noexcept 56 | { 57 | reset(); 58 | } 59 | -------------------------------------------------------------------------------- /examples/Viz3DApp/UI/Cursor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // GLM 4 | #include 5 | 6 | // Stdlib 7 | #include 8 | 9 | /// @brief The cursor captures the position and zoom level of some the 10 | /// visualizations. 11 | class Cursor final 12 | { 13 | public: 14 | /// @brief Returns a singleton instance. 15 | /// @return Global camera. 16 | static auto get() noexcept -> Cursor&; 17 | 18 | /// @brief Returns a copy of the position. 19 | /// @return Position. 20 | auto getPosition() const noexcept -> glm::vec2; 21 | 22 | /// @brief Returns a copy of the scale. 23 | /// @return Zoom. 24 | auto getZoom() const noexcept -> glm::vec2; 25 | 26 | /// @brief Gets the linear wheel vector. 27 | /// @return Linear wheel vector. 28 | auto getWheel() const noexcept -> glm::vec2; 29 | 30 | /// @brief Sets the position. 31 | /// @param position New position. 32 | void setPosition(glm::vec2 position) noexcept; 33 | 34 | /// @brief Sets the zoom. 35 | /// @param zoom New zoom. 36 | void setZoom(glm::vec2 zoom) noexcept; 37 | 38 | /// @brief Sets the linear wheel vector. 39 | /// @param wheel Linear wheel vector. 40 | void setWheel(glm::vec2 wheel) noexcept; 41 | 42 | /// @brief Resets the cursor to its initial state. 43 | void reset() noexcept; 44 | 45 | private: 46 | Cursor() noexcept; 47 | 48 | private: 49 | std::atomic m_position; 50 | 51 | std::atomic m_zoom; 52 | std::atomic m_wheel; 53 | }; 54 | -------------------------------------------------------------------------------- /examples/Viz3DApp/UI/Visualizers2D.cpp: -------------------------------------------------------------------------------- 1 | #include "Visualizers2D.h" 2 | 3 | #include "../PluginProcessor.h" 4 | #include "../Utility.h" 5 | 6 | // Spectrex 7 | #include 8 | 9 | // JUCE 10 | #include 11 | 12 | // Label margin (factor) 13 | constexpr float LABEL_MARGIN = 0.01f; 14 | 15 | void 16 | Visualization2DComponent::resized() 17 | { 18 | auto b = getLocalBounds(); 19 | 20 | // Calculate larger of margin in either width or height for consistency 21 | const auto marginPx = juce::jmax(LABEL_MARGIN * b.getWidth(), LABEL_MARGIN * b.getHeight()); 22 | 23 | // Frame bounds 24 | b = b.withTrimmedTop(marginPx).withTrimmedBottom(marginPx).withTrimmedLeft(marginPx).withTrimmedRight(marginPx); 25 | 26 | // Spectrogram 27 | const auto spectrogramBounds = b.withHeight(b.getHeight() * 0.5f - marginPx); 28 | m_spectrogramComponent->setBounds(spectrogramBounds); 29 | 30 | // Waveform 31 | const auto waveformBounds = b.withTop(b.getHeight() * 0.5f + marginPx).withHeight(b.getHeight() * 0.5f); 32 | m_waveformComponent->setBounds(waveformBounds); 33 | } 34 | 35 | void 36 | Visualization2DComponent::paint(juce::Graphics& g) 37 | { 38 | // Border color 39 | g.fillAll(juce::Colours::darkslategrey); 40 | } 41 | 42 | void 43 | Visualization2DComponent::mouseMove(const juce::MouseEvent& event) 44 | { 45 | Component::mouseMove(event); 46 | 47 | m_waveformComponent->setShouldDrawMouseTarget(true); 48 | m_spectrogramComponent->setShouldDrawMouseTarget(true); 49 | } 50 | 51 | void 52 | Visualization2DComponent::mouseExit(const juce::MouseEvent& event) 53 | { 54 | Component::mouseExit(event); 55 | 56 | m_waveformComponent->setShouldDrawMouseTarget(false); 57 | m_spectrogramComponent->setShouldDrawMouseTarget(false); 58 | } 59 | 60 | Visualization2DComponent::Visualization2DComponent(utility::WindowOpenGLContext& context, PluginAudioProcessor& processor) 61 | : m_pluginProcessor(processor) 62 | , m_processor(processor.getSpectrexMiniProcessor().getProcessor()) 63 | { 64 | 65 | // Instantiate components 66 | m_spectrogramComponent = std::make_unique(context, processor, VisualizationComponent::Type::Spectrogram); 67 | m_waveformComponent = std::make_unique(context, processor, VisualizationComponent::Type::Waveform); 68 | 69 | // Add as children 70 | addAndMakeVisible(*m_spectrogramComponent); 71 | addAndMakeVisible(*m_waveformComponent); 72 | 73 | // Add Mouse Listener 74 | m_spectrogramComponent->addMouseListener(this, true); 75 | m_waveformComponent->addMouseListener(this, true); 76 | } 77 | 78 | Visualization2DComponent::~Visualization2DComponent() {} 79 | -------------------------------------------------------------------------------- /examples/Viz3DApp/UI/Visualizers2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../WindowOpenGLContext.h" 4 | #include "VisualizationComponent.h" 5 | 6 | // spectrex 7 | #include 8 | #include 9 | #include 10 | 11 | // JUCE 12 | #include 13 | 14 | #include 15 | 16 | // Stdlib 17 | #include 18 | #include 19 | 20 | /* Forward declarations */ 21 | 22 | class Processor; 23 | 24 | class PluginAudioProcessor; 25 | 26 | /* --- */ 27 | 28 | class Visualization2DComponent : public juce::Component 29 | { 30 | public: 31 | void resized() override; 32 | void paint(juce::Graphics& g) override; 33 | void mouseMove(const juce::MouseEvent& event) override; 34 | void mouseExit(const juce::MouseEvent& event) override; 35 | 36 | Visualization2DComponent(utility::WindowOpenGLContext& context, PluginAudioProcessor& processor); 37 | ~Visualization2DComponent() override; 38 | 39 | private: 40 | PluginAudioProcessor& m_pluginProcessor; 41 | spectrex::KProcessor& m_processor; 42 | 43 | std::unique_ptr m_waveformComponent; 44 | std::unique_ptr m_spectrogramComponent; 45 | }; 46 | -------------------------------------------------------------------------------- /examples/Viz3DApp/WindowOpenGLContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Utility.h" 4 | 5 | // spectrex 6 | #include 7 | 8 | // JUCE 9 | #include 10 | 11 | // Stdlib 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | namespace utility { 18 | 19 | class WindowOpenGLContext : private juce::OpenGLRenderer 20 | { 21 | public: 22 | void setTopLevelParentComponent(juce::Component& topLevelComponent) noexcept; 23 | 24 | void detachTopLevelParentComponent() noexcept; 25 | 26 | void addRenderingTarget(juce::OpenGLRenderer* newTarget) noexcept; 27 | 28 | void removeRenderingTarget(juce::OpenGLRenderer* targetToRemove) noexcept; 29 | 30 | auto getViewportScale() noexcept -> double; 31 | 32 | void executeOnGLThread(std::function&& lambdaToExecute) noexcept; 33 | 34 | void executeOnGLThreadMultipleTimes(std::function&& lambdaToExecute, const int repetitions) noexcept; 35 | 36 | void setBeginFrameCallback(std::function callback) noexcept; 37 | void setFailureCallback(std::function callback) noexcept; 38 | 39 | auto getContext() noexcept -> juce::OpenGLContext&; 40 | 41 | auto isFailed() const noexcept -> bool { return m_failed; } 42 | 43 | // Our own context 44 | auto getVisualizationContext() noexcept -> spectrex::KContext&; 45 | 46 | auto getFrameTimeInMs() const noexcept -> double; 47 | 48 | // @thread ui 49 | // @return Clipping bounds relative to GL render target. 50 | auto updateViewportSize(juce::Component* targetComponent) noexcept -> juce::Rectangle; 51 | 52 | WindowOpenGLContext() noexcept; 53 | ~WindowOpenGLContext(); 54 | 55 | private: 56 | void newOpenGLContextCreated() noexcept override; 57 | 58 | void renderOpenGL() noexcept override; 59 | 60 | void openGLContextClosing() noexcept override; 61 | 62 | private: 63 | /* Properties */ 64 | 65 | bool m_failed = false; 66 | 67 | double m_viewportScale; 68 | 69 | MovingAverageTimer m_timer; 70 | 71 | /* Context */ 72 | 73 | juce::OpenGLContext m_openGLContext; 74 | 75 | std::atomic m_openGLContextCreated = false; 76 | 77 | /* Render Targets */ 78 | 79 | juce::Array m_renderingTargets; 80 | 81 | /* Mutex */ 82 | 83 | std::mutex m_renderingTargetsLock; 84 | 85 | std::mutex m_executeInRenderCallbackLock; 86 | 87 | /* Callback */ 88 | 89 | std::vector> m_executeInRenderCallback; 90 | 91 | std::function m_beginFrameCallback; 92 | std::function m_failureCallback; 93 | 94 | std::unique_ptr m_visualizationContext; 95 | }; 96 | 97 | } // namespace utility 98 | -------------------------------------------------------------------------------- /examples/Viz3DApp/entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.device.audio-input 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(Python COMPONENTS Interpreter REQUIRED) 2 | 3 | add_library(Viz3DShaders INTERFACE) 4 | 5 | target_include_directories(Viz3DShaders 6 | INTERFACE 7 | ${CMAKE_CURRENT_SOURCE_DIR} 8 | ) 9 | 10 | add_custom_target(GenerateShadersHeader 11 | COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/ToHeader.py 12 | WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} 13 | BYPRODUCTS ${CMAKE_CURRENT_LIST_DIR}/Shaders.h 14 | COMMENT "Generating shaders header" 15 | ) 16 | 17 | add_dependencies(Viz3DShaders GenerateShadersHeader) 18 | -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/ToHeader.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from enum import Enum 4 | 5 | 6 | class ShaderType(Enum): 7 | Vertex = 1 8 | Geometry = 2 9 | Fragment = 3 10 | 11 | 12 | output = "" 13 | 14 | output += "#pragma once\n\n" 15 | output += "namespace Plugin::Shaders {\n\n" 16 | 17 | for filename in os.listdir("."): 18 | shader_type = None 19 | 20 | if "vert" in filename: 21 | shader_type = ShaderType.Vertex 22 | 23 | print("Vertex shader ", filename) 24 | elif "geom" in filename: 25 | shader_type = ShaderType.Geometry 26 | 27 | print("Geometry shader ", filename) 28 | elif "frag" in filename: 29 | shader_type = ShaderType.Fragment 30 | 31 | print("Fragment shader ", filename) 32 | else: 33 | continue 34 | 35 | name = os.path.splitext(filename)[0] + shader_type.name 36 | 37 | with open(filename, "r") as file: 38 | file_content = file.read() 39 | 40 | output += "/* {} */\n\n".format(name) 41 | 42 | output += 'const char* {} = R"(\n'.format(name) 43 | output += file_content 44 | output += ')";\n\n' 45 | 46 | output += "} // namespace Plugin::Shaders" 47 | 48 | with open("Shaders.h", "a+") as file: 49 | file.seek(0) 50 | 51 | # only overwrite if content is not the same 52 | # keeps the library from being recompiled 53 | if file.read() != output: 54 | file.truncate(0) 55 | file.seek(0) 56 | 57 | file.write(output) 58 | -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/Visual1.frag: -------------------------------------------------------------------------------- 1 | #version 410 core 2 | 3 | in VertexData 4 | { 5 | vec2 TexCoord; 6 | flat int InstanceID; 7 | float SpectrogramValue; 8 | } 9 | In; 10 | 11 | out vec4 FragColor; 12 | 13 | uniform vec3 uLineColor1; 14 | uniform vec3 uLineColor2; 15 | 16 | uniform float uGradientPosition; 17 | uniform float uGradientIntensity; 18 | 19 | vec3 gradient(vec3 col1, vec3 col2, float x, float pos, float intensity) { 20 | return mix(col1, col2, smoothstep(pos - (0.5 * intensity), pos + (0.5 * intensity), x)); 21 | } 22 | 23 | void 24 | main() 25 | { 26 | FragColor = vec4(gradient(uLineColor1, uLineColor2, In.SpectrogramValue, uGradientPosition, uGradientIntensity), 1.0); 27 | } -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/Visual2.frag: -------------------------------------------------------------------------------- 1 | #version 410 core 2 | 3 | in VertexData 4 | { 5 | vec2 TexCoord; 6 | flat int InstanceID; 7 | float SpectrogramValue; 8 | } 9 | In; 10 | 11 | out vec4 FragColor; 12 | 13 | uniform vec3 uLineColor1; 14 | uniform vec3 uLineColor2; 15 | 16 | uniform float uGradientPosition; 17 | uniform float uGradientIntensity; 18 | 19 | uniform int uNumInstances; 20 | 21 | vec3 gradient(vec3 col1, vec3 col2, float x, float pos, float intensity) { 22 | return mix(col1, col2, smoothstep(pos - (0.5 * intensity), pos + (0.5 * intensity), x)); 23 | } 24 | 25 | void 26 | main() 27 | { 28 | FragColor = vec4(gradient(uLineColor1, uLineColor2, In.SpectrogramValue, uGradientPosition, uGradientIntensity), 29 | float(In.InstanceID) / float(uNumInstances - 1)); 30 | } -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/Visual3.frag: -------------------------------------------------------------------------------- 1 | #version 410 core 2 | 3 | out vec4 FragColor; 4 | 5 | in GeometryData 6 | { 7 | flat int InstanceID; 8 | } 9 | In; 10 | 11 | uniform int uXAmount; 12 | uniform int uZAmount; 13 | 14 | void main() { 15 | vec3 color; 16 | 17 | vec3 c1 = vec3(178, 93, 166) / 255.f; 18 | vec3 c2 = vec3(102, 136, 195) / 255.f; 19 | vec3 c3 = vec3(72, 165, 106) / 255.f; 20 | vec3 c4 = vec3(234, 175, 65) / 255.f; 21 | vec3 c5 = vec3(206, 74, 74) / 255.f; 22 | 23 | int zNr = In.InstanceID / uXAmount; 24 | int colorNr = zNr % 5; 25 | 26 | if (colorNr == 0) { 27 | color = c1; 28 | } else if (colorNr == 1) { 29 | color = c2; 30 | } else if (colorNr == 2) { 31 | color = c3; 32 | } else if (colorNr == 3) { 33 | color = c4; 34 | } else if (colorNr == 4) { 35 | color = c5; 36 | } 37 | 38 | FragColor = vec4(color, 1.0); 39 | } 40 | -------------------------------------------------------------------------------- /examples/Viz3DApp/shaders/Visual3.geom: -------------------------------------------------------------------------------- 1 | #version 410 core 2 | 3 | layout(points) in; 4 | layout(triangle_strip, max_vertices=12) out; 5 | 6 | in VertexData 7 | { 8 | int InstanceID; 9 | float ShapeWidth; 10 | float ShapeLength; 11 | float SpectrogramValue; 12 | } 13 | In[1]; 14 | 15 | out GeometryData 16 | { 17 | flat int InstanceID; 18 | } 19 | Out; 20 | 21 | uniform mat4 uViewProjection; 22 | 23 | uniform float uBaseHeight; 24 | uniform float uYDisplacement; 25 | uniform float uGlobalScale; 26 | 27 | uniform float uLineSpectrumHeight; 28 | 29 | mat4 30 | translate(vec3 d) 31 | { 32 | // clang-format off 33 | return mat4( 34 | 1.0, 0.0, 0.0, 0.0, 35 | 0.0, 1.0, 0.0, 0.0, 36 | 0.0, 0.0, 1.0, 0.0, 37 | d, 1.0 38 | ); 39 | // clang-format on 40 | } 41 | 42 | mat4 43 | scale(vec3 c) 44 | { 45 | // clang-format off 46 | return mat4( 47 | c.x, 0.0, 0.0, 0.0, 48 | 0.0, c.y, 0.0, 0.0, 49 | 0.0, 0.0, c.z, 0.0, 50 | 0.0, 0.0, 0.0, 1.0 51 | ); 52 | // clang-format on 53 | } 54 | 55 | void createFace(vec3 pos, vec3 up, vec3 right, mat4 m) { 56 | gl_Position = m * vec4(pos, 1); 57 | EmitVertex(); 58 | 59 | gl_Position = m * vec4(pos + right, 1); 60 | EmitVertex(); 61 | 62 | gl_Position = m * vec4(pos + up, 1); 63 | EmitVertex(); 64 | 65 | gl_Position = m * vec4(pos + right + up, 1); 66 | EmitVertex(); 67 | 68 | EndPrimitive(); 69 | } 70 | 71 | void main() { 72 | Out.InstanceID = In[0].InstanceID; 73 | 74 | // invidual shape's size 75 | vec3 size = vec3(In[0].ShapeWidth, uBaseHeight + In[0].SpectrogramValue * uLineSpectrumHeight, In[0].ShapeLength); 76 | 77 | // sets the shape's bottom at y=0 78 | vec3 sizeOffset = vec3(0, size.y / 2.f, 0); 79 | 80 | mat4 m = 81 | uViewProjection * 82 | // entire visualization transformation 83 | translate(vec3(0, uYDisplacement, 0)) * 84 | scale(vec3(uGlobalScale)) * 85 | // invidual shape transformation 86 | translate(gl_in[0].gl_Position.xyz + sizeOffset) * 87 | scale(size); 88 | 89 | // generate geometry 90 | const vec3 faceData[9] = vec3[]( 91 | vec3( -0.5f, -0.5f, 0.5f ), vec3( 0, 1, 0 ), vec3( 1, 0, 0 ), 92 | vec3( -0.5f, -0.5f, -0.5f ), vec3( 0, 1, 0 ), vec3( 0, 0, 1 ), 93 | vec3( 0.5f, 0.5f, -0.5f ), vec3( 0, 0, 1 ), vec3( -1, 0, 0 ) 94 | ); 95 | 96 | for (int i = 0; i < 3; i++) { 97 | vec3 facePos = faceData[i * 3 + 0]; 98 | vec3 faceUp = faceData[i * 3 + 1]; 99 | vec3 faceRight = faceData[i * 3 + 2]; 100 | 101 | // creates face with outwards non uniform border scale 102 | createFace(facePos, faceUp, faceRight, m); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /include/Spectrex/Components/Spectrogram.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Spectrex 4 | #include 5 | #include 6 | #include 7 | 8 | // GLM 9 | #include 10 | 11 | // Stdlib 12 | #include 13 | #include 14 | 15 | namespace spectrex { 16 | 17 | /// KSpectrogramComponent properties struct. 18 | struct SpectrogramComponentProperties 19 | { 20 | /// Spectrogram background color. 21 | glm::vec4 BackgroundColor = { 0.012f, 0.012f, 0.012f, 1.00f }; 22 | }; 23 | 24 | /// KComponent class that visualizes a 2D spectrogram. 25 | class KSpectrogramComponent : public KComponent 26 | { 27 | public: 28 | /// Draws this component. 29 | void draw() noexcept override; 30 | 31 | /// Get the position of this component that was most recently drawn. 32 | /// @return Position. 33 | auto getPositionLastDrawn() const noexcept -> float override; 34 | 35 | /// Return a mutable reference to the properties structure. 36 | /// @return Properties. 37 | auto getProperties() noexcept -> SpectrogramComponentProperties&; 38 | 39 | /// Returns the current color ramp. 40 | /// @return Color ramp data. 41 | auto getColorRamp() const noexcept -> const std::vector&; 42 | 43 | /// Sets the color ramp of the spectrogram. 44 | /// @param colorRamp Vector containing RGBA ramp 45 | /// colors. Vector size should be a multiple of four. 46 | void setColorRamp(const std::vector& colorRamp) noexcept; 47 | 48 | /// Get informational text for a given normalized position. 49 | /// @param normX Normalized X position. 50 | /// @param normY Normalized Y position. 51 | /// @return Information text string. 52 | auto getInfoTextForNormalizedPosition(float normX, float normY) const noexcept -> const std::string override; 53 | 54 | /// Constructs a new Spectrogram component. 55 | /// @param processor Associated processor. 56 | /// @param context Associated context. 57 | KSpectrogramComponent(KProcessor& processor, KContext& context); 58 | 59 | ~KSpectrogramComponent(); 60 | 61 | private: 62 | KDSP_IMPL(SpectrogramComponent) 63 | KDSP_IMPL_VIRTUAL(SpectrogramComponent); 64 | }; 65 | 66 | } // namespace spectrex 67 | -------------------------------------------------------------------------------- /include/Spectrex/Components/Waveform.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Spectrex 4 | #include 5 | #include 6 | #include 7 | 8 | // GLM 9 | #include 10 | 11 | // Stdlib 12 | #include 13 | #include 14 | 15 | namespace spectrex { 16 | 17 | /// KWaveformComponent properties struct. 18 | struct WaveformComponentProperties 19 | { 20 | /// Waveform background color. 21 | glm::vec4 BackgroundColor = { 0.012f, 0.012f, 0.012f, 1.00f }; 22 | }; 23 | 24 | /// KComponent class that visualizes a waveform. 25 | class KWaveformComponent : public KComponent 26 | { 27 | public: 28 | /// Draws this component. 29 | void draw() noexcept override; 30 | 31 | /// Return a mutable reference to the properties structure. 32 | /// @return Properties. 33 | auto getProperties() noexcept -> WaveformComponentProperties&; 34 | 35 | /// Get the position of this component that was most recently drawn. 36 | /// @return Position. 37 | auto getPositionLastDrawn() const noexcept -> float override; 38 | 39 | /// Get informational text for a given normalized position. 40 | /// @param normX Normalized X position. 41 | /// @param normY Normalized Y position. 42 | /// @return Information text string. 43 | auto getInfoTextForNormalizedPosition(float normX, float normY) const noexcept -> const std::string override; 44 | 45 | /// Sets the color ramp of the waveform. 46 | /// @param colorRamp Vector containing RGBA ramp 47 | /// colors. Vector size should be a multiple of four. 48 | void setColorRamp(const std::vector& colorRamp) noexcept; 49 | 50 | /// Constructs a new Waveform component. 51 | /// @param processor Associated processor. 52 | /// @param context Associated context. 53 | KWaveformComponent(KProcessor& processor, KContext& context); 54 | 55 | ~KWaveformComponent(); 56 | 57 | private: 58 | KDSP_IMPL(WaveformComponent) 59 | KDSP_IMPL_VIRTUAL(WaveformComponent); 60 | }; 61 | 62 | } // namespace spectrex 63 | -------------------------------------------------------------------------------- /include/Spectrex/MiniProcessor.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Spectrex 4 | #include 5 | 6 | // JUCE 7 | #include 8 | 9 | // Stdlib 10 | #include 11 | 12 | namespace spectrex { 13 | 14 | class KProcessor; 15 | 16 | /// MiniProcessor implements the minimum necessary processing functionality to connect Spectrex to a potential DAW or audio device. It is an open 17 | /// implementation that can be changed as necessary. 18 | class MiniProcessor final 19 | { 20 | public: 21 | /// Called before playback starts, to let the processor prepare itself. Corresponds to the juce::AudioProcessor::prepareToPlay function. 22 | void prepareToPlay(double sampleRate, int samplesPerBlock) noexcept; 23 | /// Renders the next block. Corresponds to the juce::AudioProcessor::processBlock function. 24 | void processBlock(juce::AudioPlayHead* playHead, juce::AudioSampleBuffer&, juce::MidiBuffer&) noexcept; 25 | /// Returns the current sample rate. Corresponds to the juce::AudioProcessor::getSampleRate function. 26 | double getSampleRate() const noexcept { return m_sampleRate; } 27 | 28 | /// Returns the underlying spectrex::KProcessor. 29 | auto getProcessor() const noexcept -> spectrex::KProcessor& { return *m_processor; } 30 | 31 | /// Returns the most recent ppq in quarter notes given by the host. 32 | auto getLastPosInQtrs() const noexcept -> double { return m_lastTimeInQuarters.load(); } 33 | 34 | MiniProcessor() noexcept; 35 | ~MiniProcessor(); 36 | 37 | private: 38 | /// Internal processing thread to offload audio processing (producer) and any potential audio/gl (producer/consumer) interoperability. This 39 | /// decouples any wait states from the audio thread. 40 | class ProcessingThread : public juce::Thread 41 | { 42 | public: 43 | void run() override; 44 | 45 | // Timeout for thread notify in ms 46 | static constexpr int k_processingThreadTimeoutMs = 15; 47 | 48 | ProcessingThread(MiniProcessor& owner); 49 | ~ProcessingThread(); 50 | 51 | private: 52 | MiniProcessor& m_owner; 53 | }; 54 | 55 | private: 56 | /// The amount of ppq change before a complete resync event is triggered. 57 | static constexpr double k_resyncPpqThreshold = 1.0; 58 | /// Initial value of the ppq counter. 59 | static constexpr double k_PpqInitialState = -1.0f; 60 | 61 | /// Underlying processor. 62 | std::shared_ptr m_processor; 63 | 64 | /// Current sample rate. 65 | double m_sampleRate = 0; 66 | 67 | /// Number of elements (processing blocks) inside ring buffers. Should be "big enough" to accommodate for a heavily lagging processing thread. 68 | static constexpr int k_ringBufferElements = 4096; 69 | 70 | /// Current number of effective channels that need to be processed. 71 | /// @thread audio 72 | /// @thread processing 73 | std::atomic m_numChannels = 0; 74 | 75 | /// Ring buffer for audio and MIDI shared between audio and processing. threads. 76 | /// 77 | /// Ideally this would be a SoA not AoS to avoid unpacking but RingBuffer does not allow for this currently. 78 | /// 79 | /// @thread audio 80 | /// @thread processing 81 | struct SyncData 82 | { 83 | float left = 0; 84 | float right = 0; 85 | bool noteOn = false; 86 | 87 | /// Data that is stored per block only, not per sample. 88 | /// This is put into the ring buffer anyway to keep synchronization simple, at the expense of memory space. 89 | double ppqPosition = 0; 90 | double ppqLoopEnd = 0; // Use infinite to encode no loop 91 | }; 92 | std::unique_ptr> m_ringBuffer; 93 | 94 | /// Playhead information (synchronized). 95 | /// @thread audio 96 | /// @thread processing 97 | juce::AudioPlayHead::CurrentPositionInfo m_playhead; 98 | std::atomic m_playheadValid; 99 | std::mutex m_playheadMutex; 100 | 101 | /// Last time in quarters according to playhead. 102 | /// @thread audio 103 | /// @thread processing 104 | std::atomic m_lastTimeInQuarters = 0.0; 105 | 106 | /// Temporary processing buffer. 107 | juce::AudioSampleBuffer m_processingBuffer; 108 | 109 | /// Processing thread. 110 | ProcessingThread m_processingThread; 111 | }; 112 | 113 | } // namespace spectrex 114 | -------------------------------------------------------------------------------- /include/Spectrex/Rendering/Context.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Spectrex 4 | #include 5 | 6 | namespace spectrex { 7 | 8 | /// Rendering context class. 9 | class KContext 10 | { 11 | public: 12 | /// One-time initialization for OpenGL. Can be called multiple times, only performs initialization once. Only call from GL thread. 13 | /// @thread gl 14 | static bool initializeGL() noexcept; 15 | 16 | KContext(); 17 | ~KContext(); 18 | 19 | private: 20 | KDSP_IMPL(KContext) 21 | }; 22 | 23 | } // namespace spectrex 24 | -------------------------------------------------------------------------------- /include/Spectrex/Utility/Exception.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Stdlib 4 | #include 5 | 6 | namespace spectrex { 7 | 8 | /// Generic exception class. 9 | class Exception final 10 | { 11 | public: 12 | /// Append an object to this exception's reason. 13 | /// @tparam T Type of object to add. 14 | /// @param t Object to add. 15 | /// @return This exception object. 16 | template 17 | auto operator<<(const T& t) -> Exception& 18 | { 19 | std::stringstream stream; 20 | stream << m_reason << t; 21 | 22 | m_reason = stream.str(); 23 | 24 | return *this; 25 | } 26 | 27 | /// Returns the reason the error was thrown as a string. 28 | /// @return Reason of error. 29 | auto getReason() const noexcept -> const std::string& { return m_reason; } 30 | 31 | /// Instantiate a new Error instance. 32 | /// @param reason Reason the Error is thrown. 33 | Exception(const std::string& reason) 34 | : m_reason(reason) 35 | { 36 | } 37 | 38 | ~Exception() = default; 39 | 40 | private: 41 | /// Reason for the error 42 | std::string m_reason; 43 | }; 44 | 45 | } // namespace spectrex 46 | -------------------------------------------------------------------------------- /include/Spectrex/Utility/RingBuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // spectrex 4 | #include "Utility.hpp" 5 | 6 | // Stdlib 7 | #include 8 | #include 9 | 10 | namespace spectrex { 11 | 12 | /// Generic circular ring buffer implementation. 13 | template 14 | class RingBuffer final : public spectrex::NonCopyable 15 | { 16 | public: 17 | /// Resets the ring buffer to its initial state and clears the internal buffer. 18 | void reset() noexcept 19 | { 20 | m_tail = m_head = 0; 21 | m_buffer.clear(); 22 | } 23 | 24 | /// Gets the "previous" value before the head. 25 | void getPreviousValue(T& output) const { output = m_buffer[(m_head - 1) % m_capacity]; } 26 | 27 | /// Resets the ring buffer to its initial state without clearing the internal buffer. 28 | void resetIndices() noexcept { m_tail = m_head = 0; } 29 | 30 | /// Advances the ring buffer by the given number of elements. 31 | void advance(int offset) noexcept 32 | { 33 | if (m_capacity > 0) { 34 | m_head = (m_head + offset) % m_capacity; 35 | } 36 | } 37 | 38 | /// Skips the ring buffer by the given number of elements. 39 | void skip(int n) noexcept { m_tail = (m_tail + n) % m_capacity; } 40 | 41 | /// Pushes a new value into the ring buffer. 42 | void push(const T& value) 43 | { 44 | m_buffer[m_head] = value; 45 | m_head = (m_head + 1) % m_capacity; 46 | } 47 | 48 | /// Reads a number of elements from the ring buffer. 49 | void read(T* dst, int n) noexcept 50 | { 51 | const auto nCopy = std::min((size_t)(m_capacity - m_tail), (size_t)n); 52 | memcpy(dst, m_buffer.data() + m_tail, nCopy * sizeof(T)); 53 | m_tail = (m_tail + nCopy) % m_capacity; 54 | 55 | if (n > 0) { 56 | n -= nCopy; 57 | read(dst + nCopy, n); 58 | } 59 | } 60 | 61 | /// Returns the number of available elements to read from the ring buffer. 62 | int getReadSpace() const noexcept 63 | { 64 | int ret; 65 | 66 | if (m_head > m_tail) { 67 | ret = m_head - m_tail; 68 | } else if (m_head < m_tail) { 69 | ret = (m_head + m_capacity) - m_tail; 70 | } else { 71 | ret = 0; 72 | } 73 | 74 | return ret; 75 | } 76 | 77 | /// Constructs a ring buffer. 78 | explicit RingBuffer(size_t capacity, T defaultValue) 79 | : m_capacity(capacity) 80 | , m_buffer(capacity, defaultValue) 81 | , m_head(0) 82 | , m_tail(0) 83 | { 84 | } 85 | 86 | private: 87 | const size_t m_capacity; 88 | 89 | std::vector m_buffer; 90 | 91 | size_t m_head = 0; 92 | size_t m_tail = 0; 93 | }; 94 | 95 | } // namespace spectrex 96 | -------------------------------------------------------------------------------- /include/Spectrex/Utility/Utility.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Optimization macros 4 | #ifndef OPTNONE 5 | #if defined(WIN32) 6 | #define OPTNONE 7 | #elif defined(__APPLE__) 8 | #define OPTNONE __attribute__((optnone)) 9 | #endif 10 | #endif 11 | 12 | // Assertion macros 13 | #include 14 | #ifndef KASSERT 15 | #define KASSERT(condition, msg) assert(condition) 16 | #endif 17 | 18 | namespace spectrex { 19 | 20 | /// Utility class to enforce non-copyable semantics. 21 | struct NonCopyable 22 | { 23 | NonCopyable() = default; 24 | NonCopyable(const NonCopyable&) = delete; 25 | NonCopyable& operator=(const NonCopyable&) = delete; 26 | }; 27 | 28 | } // namespace spectrex 29 | -------------------------------------------------------------------------------- /include/Spectrex/extra.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /// Internal functionality. 4 | 5 | #define KDSP_IMPL(_x) public: void* m_impl = nullptr; 6 | 7 | #define KDSP_IMPL_VIRTUAL_INTERFACE(_x) public: virtual void* v_impl() noexcept = 0; virtual void* v_impl() const noexcept = 0; 8 | #define KDSP_IMPL_VIRTUAL(_x) public: void* v_impl() noexcept override; void* v_impl() const noexcept override; 9 | -------------------------------------------------------------------------------- /lib/macos/Debug/libSpectrex.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/macos/Debug/libSpectrex.a -------------------------------------------------------------------------------- /lib/macos/Release/libSpectrex.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/macos/Release/libSpectrex.a -------------------------------------------------------------------------------- /lib/msvc/v142/MD/Win32/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MD/Win32/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MD/Win32/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MD/Win32/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MD/x64/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MD/x64/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MD/x64/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MD/x64/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MT/Win32/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MT/Win32/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MT/Win32/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MT/Win32/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MT/x64/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MT/x64/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v142/MT/x64/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v142/MT/x64/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MD/Win32/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MD/Win32/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MD/Win32/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MD/Win32/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MD/x64/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MD/x64/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MD/x64/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MD/x64/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MT/Win32/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MT/Win32/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MT/Win32/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MT/Win32/Release/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MT/x64/Debug/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MT/x64/Debug/Spectrex.lib -------------------------------------------------------------------------------- /lib/msvc/v143/MT/x64/Release/Spectrex.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koaladsp/SpectrexSDK/89befef024a085bd9af58ce165d2704e9af199b6/lib/msvc/v143/MT/x64/Release/Spectrex.lib --------------------------------------------------------------------------------