Hello everyone. I just wanted to show everyone my latest project. I “accidentally” made tunes while working on a game I’ve been building. It started out as a basic audio synthesis engine so I could make my own sounds. I realized I’d also want to make music for the game... and then I really wanted to make algorithmic music and the next thing you know...
https://crates.io/crates/tunes
There’s a lot you can do with tunes. Here’s a quick overview:
Music Theory: Scales, chords, patterns, progressions, and transposition
Composition DSL: Fluent API for building musical sequences
Sections & Arrangements: Create reusable sections (verse, chorus, bridge) and arrange them
Synthesis: FM synthesis, Granular synthesis, filter…
Hello everyone. I just wanted to show everyone my latest project. I “accidentally” made tunes while working on a game I’ve been building. It started out as a basic audio synthesis engine so I could make my own sounds. I realized I’d also want to make music for the game... and then I really wanted to make algorithmic music and the next thing you know...
https://crates.io/crates/tunes
There’s a lot you can do with tunes. Here’s a quick overview:
Music Theory: Scales, chords, patterns, progressions, and transposition
Composition DSL: Fluent API for building musical sequences
Sections & Arrangements: Create reusable sections (verse, chorus, bridge) and arrange them
Synthesis: FM synthesis, Granular synthesis, filter envelopes, wavetable oscillators
Sample Playback: Load and play WAV files with pitch shifting
Rhythm & Drums: Drum grids, euclidean rhythms, 808-style synthesis, and pattern sequencing
Instruments: 100+ Pre-configured synthesizers, bass, pads, leads, guitars, percussion, brass, strings, woodwinds and more
Effects, Automation and Filters: Delay, reverb, distortion, chorus, modulation, tremolo, autopan, gate, limiter, compressor, bitcrusher, eq, phaser, flanger, saturation, filters
Musical Patterns: Arpeggios, ornaments, tuplets, classical techniques
Algorithmic Sequences: Primes, Fib, 2^x, Markov, L-map, Collatz, Euclidean, Golden ratio, random/bounded walks, Thue-Morse, Recamán’s, Van der Corput, L-System, Cantor, Shepherd, Cellular Automaton, and many more
Tempo & Timing: Tempo changes, time signatures (3/4, 5/4, 7/8, etc.), key signatures with modal support
Key Signatures & Modes: Major, minor, and all 7 Greek modes (Dorian, Phrygian, Lydian, etc.)
Real-time Playback: Cross-platform audio output via cpal
Audio Export: WAV (uncompressed), FLAC (lossless ~50-60% compression), STEM export
MIDI Import/Export: Import Standard MIDI Files and export compositions to MIDI with proper metadata
Sample Import: Load and manipulate WAV samples
Live Coding: Hot-reload system - edit code and hear changes instantly
Anyways, tunes isn’t done yet. I plan to continue adding features and working on it as a main project. I’ve had tons of fun and learned a lot while working on it. There were absolutely some struggles involved and it’s not perfect but I think it’s serviceable enough to share.
What I’m really interested in is you guys; what will you make with tunes? I’m excited to see what people make with it and I can’t wait to hear your pieces. Good luck everyone!