From f831be3687718be91a09eb19a39a38bf3bf15b75 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 01:26:45 +0000 Subject: [PATCH 1/4] Initial plan From 5f6f1d7ff8d780bed3eac5d3a53a81592b98f9c5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 01:38:06 +0000 Subject: [PATCH 2/4] docs: Add comprehensive README, KNOWN_ISSUES, TODO, and BUILD_SETUP documentation Co-authored-by: micahcooley <158981228+micahcooley@users.noreply.github.com> --- KNOWN_ISSUES.md | 456 +++++++++++++++++++++++++++ README.md | 435 +++++++++++++++++++++++++- README_OLD.md | 441 ++++++++++++++++++++++++++ TODO.md | 590 +++++++++++++++++++++++++++++++++++ docs/BUILD_SETUP.md | 735 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 2640 insertions(+), 17 deletions(-) create mode 100644 KNOWN_ISSUES.md create mode 100644 README_OLD.md create mode 100644 TODO.md create mode 100644 docs/BUILD_SETUP.md diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md new file mode 100644 index 0000000..58a2238 --- /dev/null +++ b/KNOWN_ISSUES.md @@ -0,0 +1,456 @@ +# Known Issues & Limitations + +This document tracks known bugs, limitations, and areas requiring improvement across all Wingman components. + +**Last Updated**: January 2026 +**Status**: Living document - updated as issues are discovered/resolved + +--- + +## ๐Ÿ”ด Critical Issues + +### 1. VST3 Plugin Detection Failures + +**Component**: VST3 Plugin (WebView2) +**Platforms**: Windows (primarily), macOS +**Severity**: High + +**Description**: Plugin may not appear in DAW's plugin list after installation. + +**Root Causes**: +- DAW caching of plugin scan results +- `moduleinfo.json` formatting errors (trailing commas) +- WebView2 DLL loading failures +- Incorrect bundle structure + +**Workarounds**: +```bash +# Windows - Clear Ableton cache +rd /s /q "%APPDATA%\Ableton\Live X.X\Preferences\Plugin" + +# Windows - Re-scan manually +# In Ableton: Preferences โ†’ Plug-ins โ†’ Rescan + +# macOS - Clear plugin cache +rm -rf ~/Library/Caches/AudioUnitCache +killall -9 AudioComponentRegistrar +``` + +**Permanent Fix**: Post-build script automatically fixes `moduleinfo.json` (implemented in CMakeLists.txt) + +**Status**: Partially resolved - manual cache clearing still required sometimes + +--- + +### 2. WebView2 Runtime Crashes + +**Component**: VST3 Plugin (WebView2) +**Platforms**: Windows only +**Severity**: High + +**Description**: Plugin crashes when loading complex UI interactions or on startup. + +**Root Causes**: +- WebView2 not properly initialized before UI operations +- Race conditions in CEF thread vs. audio thread +- Memory leaks in WebView2Handler.cpp +- Invalid scheme handler registration timing + +**Symptoms**: +- DAW crashes when opening plugin editor +- Intermittent "Failed to create WebView2 environment" errors +- White screen in plugin window + +**Workarounds**: +- Ensure WebView2 Runtime is installed (latest evergreen version) +- Disable plugin in DAW, restart DAW, re-enable plugin +- Check Windows Event Viewer for specific error codes + +**Status**: Under investigation - requires deeper WebView2 integration research + +--- + +### 3. UDP Packet Loss / Desync + +**Component**: Remote Script, Standalone App +**Platforms**: All +**Severity**: Medium-High + +**Description**: State desynchronization between Ableton and Wingman app due to dropped UDP packets. + +**Root Causes**: +- UDP is unreliable (no guaranteed delivery) +- No acknowledgment/retry mechanism +- Large messages may exceed MTU +- Network congestion (even on localhost) + +**Symptoms**: +- Tempo changes not reflected in app +- Track list becomes stale +- Commands sent but not executed + +**Workarounds**: +- Manual refresh (restart app or Remote Script) +- Future: Switch to TCP/WebSocket for reliability + +**Status**: Architectural limitation - requires protocol change + +--- + +### 4. Cross-Platform Support Incomplete + +**Component**: All +**Platforms**: macOS, Linux +**Severity**: Medium + +**Description**: Many features only fully tested on Windows. + +**Known Platform Issues**: + +| Feature | Windows | macOS | Linux | +|---------|---------|-------|-------| +| Electron App | โœ… Full | ๐ŸŸก Partial | ๐ŸŸ  Limited | +| VST3 Plugin | โœ… Working | ๐ŸŸก Untested | โŒ No JUCE build | +| Remote Script | โœ… Full | ๐ŸŸก Partial | โŒ N/A | +| Installers | โœ… Full | ๐ŸŸก Partial | ๐ŸŸ  Basic | + +**macOS-Specific Issues**: +- Accessibility permissions required (not well documented) +- Remote Script paths differ (`~/Music/Ableton/...`) +- Code signing/notarization not configured + +**Linux-Specific Issues**: +- No Ableton Live support (Remote Script N/A) +- Electron app works but untested +- wmctrl/xdotool dependencies not auto-installed + +**Status**: Low priority - Windows primary target for v1.0 + +--- + +## ๐ŸŸ  High Priority Issues + +### 5. React UI Not Loading in VST3 + +**Component**: VST3 Plugin +**Severity**: High + +**Description**: Plugin editor window opens but shows blank/white screen instead of React UI. + +**Causes**: +- `dist/` folder not copied to plugin bundle +- WebView2 scheme handler not registered correctly +- Resource paths incorrect in WebView2Handler.cpp +- CORS policy blocking local file access + +**Debug Steps**: +``` +1. Check: build/Wingman_artefacts/Release/VST3/Wingman.vst3/Contents/Resources/webui/ + - Should contain index.html, main.js, styles.css +2. Check Ableton Log.txt for WebView2 errors +3. Verify scheme handler registered BEFORE WebView2 init +``` + +**Status**: Intermittent - works on some systems, not others + +--- + +### 6. API Key Security Issues + +**Component**: Standalone App, React UI +**Severity**: High (Security) + +**Description**: API keys stored in plaintext `.env` files and potentially exposed in client-side code. + +**Risks**: +- Keys visible in environment variables +- Keys may be bundled in Electron app +- No encryption at rest + +**Recommendations**: +- Use OS keychain (Keytar library) +- Encrypt .env files +- Never bundle keys in production builds +- Add .env to .gitignore (already done) + +**Status**: Mitigation in place (.gitignore), full solution pending + +--- + +### 7. Memory Leaks in Long Sessions + +**Component**: All +**Severity**: Medium-High + +**Description**: Memory usage grows over time, especially with repeated MIDI generation. + +**Observed**: +- Electron app: 200MB โ†’ 800MB after 2 hours +- VST3 plugin: 150MB โ†’ 400MB during session +- Remote Script: Minimal (Python GC handles most) + +**Likely Causes**: +- React components not properly unmounting +- Event listeners not cleaned up +- Magenta.js model caching +- Audio buffers not released + +**Workarounds**: +- Restart app periodically +- Close/reopen plugin editor window + +**Status**: Profiling needed to identify specific leaks + +--- + +## ๐ŸŸก Medium Priority Issues + +### 8. Magenta.js Model Download Delays + +**Component**: Standalone App +**Severity**: Medium + +**Description**: First-time app launch requires 2-5 minutes to download Magenta models from Google servers. + +**Issues**: +- No progress indicator +- App appears frozen +- Fails silently if no internet +- Models re-download after clearing cache + +**Workarounds**: +- Pre-bundle models in installer (increases size by ~50MB) +- Show loading screen with progress bar +- Graceful fallback to simpler generation + +**Status**: UX issue - functionality works, just poor experience + +--- + +### 9. MIDI Export Timing Issues + +**Component**: Standalone App, React UI +**Severity**: Medium + +**Description**: Exported MIDI files have incorrect timing/tempo compared to what was generated. + +**Symptoms**: +- Notes play faster/slower than expected +- Triplets become straight sixteenths +- Swing feel lost + +**Causes**: +- MIDI ticks per quarter note (TPQN) mismatch +- Tempo metadata not written correctly +- Magenta output assumes 120 BPM + +**Status**: Calculation error in MIDI export service + +--- + +### 10. No Undo/Redo in Piano Roll + +**Component**: React UI (Piano Roll) +**Severity**: Medium + +**Description**: Editing MIDI notes in piano roll has no undo functionality. + +**Impact**: Mistakes are permanent, users frustrated + +**Workarounds**: Regenerate pattern from scratch + +**Status**: Feature not implemented yet + +--- + +## ๐ŸŸข Low Priority / Cosmetic Issues + +### 11. Dark Mode Not Consistent + +**Component**: Electron App UI +**Severity**: Low + +Some components don't respect dark mode setting, mixing light/dark elements. + +**Status**: UI polish task + +--- + +### 12. Console Warnings/Errors + +**Component**: All JavaScript/TypeScript +**Severity**: Low + +Many harmless warnings in browser console: +- React key prop warnings +- Deprecated API usage warnings +- ESLint violations + +**Status**: Code cleanup needed but non-blocking + +--- + +### 13. Documentation Incomplete + +**Component**: Documentation +**Severity**: Low-Medium + +Many features lack documentation: +- Advanced Remote Script commands +- Max for Live integration (not implemented) +- Plugin customization options + +**Status**: Ongoing improvement (this PR helps!) + +--- + +### 14. No Automated Tests + +**Component**: All +**Severity**: Low-Medium + +**Description**: Project has minimal test coverage. + +**Current State**: +- No unit tests for services +- No integration tests +- No E2E tests +- Manual testing only + +**Impact**: Regressions slip through, bugs discovered late + +**Status**: Technical debt - tests needed before v1.0 + +--- + +## ๐Ÿ”ต Limitations (By Design) + +### 15. Ableton Live Only + +**Component**: Remote Script +**Status**: By design (currently) + +Remote Script is Ableton-specific using Live Object Model (LOM) API. Supporting other DAWs requires separate implementations. + +**Future**: Generic MIDI/OSC control for other DAWs planned for v2.0 + +--- + +### 16. Windows-First Development + +**Component**: All +**Status**: By design (currently) + +Primary development on Windows, macOS/Linux secondary. + +**Rationale**: Majority of music producers use Windows, limited dev resources + +--- + +### 17. Python 3.8+ Required for Remote Script + +**Component**: Remote Script +**Status**: Limitation of Ableton Live 11+ + +Ableton Live 11+ uses Python 3, Live 10 uses Python 2.7. Cannot support both easily. + +**Decision**: Target Live 11+ only + +--- + +### 18. No Real-Time Audio Processing + +**Component**: VST3 Plugin, Standalone App +**Status**: By design (currently) + +Wingman focuses on control/generation, not audio effects processing. + +**Rationale**: Avoid complexity of real-time audio DSP, focus on AI features + +--- + +## ๐Ÿ“Š Issue Tracking + +### By Component + +| Component | Critical | High | Medium | Low | Total | +|-----------|----------|------|--------|-----|-------| +| VST3 Plugin | 2 | 1 | 0 | 1 | 4 | +| Standalone App | 0 | 2 | 3 | 2 | 7 | +| Remote Script | 1 | 0 | 0 | 0 | 1 | +| All/Infrastructure | 1 | 0 | 1 | 3 | 5 | +| **Total** | **4** | **3** | **4** | **6** | **17** | + +### By Platform + +| Platform | Critical | High | Medium | Low | Total | +|----------|----------|------|--------|-----|-------| +| Windows | 2 | 3 | 2 | 4 | 11 | +| macOS | 1 | 1 | 1 | 2 | 5 | +| Linux | 1 | 0 | 0 | 1 | 2 | +| All Platforms | 0 | 1 | 1 | 0 | 2 | + +--- + +## ๐Ÿ› ๏ธ Reporting New Issues + +### Before Reporting + +1. Check this document - issue may be already known +2. Check GitHub Issues - may already be reported +3. Try documented workarounds +4. Gather debug information + +### What to Include + +- **Component**: Which part of Wingman (app, plugin, script)? +- **Platform**: Windows/macOS/Linux, version +- **Steps to reproduce**: Exact actions taken +- **Expected behavior**: What should happen +- **Actual behavior**: What actually happens +- **Logs**: Relevant error messages +- **Screenshots**: If UI-related + +### Where to Report + +- **GitHub Issues**: https://github.com/micahcooley/wingman/issues +- **Label appropriately**: `bug`, `enhancement`, `question`, etc. + +--- + +## ๐Ÿ“ˆ Issue Resolution Priority + +1. **Critical**: Prevents core functionality, crashes, data loss +2. **High**: Major features broken, poor user experience +3. **Medium**: Minor features affected, workarounds available +4. **Low**: Cosmetic, edge cases, nice-to-have + +--- + +## โœ… Recently Fixed Issues + +### Fixed in Recent Commits + +1. โœ… **moduleinfo.json Trailing Commas** - Automated fix in CMake +2. โœ… **React UI Build Not Running** - Pre-build hook added +3. โœ… **Missing WebView2 DLLs** - Added to CMake copy commands +4. โœ… **Scheme Handler Timing** - Moved registration before init + +### Track History + +See `git log` for detailed fix history and related commits. + +--- + +## ๐Ÿ“ž Need Help? + +If you encounter an issue not listed here: + +1. **Search existing issues**: https://github.com/micahcooley/wingman/issues +2. **Check documentation**: [docs/](docs/), component READMEs +3. **Ask in Discussions**: GitHub Discussions for questions +4. **File a bug report**: With full details as above + +--- + +**This document is maintained by the Wingman development team and community contributors.** diff --git a/README.md b/README.md index 59465f9..1db84c9 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,434 @@ -Wingman (INCOMPLETE / UNFINISHED) +# ๐ŸŽต Wingman - AI Music Production Assistant -Wingman was an attempt at building a JUCE-based plugin using the Chromium Embedded Framework (CEF) to allow AI-powered control of DAWs like Ableton Live. The goal was to create a TypeScript-based interface to facilitate advanced AI integration within music production environments. +> **AI-powered music production assistant providing deep DAW control through a standalone Electron app and Ableton Live Remote Script** -Status +[![Status](https://img.shields.io/badge/status-in%20development-yellow)](https://github.com/micahcooley/wingman) +[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)](#supported-platforms) +[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE) -This project is incomplete and no longer actively maintained. +--- -Development was discontinued after hitting significant roadblocks, including: +## ๐Ÿ“‹ Table of Contents -โ€ข API Integration Limitations: Achieving deep control over DAWs like Ableton proved far more restrictive than anticipated, especially from a plugin context. +- [Overview](#overview) +- [Quick Start](#quick-start) +- [Architecture](#architecture) +- [Project Structure](#project-structure) +- [Build & Setup](#build--setup) +- [Features](#features) +- [Documentation](#documentation) +- [Known Issues](#known-issues) +- [Contributing](#contributing) -โ€ข Technical Complexity: Integrating CEF and achieving solid interoperation between TypeScript/Node, C++, and plugin frameworks introduced persistent issues and instability. +--- -โ€ข Shifted Focus: Most intended AI/automation features are now being explored in a standalone DAW project where thereโ€™s more flexibility. +## ๐ŸŽฏ Overview -Whatโ€™s Here +Wingman is an ambitious project to bring AI-powered assistance to music production workflows. The project has evolved through multiple architectural iterations and currently consists of several components: -โ€ข Early-stage TypeScript-based codebase for plugin logic and UI. +### Current Architecture -โ€ข Experimental approaches to DAW/plugin communication and AI hooks. +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Wingman Standalone App โ”‚ โ† Primary focus (Electron + React) +โ”‚ - AI Chat Interface โ”‚ +โ”‚ - MIDI Generation โ”‚ +โ”‚ - Magenta.js Integration โ”‚ +โ”‚ - WebSocket/UDP Servers โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ†• WebSocket/UDP + โ”‚ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Remote Script (Python) โ”‚ โ† Ableton Live integration +โ”‚ - Live Object Model API โ”‚ +โ”‚ - Track/Clip Control โ”‚ +โ”‚ - Real-time Observers โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` -โ€ข Bugs and incomplete features remainโ€”this is not production-ready. +### Legacy Components (Experimental) -Why Share This? +- **WebView2 VST3 Plugin**: Early JUCE-based plugin with embedded web UI (partially working) +- **Bridge VST3**: Minimal plugin for DAW state communication (planned) +- **Max for Live Devices**: Audio analysis and advanced features (future) -While incomplete, this repository may still be useful as: +### Project Status -โ€ข Reference or starting point for others attempting similar integration. +โš ๏ธ **This project is actively developed but not production-ready** -โ€ข Documentation of the technical challenges encountered when bridging modern web tech (TypeScript/CEF) with legacy plugin architectures. +| Component | Status | Notes | +|-----------|--------|-------| +| Standalone Electron App | ๐ŸŸก Active Development | Core AI/MIDI features working | +| Remote Script | ๐ŸŸก Basic Implementation | Transport control functional | +| VST3 Plugin (WebView2) | ๐ŸŸ  Experimental | Loads but UI integration incomplete | +| Max for Live | ๐Ÿ”ด Planned | Future phase | -โ€ข Illustrative early attempts at embedding AI into digital audio workflows. +--- + +## ๐Ÿš€ Quick Start + +### Prerequisites + +- **Node.js**: v18+ LTS ([download](https://nodejs.org/)) +- **Python**: 3.8+ for Ableton Remote Script ([download](https://www.python.org/)) +- **Ableton Live**: 11+ (for DAW integration, optional) +- **Windows**: WebView2 Runtime ([download](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)) + +### 30-Second Test (Standalone App) + +```bash +# 1. Clone the repository +git clone https://github.com/micahcooley/wingman.git +cd wingman/wingman-app + +# 2. Install dependencies +npm install + +# 3. Set up API keys (optional for testing) +# Copy .env.example to .env and add your OpenAI key + +# 4. Start the app +npm start +``` + +The app should launch with a chat interface. Try typing: `"Generate trap drums"` + +### Full Setup (with DAW Control) + +See [docs/BUILD_SETUP.md](docs/BUILD_SETUP.md) for complete installation instructions including Ableton integration. + +--- + +## ๐Ÿ—๏ธ Architecture + +### Component Overview + +Wingman uses a **modular, loosely-coupled architecture** to separate concerns: + +1. **Standalone App (Electron)** - Main user interface + - React + TypeScript UI + - AI service integrations (OpenAI, Anthropic, Perplexity) + - Magenta.js for music generation + - WebSocket/UDP servers for DAW communication + +2. **Remote Script (Python)** - Ableton Live control + - Uses Live Object Model (LOM) API + - Bidirectional communication via WebSocket/UDP + - Real-time observer pattern for state sync + +3. **VST3 Plugin (Legacy)** - Embedded web UI (experimental) + - JUCE framework + WebView2 + - React UI bundled as resources + - Proof-of-concept for plugin-based approach + +### Communication Protocols + +- **WebSocket** (port 8123): Max for Live โ†” Standalone App +- **UDP** (ports 11000/11001): Remote Script โ†” Standalone App +- **UDP** (ports 12000/12001): Bridge VST3 โ†” Standalone App (future) + +For detailed architecture documentation, see [CLAUDE.md](CLAUDE.md). + +--- + +## ๐Ÿ“ Project Structure + +``` +wingman/ +โ”œโ”€โ”€ wingman-app/ # Main Electron application +โ”‚ โ”œโ”€โ”€ src/ +โ”‚ โ”‚ โ”œโ”€โ”€ main/ # Electron main process +โ”‚ โ”‚ โ”œโ”€โ”€ components/ # React UI components +โ”‚ โ”‚ โ”œโ”€โ”€ services/ # AI, MIDI, WebSocket services +โ”‚ โ”‚ โ””โ”€โ”€ hooks/ # React hooks +โ”‚ โ”œโ”€โ”€ public/ # Static assets +โ”‚ โ””โ”€โ”€ package.json # App dependencies +โ”‚ +โ”œโ”€โ”€ remote-script/ # Ableton Live Remote Script +โ”‚ โ””โ”€โ”€ WingmanControl/ # Python control surface +โ”‚ โ”œโ”€โ”€ __init__.py # Entry point +โ”‚ โ””โ”€โ”€ *.py # LOM integration +โ”‚ +โ”œโ”€โ”€ actual ui/ # React UI (original development) +โ”‚ โ””โ”€โ”€ vocal-muse-sidecar-main/ +โ”‚ โ””โ”€โ”€ src/ # TypeScript React components +โ”‚ +โ”œโ”€โ”€ Source/ # VST3 Plugin (C++/JUCE) +โ”‚ โ”œโ”€โ”€ PluginProcessor.* # Audio processing +โ”‚ โ”œโ”€โ”€ PluginEditor.* # UI management +โ”‚ โ”œโ”€โ”€ WebView2Handler.* # Web UI integration +โ”‚ โ””โ”€โ”€ *.cpp/h # Supporting code +โ”‚ +โ”œโ”€โ”€ installers/ # Platform-specific installers +โ”‚ โ”œโ”€โ”€ windows/ # NSIS installer scripts +โ”‚ โ”œโ”€โ”€ macos/ # DMG configuration +โ”‚ โ”œโ”€โ”€ linux/ # AppImage/DEB/RPM +โ”‚ โ””โ”€โ”€ shared/ # Cross-platform scripts +โ”‚ +โ”œโ”€โ”€ docs/ # Documentation +โ”œโ”€โ”€ research/ # Technical research +โ”œโ”€โ”€ tests/ # Test files (limited coverage) +โ”œโ”€โ”€ scripts/ # Build/utility scripts +โ”œโ”€โ”€ python-automation/ # OS-level automation +โ”œโ”€โ”€ max-for-live/ # M4L devices (future) +โ””โ”€โ”€ CMakeLists.txt # VST3 build configuration +``` + +### Entry Points + +| Component | Entry Point | Purpose | +|-----------|-------------|---------| +| Electron App | `wingman-app/src/main/index.js` | Main process entry | +| React UI | `wingman-app/src/main.tsx` | Renderer entry | +| Remote Script | `remote-script/WingmanControl/__init__.py` | Ableton integration | +| VST3 Plugin | `Source/PluginProcessor.cpp` | Audio plugin entry | + +--- + +## ๐Ÿ”ง Build & Setup + +### Standalone App + +#### Development Mode +```bash +cd wingman-app +npm install +npm run dev # Vite dev server (hot reload) +# OR +npm start # Run Electron with built UI +``` + +#### Production Build +```bash +cd wingman-app +npm run build # Build React UI +npm run package # Create .exe/.dmg/.AppImage +``` + +Outputs to: `wingman-app/dist-electron/` + +### VST3 Plugin (Experimental) + +**Requirements:** +- CMake 3.22+ +- Visual Studio 2019+ (Windows) or Xcode (macOS) +- JUCE 8.0.9+ (submodule included) +- WebView2 SDK (Windows) + +**Build Steps:** + +```bash +# Windows (PowerShell) +mkdir build +cd build +cmake .. -G "Visual Studio 16 2019" -A x64 +cmake --build . --config Release + +# macOS +mkdir build && cd build +cmake .. -G Xcode +cmake --build . --config Release +``` + +Output: `build/Wingman_artefacts/Release/VST3/Wingman.vst3` + +### Remote Script Installation + +**Automatic (Recommended):** +```bash +cd installers +python install_remote_script.py +``` + +**Manual:** +```bash +# Windows +xcopy "remote-script\WingmanControl" "%USERPROFILE%\Documents\Ableton\User Library\Remote Scripts\WingmanControl\" /E /I /Y + +# macOS +cp -r remote-script/WingmanControl ~/Music/Ableton/User\ Library/Remote\ Scripts/ +``` + +Then enable in Ableton Live: +1. Preferences โ†’ Link/Tempo/MIDI +2. Control Surface โ†’ "WingmanControl" +3. Restart Ableton Live + +--- + +## โœจ Features + +### Currently Working + +โœ… **AI Chat Interface** +- Multiple providers: OpenAI, Anthropic, Perplexity, OpenRouter +- Context-aware music production assistant +- Natural language MIDI generation + +โœ… **MIDI Generation** +- Magenta.js integration (drums, melody, bass) +- Genre-specific patterns (trap, house, jazz, lo-fi) +- Piano roll visualization +- MIDI export + +โœ… **Basic DAW Control** (Remote Script) +- Transport control (play/stop/tempo) +- Track mute/solo/arm +- Scene launching +- Clip triggering + +โœ… **WebSocket/UDP Servers** +- Max for Live integration ready +- Bridge plugin communication ready + +### In Development + +๐ŸŸก **Advanced DAW Control** +- MIDI clip creation +- Device parameter automation +- Full mixer control +- Real-time observers + +๐ŸŸก **VST3 Plugin** +- Embedded web UI working +- Needs better integration testing +- DAW state communication + +### Planned + +๐Ÿ”ด **Max for Live Devices** +- Audio analysis +- Waveform visualization +- Advanced parameter mapping + +๐Ÿ”ด **Multi-DAW Support** +- FL Studio, Logic Pro, etc. +- Generic OSC/MIDI control + +--- + +## ๐Ÿ“š Documentation + +### Essential Reading + +- **[CLAUDE.md](CLAUDE.md)** - Comprehensive technical overview and architecture decisions +- **[START_HERE.md](START_HERE.md)** - AI/Magenta integration quick start +- **[PROJECT_STATUS.md](PROJECT_STATUS.md)** - Current status and milestones + +### Component Documentation + +- **Standalone App**: [wingman-app/README.md](wingman-app/README.md) +- **Remote Script**: [remote-script/README.md](remote-script/README.md) +- **Installers**: [installers/README.md](installers/README.md) + +### Technical Documentation + +- **[docs/](docs/)** - Architecture, API references, guides +- **[research/](research/)** - Technical research documents +- **Phase Reports**: PHASE1-5 verification reports in root directory + +### Build Documentation + +- **Windows**: [installers/windows/README.md](installers/windows/README.md) +- **macOS**: [installers/macos/README.md](installers/macos/README.md) +- **Linux**: [installers/linux/README.md](installers/linux/README.md) + +--- + +## ๐Ÿ› Known Issues + +See [KNOWN_ISSUES.md](KNOWN_ISSUES.md) for a complete list of bugs and limitations. + +### Critical Issues + +1. **VST3 Plugin Detection** - Plugin may not appear in some DAWs (cache issues) +2. **WebView2 Stability** - Occasional crashes with complex UI interactions +3. **Remote Script Reliability** - UDP packet loss can cause desyncs +4. **Cross-Platform** - macOS/Linux support incomplete for some features + +### Workarounds + +Most issues have documented workarounds. Check: +- [TROUBLESHOOTING.md](actual%20ui/vocal-muse-sidecar-main/TROUBLESHOOTING.md) - General troubleshooting +- [TROUBLESHOOTING_API_KEY.md](TROUBLESHOOTING_API_KEY.md) - API key issues +- Component-specific READMEs for targeted fixes + +--- + +## ๐Ÿค Contributing + +### Current State + +โš ๏ธ **This project is not yet ready for external contributions** + +Reasons: +- Architecture is evolving rapidly +- Major refactoring in progress +- Documentation still being improved +- No formal contribution guidelines yet + +### How You Can Help + +- **Test and report issues**: Try building and running the app, report what doesn't work +- **Documentation improvements**: Suggest clarifications or additions +- **Share use cases**: Describe how you'd use Wingman in your workflow + +### Future Contribution Guidelines + +Once the project stabilizes, we'll add: +- Code style guidelines +- Pull request templates +- Development workflow +- Testing requirements + +--- + +## ๐Ÿ“„ License + +MIT License - See [LICENSE](LICENSE) for details + +--- + +## ๐Ÿ™ Acknowledgments + +- **JUCE Framework** - Audio plugin framework +- **Electron** - Cross-platform desktop apps +- **Magenta.js** - AI music generation +- **Ableton Live API** - DAW integration capabilities + +--- + +## ๐Ÿ“ž Support & Contact + +- **Issues**: [GitHub Issues](https://github.com/micahcooley/wingman/issues) +- **Discussions**: Use GitHub Discussions for questions +- **Developer**: Sylor + +--- + +## ๐Ÿ—บ๏ธ Roadmap + +### Short Term (Next 3 Months) +- [ ] Stabilize Electron app core features +- [ ] Complete Remote Script implementation +- [ ] Improve cross-platform compatibility +- [ ] Add comprehensive testing + +### Medium Term (3-6 Months) +- [ ] VST3 plugin feature parity +- [ ] Max for Live device integration +- [ ] Enhanced AI music generation +- [ ] Multi-DAW support research + +### Long Term (6-12 Months) +- [ ] Plugin marketplace integration +- [ ] Collaborative features +- [ ] Mobile companion app +- [ ] Cloud sync and presets + +--- + +**Last Updated**: January 2026 +**Version**: 1.0.0-alpha +**Status**: Active Development diff --git a/README_OLD.md b/README_OLD.md new file mode 100644 index 0000000..2cbd9e9 --- /dev/null +++ b/README_OLD.md @@ -0,0 +1,441 @@ +# ๐ŸŽต Wingman - AI Music Production Assistant + +> **AI-powered music production assistant providing deep DAW control through a standalone Electron app and Ableton Live Remote Script** + +[![Status](https://img.shields.io/badge/status-in%20development-yellow)](https://github.com/micahcooley/wingman) +[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)](#supported-platforms) +[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE) + +--- + +## ๐Ÿ“‹ Table of Contents + +- [Overview](#overview) +- [Quick Start](#quick-start) +- [Architecture](#architecture) +- [Project Structure](#project-structure) +- [Build & Setup](#build--setup) +- [Features](#features) +- [Documentation](#documentation) +- [Known Issues](#known-issues) +- [Contributing](#contributing) + +--- + +## ๐ŸŽฏ Overview + +Wingman is an ambitious project to bring AI-powered assistance to music production workflows. The project has evolved through multiple architectural iterations and currently consists of several components: + +### Current Architecture + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Wingman Standalone App โ”‚ โ† Primary focus (Electron + React) +โ”‚ - AI Chat Interface โ”‚ +โ”‚ - MIDI Generation โ”‚ +โ”‚ - Magenta.js Integration โ”‚ +โ”‚ - WebSocket/UDP Servers โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ†• WebSocket/UDP + โ”‚ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ Remote Script (Python) โ”‚ โ† Ableton Live integration +โ”‚ - Live Object Model API โ”‚ +โ”‚ - Track/Clip Control โ”‚ +โ”‚ - Real-time Observers โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +### Legacy Components (Experimental) + +- **WebView2 VST3 Plugin**: Early JUCE-based plugin with embedded web UI (partially working) +- **Bridge VST3**: Minimal plugin for DAW state communication (planned) +- **Max for Live Devices**: Audio analysis and advanced features (future) + +### Project Status + +โš ๏ธ **This project is actively developed but not production-ready** + +| Component | Status | Notes | +|-----------|--------|-------| +| Standalone Electron App | ๐ŸŸก Active Development | Core AI/MIDI features working | +| Remote Script | ๐ŸŸก Basic Implementation | Transport control functional | +| VST3 Plugin (WebView2) | ๐ŸŸ  Experimental | Loads but UI integration incomplete | +| Max for Live | ๐Ÿ”ด Planned | Future phase | + +--- + +## ๐Ÿš€ Quick Start + +### Prerequisites + +- **Node.js**: v18+ LTS ([download](https://nodejs.org/)) +- **Python**: 3.8+ for Ableton Remote Script ([download](https://www.python.org/)) +- **Ableton Live**: 11+ (for DAW integration, optional) +- **Windows**: WebView2 Runtime ([download](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)) + +### 30-Second Test (Standalone App) + +```bash +# 1. Clone the repository +git clone https://github.com/micahcooley/wingman.git +cd wingman/wingman-app + +# 2. Install dependencies +npm install + +# 3. Set up API keys (optional for testing) +# Copy .env.example to .env and add your OpenAI key + +# 4. Start the app +npm start +``` + +The app should launch with a chat interface. Try typing: `"Generate trap drums"` + +### Full Setup (with DAW Control) + +See [docs/BUILD_SETUP.md](docs/BUILD_SETUP.md) for complete installation instructions including Ableton integration. + +--- + +## ๐Ÿ—๏ธ Architecture + +### Component Overview + +Wingman uses a **modular, loosely-coupled architecture** to separate concerns: + +1. **Standalone App (Electron)** - Main user interface + - React + TypeScript UI + - AI service integrations (OpenAI, Anthropic, Perplexity) + - Magenta.js for music generation + - WebSocket/UDP servers for DAW communication + +2. **Remote Script (Python)** - Ableton Live control + - Uses Live Object Model (LOM) API + - Bidirectional communication via WebSocket/UDP + - Real-time observer pattern for state sync + +3. **VST3 Plugin (Legacy)** - Embedded web UI (experimental) + - JUCE framework + WebView2 + - React UI bundled as resources + - Proof-of-concept for plugin-based approach + +### Communication Protocols + +- **WebSocket** (port 8123): Max for Live โ†” Standalone App +- **UDP** (ports 11000/11001): Remote Script โ†” Standalone App +- **UDP** (ports 12000/12001): Bridge VST3 โ†” Standalone App (future) + +For detailed architecture documentation, see [CLAUDE.md](CLAUDE.md). + +--- + +## ๐Ÿ“ Project Structure + +``` +wingman/ +โ”œโ”€โ”€ wingman-app/ # Main Electron application +โ”‚ โ”œโ”€โ”€ src/ +โ”‚ โ”‚ โ”œโ”€โ”€ main/ # Electron main process +โ”‚ โ”‚ โ”œโ”€โ”€ components/ # React UI components +โ”‚ โ”‚ โ”œโ”€โ”€ services/ # AI, MIDI, WebSocket services +โ”‚ โ”‚ โ””โ”€โ”€ hooks/ # React hooks +โ”‚ โ”œโ”€โ”€ public/ # Static assets +โ”‚ โ””โ”€โ”€ package.json # App dependencies +โ”‚ +โ”œโ”€โ”€ remote-script/ # Ableton Live Remote Script +โ”‚ โ””โ”€โ”€ WingmanControl/ # Python control surface +โ”‚ โ”œโ”€โ”€ __init__.py # Entry point +โ”‚ โ””โ”€โ”€ *.py # LOM integration +โ”‚ +โ”œโ”€โ”€ actual ui/ # React UI (original development) +โ”‚ โ””โ”€โ”€ vocal-muse-sidecar-main/ +โ”‚ โ””โ”€โ”€ src/ # TypeScript React components +โ”‚ +โ”œโ”€โ”€ Source/ # VST3 Plugin (C++/JUCE) +โ”‚ โ”œโ”€โ”€ PluginProcessor.* # Audio processing +โ”‚ โ”œโ”€โ”€ PluginEditor.* # UI management +โ”‚ โ”œโ”€โ”€ WebView2Handler.* # Web UI integration +โ”‚ โ””โ”€โ”€ *.cpp/h # Supporting code +โ”‚ +โ”œโ”€โ”€ installers/ # Platform-specific installers +โ”‚ โ”œโ”€โ”€ windows/ # NSIS installer scripts +โ”‚ โ”œโ”€โ”€ macos/ # DMG configuration +โ”‚ โ”œโ”€โ”€ linux/ # AppImage/DEB/RPM +โ”‚ โ””โ”€โ”€ shared/ # Cross-platform scripts +โ”‚ +โ”œโ”€โ”€ docs/ # Documentation +โ”‚ โ”œโ”€โ”€ architecture/ # Design documents +โ”‚ โ”œโ”€โ”€ api/ # API references +โ”‚ โ””โ”€โ”€ guides/ # User guides +โ”‚ +โ”œโ”€โ”€ research/ # Technical research +โ”‚ โ”œโ”€โ”€ DEEP_TECHNICAL_*.md # Integration research +โ”‚ โ””โ”€โ”€ *.md # Various investigations +โ”‚ +โ”œโ”€โ”€ tests/ # Test files (limited coverage) +โ”œโ”€โ”€ scripts/ # Build/utility scripts +โ”œโ”€โ”€ python-automation/ # OS-level automation +โ”œโ”€โ”€ max-for-live/ # M4L devices (future) +โ””โ”€โ”€ CMakeLists.txt # VST3 build configuration +``` + +### Entry Points + +| Component | Entry Point | Purpose | +|-----------|-------------|---------| +| Electron App | `wingman-app/src/main/index.js` | Main process entry | +| React UI | `wingman-app/src/main.tsx` | Renderer entry | +| Remote Script | `remote-script/WingmanControl/__init__.py` | Ableton integration | +| VST3 Plugin | `Source/PluginProcessor.cpp` | Audio plugin entry | + +--- + +## ๐Ÿ”ง Build & Setup + +### Standalone App + +#### Development Mode +```bash +cd wingman-app +npm install +npm run dev # Vite dev server (hot reload) +# OR +npm start # Run Electron with built UI +``` + +#### Production Build +```bash +cd wingman-app +npm run build # Build React UI +npm run package # Create .exe/.dmg/.AppImage +``` + +Outputs to: `wingman-app/dist-electron/` + +### VST3 Plugin (Experimental) + +**Requirements:** +- CMake 3.22+ +- Visual Studio 2019+ (Windows) or Xcode (macOS) +- JUCE 8.0.9+ (submodule included) +- WebView2 SDK (Windows) + +**Build Steps:** + +```bash +# Windows (PowerShell) +mkdir build +cd build +cmake .. -G "Visual Studio 16 2019" -A x64 +cmake --build . --config Release + +# macOS +mkdir build && cd build +cmake .. -G Xcode +cmake --build . --config Release +``` + +Output: `build/Wingman_artefacts/Release/VST3/Wingman.vst3` + +### Remote Script Installation + +**Automatic (Recommended):** +```bash +cd installers +python install_remote_script.py +``` + +**Manual:** +```bash +# Windows +xcopy "remote-script\WingmanControl" "%USERPROFILE%\Documents\Ableton\User Library\Remote Scripts\WingmanControl\" /E /I /Y + +# macOS +cp -r remote-script/WingmanControl ~/Music/Ableton/User\ Library/Remote\ Scripts/ +``` + +Then enable in Ableton Live: +1. Preferences โ†’ Link/Tempo/MIDI +2. Control Surface โ†’ "WingmanControl" +3. Restart Ableton Live + +--- + +## โœจ Features + +### Currently Working + +โœ… **AI Chat Interface** +- Multiple providers: OpenAI, Anthropic, Perplexity, OpenRouter +- Context-aware music production assistant +- Natural language MIDI generation + +โœ… **MIDI Generation** +- Magenta.js integration (drums, melody, bass) +- Genre-specific patterns (trap, house, jazz, lo-fi) +- Piano roll visualization +- MIDI export + +โœ… **Basic DAW Control** (Remote Script) +- Transport control (play/stop/tempo) +- Track mute/solo/arm +- Scene launching +- Clip triggering + +โœ… **WebSocket/UDP Servers** +- Max for Live integration ready +- Bridge plugin communication ready + +### In Development + +๐ŸŸก **Advanced DAW Control** +- MIDI clip creation +- Device parameter automation +- Full mixer control +- Real-time observers + +๐ŸŸก **VST3 Plugin** +- Embedded web UI working +- Needs better integration testing +- DAW state communication + +### Planned + +๐Ÿ”ด **Max for Live Devices** +- Audio analysis +- Waveform visualization +- Advanced parameter mapping + +๐Ÿ”ด **Multi-DAW Support** +- FL Studio, Logic Pro, etc. +- Generic OSC/MIDI control + +--- + +## ๐Ÿ“š Documentation + +### Essential Reading + +- **[CLAUDE.md](CLAUDE.md)** - Comprehensive technical overview and architecture decisions +- **[START_HERE.md](START_HERE.md)** - AI/Magenta integration quick start +- **[PROJECT_STATUS.md](PROJECT_STATUS.md)** - Current status and milestones + +### Component Documentation + +- **Standalone App**: [wingman-app/README.md](wingman-app/README.md) +- **Remote Script**: [remote-script/README.md](remote-script/README.md) +- **Installers**: [installers/README.md](installers/README.md) + +### Technical Documentation + +- **[docs/](docs/)** - Architecture, API references, guides +- **[research/](research/)** - Technical research documents +- **Phase Reports**: PHASE1-5 verification reports in root directory + +### Build Documentation + +- **Windows**: [installers/windows/README.md](installers/windows/README.md) +- **macOS**: [installers/macos/README.md](installers/macos/README.md) +- **Linux**: [installers/linux/README.md](installers/linux/README.md) + +--- + +## ๐Ÿ› Known Issues + +See [KNOWN_ISSUES.md](KNOWN_ISSUES.md) for a complete list of bugs and limitations. + +### Critical Issues + +1. **VST3 Plugin Detection** - Plugin may not appear in some DAWs (cache issues) +2. **WebView2 Stability** - Occasional crashes with complex UI interactions +3. **Remote Script Reliability** - UDP packet loss can cause desyncs +4. **Cross-Platform** - macOS/Linux support incomplete for some features + +### Workarounds + +Most issues have documented workarounds. Check: +- [TROUBLESHOOTING.md](actual%20ui/vocal-muse-sidecar-main/TROUBLESHOOTING.md) - General troubleshooting +- [TROUBLESHOOTING_API_KEY.md](TROUBLESHOOTING_API_KEY.md) - API key issues +- Component-specific READMEs for targeted fixes + +--- + +## ๐Ÿค Contributing + +### Current State + +โš ๏ธ **This project is not yet ready for external contributions** + +Reasons: +- Architecture is evolving rapidly +- Major refactoring in progress +- Documentation still being improved +- No formal contribution guidelines yet + +### How You Can Help + +- **Test and report issues**: Try building and running the app, report what doesn't work +- **Documentation improvements**: Suggest clarifications or additions +- **Share use cases**: Describe how you'd use Wingman in your workflow + +### Future Contribution Guidelines + +Once the project stabilizes, we'll add: +- Code style guidelines +- Pull request templates +- Development workflow +- Testing requirements + +--- + +## ๐Ÿ“„ License + +MIT License - See [LICENSE](LICENSE) for details + +--- + +## ๐Ÿ™ Acknowledgments + +- **JUCE Framework** - Audio plugin framework +- **Electron** - Cross-platform desktop apps +- **Magenta.js** - AI music generation +- **Ableton Live API** - DAW integration capabilities + +--- + +## ๐Ÿ“ž Support & Contact + +- **Issues**: [GitHub Issues](https://github.com/micahcooley/wingman/issues) +- **Discussions**: Use GitHub Discussions for questions +- **Developer**: Sylor + +--- + +## ๐Ÿ—บ๏ธ Roadmap + +### Short Term (Next 3 Months) +- [ ] Stabilize Electron app core features +- [ ] Complete Remote Script implementation +- [ ] Improve cross-platform compatibility +- [ ] Add comprehensive testing + +### Medium Term (3-6 Months) +- [ ] VST3 plugin feature parity +- [ ] Max for Live device integration +- [ ] Enhanced AI music generation +- [ ] Multi-DAW support research + +### Long Term (6-12 Months) +- [ ] Plugin marketplace integration +- [ ] Collaborative features +- [ ] Mobile companion app +- [ ] Cloud sync and presets + +--- + +**Last Updated**: January 2026 +**Version**: 1.0.0-alpha +**Status**: Active Development diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..cdd8ab7 --- /dev/null +++ b/TODO.md @@ -0,0 +1,590 @@ +# TODO - Wingman Development Tasks + +Comprehensive task list for ongoing development, organized by priority and component. + +**Last Updated**: January 2026 +**Project Phase**: Alpha Development + +--- + +## ๐ŸŽฏ Immediate Priorities (Next Sprint) + +### Critical Path to v1.0 Alpha + +- [ ] **Fix UDP Reliability** - Replace UDP with WebSocket/TCP for Remote Script communication + - Prevents state desync issues + - Enables guaranteed delivery + - Priority: Critical, Est: 2-3 days + +- [ ] **Complete Remote Script Core Commands** - Implement remaining LOM API wrappers + - MIDI clip creation + - Device parameter control + - Mixer (volume/pan) control + - Priority: Critical, Est: 3-4 days + +- [ ] **Add Error Handling to AI Services** - Graceful degradation when APIs fail + - Retry logic with exponential backoff + - Fallback to local generation + - User-friendly error messages + - Priority: High, Est: 1-2 days + +- [ ] **Memory Leak Investigation** - Profile and fix memory growth in long sessions + - Use Chrome DevTools memory profiler + - Check React component cleanup + - Verify Magenta model caching + - Priority: High, Est: 2-3 days + +--- + +## ๐Ÿ“ฆ Component-Specific Tasks + +### Standalone Electron App + +#### High Priority +- [ ] Implement undo/redo system for piano roll edits +- [ ] Add progress indicator for Magenta model downloads +- [ ] Improve MIDI export timing accuracy +- [ ] Add WebSocket reconnection logic with exponential backoff +- [ ] Implement app auto-update mechanism (electron-updater) + +#### Medium Priority +- [ ] Add preset system for saving/loading AI prompts +- [ ] Implement dark mode consistently across all components +- [ ] Add keyboard shortcuts documentation and editor +- [ ] Create onboarding tutorial for first-time users +- [ ] Add telemetry (opt-in) for crash reporting + +#### Low Priority +- [ ] Implement drag-and-drop MIDI import +- [ ] Add audio preview of generated MIDI (using Tone.js) +- [ ] Create plugin for VSCode integration +- [ ] Add localization (i18n) support + +--- + +### Remote Script (Python) + +#### High Priority +- [ ] Implement full mixer control (all track parameters) +- [ ] Add MIDI clip creation and note manipulation +- [ ] Implement device parameter automation +- [ ] Add real-time observers for all track/clip changes +- [ ] Create comprehensive error logging to Live's Log.txt + +#### Medium Priority +- [ ] Add support for return tracks and sends +- [ ] Implement scene management (create/delete/duplicate) +- [ ] Add support for automation recording +- [ ] Create compatibility layer for Live 10 (Python 2.7) +- [ ] Add support for grouped tracks + +#### Low Priority +- [ ] Implement warp marker manipulation +- [ ] Add support for arrangement view (in addition to session) +- [ ] Create undo/redo integration with Live's history +- [ ] Add support for Max for Live device parameter mapping + +--- + +### VST3 Plugin (WebView2) + +#### High Priority +- [ ] Fix white screen issue on some systems +- [ ] Implement reliable WebView2 initialization sequence +- [ ] Add proper error handling for WebView2 failures +- [ ] Create fallback UI (native JUCE) when WebView2 unavailable +- [ ] Fix resource loading paths (ensure dist/ is copied correctly) + +#### Medium Priority +- [ ] Implement window resize handling +- [ ] Add plugin parameter mapping (automation in DAW) +- [ ] Create preset management system +- [ ] Add MIDI learn for parameters +- [ ] Implement sidechain input support + +#### Low Priority +- [ ] Port plugin to VST2 format (for legacy DAW support) +- [ ] Create AU (Audio Unit) version for macOS +- [ ] Add AAX format for Pro Tools +- [ ] Implement multi-instance support (multiple plugin windows) + +--- + +### Installers + +#### High Priority +- [ ] Test Windows installer on clean VMs (Win10, Win11) +- [ ] Fix macOS code signing and notarization +- [ ] Add dependency auto-installation (Node.js, Python, etc.) +- [ ] Create uninstaller that properly cleans up Remote Script +- [ ] Add silent install mode for enterprise deployment + +#### Medium Priority +- [ ] Create Chocolatey package (Windows package manager) +- [ ] Create Homebrew cask (macOS package manager) +- [ ] Add Linux distribution packages (Debian, Fedora, Arch) +- [ ] Implement auto-update mechanism in installers +- [ ] Add custom icon sets for all platforms + +#### Low Priority +- [ ] Create portable version (no installation required) +- [ ] Add installer localization +- [ ] Create MSI installer for enterprise (in addition to NSIS) +- [ ] Add installer themes/branding customization + +--- + +## ๐Ÿงช Testing & Quality Assurance + +### Testing Infrastructure + +#### High Priority +- [ ] Set up Jest for unit testing (TypeScript services) +- [ ] Add Vitest for React component testing +- [ ] Create integration test suite for AI services +- [ ] Add E2E tests for critical user flows (Playwright) +- [ ] Set up CI/CD pipeline (GitHub Actions) + +#### Medium Priority +- [ ] Add code coverage reporting (Codecov/Coveralls) +- [ ] Create load testing for WebSocket/UDP servers +- [ ] Add performance benchmarks for MIDI generation +- [ ] Implement snapshot testing for UI components +- [ ] Create visual regression tests (Percy/Chromatic) + +#### Low Priority +- [ ] Add mutation testing +- [ ] Create chaos engineering tests (random failures) +- [ ] Add security scanning (Snyk, Dependabot) +- [ ] Implement fuzz testing for input validation + +--- + +### Manual Testing Checklist + +- [ ] Test on Windows 10 (clean install) +- [ ] Test on Windows 11 (clean install) +- [ ] Test on macOS Intel (Monterey, Ventura, Sonoma) +- [ ] Test on macOS Apple Silicon (Monterey, Ventura, Sonoma) +- [ ] Test on Ubuntu 22.04 LTS +- [ ] Test on Fedora 39 +- [ ] Test in Ableton Live 11 (Windows) +- [ ] Test in Ableton Live 12 (Windows) +- [ ] Test in Ableton Live 11 (macOS) +- [ ] Test with Ableton Live Lite +- [ ] Test with Ableton Live Suite +- [ ] Test all AI providers (OpenAI, Anthropic, Perplexity, OpenRouter) +- [ ] Test offline mode (no internet connection) +- [ ] Test with firewall enabled +- [ ] Test with antivirus enabled + +--- + +## ๐Ÿ“š Documentation + +### Essential Documentation + +#### High Priority +- [ ] Create comprehensive BUILD_SETUP.md guide +- [ ] Write CONTRIBUTING.md guidelines +- [ ] Add API documentation (JSDoc โ†’ docs site) +- [ ] Create troubleshooting flowcharts (decision trees) +- [ ] Write security best practices guide + +#### Medium Priority +- [ ] Create video tutorials (YouTube) +- [ ] Write blog posts about architecture decisions +- [ ] Add inline code comments (80% coverage target) +- [ ] Create developer onboarding guide +- [ ] Write performance optimization guide + +#### Low Priority +- [ ] Create interactive documentation (Docusaurus) +- [ ] Add architecture diagrams (C4 model) +- [ ] Write case studies of real-world usage +- [ ] Create FAQ from user questions +- [ ] Add glossary of technical terms + +--- + +## ๐Ÿ”’ Security & Privacy + +### Security Hardening + +#### High Priority +- [ ] Implement OS keychain for API key storage +- [ ] Add input validation for all user-provided data +- [ ] Audit dependencies for known vulnerabilities +- [ ] Implement Content Security Policy (CSP) for WebView2 +- [ ] Add rate limiting to prevent abuse + +#### Medium Priority +- [ ] Implement secure IPC between Electron main/renderer +- [ ] Add encryption for stored preferences +- [ ] Create security.txt and vulnerability disclosure policy +- [ ] Implement sandboxing for untrusted code execution +- [ ] Add HTTPS support for WebSocket server (wss://) + +#### Low Priority +- [ ] Implement two-factor authentication for cloud sync +- [ ] Add audit logging for security events +- [ ] Create penetration testing suite +- [ ] Implement certificate pinning +- [ ] Add hardware security module (HSM) support + +--- + +## ๐ŸŽจ UI/UX Improvements + +### User Experience + +#### High Priority +- [ ] Add loading states for all async operations +- [ ] Implement proper error boundaries (React) +- [ ] Add accessibility features (ARIA labels, keyboard nav) +- [ ] Create responsive design for different screen sizes +- [ ] Implement toast notifications for actions + +#### Medium Priority +- [ ] Add animations and transitions +- [ ] Create customizable themes +- [ ] Implement command palette (Ctrl+K) +- [ ] Add tooltips for all interactive elements +- [ ] Create guided tour for new users + +#### Low Priority +- [ ] Add gesture support for touch devices +- [ ] Implement voice commands (Web Speech API) +- [ ] Create mini-mode (compact view) +- [ ] Add window snapping and docking +- [ ] Implement custom cursor styles + +--- + +## ๐Ÿš€ Performance Optimization + +### Performance Tasks + +#### High Priority +- [ ] Optimize React renders (useMemo, useCallback) +- [ ] Implement virtual scrolling for large lists +- [ ] Add lazy loading for heavy components +- [ ] Optimize bundle size (code splitting, tree shaking) +- [ ] Profile and optimize Magenta.js model loading + +#### Medium Priority +- [ ] Implement Web Workers for CPU-intensive tasks +- [ ] Add caching layer for API responses +- [ ] Optimize MIDI generation algorithms +- [ ] Implement debouncing for frequent events +- [ ] Add service worker for offline support + +#### Low Priority +- [ ] Implement WebAssembly for performance-critical code +- [ ] Add GPU acceleration for visualizations +- [ ] Optimize memory allocations (object pooling) +- [ ] Implement ahead-of-time (AOT) compilation +- [ ] Add profiling instrumentation + +--- + +## ๐ŸŒ Multi-DAW Support + +### Expand Beyond Ableton + +#### High Priority +- [ ] Research FL Studio API capabilities +- [ ] Research Logic Pro AppleScript automation +- [ ] Design generic DAW abstraction layer +- [ ] Implement OSC protocol support +- [ ] Create generic MIDI control mode + +#### Medium Priority +- [ ] Implement FL Studio Remote Script +- [ ] Implement Logic Pro control via AppleScript +- [ ] Add Bitwig Studio support (OSC) +- [ ] Add Reaper support (ReaScript) +- [ ] Create Cubase support (MIDI Remote) + +#### Low Priority +- [ ] Add Studio One support +- [ ] Add Pro Tools support (limited by API) +- [ ] Create Reason support +- [ ] Add Mixcraft support +- [ ] Implement generic MIDI/OSC learning mode + +--- + +## ๐Ÿค– AI & ML Enhancements + +### Advanced AI Features + +#### High Priority +- [ ] Add support for GPT-4 Turbo and GPT-5 +- [ ] Implement Claude 3 Opus support +- [ ] Add prompt engineering best practices +- [ ] Create genre-specific AI models +- [ ] Implement context window management + +#### Medium Priority +- [ ] Add voice-to-MIDI generation (Whisper โ†’ AI โ†’ MIDI) +- [ ] Implement AI-powered mixing suggestions +- [ ] Create arrangement AI (suggest song structure) +- [ ] Add style transfer (apply one song's style to another) +- [ ] Implement harmonic analysis and suggestions + +#### Low Priority +- [ ] Add emotion-based generation (happy, sad, energetic) +- [ ] Implement collaborative AI (multiple agents) +- [ ] Create AI-powered mastering +- [ ] Add generative sound design +- [ ] Implement procedural music generation + +--- + +## ๐Ÿ”Œ Plugin Ecosystem + +### Extensibility + +#### High Priority +- [ ] Design plugin API architecture +- [ ] Create plugin SDK documentation +- [ ] Implement plugin loader system +- [ ] Add plugin marketplace (basic) +- [ ] Create example plugins + +#### Medium Priority +- [ ] Add plugin sandboxing (security) +- [ ] Implement plugin versioning and updates +- [ ] Create plugin development CLI tools +- [ ] Add plugin testing framework +- [ ] Implement plugin analytics (opt-in) + +#### Low Priority +- [ ] Create plugin store with payments +- [ ] Add plugin discovery and search +- [ ] Implement plugin bundles +- [ ] Create plugin creator program +- [ ] Add plugin certification process + +--- + +## ๐Ÿ“Š Analytics & Monitoring + +### Telemetry (Opt-In) + +#### High Priority +- [ ] Implement crash reporting (Sentry) +- [ ] Add anonymous usage analytics (opt-in) +- [ ] Create error tracking dashboard +- [ ] Implement performance monitoring +- [ ] Add feature usage metrics + +#### Medium Priority +- [ ] Create user feedback system (in-app) +- [ ] Implement A/B testing framework +- [ ] Add session replay (for debugging) +- [ ] Create analytics dashboard for developers +- [ ] Implement custom event tracking + +#### Low Priority +- [ ] Add heatmaps for UI interactions +- [ ] Implement user journey tracking +- [ ] Create predictive analytics +- [ ] Add cohort analysis +- [ ] Implement retention metrics + +--- + +## ๐ŸŒ Localization + +### Internationalization + +#### High Priority +- [ ] Set up i18n framework (i18next) +- [ ] Extract all user-facing strings +- [ ] Create English (en-US) as base locale +- [ ] Add language selector in settings +- [ ] Implement locale-aware formatting (dates, numbers) + +#### Medium Priority +- [ ] Add Spanish (es-ES) translation +- [ ] Add French (fr-FR) translation +- [ ] Add German (de-DE) translation +- [ ] Add Japanese (ja-JP) translation +- [ ] Add Chinese Simplified (zh-CN) translation + +#### Low Priority +- [ ] Add Portuguese (pt-BR) translation +- [ ] Add Russian (ru-RU) translation +- [ ] Add Korean (ko-KR) translation +- [ ] Create translation contribution guide +- [ ] Implement crowdsourced translations (Crowdin) + +--- + +## ๐Ÿ’ฐ Monetization (Future) + +### Business Model Options + +#### Research Phase +- [ ] Research freemium model viability +- [ ] Investigate subscription pricing +- [ ] Analyze one-time purchase vs. subscription +- [ ] Research enterprise licensing +- [ ] Investigate plugin marketplace revenue share + +#### Implementation (Post-v1.0) +- [ ] Implement license key system +- [ ] Create payment integration (Stripe, Paddle) +- [ ] Add subscription management +- [ ] Create enterprise licensing portal +- [ ] Implement trial period and conversion + +--- + +## ๐Ÿค Community & Ecosystem + +### Community Building + +#### High Priority +- [ ] Create Discord server for community +- [ ] Set up GitHub Discussions +- [ ] Write contribution guidelines +- [ ] Create code of conduct +- [ ] Set up issue templates + +#### Medium Priority +- [ ] Create showcase gallery (user creations) +- [ ] Implement user profiles and badges +- [ ] Create community challenges/competitions +- [ ] Set up forum (Discourse) +- [ ] Create developer ambassador program + +#### Low Priority +- [ ] Organize virtual meetups +- [ ] Create conference talks and workshops +- [ ] Implement community plugins directory +- [ ] Create swag store +- [ ] Organize annual user conference + +--- + +## ๐ŸŽ“ Education & Onboarding + +### Learning Resources + +#### High Priority +- [ ] Create quick start video (< 5 minutes) +- [ ] Write beginner's guide +- [ ] Create interactive tutorial in-app +- [ ] Add tooltips and contextual help +- [ ] Create troubleshooting guide + +#### Medium Priority +- [ ] Create advanced user course +- [ ] Write best practices guide +- [ ] Create YouTube tutorial series +- [ ] Add in-app tips and tricks +- [ ] Create cheat sheet (PDF) + +#### Low Priority +- [ ] Create certification program +- [ ] Write comprehensive book +- [ ] Create interactive playground +- [ ] Add gamification (achievements) +- [ ] Create mentor program + +--- + +## ๐Ÿ“… Release Planning + +### Version Roadmap + +#### v1.0-alpha (Current) +- [ ] Complete core features +- [ ] Fix critical bugs +- [ ] Add basic documentation +- [ ] Create first installer + +#### v1.0-beta +- [ ] Public beta testing +- [ ] Fix reported issues +- [ ] Add telemetry (opt-in) +- [ ] Comprehensive testing + +#### v1.0 (Stable) +- [ ] Production-ready +- [ ] Full documentation +- [ ] Marketing launch +- [ ] Community support + +#### v1.1 +- [ ] Multi-DAW support +- [ ] Advanced AI features +- [ ] Plugin marketplace +- [ ] Enhanced UI/UX + +#### v2.0 +- [ ] Major architecture updates +- [ ] New AI models +- [ ] Cloud sync +- [ ] Mobile companion app + +--- + +## ๐Ÿ“ž Maintenance + +### Ongoing Tasks + +#### Weekly +- [ ] Review and triage new issues +- [ ] Update dependencies +- [ ] Review PRs +- [ ] Update documentation + +#### Monthly +- [ ] Security audit +- [ ] Performance review +- [ ] User feedback analysis +- [ ] Roadmap updates + +#### Quarterly +- [ ] Major version planning +- [ ] Dependency major version updates +- [ ] Team retrospective +- [ ] Community survey + +--- + +## ๐ŸŽฏ Success Metrics + +### Key Performance Indicators + +- [ ] 1,000 active users within 3 months +- [ ] < 0.1% crash rate +- [ ] > 4.5 โญ average rating +- [ ] < 2 second app startup time +- [ ] > 80% test coverage +- [ ] < 100ms average API response time +- [ ] < 5 critical bugs in production +- [ ] > 90% user satisfaction + +--- + +## ๐Ÿ“ Notes + +- This TODO list is living document - updated regularly +- Priority levels may change based on user feedback +- Some tasks may be deferred or cancelled +- Estimated times are rough - actual may vary +- Community contributions welcome for any task + +**Want to help?** Pick a task, create an issue, submit a PR! + +--- + +**Last Updated**: January 2026 +**Total Tasks**: 200+ +**Completed**: 15% (Phase 1) +**Status**: Active Development diff --git a/docs/BUILD_SETUP.md b/docs/BUILD_SETUP.md new file mode 100644 index 0000000..447545e --- /dev/null +++ b/docs/BUILD_SETUP.md @@ -0,0 +1,735 @@ +# Complete Build & Setup Guide + +Comprehensive instructions for building and setting up all Wingman components from source. + +**Target Audience**: Developers, contributors, and advanced users +**Last Updated**: January 2026 +**Platforms Covered**: Windows, macOS, Linux + +--- + +## ๐Ÿ“‹ Table of Contents + +1. [Prerequisites](#prerequisites) +2. [Environment Setup](#environment-setup) +3. [Component Build Instructions](#component-build-instructions) +4. [Platform-Specific Notes](#platform-specific-notes) +5. [Troubleshooting](#troubleshooting) +6. [Verification](#verification) + +--- + +## ๐Ÿ”ง Prerequisites + +### Required Software + +| Software | Version | Purpose | Download | +|----------|---------|---------|----------| +| **Node.js** | 18.x LTS or higher | JavaScript runtime for Electron app | [nodejs.org](https://nodejs.org/) | +| **npm** | 8.x+ (bundled with Node.js) | Package manager | Included with Node.js | +| **Python** | 3.8+ | Remote Script, automation | [python.org](https://www.python.org/) | +| **Git** | Latest | Version control | [git-scm.com](https://git-scm.com/) | + +### Platform-Specific Requirements + +#### Windows +| Software | Version | Purpose | Download | +|----------|---------|---------|----------| +| **Visual Studio** | 2019 or 2022 | C++ compiler for VST3 | [visualstudio.com](https://visualstudio.microsoft.com/) | +| **CMake** | 3.22+ | Build system | [cmake.org](https://cmake.org/) | +| **WebView2 Runtime** | Latest Evergreen | Web UI in VST3 | [microsoft.com](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) | +| **WebView2 SDK** | 1.0.2210.55 | VST3 development | Via NuGet | + +**Visual Studio Components Needed:** +- Desktop development with C++ +- Windows 10/11 SDK +- CMake tools for Windows + +#### macOS +| Software | Version | Purpose | Download | +|----------|---------|---------|----------| +| **Xcode** | 13+ | C++ compiler for VST3 | Mac App Store | +| **Xcode Command Line Tools** | Latest | Build tools | `xcode-select --install` | +| **CMake** | 3.22+ | Build system | [cmake.org](https://cmake.org/) or Homebrew | + +#### Linux +| Software | Version | Purpose | Download | +|----------|---------|---------|----------| +| **GCC/Clang** | GCC 9+ or Clang 10+ | C++ compiler | Package manager | +| **CMake** | 3.22+ | Build system | Package manager | +| **Build essentials** | Latest | Compilation tools | Package manager | +| **GTK3** | 3.24+ | GUI toolkit (JUCE) | Package manager | +| **ALSA/JACK** | Latest | Audio subsystem | Package manager | + +--- + +## ๐ŸŒ Environment Setup + +### 1. Clone the Repository + +```bash +# HTTPS +git clone https://github.com/micahcooley/wingman.git +cd wingman + +# SSH (if configured) +git clone git@github.com:micahcooley/wingman.git +cd wingman + +# Initialize submodules (for JUCE) +git submodule update --init --recursive +``` + +### 2. Verify Prerequisites + +**Check Node.js and npm:** +```bash +node --version # Should be v18.x or higher +npm --version # Should be 8.x or higher +``` + +**Check Python:** +```bash +python --version # Should be 3.8 or higher +# or +python3 --version +``` + +**Check CMake:** +```bash +cmake --version # Should be 3.22 or higher +``` + +**Check Git:** +```bash +git --version +``` + +### 3. Install Global Tools (Optional) + +```bash +# Electron packager (optional, for quick packaging) +npm install -g electron-packager + +# CMake GUI (optional, for easier configuration) +# Download from cmake.org + +# NuGet CLI (Windows, for WebView2 SDK) +# Download from nuget.org +``` + +--- + +## ๐Ÿ”จ Component Build Instructions + +### Build Order Recommendation + +1. **Standalone App** (Quickest to test, main focus) +2. **Remote Script** (Python, no compilation) +3. **VST3 Plugin** (Most complex, optional) + +--- + +## 1๏ธโƒฃ Standalone Electron App + +### Development Mode + +```bash +cd wingman-app + +# Install dependencies +npm install + +# Start development server +npm run dev +``` + +This starts Vite dev server with hot module replacement. Access at `http://localhost:5173`. + +### Run Electron with Built UI + +```bash +cd wingman-app + +# Install dependencies (if not done) +npm install + +# Build React UI +npm run build + +# Run Electron app +npm start +``` + +The app will launch with the built React UI. + +### Production Build + +```bash +cd wingman-app + +# Full clean build +npm run build + +# Package for current platform +npm run package + +# Platform-specific builds +npm run dist:win # Windows .exe +npm run dist:mac # macOS .dmg +npm run dist:linux # Linux AppImage/DEB/RPM + +# All platforms (on supported CI) +npm run dist:all +``` + +**Output Locations:** +- Built UI: `wingman-app/dist/` +- Packaged apps: `wingman-app/dist-electron/` + +### Build Scripts Explained + +| Script | Purpose | Output | +|--------|---------|--------| +| `npm run dev` | Vite dev server (hot reload) | http://localhost:5173 | +| `npm run build` | Build React UI for production | `dist/` folder | +| `npm start` | Run Electron with built UI | Electron window | +| `npm run package` | Create executable | `dist-electron/` | +| `npm run dist` | Full build + installer | Platform installer | + +--- + +## 2๏ธโƒฃ Remote Script (Python) + +No compilation needed - just installation. + +### Installation + +#### Automatic (Recommended) + +```bash +# From repository root +cd installers +python install_remote_script.py +``` + +This script: +1. Detects Ableton Live installation +2. Copies script to correct location +3. Verifies permissions + +#### Manual Installation + +**Windows:** +```bash +xcopy /E /I /Y "remote-script\WingmanControl" "%USERPROFILE%\Documents\Ableton\User Library\Remote Scripts\WingmanControl\" +``` + +**macOS:** +```bash +cp -r remote-script/WingmanControl ~/Music/Ableton/User\ Library/Remote\ Scripts/ +``` + +**Linux:** +N/A (Ableton Live not available on Linux) + +### Enable in Ableton Live + +1. Open Ableton Live +2. Go to **Preferences** (Ctrl/Cmd + ,) +3. Navigate to **Link/Tempo/MIDI** tab +4. Set **Control Surface** dropdown to **WingmanControl** +5. Set **Input** and **Output** to **None** +6. **Restart Ableton Live** + +### Verify Installation + +Check Ableton's Log.txt for: +``` +โœ… Wingman Control initialized +๐Ÿ“ค UDP sender ready: 127.0.0.1:11000 +๐Ÿ“ฅ UDP receiver started on :11001 +``` + +**Log Location:** +- Windows: `%APPDATA%\Ableton\Live X.X\Preferences\Log.txt` +- macOS: `~/Library/Preferences/Ableton/Live X.X/Log.txt` + +--- + +## 3๏ธโƒฃ VST3 Plugin (Experimental) + +### Windows Build + +#### Step 1: Install WebView2 SDK + +**Option A: NuGet (Recommended)** +```powershell +# Install NuGet CLI if not already +# Download from https://www.nuget.org/downloads + +# Install WebView2 SDK +nuget install Microsoft.Web.WebView2 -Version 1.0.2210.55 -OutputDirectory %USERPROFILE%\.nuget\packages +``` + +**Option B: Manual Download** +1. Download SDK from [Microsoft WebView2](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) +2. Extract to `%USERPROFILE%\.nuget\packages\microsoft.web.webview2\1.0.2210.55\` + +#### Step 2: Build React UI + +```bash +cd "actual ui/vocal-muse-sidecar-main" +npm install +npm run build +``` + +This creates `dist/` folder with compiled React app. + +#### Step 3: Configure CMake + +```powershell +# Create build directory +mkdir build +cd build + +# Configure (Visual Studio 2019) +cmake .. -G "Visual Studio 16 2019" -A x64 + +# Or Visual Studio 2022 +cmake .. -G "Visual Studio 17 2022" -A x64 +``` + +#### Step 4: Build + +```powershell +# From build/ directory + +# Build (Debug) +cmake --build . --config Debug + +# Build (Release) +cmake --build . --config Release +``` + +#### Step 5: Install Plugin + +```powershell +# Release build +xcopy /E /I /Y "Wingman_artefacts\Release\VST3\Wingman.vst3" "%COMMONPROGRAMFILES%\VST3\Wingman.vst3" + +# Debug build +xcopy /E /I /Y "Wingman_artefacts\Debug\VST3\Wingman.vst3" "%COMMONPROGRAMFILES%\VST3\Wingman.vst3" +``` + +**Common VST3 Locations:** +- Windows: `C:\Program Files\Common Files\VST3\` +- User-specific: `%APPDATA%\VST3\` + +--- + +### macOS Build + +#### Step 1: Build React UI + +```bash +cd "actual ui/vocal-muse-sidecar-main" +npm install +npm run build +``` + +#### Step 2: Configure CMake + +```bash +# Create build directory +mkdir build && cd build + +# Configure for Xcode +cmake .. -G Xcode + +# Or configure for Unix Makefiles (faster) +cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release +``` + +#### Step 3: Build + +```bash +# From build/ directory + +# Xcode project +cmake --build . --config Release + +# Or open in Xcode +open Wingman.xcodeproj +# Then build in Xcode (Cmd+B) +``` + +#### Step 4: Install Plugin + +```bash +# Copy to user VST3 folder +cp -r Wingman_artefacts/Release/VST3/Wingman.vst3 ~/Library/Audio/Plug-Ins/VST3/ + +# Or system-wide (requires sudo) +sudo cp -r Wingman_artefacts/Release/VST3/Wingman.vst3 /Library/Audio/Plug-Ins/VST3/ +``` + +**VST3 Plugin Locations:** +- User: `~/Library/Audio/Plug-Ins/VST3/` +- System: `/Library/Audio/Plug-Ins/VST3/` + +--- + +### Linux Build (Untested) + +#### Step 1: Install Dependencies + +**Ubuntu/Debian:** +```bash +sudo apt-get update +sudo apt-get install build-essential cmake git \ + libasound2-dev libjack-jackd2-dev \ + libfreetype6-dev libx11-dev libxinerama-dev libxrandr-dev \ + libxcursor-dev libxcomposite-dev mesa-common-dev \ + libgtk-3-dev libwebkit2gtk-4.0-dev +``` + +**Fedora:** +```bash +sudo dnf install gcc-c++ cmake git \ + alsa-lib-devel jack-audio-connection-kit-devel \ + freetype-devel libX11-devel libXinerama-devel \ + libXrandr-devel libXcursor-devel mesa-libGL-devel \ + gtk3-devel webkit2gtk3-devel +``` + +#### Step 2: Build React UI + +```bash +cd "actual ui/vocal-muse-sidecar-main" +npm install +npm run build +``` + +#### Step 3: Build Plugin + +```bash +mkdir build && cd build +cmake .. -DCMAKE_BUILD_TYPE=Release +make -j$(nproc) # Parallel build +``` + +#### Step 4: Install Plugin + +```bash +# User VST3 folder +mkdir -p ~/.vst3 +cp -r Wingman_artefacts/Release/VST3/Wingman.vst3 ~/.vst3/ + +# System-wide (requires sudo) +sudo mkdir -p /usr/lib/vst3 +sudo cp -r Wingman_artefacts/Release/VST3/Wingman.vst3 /usr/lib/vst3/ +``` + +--- + +## ๐Ÿ–ฅ๏ธ Platform-Specific Notes + +### Windows + +#### Path Length Limit +Windows has a 260-character path limit. If you encounter issues: + +```powershell +# Enable long paths (requires admin) +reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f +``` + +Or use short repository path like `C:\wingman\`. + +#### Antivirus Issues +Windows Defender or other antivirus may flag the build or executable. Add exceptions: + +1. Windows Security โ†’ Virus & threat protection +2. Manage settings โ†’ Add or remove exclusions +3. Add folder: `C:\wingman\` (or your repo path) + +#### Visual Studio Community vs. Professional +Community Edition is free and sufficient for Wingman development. + +--- + +### macOS + +#### Code Signing (Development) +For local development, you can skip code signing: + +```bash +# Allow unsigned plugins in DAW +sudo spctl --master-disable + +# Re-enable after testing +sudo spctl --master-enable +``` + +#### Rosetta 2 (Apple Silicon) +To build for Intel Macs on Apple Silicon: + +```bash +cmake .. -DCMAKE_OSX_ARCHITECTURES=x86_64 +``` + +For Universal builds (Intel + ARM): +```bash +cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" +``` + +#### Accessibility Permissions +Wingman needs accessibility permissions for OS automation: + +1. System Preferences โ†’ Security & Privacy โ†’ Accessibility +2. Click lock to make changes +3. Add Ableton Live and/or Wingman to allowed apps + +--- + +### Linux + +#### Audio Backend Selection +JUCE supports ALSA and JACK. For best compatibility: + +```bash +# Install both +sudo apt-get install libasound2-dev libjack-jackd2-dev +``` + +#### GTK3 Theming +Plugin UI appearance depends on GTK3 theme. To match system: + +```bash +# Install preferred theme +sudo apt-get install gtk2-engines-murrine gtk2-engines-pixbuf + +# Apply theme +gsettings set org.gnome.desktop.interface gtk-theme 'Your-Theme-Name' +``` + +--- + +## ๐Ÿ› Troubleshooting + +### Common Issues + +#### "Command not found: node" + +**Cause**: Node.js not in PATH + +**Solution**: +```bash +# Windows (PowerShell, as admin) +setx PATH "%PATH%;C:\Program Files\nodejs\" + +# macOS/Linux +echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc +source ~/.bashrc +``` + +--- + +#### "Cannot find module 'xyz'" + +**Cause**: Dependencies not installed + +**Solution**: +```bash +# Delete node_modules and reinstall +rm -rf node_modules package-lock.json +npm install + +# Or use clean install +npm ci +``` + +--- + +#### "CMake Error: Could not find WebView2" + +**Cause**: WebView2 SDK not installed or wrong path + +**Solution**: +1. Verify installation: + ``` + %USERPROFILE%\.nuget\packages\microsoft.web.webview2\1.0.2210.55\ + ``` +2. If missing, run: + ``` + nuget install Microsoft.Web.WebView2 -Version 1.0.2210.55 + ``` +3. Alternatively, download manually from Microsoft + +--- + +#### "Plugin not detected in DAW" + +**Cause**: Multiple possible causes + +**Solution**: +1. Clear DAW plugin cache +2. Verify plugin installed in correct location +3. Check DAW logs for errors +4. Ensure WebView2 Runtime installed (Windows) + +--- + +#### "React UI shows white screen in VST3" + +**Cause**: Resources not copied or WebView2 init failure + +**Solution**: +1. Verify `dist/` folder copied to plugin bundle: + ``` + Wingman.vst3/Contents/Resources/webui/ + ``` +2. Check if `index.html` exists in webui folder +3. View Ableton Log.txt for WebView2 errors +4. Reinstall WebView2 Runtime + +--- + +#### "Permission denied" errors (macOS/Linux) + +**Cause**: Script or binary lacks execute permission + +**Solution**: +```bash +chmod +x path/to/script +# or +chmod +x path/to/binary +``` + +--- + +#### Build takes forever / out of memory + +**Cause**: Insufficient system resources + +**Solution**: +```bash +# Limit parallel jobs +cmake --build . -- -j2 # Use only 2 cores + +# Or set environment variable +export CMAKE_BUILD_PARALLEL_LEVEL=2 +``` + +--- + +## โœ… Verification + +### Verify Standalone App + +#### Test 1: App Launches +```bash +cd wingman-app +npm start +``` + +**Expected**: Electron window opens with React UI + +--- + +#### Test 2: AI Chat Works +1. Open app +2. Configure API key (Settings) +3. Type: "Generate trap drums" +4. **Expected**: Piano roll appears with MIDI pattern + +--- + +#### Test 3: MIDI Export +1. Generate MIDI pattern +2. Click "Send to DAW" or "Export MIDI" +3. **Expected**: MIDI file saved or sent successfully + +--- + +### Verify Remote Script + +#### Test 1: Script Loaded +1. Open Ableton Live +2. Check Preferences โ†’ Link/Tempo/MIDI +3. **Expected**: "WingmanControl" appears in Control Surface dropdown + +--- + +#### Test 2: Communication +1. Start Wingman app +2. Open Ableton Live +3. Play transport +4. **Expected**: App shows "Playing" status + +--- + +#### Test 3: Commands Work +In Wingman app: +1. Send command: "Set tempo to 120" +2. **Expected**: Ableton tempo changes to 120 BPM + +--- + +### Verify VST3 Plugin + +#### Test 1: Plugin Detected +1. Open DAW (Ableton, FL Studio, etc.) +2. Rescan plugins +3. **Expected**: "Wingman" appears in plugin list + +--- + +#### Test 2: Plugin Loads +1. Add Wingman to a track +2. Open plugin editor +3. **Expected**: UI appears (not white screen) + +--- + +#### Test 3: Basic Functionality +1. Type message in plugin chat +2. **Expected**: AI responds +3. Generate MIDI +4. **Expected**: MIDI sent to DAW track + +--- + +## ๐Ÿ“š Additional Resources + +- **CMake Documentation**: https://cmake.org/documentation/ +- **JUCE Documentation**: https://juce.com/learn/documentation +- **Electron Documentation**: https://www.electronjs.org/docs +- **WebView2 Documentation**: https://learn.microsoft.com/en-us/microsoft-edge/webview2/ + +--- + +## ๐Ÿค Getting Help + +If you encounter issues not covered here: + +1. **Check KNOWN_ISSUES.md** - May already be documented +2. **Search GitHub Issues** - Someone may have reported it +3. **Ask in GitHub Discussions** - Community can help +4. **File a Bug Report** - With full details + +--- + +## ๐Ÿ“ Notes for Contributors + +- Always build in **Release** mode for distribution +- Run linters before committing (`npm run lint`) +- Test on clean systems (VMs recommended) +- Document any new build steps or requirements + +--- + +**Last Updated**: January 2026 +**Maintained By**: Wingman Development Team +**Questions?** Open an issue or discussion on GitHub From 2bdb79c71dc8b1283d6bf8805e8ba585c8ba6afe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 5 Jan 2026 01:41:17 +0000 Subject: [PATCH 3/4] docs: Add CONTRIBUTING, DEPENDENCIES, and enhance documentation structure Co-authored-by: micahcooley <158981228+micahcooley@users.noreply.github.com> --- CONTRIBUTING.md | 560 ++++++++++++++++++++++++++++++++++++++++++++++++ DEPENDENCIES.md | 393 +++++++++++++++++++++++++++++++++ 2 files changed, 953 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 DEPENDENCIES.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f2ebe7a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,560 @@ +# Contributing to Wingman + +Thank you for your interest in contributing to Wingman! This document provides guidelines and information for contributors. + +**Current Status**: Project is in alpha development and **not yet accepting external contributions**. This document outlines future contribution guidelines. + +--- + +## ๐Ÿ“‹ Table of Contents + +- [Code of Conduct](#code-of-conduct) +- [Getting Started](#getting-started) +- [Development Workflow](#development-workflow) +- [Coding Standards](#coding-standards) +- [Commit Guidelines](#commit-guidelines) +- [Pull Request Process](#pull-request-process) +- [Testing Requirements](#testing-requirements) +- [Documentation](#documentation) + +--- + +## ๐Ÿ“œ Code of Conduct + +### Our Pledge + +We are committed to providing a welcoming and inclusive environment for all contributors, regardless of: +- Experience level +- Gender identity and expression +- Sexual orientation +- Disability +- Personal appearance +- Body size +- Race, ethnicity, or nationality +- Age +- Religion + +### Expected Behavior + +- **Be Respectful**: Treat all contributors with respect and kindness +- **Be Collaborative**: Work together and help each other +- **Be Professional**: Keep discussions focused on technical matters +- **Be Open-Minded**: Welcome different perspectives and ideas +- **Give Credit**: Acknowledge others' contributions + +### Unacceptable Behavior + +- Harassment, trolling, or personal attacks +- Discriminatory or offensive language +- Publishing others' private information +- Spam or off-topic discussions +- Any conduct that would be inappropriate in a professional setting + +### Enforcement + +Violations will result in warnings, temporary bans, or permanent bans at maintainers' discretion. Report issues to project maintainers. + +--- + +## ๐Ÿš€ Getting Started + +### Prerequisites + +Before contributing, ensure you have: +- [ ] Read the [README.md](README.md) +- [ ] Set up your development environment ([docs/BUILD_SETUP.md](docs/BUILD_SETUP.md)) +- [ ] Built the project successfully +- [ ] Familiarized yourself with the architecture ([CLAUDE.md](CLAUDE.md)) +- [ ] Checked [KNOWN_ISSUES.md](KNOWN_ISSUES.md) and [TODO.md](TODO.md) + +### Finding Something to Work On + +**Not yet available** - Will be added when project reaches stable state. + +Future options: +- Check GitHub Issues labeled `good-first-issue` +- Check [TODO.md](TODO.md) for tasks +- Ask in GitHub Discussions + +--- + +## ๐Ÿ”„ Development Workflow + +### Fork and Clone + +```bash +# Fork the repository on GitHub first + +# Clone your fork +git clone https://github.com/YOUR_USERNAME/wingman.git +cd wingman + +# Add upstream remote +git remote add upstream https://github.com/micahcooley/wingman.git +``` + +### Create a Branch + +```bash +# Update your fork +git checkout main +git pull upstream main + +# Create a feature branch +git checkout -b feature/your-feature-name + +# Or for bug fixes +git checkout -b fix/issue-description +``` + +### Branch Naming Conventions + +| Type | Prefix | Example | +|------|--------|---------| +| New Feature | `feature/` | `feature/add-midi-quantization` | +| Bug Fix | `fix/` | `fix/memory-leak-plugin` | +| Documentation | `docs/` | `docs/update-build-guide` | +| Performance | `perf/` | `perf/optimize-midi-generation` | +| Refactoring | `refactor/` | `refactor/cleanup-services` | +| Testing | `test/` | `test/add-unit-tests` | +| CI/CD | `ci/` | `ci/add-github-actions` | + +### Make Changes + +1. **Write Code**: Follow [Coding Standards](#coding-standards) +2. **Add Tests**: Cover new functionality +3. **Update Docs**: Document changes +4. **Run Linters**: Ensure code quality +5. **Test Locally**: Verify everything works + +```bash +# Run linters +cd wingman-app +npm run lint + +# Run tests (when available) +npm test + +# Build to verify +npm run build +``` + +### Commit Changes + +Follow [Commit Guidelines](#commit-guidelines): + +```bash +git add . +git commit -m "feat: Add MIDI quantization feature" +``` + +### Push to Your Fork + +```bash +git push origin feature/your-feature-name +``` + +### Open Pull Request + +1. Go to your fork on GitHub +2. Click "Compare & pull request" +3. Fill out PR template (when available) +4. Link related issues +5. Wait for review + +--- + +## ๐Ÿ“ Coding Standards + +### General Principles + +- **KISS**: Keep It Simple, Stupid +- **DRY**: Don't Repeat Yourself +- **YAGNI**: You Aren't Gonna Need It +- **SOLID**: Single responsibility, Open/closed, Liskov substitution, Interface segregation, Dependency inversion + +### Language-Specific Guidelines + +#### TypeScript/JavaScript + +**Style Guide**: Airbnb JavaScript Style Guide (with modifications) + +**Key Points**: +- Use TypeScript for all new code +- Prefer `const` over `let`, avoid `var` +- Use arrow functions for callbacks +- Use async/await over promises +- Add JSDoc comments for public APIs +- Use ESLint and Prettier + +**Example**: +```typescript +/** + * Generates MIDI pattern based on user prompt and AI specifications. + * @param prompt - User's natural language request + * @param refinedParams - AI-refined parameters for generation + * @returns Promise resolving to MIDI sequence + * @throws {MagentaError} If generation fails + */ +export async function generateMidiPattern( + prompt: string, + refinedParams: MusicParameters +): Promise { + // Implementation +} +``` + +#### C++ (JUCE Plugin) + +**Style Guide**: JUCE Coding Standards + Google C++ Style Guide + +**Key Points**: +- Use JUCE idioms (MessageManager, AudioProcessor, etc.) +- Follow RAII principles +- Use smart pointers (`std::unique_ptr`, `std::shared_ptr`) +- Avoid raw `new`/`delete` +- Use `const` liberally +- Add Doxygen comments for public APIs + +**Example**: +```cpp +/** + * @brief Handles WebView2 message from React UI + * + * Parses JSON message, validates schema, and dispatches to appropriate handler. + * Thread-safe: Can be called from WebView2 thread. + * + * @param message JSON string from WebView2 + * @throws std::invalid_argument if message format is invalid + */ +void WingmanProcessor::handleWebMessage(const juce::String& message) { + // Implementation +} +``` + +#### Python (Remote Script) + +**Style Guide**: PEP 8 + +**Key Points**: +- Follow PEP 8 strictly +- Use type hints (Python 3.8+) +- Add docstrings (Google style) +- Keep functions small and focused +- Use meaningful variable names + +**Example**: +```python +def launch_clip(track_index: int, scene_index: int, quantization: int = 1) -> bool: + """ + Launches clip at specified track and scene indices. + + Args: + track_index: Zero-based track index in Live set + scene_index: Zero-based scene index + quantization: Launch quantization (0=none, 1=bar, 2=beat, etc.) + + Returns: + True if clip launched successfully, False otherwise + + Raises: + IndexError: If track or scene index out of range + """ + # Implementation +``` + +### Code Organization + +#### File Structure +``` +# TypeScript +src/ + โ”œโ”€โ”€ services/ # Business logic + โ”œโ”€โ”€ components/ # React components + โ”œโ”€โ”€ hooks/ # Custom React hooks + โ”œโ”€โ”€ utils/ # Helper functions + โ””โ”€โ”€ types/ # TypeScript types/interfaces + +# C++ +Source/ + โ”œโ”€โ”€ *.h # Header files + โ”œโ”€โ”€ *.cpp # Implementation files + โ””โ”€โ”€ README.md # Component documentation +``` + +#### Naming Conventions + +| Type | Convention | Example | +|------|-----------|---------| +| **TypeScript** | +| Files | camelCase | `musicPromptRefiner.ts` | +| Classes | PascalCase | `MagentaService` | +| Functions | camelCase | `generateMidiPattern()` | +| Constants | UPPER_SNAKE_CASE | `DEFAULT_TEMPO` | +| Interfaces | PascalCase | `MusicParameters` | +| **C++** | +| Classes | PascalCase | `WingmanProcessor` | +| Methods | camelCase | `processBlock()` | +| Members | camelCase_ | `sampleRate_` | +| Constants | kCamelCase | `kMaxBufferSize` | +| **Python** | +| Files | snake_case | `command_handler.py` | +| Classes | PascalCase | `ObserverManager` | +| Functions | snake_case | `launch_clip()` | +| Constants | UPPER_SNAKE_CASE | `DEFAULT_TEMPO` | + +### Comments + +**When to Comment**: +- โœ… Complex algorithms +- โœ… Non-obvious design decisions +- โœ… Public APIs +- โœ… Workarounds for bugs +- โœ… TODO/FIXME/HACK markers + +**What NOT to Comment**: +- โŒ Obvious code (`i++; // increment i`) +- โŒ Outdated information +- โŒ Code that should be self-explanatory + +**Example**: +```typescript +// โœ… Good: Explains WHY +// Use exponential backoff to avoid rate limiting (max 10 retries) +const delay = Math.min(1000 * Math.pow(2, retries), 30000); + +// โŒ Bad: Explains WHAT (obvious from code) +// Set the delay to 1000 times 2 to the power of retries +const delay = 1000 * Math.pow(2, retries); +``` + +--- + +## ๐Ÿ’ฌ Commit Guidelines + +### Conventional Commits + +We use [Conventional Commits](https://www.conventionalcommits.org/) specification. + +**Format**: +``` +(): + + + +