mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
feat: add the ability to use Sointu as a sync-tracker
There is a new "sync" opcode that saves the top-most signal every 256 samples to the new "syncBuffer" output. Additionally, you can enable saving the current fractional row as sync[0], avoiding calculating the beat in the shader, but also calculating the beat correctly when the beat is modulated.
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
function(regression_test testname)
|
||||
|
||||
if(${ARGC} LESS 6)
|
||||
if(${ARGC} LESS 4)
|
||||
if(ARGV5)
|
||||
set(source ${ARGV5})
|
||||
add_executable(${testname} ${source} test_renderer.c)
|
||||
else()
|
||||
if(ARGV3)
|
||||
set(source ${ARGV3}.yml)
|
||||
else()
|
||||
set(source ${testname}.yml)
|
||||
else()
|
||||
set(source ${ARGV3}.yml)
|
||||
endif()
|
||||
|
||||
set(asmfile ${testname}.asm)
|
||||
@ -19,7 +22,7 @@ function(regression_test testname)
|
||||
add_executable(${testname} test_renderer.c ${asmfile})
|
||||
target_compile_definitions(${testname} PUBLIC TEST_HEADER=<${testname}.h>)
|
||||
|
||||
if (NODE AND WAT2WASM AND NOT ${testname} MATCHES "sample")
|
||||
if (NODE AND WAT2WASM AND NOT ${testname} MATCHES "sample" AND NOT ${testname} MATCHES "sync")
|
||||
set(wasmfile ${CMAKE_CURRENT_BINARY_DIR}/${testname}.wasm)
|
||||
set(watfile ${CMAKE_CURRENT_BINARY_DIR}/${testname}.wat)
|
||||
set(wasmtarget wasm_${testname})
|
||||
@ -29,31 +32,29 @@ function(regression_test testname)
|
||||
DEPENDS sointu-compiler
|
||||
)
|
||||
add_test(${wasmtarget} ${NODE} ${CMAKE_CURRENT_SOURCE_DIR}/wasm_test_renderer.es6 ${wasmfile} ${CMAKE_CURRENT_SOURCE_DIR}/expected_output/${testname}.raw)
|
||||
endif()
|
||||
else()
|
||||
set(source ${ARGV5})
|
||||
add_executable(${testname} ${source} test_renderer.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_test(${testname} ${testname} ${CMAKE_CURRENT_SOURCE_DIR}/expected_output/${testname}.raw)
|
||||
if (${testname} MATCHES "sync")
|
||||
add_test(${testname} ${testname} ${CMAKE_CURRENT_SOURCE_DIR}/expected_output/${testname}.raw ${CMAKE_CURRENT_SOURCE_DIR}/expected_output/${testname}_syncbuf.raw)
|
||||
else()
|
||||
add_test(${testname} ${testname} ${CMAKE_CURRENT_SOURCE_DIR}/expected_output/${testname}.raw)
|
||||
endif()
|
||||
target_link_libraries(${testname} ${HEADERLIB})
|
||||
|
||||
target_include_directories(${testname} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_compile_definitions(${testname} PUBLIC TEST_NAME="${testname}")
|
||||
|
||||
if(ARGC GREATER 1)
|
||||
if (ARGV1)
|
||||
message("${testname} requires ${ARGV1}")
|
||||
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED "${ARGV1}")
|
||||
endif()
|
||||
|
||||
if (ARGV1)
|
||||
message("${testname} requires ${ARGV1}")
|
||||
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED "${ARGV1}")
|
||||
endif()
|
||||
|
||||
if (ARGV2)
|
||||
message("${testname} setups ${ARGV2}")
|
||||
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP "${ARGV2}")
|
||||
endif()
|
||||
|
||||
if(ARGC GREATER 2)
|
||||
if (ARGV2)
|
||||
message("${testname} setups ${ARGV2}")
|
||||
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP "${ARGV2}")
|
||||
endif()
|
||||
endif()
|
||||
endfunction(regression_test)
|
||||
|
||||
regression_test(test_envelope "" ENVELOPE)
|
||||
@ -157,6 +158,7 @@ regression_test(test_envelope_16bit ENVELOPE "" test_envelope "-i")
|
||||
regression_test(test_polyphony "ENVELOPE;VCO_SINE")
|
||||
regression_test(test_chords "ENVELOPE;VCO_SINE")
|
||||
regression_test(test_speed "ENVELOPE;VCO_SINE")
|
||||
regression_test(test_sync "ENVELOPE" "" "" "-r")
|
||||
|
||||
regression_test(test_render_samples ENVELOPE "" "" "" test_render_samples.c)
|
||||
target_link_libraries(test_render_samples ${STATICLIB})
|
||||
|
Reference in New Issue
Block a user