Insane changes
This commit is contained in:
parent
d687c2e24c
commit
6f70cf0a3d
@ -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
|
||||||
)
|
)
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
2
mux.c
2
mux.c
@ -9,7 +9,7 @@ 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() {
|
||||||
|
|||||||
13
vco.c
13
vco.c
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user