1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
//! A library to easily explore music theory principles.
//!
//! # Examples
//!
//! ```
//! use klib::core::chord::*;
//! use klib::core::known_chord::KnownChord;
//! use klib::core::modifier::Degree;
//! use klib::core::note::*;
//!
//! // Check to see what _kind_ of chord this is.
//! assert_eq!(
//! Chord::new(C).augmented().seven().known_chord(),
//! KnownChord::AugmentedDominant(Degree::Seven)
//! );
//! ```
//!
//! ```
//! use klib::core::base::Parsable;
//! use klib::core::chord::*;
//! use klib::core::note::*;
//!
//! // Parse a chord from a string, and inspect the scale.
//! assert_eq!(
//! Chord::parse("Cm7b5").unwrap().scale(),
//! vec![C, D, EFlat, F, GFlat, AFlat, BFlat]
//! );
//! ```
//!
//! ```
//! use klib::core::chord::*;
//! use klib::core::note::*;
//!
//! // From a note, create a chord, and look at the chord tones.
//! assert_eq!(
//! C.into_chord().augmented().major7().chord(),
//! vec![C, E, GSharp, B]
//! );
//! ```
#![warn(rustdoc::broken_intra_doc_links, rust_2018_idioms, clippy::all, missing_docs)]
#![allow(incomplete_features)]
#![allow(clippy::needless_range_loop)]
#![feature(adt_const_params)]
#![feature(generic_const_exprs)]
#![feature(specialization)]
#![feature(concat_idents)]
#![feature(iter_advance_by)]
#![feature(int_roundings)]
#![feature(coverage_attribute)]
pub mod core;
pub mod helpers;
#[cfg(feature = "analyze_base")]
pub mod analyze;
#[cfg(feature = "ml_base")]
pub mod ml;
#[cfg(feature = "wasm")]
pub mod wasm;
#[cfg(feature = "analyze_base")]
pub use rodio;