gitmyhub

claude-chat-midi-player

★ 2 updated 21d ago

A Claude Skill to spawn a Midi Player with included Synthesizer, and compose original music playing in it.

This is a Claude Skill that teaches Claude to compose original music and play MIDI files inside a chat, synthesizing every sound live in the browser with no audio samples.

Web Audio APIJavaScriptMIDIClaude Skillssetup: easycomplexity 3/5

This project, called webaudio-midi-composer, is a Claude Skill, meaning it is a set of instructions and reference material that teaches Claude how to do a specific task inside a chat conversation. In this case, the task is composing original music and playing MIDI files directly in the chat, complete with a piano roll display and playback controls. Every sound the skill produces, including drums, bass, and lead instruments, is generated from scratch using the browser's built in Web Audio tools, oscillators and filtered noise rather than any pre-recorded samples or audio files.

Ask Claude for something like a boss battle theme or a lullaby, and the skill plans out the song's structure, motifs, and harmony, then synthesizes each instrument and mixes them together following documented mixing rules, producing an interactive music player right inside the conversation. It can also take an existing .mid file and build a player for it, parsing the file itself and reproducing its instruments as a synthesized General MIDI band, entirely on the user's own machine, with nothing uploaded elsewhere.

A large part of the skill is a documented debugging process. While being built and tested against a very large, fast Final Fantasy VIII boss battle MIDI file, the author found and fixed several real audio problems, such as crackling caused by scheduling too many notes at once, and drums disappearing because a compressor was reacting the wrong way to loud, busy sections. Each of these problems is written up with its symptom, cause, fix, and a measured result, so that anyone using the skill benefits from lessons already learned the hard way.

The skill can be installed either in Claude.ai, through the Skills section of settings, or in Claude Code by placing its folder in the local skills directory. The author is upfront that the synthesized instruments are only an impression of real ones, not a faithful recreation, and lists planned improvements such as exporting composed music back out as a MIDI file and adding mute and solo controls per instrument track.

Where it fits