MusicXML sheet music plugin for GUI Chat applications. Displays and plays sheet music from MusicXML format.
- Display sheet music from MusicXML format
- Audio playback with OpenSheetMusicDisplay and osmd-audio-player
- Tempo control
- Cursor following during playback
yarn add @gui-chat-plugin/music// In src/tools/index.ts
import MusicPlugin from "@gui-chat-plugin/music/vue";
const pluginList = [
// ... other plugins
MusicPlugin,
];
// In src/main.ts
import "@gui-chat-plugin/music/style.css";import { executeMusic, TOOL_DEFINITION } from "@gui-chat-plugin/music";
// Show sheet music
const result = await executeMusic(context, {
musicXML: "<musicxml-content>",
title: "My Song",
});interface MusicArgs {
musicXML: string; // The music in MusicXML format
title?: string; // Optional title for the music piece
}interface MusicToolData {
musicXML: string;
}This plugin requires:
opensheetmusicdisplay: For rendering MusicXML as sheet musicosmd-audio-player: For audio playback
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTry these prompts to test the plugin:
- "Create sheet music for a simple C major scale"
- "Write a short melody in G major"
- "Generate sheet music for Twinkle Twinkle Little Star"
MIT
- Protocol spec: gui-chat-protocol
- Reference implementations using this protocol: mulmoclaude · MulmoChat