WIP synthesizer

This commit is contained in:
sigil-03 2025-10-27 16:56:11 -06:00
parent e43186ee4b
commit 96e26ce493
2 changed files with 25 additions and 0 deletions

View file

@ -1,2 +1,6 @@
#![no_std]
mod synthesizer;
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,
}
}
}