Crate tunes

Crate tunes 

Source
Expand description

§tunes

A comprehensive music composition, synthesis, and audio generation library.

§Quick Start

use tunes::prelude::*;

fn main() -> anyhow::Result<()> {
    let engine = AudioEngine::new()?;
    let mut comp = Composition::new(Tempo::new(120.0));

    comp.track("piano")
        .note(&[C4], 0.5)
        .note(&[E4], 0.5)
        .note(&[G4], 0.5)
        .note(&[C5], 0.5);

    engine.play_mixer(&comp.into_mixer())?;
    Ok(())
}

Modules§

audio
Real-time audio input and recording
cache
Smart caching system for pre-rendered synthesis
composition
consts
Musical constants: notes, scales, and chords
engine
error
Error types for the tunes library
instruments
Instrument presets organized by category
live_coding
Live coding support for tunes
midi
MIDI support for Tunes
prelude
Prelude module for convenient imports
sequences
Mathematical sequence generators for algorithmic music
synthesis
Advanced synthesis techniques and modulation
templates
theory
Music theory: scales, chords, progressions, microtonal systems, and key signatures
track
Audio track and event system

Macros§

play_sample
Play a sample with consistent path resolution

Structs§

RegisteredSample
Registered sample for startup validation

Functions§

validate_all_samples
Validate all registered samples exist at startup