Base synth.c
This commit is contained in:
parent
895b0d635c
commit
d29f2e8c39
3
pwm.c
3
pwm.c
@ -2,6 +2,7 @@
|
||||
#include <pico/types.h>
|
||||
|
||||
#include "const.h"
|
||||
#include "synth.h"
|
||||
|
||||
#include "pwm.h"
|
||||
|
||||
@ -13,7 +14,7 @@ void pwm_isr(void) {
|
||||
pwm_clear_irq(slice);
|
||||
|
||||
// TODO:
|
||||
float sample = 0.0f;
|
||||
float sample = get_sample();
|
||||
|
||||
uint16_t level = (uint16_t)((sample + 1.0f) * 0.5f * 3400.0f);
|
||||
pwm_set_chan_level(slice, chan, level);
|
||||
|
||||
6
synth.cc
Normal file
6
synth.cc
Normal file
@ -0,0 +1,6 @@
|
||||
#include "synth.h"
|
||||
|
||||
float get_sample(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user