Insane changes

This commit is contained in:
Tom-on64 2026-04-24 14:52:45 +02:00
parent d687c2e24c
commit 6f70cf0a3d
4 changed files with 20 additions and 4 deletions

View File

@ -25,7 +25,7 @@ pico_sdk_init()
# Add executable. Default name is the project name, version 0.1 # Add executable. Default name is the project name, version 0.1
add_executable(sint-gauntlet sint-gauntlet.c vco.c ) add_executable(sint-gauntlet main.cc vco.c mux.c)
pico_set_program_name(sint-gauntlet "sint-gauntlet") pico_set_program_name(sint-gauntlet "sint-gauntlet")
pico_set_program_version(sint-gauntlet "0.1") pico_set_program_version(sint-gauntlet "0.1")
@ -39,6 +39,7 @@ target_link_libraries(sint-gauntlet
# Add the standard include files to the build # Add the standard include files to the build
target_include_directories(sint-gauntlet PRIVATE target_include_directories(sint-gauntlet PRIVATE
${CMAKE_CURRENT_LIST_DIR}/daisysp
${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required ${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required
) )

View File

@ -9,6 +9,10 @@
#include "hardware/pwm.h" #include "hardware/pwm.h"
#include "hardware/adc.h" #include "hardware/adc.h"
#include "state.h" #include "state.h"
#include "daisysp.h"
daisysp::Oscillator osc;
daisysp::Svf filter;
state_t state; state_t state;

4
mux.c
View File

@ -9,11 +9,11 @@ void set_mux_addr(uint8_t addr) {
} }
float read_value_from_mux() { float read_value_from_mux() {
return ; return 0.0f;
} }
void update_inputs() { void update_inputs() {
for(uint8_t i = 0; i < 2; i++) { for(uint8_t i = 0; i < 2; i++) {
} }
} }

13
vco.c
View File

@ -1,4 +1,15 @@
#include "const.h"
#include "state.h"
#include "vco.h"
float phase = 0.0f; float phase = 0.0f;
float vco(void) {
float phase_inc = (state.vco_freq * 1760) / SAMPLE_RATE;
phase += phase_inc;
float vco(void); if (phase >= 1.0f) phase -= 1.0f;
return (phase * 2.0f) - 1.0f;
}