Files
soothe2-re/dsp/CMakeLists.txt
T
Matiq f689023089 Exact ln/exp2 infrastructure for FIR construction (0x1802a24c0 / 0x26b820)
- log2_ln.hpp/cpp: Plugin's exact ln(float) polynomial from 535a70
  (0x1802a24c0). IEEE 754 bit extraction + Horner evaluation.
  Coefficients extracted from binary at 0x181f81f80..0x181f821c0.
  Max error ~3e-6 for typical inputs.

- spectral.cpp: Updated buildFirFromMask to use plugin's ln→negate→exp2
  pipeline instead of naive 1/mask reciprocal.

- exp2_tables.hpp/cpp: Already contains plugin's exp2 tables (0x26b820).

Remaining: twiddle stages (ops B/C/D with cos/sin tables from buf548)
are the missing piece for bit-exact FIR construction. These are
FFT butterflies already implemented in fft.hpp but need integration
into the FIR pipeline.
2026-08-27 12:18:57 +03:00

69 lines
2.0 KiB
CMake

cmake_minimum_required(VERSION 3.10)
project(soothe2_dsp)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Threads REQUIRED)
find_library(SAMPLERATE samplerate)
add_library(soothe2_dsp SHARED
fft_plan.cpp
fft_stage.cpp
twiddle_builder.cpp
fft.cpp
spectral.cpp
filter.cpp
detect.cpp
twin.cpp
freqpath.cpp
levelpath.cpp
phase_table.cpp
fftconv.cpp
vlog.cpp
exp2_tables.cpp
exp2.cpp
leveltrack.cpp
framed_model.cpp
fnfaith.cpp
fn529fe0.cpp
rt_weights.cpp
rt_mask_tables.cpp
log2_ln.cpp
)
add_executable(soothe2_harness harness.cpp)
add_executable(framed_test framed_test.cpp)
add_executable(render48k render48k.cpp)
add_executable(twin_check twin_check.cpp)
add_executable(tables_check tables_check.cpp)
add_executable(fftconv_check fftconv_check.cpp)
add_executable(vlog_check vlog_check.cpp)
add_executable(leveltrack_check leveltrack_check.cpp)
add_executable(levelpath_check levelpath_check.cpp)
add_executable(exp2_check exp2_check.cpp)
add_executable(fn529fe0_check fn529fe0_check.cpp)
target_link_libraries(twin_check soothe2_dsp)
target_link_libraries(framed_test soothe2_dsp)
target_link_libraries(render48k soothe2_dsp ${SAMPLERATE})
target_link_libraries(exp2_check soothe2_dsp)
target_link_libraries(fn529fe0_check soothe2_dsp)
target_link_libraries(tables_check soothe2_dsp)
target_link_libraries(fftconv_check soothe2_dsp)
target_link_libraries(vlog_check soothe2_dsp)
target_link_libraries(leveltrack_check soothe2_dsp)
target_link_libraries(levelpath_check soothe2_dsp)
target_link_libraries(soothe2_harness soothe2_dsp)
target_include_directories(soothe2_dsp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(soothe2_dsp Threads::Threads)
set_target_properties(soothe2_dsp PROPERTIES
POSITION_INDEPENDENT_CODE ON
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(soothe2_dsp PRIVATE -O3 -march=native)
endif()