Skip to content

Commit

Permalink
Merge branch 'Chowdhury-DSP:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
RustoMCSpit authored May 31, 2024
2 parents 1e14975 + 6ef1720 commit d50e385
Show file tree
Hide file tree
Showing 12 changed files with 922 additions and 85 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [UNRELEASED]
- Updated "Poly Octave" DSP to sound cleaner and use less CPU

## [1.3.0] - 2024-03-15
- Added "Laser Trem" module.
- Added "Poly Octave" module.
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ if(WIN32)
set(CMAKE_SYSTEM_VERSION 7.1 CACHE STRING INTERNAL FORCE) # Windows SDK for Windows 7 and up
endif()
if(APPLE AND (CMAKE_SYSTEM_NAME STREQUAL "iOS"))
project(BYOD VERSION 2.1.0)
project(BYOD VERSION 2.1.1)
else()
project(BYOD VERSION 1.3.0)
project(BYOD VERSION 1.3.1)
endif()
set(CMAKE_CXX_STANDARD 20)

Expand Down
9 changes: 6 additions & 3 deletions modules/cmake/RuntimeSIMDLib.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
include(CheckCXXCompilerFlag)
function(make_lib_simd_runtime name file)
function(make_lib_simd_runtime name)
set(multiValueArgs SOURCES)
cmake_parse_arguments(ARG "" "" "${multiValueArgs}" ${ARGN})

add_library(${name}_sse_or_arm STATIC)
target_sources(${name}_sse_or_arm PRIVATE ${file})
target_sources(${name}_sse_or_arm PRIVATE ${ARG_SOURCES})

add_library(${name}_avx STATIC)
target_sources(${name}_avx PRIVATE ${file})
target_sources(${name}_avx PRIVATE ${ARG_SOURCES})
target_compile_definitions(${name}_avx PRIVATE BYOD_COMPILING_WITH_AVX=1)
if(WIN32)
CHECK_CXX_COMPILER_FLAG("/arch:AVX" COMPILER_OPT_ARCH_AVX_SUPPORTED)
Expand Down
5 changes: 3 additions & 2 deletions res/presets/OctaVerb.chowpreset
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<Preset name="OctaVerb" plugin="BYOD" vendor="CHOW" category="Pedals" version="1.2.2">
<proc_chain state_plugin_version="1.2.2">
<Preset name="OctaVerb" plugin="BYOD" vendor="CHOW" category="Pedals" version="1.3.1">
<proc_chain state_plugin_version="1.3.1">
<Poly_Octave>
<Parameters x_pos="0.04100000113248825" y_pos="0.505660355091095">
<PARAM id="dry" value="0.0"/>
<PARAM id="on_off" value="1.0"/>
<PARAM id="up2_octave" value="0.5"/>
<PARAM id="up_octave" value="1.0"/>
<PARAM id="v1_mode" value="0.0"/>
</Parameters>
<port_0 connection_0="3" connection_end_0="0"/>
</Poly_Octave>
Expand Down
22 changes: 15 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,13 @@ if (NOT(${JAI_COMPILER} STREQUAL "JAI_COMPILER-NOTFOUND"))
target_compile_definitions(BYOD PRIVATE BYOD_BUILDING_JAI_MODULES=1)
endif()

# AVX/SSE files for accelerated neural nets
make_lib_simd_runtime(rnn_accelerated processors/drive/neural_utils/RNNAccelerated.cpp)
foreach(target IN ITEMS rnn_accelerated_sse_or_arm rnn_accelerated_avx)
# AVX/SSE files for accelerated neural nets and other DSP
make_lib_simd_runtime(dsp_accelerated
SOURCES
processors/drive/neural_utils/RNNAccelerated.cpp
processors/other/poly_octave/PolyOctaveV2FilterBankImpl.cpp
)
foreach(target IN ITEMS dsp_accelerated_sse_or_arm dsp_accelerated_avx)
target_link_libraries(${target}
PRIVATE
math_approx
Expand All @@ -182,17 +186,21 @@ foreach(target IN ITEMS rnn_accelerated_sse_or_arm rnn_accelerated_avx)
${CMAKE_CURRENT_SOURCE_DIR}/../modules/RTNeural
${CMAKE_CURRENT_SOURCE_DIR}/../modules/RTNeural/modules/xsimd/include
)
target_compile_definitions(${target} PRIVATE RTNEURAL_USE_XSIMD=1)
target_compile_definitions(${target}
PRIVATE
RTNEURAL_USE_XSIMD=1
_USE_MATH_DEFINES=1
)
set_target_properties(${target} PROPERTIES
POSITION_INDEPENDENT_CODE TRUE
VISIBILITY_INLINES_HIDDEN TRUE
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
)
endforeach()
target_compile_definitions(rnn_accelerated_sse_or_arm PRIVATE RTNEURAL_DEFAULT_ALIGNMENT=16 RTNEURAL_NAMESPACE=RTNeural_sse_arm)
target_compile_definitions(rnn_accelerated_avx PRIVATE RTNEURAL_DEFAULT_ALIGNMENT=32 RTNEURAL_NAMESPACE=RTNeural_avx)
target_link_libraries(BYOD PRIVATE rnn_accelerated)
target_compile_definitions(dsp_accelerated_sse_or_arm PRIVATE RTNEURAL_DEFAULT_ALIGNMENT=16 RTNEURAL_NAMESPACE=RTNeural_sse_arm)
target_compile_definitions(dsp_accelerated_avx PRIVATE RTNEURAL_DEFAULT_ALIGNMENT=32 RTNEURAL_NAMESPACE=RTNeural_avx)
target_link_libraries(BYOD PRIVATE dsp_accelerated)

# special flags for MSVC
if (MSVC)
Expand Down
Loading

0 comments on commit d50e385

Please sign in to comment.