Crate rstmt_core

Source
Expand description

§rstmt-core

This crate provides the core functionality for the rstmt library, including Aspn, NoteBase, Pitch, and Octave. Additionally, the crate provides a host of other primitives and utilities designed to manifest and manipulate musical concepts.

Modules§

consts
this module implements various constants used throughout the library.
error
this module defines the Error type and provides a type alias for a Result with an Error.
freq
The freq module defines the Frequency type and its associated traits and implementations.
intervals
this module implements intervallic relationships in music theory
notes
this modules implements the various representations of musical notes, octaves, and pitches.
octave
this module implements the Octave type, repsenting a particular octave in music.
pitch
this module implements the Pitch type and its associated traits and types.
traits
this module implements the core traits used throughout the library.
types
this module imimplements various types and other primitives used throughout the library

Structs§

Aspn
An american scientific pitch notation (Aspn) representation of a musical note; this standard is used to represent notes in a way that is consistent with the American scientific pitch notation system, which uses a combination of a pitch class (represented as an integer) and an octave (represented as an Octave) to uniquely identify a musical note. The pitch class is the note’s position in the chromatic scale, while the octave indicates the note’s position in the musical range.
Frequency
The Frequency type is a generic wrapper around type T that implements the RawFrequency trait. This implementation is designed to provide a consistent interface for dealing with frequencies within the crate, enabling conversion, arithmetic operations, and other utilities that are common to frequency values.
HarmonicFunctionIter
An iterator over the variants of HarmonicFunction
NoteBase
The NoteBase is a generic representation of a musical note
Octave
A type defining an octave
Pitch
A discrete pitch with a class and frequency.

Enums§

Error
The Error enum represents various errors that can occur in the application.
HarmonicFunction
Harmonic functions in tonal music

Constants§

C_MAJOR_SCALE
The C Major scale represented as an array of pitch class indices.

Traits§

AsAspn
The AsAspn trait is used to convert a reference into a Aspn
AsOctave
A trait for converting a reference into an Octave.
AsPitch
A trait for converting a reference into a Pitch.
Chroma
Chroma defines a trait for establishing a chromatic relationship between pitches.
IntoAspn
A trait for converting a type into a Aspn
IntoOctave
A trait for converting a type into an Octave.
IntoPitch
A trait for converting a type into a Pitch.
PitchClass
The PitchClass trait establishes an interface to defining pitch classes.
PitchMod
this trait relies on a python modulo operator with a divisor of 12
PyMod
The PyMod trait defines a pythonic modulo operator that can be used to perform modulo operations similar to Python’s % operator, which behaves differently than Rust’s % operator when dealing with negative numbers.
RawFrequency
RawFrequency defines an interface for all raw Frequency types.
RawPitch
RawPitch defines an interface for all raw pitch types.

Type Aliases§

Result
a type alias for a Result with a Error type