Skip to main content

sim_lib_pitch_serial/
lib.rs

1//! Strict twelve-tone rows, complete families, matrices, and explicit labels.
2//!
3//! This crate is the pitch-specific layer over [`sim_lib_serial_core`]. It uses
4//! the canonical [`sim_lib_pitch_core::PitchClass`] values, admits each of the
5//! twelve classes exactly once, and keeps affine/reversal operation identity
6//! separate from convention-dependent printed labels.
7#![forbid(unsafe_code)]
8#![deny(missing_docs)]
9
10mod affine;
11mod all_interval;
12mod alphabet;
13mod class;
14mod combinatoriality;
15mod derivation;
16mod error;
17mod family;
18mod interval;
19mod invariance;
20mod label;
21mod matrix;
22mod mosaic;
23mod multiply;
24mod operation;
25mod partition;
26mod render;
27mod reservoir;
28mod row;
29mod segment;
30mod vertical;
31
32pub use affine::{AffinePitchMap, PitchTransformOutput};
33pub use all_interval::{AllIntervalMultiplicity, AllIntervalReport, analyze_all_interval};
34pub use alphabet::PitchClassAlphabet;
35pub use class::{FormEquivalence, RowClassAlias, RowClassReport, analyze_row_class};
36pub use combinatoriality::{
37    CombinatorialBlockEvidence, CombinatorialPartition, CombinatorialPartner,
38    CombinatorialityReport, analyze_combinatoriality, analyze_combinatoriality_partition,
39};
40pub use derivation::{
41    DerivationCellRelation, DerivationKind, DerivationMatch, DerivationReport, analyze_derivation,
42    analyze_derivation_partition,
43};
44pub use error::RowError;
45pub use family::{RowAlias, RowFamilySet};
46pub use interval::OrderedIntervalString;
47pub use invariance::{SegmentInvariant, analyze_invariance};
48pub use label::{RowLabel, RowLabelConvention};
49pub use matrix::{
50    MatrixCoordinate, ROW_MATRIX_SIZE, RowMatrix, RowMatrixCell, RowMatrixEdgeLabels,
51};
52pub use mosaic::{MosaicBlock, MosaicReport, analyze_mosaic};
53pub use multiply::{BlockProductReservoir, multiply_partitions};
54pub use operation::{RowFamily, RowOperation};
55pub use partition::{
56    AggregateCoverageReport, BlockOrder, InterlockingPartitionReport, OrderKind,
57    PartitionBlockMatch, PartitionSimilarityReport, RowPartition, RowPartitionBlock,
58    analyze_aggregate_coverage, analyze_interlocking_partitions,
59    analyze_partition_aggregate_coverage, analyze_partition_similarity, try_partition,
60};
61pub use render::RowMatrixData;
62pub use reservoir::{
63    BlockProjection, BlockProjectionSource, InvariantDelta, OrderedPitchBlock, PitchInvariant,
64    PitchReservoir,
65};
66pub use row::{RowForm, ToneRow};
67pub use segment::{RowSegment, RowSegmentSource};
68pub use vertical::{VerticalCollection, VerticalSlice, verticalize};
69
70/// Cookbook recipes for this lib, embedded at build time.
71pub static RECIPES: sim_cookbook::EmbeddedDir =
72    include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));