Expand description
§rstmt
This crate focuses on implementing various musical objects and operations.
Modules§
- rstmt-neo
Structs§
- An octave describes the interval between one musical pitch and another with either half or double its frequency. Any changes made to a notes octave simply translates the same pitch class to another register.
- A pitch is a discrete tone with an individual frequency that may be classified as a pitch class.
Enums§
- Intervals enumerates the various intervals used within music theory. The system considers a semitone to be the smallest interval, while the octave describe the maximum distance between any two pitches.
- A step between notes.
Constants§
- Used to describe the total number of notes considered
- A semitone is half of a tone
- A tone is a difference of two
Traits§
- The American Standard Pitch Notation (ASPN) is a system popularized for its ability to simplify the representation of musical notes, combining the traditional symbols or pitch classes used to describe a particular pitch as well as leverging a subscript to denote the octave of the given pitch.
- This trait further generalizes PyMod by returning the absolute value of the result; dropping all signs in the process. This method is particularly useful when working in environments where the magnitude of the result is more important than the sign.
- This trait is used for computing the distance between two objects; The generality of the trait enables developers to implement it for their algorithms of choice operating on two objects within the same space.
- IntervalKind denotes objects used to explicitly define the various intervals in music theory.
- IntervalOps is a trait for objects capable of basic arithmetic with intervals.
- IntoInterval is a trait describing a method which consumes the current type, converting it into an Intervals
- A trait for converting a type into a Pitch instance.
- Notable is used to describe objects capable of being represented as a pitch
- The
PyModtrait, inpired by pythons%operator, describes a method for finding the modulo between two numbers which, rather uniquely, preserves the sign of the denominator. - Symbolic describes objects capable of symbolic representation
Functions§
- Computes the
absmodof the value given a modulus. The modulo is calculated before determining if the value is positive or negative. If negative, the value is reflected by adding the modulus before taking the modulo again. - A functional implementation of python’s
%operator. The implementation is unique in its handling of negative values, uniquely preseving the sign of the denominator.
Type Aliases§
- A type alias for an integer representing a particular pitch of a note
- A type alias for
Result<T, Error>.