flux-algebra 0.1.0

Algebraic structures for music theory: HarmonicRing, PLR group, Tropical semiring, TuningField
Documentation
  • Coverage
  • 67.39%
    31 out of 46 items documented0 out of 35 items with examples
  • Size
  • Source code size: 16.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 633.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • SuperInstance/flux-algebra-rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

flux-algebra-rs

<<<<<<< HEAD A pure Rust port of flux-algebra — algebraic structures for music theory.

Features

  • HarmonicRing — Z/nZ ring for pitch-class arithmetic (transposition, inversion, units)
  • PLR Group — Parallel, Leading-tone, Relative operations on triads
  • Tropical Semiring — (R ∪ {∞}, min, +) with polynomial evaluation
  • TuningField — Equal temperament and custom tuning systems
  • Voice-leading combinatorics — Minimal smooth voice leading via permutation search ======= Rust port of flux-algebra — musical algebra for harmonic analysis.

Features

  • Chord operations: major/minor/diminished/augmented, transposition, quality inversion
  • PLR group: Parallel, Leading-tone, Relative (Neo-Riemannian transformations)
  • Hexatonic cycles: 6-chord cycles through P/L transformations
  • Tropical semiring: min-plus algebra over intervals
  • Tuning fields: equal temperament, just intonation, cents deviation
  • Voice leading: distance computation and smoothest voice leading

83fe680 (Initial Rust port: musical algebra library)

Usage

<<<<<<< HEAD
use flux_algebra::{HarmonicRing, PlrGroup, groups::Triad, TropicalSemiring};

let ring = HarmonicRing::chromatic();
let transposed = ring.transpose(&[0, 4, 7], 5); // C major → F major

let c_major = Triad::major(0);
let c_minor = PlrGroup::p(c_major); // Parallel: Cm

let trop_min = TropicalSemiring::add(3.0, 5.0); // = 3.0

License

======= use flux_algebra::{Chord, parallel, relative, leading_tone, TuningField, voice_leading_distance};

let c_major = Chord::major(0); let a_minor = relative(&c_major); let b_minor = leading_tone(&c_major);

let tuning = TuningField::just_intonation(); let freq = tuning.frequency(60); // C4 in just intonation


## License

>>>>>>> 83fe680 (Initial Rust port: musical algebra library)
MIT