- Home
- Skills
- Agents & Orchestration
- piano midi generator
Works with the AI Agents you already use
piano midi generator
Generate original solo-piano MIDI music locally with a pretrained LSTM model.
Free
piano midi generator
Example session with this skill installed
Generate a 40-second piano melody and render it as a WAV file so I can hear it. Use a slightly higher temperature for more variety.
- Read your context and instructions
- Compiled the piano midi generator
I have generated a new solo-piano composition using the LSTM model. The sequence consists of approximately 180 notes, which translates to about 40 seconds of music at the default tempo. I used a temperature setting of 1.2 to introduce more melodic variety and rendered a WAV preview for immediate playback.
Generation Log
| Parameter | Value |
|---|---|
| Model | 2-Layer LSTM (256 units) |
| Note Count | 180 |
| Temperature | 1.2 |
| Output MIDI | generated_music.mid |
| Output Audio | generated_music.wav |
| Duration | ~42 seconds |
# Command executed:
python scripts/generate.py --length 180 --temperature 1.2 --out generated_music.mid --wav
The resulting MIDI file contains four-stream data: pitch, duration, velocity (dynamics), and time-shift. The WAV was rendered using the built-in basic synthesizer. For a more realistic grand piano sound, you can re-run the command with a specific .sf2 soundfont or import the MIDI into your preferred Digital Audio Workstation (DAW).
Next steps
- Import
generated_music.midinto a DAW like Ableton or Logic to apply high-quality VST instruments. - If the melody is too experimental, re-run with
--temperature 0.8for a more grounded, repetitive structure. - Provide your own MIDI file as a
--seed-midito have the model continue your specific theme.
Connects securely to your tools. The creator never sees your data.
About this skill
Writing placeholder music or composing melodies manually is time-consuming. This skill generates original solo-piano MIDI files locally using a lightweight LSTM model without requiring external APIs or GPUs.
What it does
- MIDI generation: Produces standard
.midfiles with controllable pitch, duration, and velocity. - Melody continuation: Extends existing MIDI files by using them as a seed for the neural network.
- Local execution: Runs inference entirely on CPU using
numpy, requiring no internet or API keys. - Audio rendering: Synthesizes output directly to
.wavor.mp3for immediate previewing. - Hyperparameter control: Adjusts musical randomness via temperature and caps silences or note lengths.
How it works
- Install dependencies using the provided
requirements.txtwhich includesnumpyandpretty_midi. - Execute the generation script specifying the desired note count and output filename.
- Pass an optional seed MIDI file if you want the model to continue an existing composition.
- Preview the output by enabling the built-in synthesizer flags or importing the MIDI into a DAW.
Frameworks & tools
The engine is built on numpy for matrix operations with pretty_midi for file handling. It uses a pretrained 2-layer LSTM architecture with 256 hidden units.
Why this beats prompting it yourself
LLMs often struggle with the precise binary structure of MIDI and produce malformed files or unmusical chaos. This tool uses a specialized model trained on the MAESTRO dataset to ensure rhythmically coherent piano performances.
Use cases
- Generate background tracks or placeholders for game development and prototypes.
- Extend a short melodic motif into a full-length piano arrangement.
- Batch produce unique musical seeds for further refinement in a DAW.
- Create royalty-free ambient piano music for local applications.
Known limitations
Supports solo piano only. It cannot produce multi-instrument arrangements, vocals, or sheet music. Quality varies per run and lacks explicit control over song structure or key signatures.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Solo piano only. No support for chords, keys, or song structure. Seed MIDI must be melodic; drum tracks are ignored. Requires numpy and pretty_midi.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account
- Software
- Python 3.10+ with pip
- Optional
- ffmpeg (only for MP3 export)pyfluidsyntha .sf2 soundfont (only for realistic audio)
First-time setup needs internet once: pip install -r scripts/requirements.txt (numpy, pretty_midi). After that it runs fully offline. Output is MIDI; WAV preview uses a basic synth.
Permissions
File Scopes
Terminal to run the Python script. Reads the bundled model weights and an optional user-supplied seed MIDI. Writes the generated .mid (and optional .wav/.mp3) to the path the user chooses. No network access at runtime.