Expand description
This crate works to establish a solid foundation fo exploring the neo-riemannian theory,
providing implementations of the Triad, its transformations LPR, and the
generalized tonnetz (HyperTonnetz).
§Background
The neo-riemannian theory is a loose collection of musical theories focused on the triad. Research in the field has been ongoing for over a century, culminating in the successful generalization of the tonnetz, a geometric representation of the triad and its transformations, into a single topological entity composed of individual simplices.
§Examples
§Basic Usage
Create a C major triad and perform some basic operations.
use rstmt_nrt::Triad;
// initialize a c-major triad: (0, 4, 7)
let triad = Triad::major(0);
// verify the composition
assert_eq! { triad.is_major(), triad == [0, 4, 7] }
// apply a single, parallel transformation and verify
assert_eq! { triad.parallel(), [0, 3, 7] }
// chain together two parallel transformations to confirm inversion
assert_eq! { triad.parallel().parallel(), triad }Re-exports§
pub use super::walker::*;
Modules§
- error
- this module defines the standard error type,
TriadError, for the crate custom error types for thenrtcrate - iter
- this module defines various iterators for traversing a tonnetz, chaining transformations and more.
- motion
- this module focuses on implementing the motion planning algorithm for finding paths along the surface of the tonnetz.
- tonnetz
- The tonnetz is a conceptual lattice representation of tonal space first proposed in 1739 by Leonhard Euler as a means of visualizing relationships between triads. Over the centuries, researchers have expanded upon Euler’s initial concept, eventually culminating in the development of the long-awaited generalized tonnetz.
- triad
- this module defines the
Triadstruct along with additional types and traits supporting the representation of triads and their operations w.r.t. the neo-riemannian theory.
Structs§
- Factors
Iter - An iterator over the variants of Factors
- Hyper
Tonnetz - The
HyperTonnetzimplementation relies on a hypergraph to define the relationships between various notes and triads within the tonal space. Hypergraphs generalize the concept of a graph by allowing edges to connect any number of vertices, making them well-suited for modeling complex relationships and topologies such as those found in music theory. - LPRIter
- An iterator over the variants of LPR
- Triad
Base - The
TriadBaseis an implementation of a triad generic over the chord, or storage, its classification, and the element type used to represent a note within the triadic chord. - Triads
Iter - An iterator over the variants of Triads
Enums§
- Chord
Factor - The
ChordFactorimplementation enumerates the various notes within a triad, essentially providing an index for each of the chord’s components. - Factors
- LPR
- The
LPRimplementation enumerates the primary transformations considered within the Neo-Riemannian theory. Each transformation is its own inverse (meaning consecutive applications of the same transformation will return the original triad) and may be chained together in both disctrete and continuous space to explore relationships between triads. These transformation act on the given triad based on the quality of the interval between the first and second notes (i.e., the root and third chord factors) meaning the effect of the transformation is dictated by whether the triad starts with a major or minor third. - Triad
Error - the
TriadErrortype enumerates the various errors that one can expect to encounter within the crate. - Triads
- The
Triadsimplementation enumerates the allowed triad classifications determined by the intervals between the chord factors.
Traits§
- RelTriad
- Relative
- The
Relativetrait is used to define a relationship between two distinct triad classifications - Triad
Repr TriadRepris a sealed trait extending theRawSpacetrait to establish basic behaviors of compatible representations of a triad.- Triad
Repr Mut - The
TriadReprMuttrait is used to extend theTriadReprtrait to provide mutable access to the elements of a triad. - Triad
Type - The
TriadTypetrait is used to represent the various classifications of a triad considered by the Neo-Riemannian theory.