From 19b13ae0d3a36402087bd11d4699a42cd43d9294 Mon Sep 17 00:00:00 2001 From: Anett Seeker Date: Fri, 18 Oct 2024 17:20:57 +0200 Subject: [PATCH] Fix some more first doc paragraphs --- src/fret_pattern.rs | 1 + src/interval.rs | 1 + src/staff_position.rs | 1 + src/voicing.rs | 10 ++++++---- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/fret_pattern.rs b/src/fret_pattern.rs index 3d44f51..8448ce8 100644 --- a/src/fret_pattern.rs +++ b/src/fret_pattern.rs @@ -8,6 +8,7 @@ use crate::{FretID, STRING_COUNT}; pub struct ParseFretPatternError; /// A pattern of frets to press down for playing a chord. +/// /// Each index of the array corresponds to a ukulele string. #[derive(Debug, Copy, Clone)] pub struct FretPattern { diff --git a/src/interval.rs b/src/interval.rs index 7632995..0667ff1 100644 --- a/src/interval.rs +++ b/src/interval.rs @@ -10,6 +10,7 @@ pub struct ParseIntervalError { } /// An interval is the difference between two notes. +/// /// https://en.wikipedia.org/wiki/Interval_(music) #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Interval { diff --git a/src/staff_position.rs b/src/staff_position.rs index 8998204..734201d 100644 --- a/src/staff_position.rs +++ b/src/staff_position.rs @@ -5,6 +5,7 @@ use crate::StaffSteps; const STAFF_POSITION_COUNT: StaffSteps = 7; /// The vertical position of the notehead on the staff (on a line or in a space). +/// /// We use the staff position of an enharmonic note to decide whether it is sharp /// or flat. /// diff --git a/src/voicing.rs b/src/voicing.rs index 1fba44b..2a452fd 100644 --- a/src/voicing.rs +++ b/src/voicing.rs @@ -12,15 +12,17 @@ use crate::{ FINGER_COUNT, STRING_COUNT, }; +/// A chord voicing. +/// +/// The voicing of a chord describes the order of the individual notes within +/// the chord. The same chord can be voiced in different ways, i.e. there are +/// several ways to play the same chord on the ukulele. +/// https://en.wikipedia.org/wiki/Voicing_(music) #[derive(Clone, Copy, PartialEq, Eq)] pub struct Voicing { uke_strings: [UkeString; STRING_COUNT], } -/// The voicing of a chord describes the order of the individual notes within -/// the chord. The same chord can be voiced in different ways, i.e. there are -/// several ways to play the same chord on the ukulele. -/// https://en.wikipedia.org/wiki/Voicing_(music) impl Voicing { // Create a Voicing instance from a set of frets and a tuning. // As there is no information about a certain chord for which