$ show meel-hd/lofi-engine
This is a feature-rich desktop application built with Tauri v2 and Svelte v3 that generates procedural lo-fi music in real-time using Tone.js. It offers a complete music creation experience with chord progression generation, drum sequencing, and ambient sound effects (rain, thunder, jungle, campfire). Beyond audio, it includes productivity tools like a Pomodoro timer, focus task management, and a system tray with mini-player mode. The application is local-first, storing user preferences (volumes, backgrounds, locale) in browser storage and custom background images in IndexedDB. It supports 7 languages and provides extensive keyboard shortcuts. The architecture is monolithic with a Rust backend handling native window management (custom title bar, mini-mode, tray) and a Svelte frontend managing the audio engine and UI state. The audio engine is particularly well-crafted, implementing music theory concepts (scales, intervals, chord weights) programmatically.
The LLM identified 3 files worth highlighting for reuse:
Defines interval weights for chord quality selection (major, minor, diminished, augmented) using intervals from the chromatic scale. This self-contained module could be reused as the core of any procedural harmony generator, with no dependencies on other engine modules. It demonstrates non-obvious skill in translating music theory into computational weights for randomized but musically coherent chord selection.
A minimal, promisified wrapper around IndexedDB that provides async get, set, remove, and keys operations. It handles database opening, versioning, and object store creation. This is a reusable data persistence pattern that can be extracted into any web or desktop project requiring offline storage, with no framework dependencies.
Defines the 12 major and 12 minor musical keys with their associated interval patterns and accidentals. This is a pure data module (no Tone.js or app imports) that can be reused in any music application to map between key names, scale degrees, and MIDI note offsets. It demonstrates clean data modeling of a complex domain.