Compare commits

...

No commits in common. "main" and "96e26ce493e3a884a5f402a686aca75fda54a3c3" have entirely different histories.

2 changed files with 25 additions and 0 deletions

View file

@ -1,2 +1,6 @@
#![no_std] #![no_std]
mod synthesizer;
mod wavetable; mod wavetable;
//TODO:
// * patch mod w/ trait Input and trait Output(?)

21
src/synthesizer.rs Normal file
View file

@ -0,0 +1,21 @@
use crate::wavetable::Wavetable;
pub trait Synthesizer {}
pub struct SimpleWavetableSynthesizer<W: Wavetable> {
wavetable: W,
clock_freq_hz: usize,
output_freq_hz: usize,
enable: bool,
}
impl<W: Wavetable> SimpleWavetableSynthesizer<W> {
pub fn new(wavetable: W, clock_freq_hz: usize) -> Self {
Self {
wavetable,
clock_freq_hz,
output_freq_hz: 0,
enable: false,
}
}
}