From 3505cc56367feabc60aaffe5e2b899d4d5d00531 Mon Sep 17 00:00:00 2001 From: jacksonfu14 Date: Sun, 16 Nov 2025 16:21:37 +0100 Subject: feature: convert sequences to ly markup --- morphology-img/src/pitch.rs | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 morphology-img/src/pitch.rs (limited to 'morphology-img/src/pitch.rs') diff --git a/morphology-img/src/pitch.rs b/morphology-img/src/pitch.rs deleted file mode 100644 index dd7d87e..0000000 --- a/morphology-img/src/pitch.rs +++ /dev/null @@ -1,43 +0,0 @@ -/// Represents a LilyPond absolute pitch name (e.g., "c'", "bes,", "fis") -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct LilyPondPitch(String); - -impl LilyPondPitch { - pub fn new(s: impl Into) -> Self { - Self(s.into()) - } - - pub fn as_str(&self) -> &str { - &self.0 - } -} - -/// Represents a complete LilyPond note with duration (e.g., "c'4") -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct LilyPondNote(String); - -impl LilyPondNote { - pub fn new(pitch: LilyPondPitch, duration: Duration) -> Self { - Self(format!("{}{}", pitch.as_str(), duration.as_str())) - } - - pub fn as_str(&self) -> &str { - &self.0 - } -} - -/// Represents a note duration in LilyPond (e.g., "4", "8", "2") -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub struct Duration(u8); - -impl Duration { - pub const QUARTER: Duration = Duration(4); - - pub fn new(value: u8) -> Self { - Self(value) - } - - pub fn as_str(&self) -> String { - self.0.to_string() - } -} -- cgit v1.2.3