Crate rstmt_core

Source
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§

chords
consts
error
intervals
notes
ops
pitch
prelude
qualities
statics
tone
traits
types

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§

IntervalKind
IntervalKind denotes objects used to explicitly define the various intervals in music theory.
IntoInterval
IntoInterval is a trait describing a method which consumes the current type, converting it into an Intervals
IntoPitch
A trait for converting a type into a Pitch instance.
MusicalInterval

Functions§

absmod
Computes the absmod of 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.

Type Aliases§

BoxError
BoxResult
PitchTy
A type alias for an integer representing a particular pitch of a note
Result
A type alias for Result<T, Error>.