Expand description
§triad-core
This library provides the core abstractions for the triad project.
Re-exports§
pub use super::octave::Octave;pub use super::pair::Pair;pub use super::steps::Step;pub use super::Tuple2;pub use super::Tuple3;pub use super::absmod::*;pub use super::arith::*;pub use super::distance::*;pub use super::intervals::*;pub use super::notable::*;
Modules§
Structs§
- Note
- Pitch
- A pitch is a discrete tone with an individual frequency that may be classified as a pitch class.
Enums§
- Error
- Fifth
- Fourth
- Intervals
- 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.
- Pitches
- Seventh
- Third
Constants§
- FLAT_
SUFFIX - MODULUS
- Used to describe the total number of notes considered
- SEMITONE
- A semitone is half of a tone
- SHARP_
SUFFIX - TONE
- A tone is a difference of two
Traits§
- Interval
Kind - IntervalKind denotes objects used to explicitly define the various intervals in music theory.
- Into
Interval - IntoInterval is a trait describing a method which consumes the current type, converting it into an Intervals
- Into
Pitch - A trait for converting a type into a Pitch instance.
- Musical
Interval
Functions§
- absmod
- 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. - pymod
- A functional implementation of python’s
%operator. The implementation is unique in its handling of negative values, uniquely preseving the sign of the denominator.