# Changelog All notable changes to this project will be documented in this file. ## [0.0.6] - Unreleased ### Added - TachyonFX based animations - Prelude: project-level Forth script for persistent word definitions. Press `d` to edit, `D` to re-evaluate. Runs automatically on playback start and project load. - Varargs stack words: `rev`, `shuffle`, `sort` (ascending), `rsort` (descending), `sum`, `prod`. All take a count and operate on the top n items. ### Changed - Split `words.rs` (3,078 lines) into a `words/` directory module with category-based files: `core.rs`, `sound.rs`, `effects.rs`, `sequencing.rs`, `music.rs`, `midi.rs`, plus `compile.rs` and `mod.rs`. - Renamed `tri` Forth word to `triangle`. - Sequencer rewritten with prospective lookahead scheduling. Instead of sleeping until a substep, waking late, and detecting past events, the sequencer now pre-computes all events within a ~20ms forward window. Events arrive at doux with positive time deltas, scheduled before they need to fire. Sleep+spin-wait replaced by `recv_timeout(3ms)` on the command channel. Timing no longer depends on OS sleep precision. - `audio_sample_pos` updated at buffer start instead of end, so `engine_time` reflects current playback position. - Doux grace period increased from 1ms to 50ms as a safety net (events should never be late with lookahead). - Flattened model re-export indirection; `script.rs` now exports only `ScriptEngine`. - Hue rotation step size increased from 1° to 5° for faster adjustment. - Moved catalog data (DOCS, CATEGORIES) from views to `src/model/`, eliminating state-to-view layer inversion. - Extracted shared initialization into `src/init.rs`, deduplicating ~140 lines between terminal and desktop binaries. - Split App dispatch into focused service modules (`help_nav`, `dict_nav`, `euclidean`, `clipboard`, extended `pattern_editor`), reducing `app.rs` by ~310 lines. - Moved stack preview computation from render path to input time, making editor rendering pure. - Decoupled script runtime state between UI and sequencer threads, eliminating shared mutexes on the RT path. ### Fixed - Prelude content no longer leaks into step editor. Closing the prelude editor now restores the current step's content to the buffer. - Desktop binary now loads color theme and connects MIDI devices on startup (was missing). - Audio commands no longer silently dropped when channel is full; switched to unbounded channel matching MIDI dispatch pattern. - PatternProps and EuclideanDistribution modals now use the global theme background instead of the terminal default. - Changing pattern properties is now a stage/commit operation. - Changing pattern speed only happens at pattern boundaries. - `mlockall` warning no longer appears on macOS; memory locking is now Linux-only. - `clear` now resets `at` deltas, so subsequent emits default to a single emit at position 0. ## [0.0.5] - Unreleased ### Added - Mute/solo for patterns: stage with `m`/`x`, commit with `c`. Solo mutes all other patterns. Clear with `M`/`X`. - Lookahead scheduling: scripts are pre-evaluated ahead of time and audio commands are scheduled at precise beat positions, improving timing accuracy under CPU load. - Realtime thread scheduling (`SCHED_FIFO`) for sequencer thread on Unix systems, improving timing reliability. - Deep into the Linux hellscape: trying to get reliable performance, better stability, etc. ### Fixed - Editor completion popup no longer steals arrow keys. Arrow keys always move the cursor; use Ctrl+N/Ctrl+P to navigate the completion list. ## [0.0.4] - 2026-02-02 ### Added - Double-stack words: `2dup`, `2drop`, `2swap`, `2over`. - `forget` word to remove user-defined words from the dictionary. - Active patterns panel showing playing patterns with bank, pattern, iteration count, and step position. - Configurable visualization layout (Top/Bottom/Left/Right) for scope and spectrum placement. - Euclidean distribution modal to spread a step's script across the pattern using Euclidean rhythms. - Fairyfloss theme (pastel candy colors by sailorhg). - Hot Dog Stand theme (classic Windows 3.1 red/yellow). - Hue rotation option in Options menu to shift all theme colors (0-360°). ### Changed - Title view now adapts to smaller terminal sizes gracefully. ### Fixed - Scope/spectrum ratio asymmetry in Left/Right layout modes. - Updated `cpal` dependency from 0.15 to 0.17 to fix type mismatch with `doux` audio backend. - Copy/paste (Ctrl+C/V/X) not working in desktop version due to egui intercepting clipboard shortcuts. ## [0.0.3] - 2026-02-02 ### Added - Polyphonic parameters: param words (`note`, `freq`, `gain`, etc.) and sound words now consume the entire stack, enabling polyphony (e.g., `60 64 67 note sine s .` emits 3 voices). - New random distribution words: `exprand` (exponential) and `logrand` (logarithmic). - Music theory chord words: `maj`, `m`, `dim`, `aug`, `sus2`, `sus4`, `maj7`, `min7`, `dom7`, `dim7`, `m7b5`, `minmaj7`, `aug7`, `maj6`, `min6`, `dom9`, `maj9`, `min9`, `dom11`, `min11`, `dom13`, `add9`, `add11`, `madd9`, `dom7b9`, `dom7s9`, `dom7b5`, `dom7s5`. - Playing patterns are now saved with the project and restored on load. ### Changed - `at` now consumes the entire stack for time offsets; polyphony multiplies with deltas (2 notes × 2 times = 4 voices). - Iterator (`iter`) now resets when a pattern restarts. - Project loading now properly resets state: stops all patterns, clears user variables/dictionary, and clears queued changes. ### Removed - `tcycle` word (replaced by polyphonic parameter behavior). ## [0.0.2] - 2026-02-01 - CI testing and codebase cleanup ## [0.0.1] - Initial Release - CI testing