Crate rstmt

source ·
Expand description

§rstmt

This crate focuses on implementing various musical objects and operations.

Modules§

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§

Constants§

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 PyMod trait, 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 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.
  • 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§