# Changelog All notable changes to this project will be documented in this file. ## [0.0.8] - 2026-06-05 ### Improved - Sample library browser: search now shows folder names only (no files) while typing, sorted by fuzzy match score. After confirming search with Enter, folders can be expanded and collapsed normally. Esc clears the search filter before closing the panel. Left arrow on a file collapses the parent folder. Cursor and scroll position stay valid after expand/collapse operations. - RAM optimizations saving ~5 MB at startup plus smaller enums and fewer hot-path allocations: - Removed dead `Step::command` field (~3.1 MB) - Narrowed `Step::source` from `Option` to `Option` (~1.8 MB) - `Op::SetParam` and `Op::GetContext` now use `&'static str` instead of `String` - `SourceSpan` fields narrowed from `usize` to `u32` - Dirty pattern tracking uses fixed `[[bool; 32]; 32]` array instead of `HashSet` - Boxed `FileBrowserState` in `Modal` enum to shrink all variants - `StepContext::cc_access` borrows instead of cloning `Arc` - Removed unnecessary `Arc` wrapper from `Stack` type - Variable key cache computes on-demand with reusable buffers instead of pre-allocating 2048 Strings ### Changed - Header bar is now always 3 lines tall with vertically centered content and full-height background colors, replacing the previous 1-or-2-line width-dependent layout. - Help view Welcome page: BigText title is now gated behind `cfg(not(feature = "desktop"))`, falling back to a plain text title in the desktop build (same strategy as the splash screen). - Space now toggles play/pause on all views, including the Patterns page where it previously toggled pattern play. Pattern play on the Patterns page is now bound to `p`. ## [0.0.7] - 2026-05-02 ### Added - 3-operator FM synthesis words: `fm2` (operator 2 depth), `fm2h` (operator 2 harmonic ratio), `fmalgo` (algorithm: 0=cascade, 1=parallel, 2=branch), `fmfb` (feedback amount). Extends the existing 2-OP FM engine to a full 3-OP architecture with configurable routing and operator feedback. - Background head-preload for sample libraries. At startup, a background thread decodes the first 4096 frames (~93ms) of every sample into RAM. Short samples (most percussion/drums) are fully captured and play instantly on first trigger. Eliminates first-hit misses for live performance. - Most changes are on doux side. It makes sense to recompile and release now to ship a version that comes with these improvements. ### Fixed - Code editor now scrolls vertically to keep the cursor visible. Previously, lines beyond the visible area were clipped and the cursor could move off-screen. ## [0.0.6] - 2026-05-02 ### 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. - Euclidean rhythm words: `euclid` (k n -- hits) distributes k hits across n steps, `euclidrot` (k n r -- hits) adds rotation offset. - Shorthand float syntax: `.25` parses as `0.25`, `-.5` parses as `-0.5`. ### 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] - 2026-04-02 ### 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