Skip to content

Conversation

@daiverd
Copy link
Contributor

@daiverd daiverd commented Sep 4, 2025

  • refactor: remove deprecated VirtualMidiService and integrate into MidiService
  • feat: add TypeScript declarations for MIDI.js integration
  • feat: add dynamic MIDI.js script loader utility
  • feat: add enhanced JZZ.synth.MIDIjs bridge with dynamic instrument loading
  • feat: add MIDI.js library for browser-based soundfont synthesis
  • feat: integrate virtual synthesizers and MIDI.js into unified MidiService
  • refactor: update MidiStatus component for unified MIDI service
  • feat: Add channel 10 drum routing to JZZ.synth.MIDIjs bridge
  • feat: Add support for multiple MIDI.js soundfonts

David Sexton and others added 16 commits September 4, 2025 12:26
…iService

- Remove VirtualMidiService.ts as functionality moved to MidiService
- Update App.tsx to remove VirtualMidiService initialization
- Simplify MIDI initialization to single service

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive type definitions for MIDI.js global API
- Support for loadPlugin, loadResource, and audio context methods
- Enable type-safe MIDI.js usage in TypeScript components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Implement fail-fast script loading with detailed error reporting
- Load scripts in correct order: JZZ → MIDI.js → JZZ.synth.MIDIjs
- Add timeout handling and verification checks
- Support singleton pattern for efficient loading

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ading

- Implement dynamic instrument loading with piano fallback
- Add program change interception and deferred execution
- Prevent duplicate loading with state management
- Support multi-channel program changes
- Add comprehensive error handling and logging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add MIDI.js v0.3.2 for Web Audio API based synthesis
- Support dynamic soundfont loading from remote URLs
- Enable high-quality instrument synthesis with MP3/OGG formats
- Integrate with existing JZZ MIDI infrastructure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…vice

- Integrate JZZ Tiny Synthesizer and MIDI.js Synthesizer
- Add global JZZ availability for MIDI.js compatibility
- Implement unified device management for hardware and virtual devices
- Add proper TypeScript types and error handling
- Remove dependency on separate VirtualMidiService
- Support MP3 soundfont format with MusyngKite collection
- Clean up excessive debug logging for production readiness

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove VirtualMidiService dependencies
- Use event-driven device updates instead of polling
- Improve initialization checks and error handling
- Reduce polling interval from 2s to 5s for connection state
- Clean up device refresh logic

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Route MIDI channel 10 (drums) to JZZ.synth.Tiny for proper percussion sounds
- Keep channels 1-9, 11-16 on JZZ.synth.MIDIjs for high-quality melodic instruments
- Initialize JZZ.synth.Tiny port automatically when MIDI.js synthesizer is used
- Hybrid approach gives best of both synthesizers: working drums + quality instruments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Register 3 separate MIDI.js synthesizers: FatBoy, FluidR3, and MusyngKite
- Each synthesizer uses different soundfont URL for distinct sound character
- Users can now choose their preferred soundfont quality/style
- All synthesizers maintain channel 10 drum routing to JZZ.synth.Tiny
- Clean user experience: simple device selection, predictable sound per choice

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add spessasynth_lib dependency for high-quality SF2/SF3 soundfont synthesis.
SpessaSynth provides professional-grade audio worklet-based MIDI synthesis
with support for custom soundfonts and advanced synthesis features.

- Add spessasynth_lib ^4.0.3 dependency
- Include spessasynth_processor.min.js worklet in public directory
- Provides alternative to MIDI.js with better soundfont support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Extend MidiPreferences to support configurable soundfonts for both
MIDI.js and SpessaSynth synthesizers.

- Add midiJsSoundfont field with MusyngKite as default
- Add spessaSynthSoundfont field for custom SF2/SF3 URLs
- Support user-configurable synthesis quality vs performance
- Enables single MIDI.js port with multiple soundfont options

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive soundfont selection interface to MIDI preferences tab.

- MIDI.js soundfont dropdown (FatBoy/FluidR3/MusyngKite)
- SpessaSynth custom soundfont URL input field
- Real-time synthesizer reloading on preference changes
- Clear descriptions and user guidance for each option
- Enhanced MIDI tab with organized soundfont controls

Replaces multiple MIDI.js ports with single configurable synthesizer.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major refactoring of MIDI synthesizer architecture:

MIDI.js Changes:
- Replace 3 separate soundfont ports with single configurable synthesizer
- Dynamic soundfont loading based on user preferences
- Support FatBoy, FluidR3 GM, and MusyngKite soundfonts
- Add reloadSynthesizers() method for real-time soundfont switching

SpessaSynth Integration:
- Add WorkletSynthesizer support for high-quality SF2/SF3 synthesis
- Proper JZZ engine integration with _openOut method
- AudioContext user gesture handling (resume on first MIDI message)
- Custom soundfont loading with fallback to built-in sounds
- Professional-grade audio worklet processing

Architecture Improvements:
- Enhanced error handling and debug logging
- Better AudioContext lifecycle management
- Improved synthesizer initialization timing
- Comprehensive soundfont loading with progress tracking

The system now provides 3 synthesizer options:
1. JZZ Tiny (basic built-in synthesis)
2. MIDI.js (configurable soundfont-based)
3. SpessaSynth (professional SF2/SF3 support)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed technical documentation for the complete MIDI system:

MIDI.md:
- Architecture overview with component diagrams
- MidiService implementation details and features
- UI component documentation (preferences, sidebar, status)
- Synthesizer library explanations (JZZ, MIDI.js, SpessaSynth)
- GMCP MIDI integration specifications
- Configuration and preference management
- Usage examples and step-by-step setup guides
- Comprehensive troubleshooting section

CLAUDE.md:
- Updated project instructions with MIDI system overview
- Development commands and architecture notes
- Key component descriptions and file locations

Provides complete reference for developers and users working with
the MIDI functionality in the Mongoose React Client.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove SpessaSynth library integration and simplify MIDI system to use
only JZZ Tiny and MIDI.js synthesizers. This eliminates complexity and
resolves integration issues with SpessaSynth's JZZ plugin registration.

Changes:
- Remove spessasynth_lib dependency from package.json
- Remove SpessaSynth worklet processor file
- Remove SpessaSynth integration from MidiService.ts
- Remove SpessaSynth preferences from PreferencesStore.tsx
- Remove SpessaSynth UI from MIDI preferences tab
- Update MIDI.md documentation to reflect simplified system

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Consolidated project documentation by merging other-CLAUDE.md into CLAUDE.md.
Added detailed code style guidelines, enhanced architecture overview with
GMCP protocol structure and component communication flow, and improved
development command documentation.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants