Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    piano midi generator

    1

    Generate original solo-piano MIDI music locally with a pretrained LSTM model.

    Free

    Security scanned
    piano midi generator

    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

    ParameterValue
    Model2-Layer LSTM (256 units)
    Note Count180
    Temperature1.2
    Output MIDIgenerated_music.mid
    Output Audiogenerated_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.mid into a DAW like Ableton or Logic to apply high-quality VST instruments.
    • If the melody is too experimental, re-run with --temperature 0.8 for a more grounded, repetitive structure.
    • Provide your own MIDI file as a --seed-midi to 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 .mid files 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 .wav or .mp3 for immediate previewing.
    • Hyperparameter control: Adjusts musical randomness via temperature and caps silences or note lengths.

    How it works

    1. Install dependencies using the provided requirements.txt which includes numpy and pretty_midi.
    2. Execute the generation script specifying the desired note count and output filename.
    3. Pass an optional seed MIDI file if you want the model to continue an existing composition.
    4. 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.

    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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    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 forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    • Free with an Agensi account

    Requires

    Python 3.10+ with pip

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    *.mid
    *.wav
    *.mp3
    assets/weights.npz

    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.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    This skill produces standard .mid files that can be imported into any Digital Audio Workstation (DAW) like Ableton, FL Studio, or Logic Pro, as well as .wav or .mp3 files for immediate listening.

    No, the skill runs entirely locally on your CPU using a lightweight LSTM model and numpy, meaning you don't need internet access, API keys, or an expensive GPU to generate music.

    Yes, you can upload an existing MIDI file as a 'seed,' and the AI will analyze the patterns to compose a natural-sounding continuation of your original melody.

    Unlike general-purpose LLMs that often struggle with musical structure, this model was specifically trained on the MAESTRO dataset to ensure rhythmic coherence and realistic piano velocity.

    The package includes the pretrained 2-layer LSTM model weights, the Python generation script, a requirements file for dependencies, and documentation on how to adjust hyperparameters like 'temperature.'

    This skill is optimized for solo piano performances and does not support multi-instrument arrangements, vocals, or complex song structures like verses and choruses.

    New in Agents & Orchestration