
Description
Midi Toolkit - Animate Pianos & Keyboards in Unity
Bring your virtual pianos and keyboards to life! Midi Toolkit specializes in synchronizing MIDI data with 3D piano key animations, creating realistic performances that respond to every note, velocity, and sustain pedal press. Whether you're showcasing classical performances, building interactive music learning tools, or creating cinematic music scenes, this toolkit handles the technical complexity so you can focus on the visuals.
GPU-Powered Performance
Two complementary approaches for different needs:
🎨 MidiTextureCompute - Real-time GPU rendering perfect for:
Live MIDI controller performances
Dynamic tempo changes and playback control
📸 MidiTextureBaker + Player - Pre-baked sequences ideal for:
Music videos and cinematic performances
Synchronized visual effects with pre-recorded audio
Maximum performance - zero runtime processing
Both systems output texture data (per-key state, velocity, sustain) that you sample in your shaders to drive key materials, emissive glow, displacement, or any visual effect you can imagine.
What's Inside
🎹 MidiFileInput: Load and play standard MIDI files with full playback control (play/pause/seek), tempo adjustment, and per-track enabling. Parse any .mid file and drive your piano animations.
🎛️ MidiLiveInput: Connect hardware MIDI keyboards and controllers to capture events in real-time. Perfect for interactive experiences, practice tools, or live performance capture.
🔊 MidiAudioOutput: Audio synthesis that converts MIDI events to sound using your own AudioClip samples. Includes a Grand Piano sample library (88 notes) for immediate playback. Multi-instrument support with polyphony management.
🎨 MidiTextureCompute: GPU compute shader generates animation texture in real-time. Customizable fade speeds, sustain tracking, and per-channel control.
📸 MidiTextureBaker: Pre-bake entire MIDI files into optimized textures.
▶️ MidiTextureBakerPlayer: Play baked textures with automatic syncing. No processing overhead during playback.
🎯 MidiInputEventListener: Wire MIDI events directly to GameObjects through Unity Events - zero coding required. Trigger animations, particle systems, lighting changes, or any Unity component from the Inspector.
Perfect For
🎼 Animated Piano Performances: Synchronize key presses with audio playback for virtual performances
🎓 Music Education: Build interactive piano learning tools with visual feedback
🎬 Music Videos & Cinematics: Create visuals of pianos playing themselves
🎨 Creative Installations: Drive generative art, lighting, or other systems from piano performances
And Beyond: While optimized for pianos, the toolkit's modular design supports any MIDI-driven application - synthesizers, drum pads, orchestral instruments, or custom controllers.
Important Notes
⚠️ No 3D Models Included: This toolkit provides the MIDI processing and animation data. For a complete solution, pair it with my Grand Piano 3D model package (fully compatible) or use your own piano/keyboard models.
💡 Shader Knowledge Helpful: To visualize the texture data, you'll sample it in your materials/shaders. Example shader code provided in documentation.
If you have any questions or need assistance, please feel free to reach out! I'm always happy to help!






