Last Updated: 2025-11-15 Platform: macOS 10.15+ Architecture: Intel (x86_64) and Apple Silicon (arm64)
# Navigate to project
cd /Users/christopherjoseph/projects/amiable/midimon
# Check Rust is installed
rustc --version # Should show 1.70+
# Check Node.js is installed (for GUI)
node --version # Should show 18+
npm --version
# Check if you have a MIDI device connected
ls /dev/cu.* | grep -i midi# Build the entire workspace (core + daemon + GUI)
cargo build --release --workspace
# This builds:
# - midimon-core (engine library)
# - midimon-daemon (background service + CLI tools)
# - midimon-gui (Tauri app)Expected output:
Compiling midimon-core v2.0.0
Compiling midimon-daemon v2.0.0
Compiling midimon-gui v2.0.0
Finished release [optimized] target(s) in 45.23s
Build times:
- Clean build: ~45-60 seconds
- Incremental: ~5-10 seconds
# Start the daemon
./target/release/midimon
# Expected output:
# MIDIMon v2.0.0 starting...
# Available MIDI ports:
# 0: IAC Driver Bus 1
# 1: ...
#
# Select port number (or 'q' to quit):If you don't have a MIDI device:
- macOS has a built-in virtual MIDI device: "IAC Driver"
- Enable it: Audio MIDI Setup.app → Window → Show MIDI Studio → IAC Driver → Device is online ✓
Open a second terminal while daemon is running:
# Check daemon status
./target/release/midimonctl status
# Expected output:
# Daemon Status:
# - Lifecycle: Running
# - Uptime: 5s
# - Events processed: 0
# - Device: Not connected
# Test config reload (hot-reload)
./target/release/midimonctl reload
# Expected output:
# ✓ Configuration reloaded successfully
# Reload time: 3ms
# Test ping (latency check)
./target/release/midimonctl ping
# Expected output:
# ✓ Daemon responded in 1ms
# Validate config
./target/release/midimonctl validate
# Expected output:
# ✓ Configuration is valid# 1. Make a small change to config
echo "# Test comment" >> ~/.config/midimon/config.toml
# 2. Reload daemon
./target/release/midimonctl reload
# 3. Check it reloaded in <10ms
# ✓ Configuration reloaded successfully
# Reload time: 3mscd midimon-gui
# Install frontend dependencies
cd ui
npm install
# Build the frontend
npm run build
# Go back to GUI root
cd ..
# Build the Tauri app
cargo tauri build --debug # Debug build for testingExpected output:
Finished 2 bundles at:
/Users/.../midimon-gui/src-tauri/target/release/bundle/dmg/MIDIMon_2.0.0_x64.dmg
/Users/.../midimon-gui/src-tauri/target/release/bundle/macos/MIDIMon.app
# From midimon-gui directory
cargo tauri devExpected behavior:
- Vite dev server starts (http://localhost:5173)
- Tauri window opens with MIDIMon UI
- Menu bar icon appears in system tray
What to test:
- Click menu bar icon → Menu appears
- Check "Status: Checking..." updates to "Status: Running" or "Status: Stopped"
- Try "Reload Configuration" → Should reload daemon
- Try "Show MIDIMon" → Window focuses
- Click "Devices" in sidebar
- Should see list of MIDI devices
- Try "📋 Device Templates" button → Template selector opens
- Select "Maschine Mikro MK3" or "Generic 25-Key MIDI Keyboard"
- Click "Apply Template" → Config created
- Click "Modes" in sidebar
- Should see "Default" mode
- Click "+ Add Mode" → Create "Test Mode"
- Set color to "green"
- Click "Save" → Mode appears in list
- Click "Mappings" in sidebar
- Click "+ Add Mapping"
- Click "🎹 MIDI Learn" button
- If you have a MIDI device:
- Press a pad/key → Trigger auto-detected
- Click "Use This" → Trigger filled in
- If no MIDI device:
- Skip MIDI Learn
- Manually select trigger type: "Note"
- Set note number: 60 (Middle C)
- Configure action:
- Type: "Keystroke"
- Modifiers: [Cmd]
- Keys: "S"
- Click "Save Mapping"
- Click "Settings" in sidebar
- Check config file path displays
- Click "📋" → Path copied to clipboard
- Click "📊 Show Event Console"
- If MIDI device connected: Press pads → Events appear
- If no device: Events will be empty
With GUI running:
-
Status Updates:
- Menu bar icon shows status
- Auto-updates every 2 seconds
- Shows: Running/Stopped/Error/Paused
-
Quick Actions:
- Click "Reload Configuration" → Daemon reloads
- Click "Pause Processing" → Event processing stops
- Click "Resume Processing" → Event processing resumes
-
Mode Switching:
- Hover "Switch Mode" → Submenu appears
- Click "Development" → Mode switches
- Check daemon reloads
# Use the MIDI diagnostic tool to send virtual events
./target/release/midi_diagnostic 0 # Use IAC Driver or port 0
# This will show you ALL MIDI events on that port
# You can use macOS's Audio MIDI Setup to send test notesTo send test MIDI from macOS:
- Open Audio MIDI Setup.app
- Window → Show MIDI Studio
- Double-click "IAC Driver"
- Check "Device is online"
- Double-click IAC Driver in MIDI Studio
- Click "Test" → Sends test notes
You need one of:
- MIDI keyboard/controller (USB)
- Native Instruments Maschine Mikro MK3 (full RGB support)
- Virtual MIDI device (IAC Driver) + MIDI test app
-
Start daemon with MIDI device:
./target/release/midimon # Select your MIDI device port number -
Open GUI:
cd midimon-gui cargo tauri dev -
Test MIDI Learn:
- Go to Mappings tab
- Click "+ Add Mapping"
- Click "🎹 MIDI Learn"
- Press a pad on your controller
- Should show: "Trigger captured!"
- Displays detected pattern (e.g., "Note 36 - medium (41-80)")
-
Test Pattern Detection:
Long Press:
- Click "🎹 MIDI Learn"
- Press and hold a pad for 1+ seconds
- Should detect: "Long Press Note 36 (1520ms)"
Double Tap:
- Click "🎹 MIDI Learn"
- Quickly press same pad twice (within 500ms)
- Should detect: "Double Tap Note 36 (timeout: 350ms)"
Chord:
- Click "🎹 MIDI Learn"
- Press 2+ pads simultaneously (within 100ms)
- Should detect: "Chord [36, 37, 38] (window: 100ms)"
Encoder Turn:
- Click "🎹 MIDI Learn"
- Turn a knob/encoder on your controller
- Should detect: "Encoder CC 1 (direction: clockwise)"
# List your MIDI devices
./target/release/midimonctl devices # (if this command exists)
# Or use midir to list:
cargo run --bin test_midi-
Open GUI → Devices tab
-
Click "📋 Device Templates"
-
Should see 6 templates:
- Maschine Mikro MK3
- Launchpad Mini
- Korg nanoKONTROL2
- Akai APC Mini
- Arturia BeatStep
- Generic 25-Key MIDI Keyboard
-
Select a template (e.g., Maschine Mikro MK3)
-
Preview should show:
- Name, manufacturer, description
- MIDI patterns it matches
- Category (pad-controller)
-
Click "Apply Template"
-
Expected:
- Config file updated at ~/.config/midimon/config.toml
- Daemon reloads
- Alert: "Configuration created from template!"
-
Verify:
cat ~/.config/midimon/config.toml # Should contain template config
In Template Selector:
- Click "Pad Controller" tab → Shows pad controllers
- Click "Keyboard" tab → Shows keyboard template
- Click "Mixer" tab → Shows mixer controllers
- Click "All" tab → Shows all 6 templates
Critical: macOS requires Accessibility permissions for app detection.
- Open System Settings → Privacy & Security → Accessibility
- Click + and add:
- Terminal.app (if running from terminal)
- MIDIMon.app (if running GUI)
- Toggle the switches ON
# Start the GUI
cd midimon-gui
cargo tauri devIn GUI:
-
Go to Settings tab
-
Open browser console (Cmd+Option+I)
-
Run in console:
await invoke('get_frontmost_app')
-
Should return:
{ "bundle_id": "com.google.Chrome", "name": "Google Chrome", "path": "/Applications/Google Chrome.app", "pid": 12345 } -
Switch apps (Cmd+Tab to different app)
-
Run command again → Should show new app
- Go to Devices tab
- Click "🔄 Profiles"
- Click "+ New Profile"
- Enter:
- Name: "VS Code Profile"
- Bundle IDs:
com.microsoft.VSCode
- Click "Save"
- Profile appears in list
Manual Switch:
- In Profile Manager
- Click on "VS Code Profile"
- Click "Activate"
- Check:
- Config reloads
- Status shows: "Profile: VS Code Profile"
Automatic Switch (requires app detection):
- Create 2 profiles:
- "Chrome Profile" →
com.google.Chrome - "VS Code Profile" →
com.microsoft.VSCode
- "Chrome Profile" →
- Start app monitoring (if not auto-started)
- Switch to Chrome (Cmd+Tab)
- Profile should auto-switch to Chrome Profile
- Switch to VS Code
- Profile should auto-switch to VS Code Profile
Export:
- Select a profile
- Click "Export"
- Choose format: JSON or TOML
- Save file
- Verify file contents:
cat ~/Downloads/vscode-profile.toml
Import:
- Click "Import"
- Select exported file
- Enter new name (or keep same)
- Click "Import"
- Profile appears in list
- Native Instruments Maschine Mikro MK3
- NI USB drivers installed
- Accessibility permissions granted
# Run LED diagnostic tool
cargo run --bin led_diagnostic
# Expected:
# - All 16 pads cycle through colors
# - RGB test pattern appears
# - No errors about HID accessEdit config (~/.config/midimon/config.toml):
[led_settings]
scheme = "reactive"
brightness = 100
fade_time_ms = 1000Try different schemes:
# Start daemon
./target/release/midimon 2 # Port 2 for Mikro MK3
# Test schemes (Ctrl+C and restart with different scheme)
./target/release/midimon 2 --led reactive
./target/release/midimon 2 --led rainbow
./target/release/midimon 2 --led breathing
./target/release/midimon 2 --led wave
./target/release/midimon 2 --led sparkleExpected LED behavior:
- Reactive: Pads light up on press (green/yellow/red by velocity), fade after 1s
- Rainbow: Rotating rainbow pattern across all pads
- Breathing: Pulsing effect, all pads sync
- Wave: Cascading wave left-to-right
- Sparkle: Random twinkling
-
Open GUI → Settings tab
-
Click "📊 Show Event Console"
-
If MIDI device connected:
- Press pads → Events appear in console
- Shows: Note number, velocity, timestamp
- Color-coded by event type
-
Event types displayed:
- Note On/Off (blue)
- Control Change (green)
- Processed events (yellow)
- Actions (purple)
- Errors (red)
# If CLI event command exists
./target/release/midimonctl events
# Shows real-time event stream
# Press Ctrl+C to stop# Check if daemon process exists
ps aux | grep midimon
# If not running, start it
./target/release/midimon# Check IPC socket exists
ls -la /tmp/midimon.sock
# If missing, restart daemon
./target/release/midimonctl stop
./target/release/midimon# Check Node.js dependencies installed
cd midimon-gui/ui
npm install
# Check Tauri CLI installed
cargo install tauri-cli
# Try development mode
cargo tauri dev# Check MIDI devices in Audio MIDI Setup
open -a "Audio MIDI Setup"
# Enable IAC Driver (virtual MIDI)
# Window → Show MIDI Studio → IAC Driver → Device is online ✓
# List MIDI ports
cargo run --bin test_midi# Grant Input Monitoring permission
# System Settings → Privacy & Security → Input Monitoring
# Add Terminal.app or MIDIMon.app
# Grant Accessibility permission (for app detection)
# System Settings → Privacy & Security → Accessibility
# Add Terminal.app or MIDIMon.app# Update Rust toolchain
rustup update
# Clean build
cargo clean
cargo build --release --workspace
# Check Rust version
rustc --version # Should be 1.70+# Benchmark reload time (should be <10ms)
time ./target/release/midimonctl reload
# Expected output:
# ✓ Configuration reloaded successfully
# Reload time: 3ms
#
# real 0m0.015s
# user 0m0.005s
# sys 0m0.008s# Measure ping latency (should be <5ms)
for i in {1..10}; do
./target/release/midimonctl ping
done
# Expected: All responses <5msWith MIDI device:
- Press pad on controller
- Watch Event Console
- Latency should be <10ms from physical press to event display
After testing, use this template to document results:
# MIDIMon v2.0.0 Test Report
**Date**: 2025-11-15
**Tester**: [Your Name]
**Platform**: macOS [version]
**Architecture**: [Intel/Apple Silicon]
**MIDI Device**: [Your controller or "IAC Driver"]
## Build Status
- [ ] Workspace builds without errors
- [ ] Build time: ___s (clean), ___s (incremental)
## Daemon Testing
- [ ] Daemon starts successfully
- [ ] Config hot-reload works (<10ms)
- [ ] IPC ping latency <5ms
- [ ] Config validation works
## GUI Testing
- [ ] GUI launches in dev mode
- [ ] System tray icon appears
- [ ] Status updates (every 2s)
- [ ] All 4 tabs load (Devices, Modes, Mappings, Settings)
## MIDI Learn Testing
- [ ] Single note detection works
- [ ] Long press detection (>1000ms)
- [ ] Double tap detection (<500ms)
- [ ] Chord detection (<100ms)
- [ ] Encoder direction detection
- [ ] TOML config generated correctly
## Device Templates
- [ ] All 6 templates load
- [ ] Template selection works
- [ ] Template application works
- [ ] Daemon reloads after apply
## Per-App Profiles
- [ ] App detection works (with permissions)
- [ ] Profile creation works
- [ ] Manual profile switching works
- [ ] Automatic switching works
- [ ] Profile import/export works
## LED Feedback (if Mikro MK3)
- [ ] Reactive scheme works
- [ ] Rainbow scheme works
- [ ] LED colors accurate
## Event Console
- [ ] Events display in GUI
- [ ] Events color-coded correctly
- [ ] Real-time updates work
## Issues Found
[List any bugs or issues]
## Performance Metrics
- Config reload: ___ms
- IPC ping: ___ms
- MIDI latency: ___ms- Report Issues: Create GitHub issues for any bugs found
- Document Use Cases: Write down your specific workflows
- Share Feedback: What worked well? What needs improvement?
- Request Features: What's missing that you need?
# Build everything
cargo build --release --workspace
# Start daemon
./target/release/midimon
# Daemon control
./target/release/midimonctl status
./target/release/midimonctl reload
./target/release/midimonctl validate
./target/release/midimonctl ping
./target/release/midimonctl stop
# GUI development
cd midimon-gui
cargo tauri dev
# GUI production build
cd midimon-gui
cargo tauri build
# Diagnostic tools
cargo run --bin midi_diagnostic 2
cargo run --bin led_diagnostic
cargo run --bin test_midi
# Check daemon process
ps aux | grep midimon
ls -la /tmp/midimon.sock
# View config
cat ~/.config/midimon/config.tomlHappy Testing! 🎹