Compare commits
No commits in common. "main" and "96e26ce493e3a884a5f402a686aca75fda54a3c3" have entirely different histories.
main
...
96e26ce493
2 changed files with 25 additions and 0 deletions
|
|
@ -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
21
src/synthesizer.rs
Normal 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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue