Initial commit, very broken

This commit is contained in:
2023-01-09 19:04:04 +01:00
commit 5f82b549dc
8 changed files with 1575 additions and 0 deletions

22
src/note.rs Normal file
View File

@@ -0,0 +1,22 @@
use std::fmt::{Display, Formatter};
#[derive(Debug, Clone)]
pub struct Note {
pub frequency: f32,
pub sample: u8,
pub effect: u16,
}
impl Display for Note {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "freq {}, sample: {}, effect: {}", self.frequency, self.sample, self.effect)
}
}
#[cfg(test)]
mod test {
#[test]
pub fn note_to_frequency() {
}
}