Skip to content

Jed556/AutoMidiPlayer


Auto MIDI Player【AMP】

Beta Stable Downloads

A MIDI to key player for in-game instruments made using C# and WPF with Windows Mica design. This project is originally forked from sabihoshi/GenshinLyreMidiPlayer and was later detached into its own repository to enable multi-game support and introduce features that don’t fit the original Genshin Impact–only use design.

If you liked this project, consider contributing or giving a 🌟 star. Thank you~

Slideshow.mp4

Supported Games and Instruments

  • Genshin Impact - Windsong Lyre, Floral Zither, Vintage Lyre
  • Heartopia - Piano (All variations), 15-key instruments (e.g. lyre, wooden bass, violin, etc.)
  • Roblox - Piano (61-key)
  • Sky: Children of the Light - All available Sky instruments as of Feb 2026

How to use

  1. Download the program and then run, no need for installation.
  2. Open a .mid file by pressing the open file button at the top left.
  3. Enable the tracks that you want to be played back.
  4. Press play and it will automatically switch to the target game window.
  5. Automatically stops playing if you switch to a different window.

If you get a SmartScreen popup, click on "More info" and then "Run anyway" The reason this appears is because the application is not signed. Signing costs money which can get very expensive.

Features

Core Features

  • Multi-game support - Play on Genshin Impact (Lyre, Zither, Vintage Lyre) and Heartopia (Piano Variants)
  • Spotify-style UI - Modern player interface with fixed bottom controls
  • Per-song Settings - Key, speed, and transpose settings are saved per song
    • Track Management - Enable/disable individual MIDI tracks with detailed statistics
    • Transposition - Change the key with automatic note transposition
    • Speed Control - Adjust playback speed from 0.1x to 4.0x
    • BPM Control - Set a custom BPM for the song

Instrument Playback

  • Test MIDI files through speakers before playing in-game
  • Change keyboard layouts (QWERTY, QWERTZ, AZERTY, DVORAK, etc.)
  • Hold and merge nearby notes. Some songs sound better when merged (#4)
  • Play using your own MIDI Input Device
Instruments.mp4

MIDI Track Management

  • Play multiple tracks of a MIDI file simultaneously
  • Turn on/off tracks in realtime
Tracks.mp4

Piano Sheet

The Piano Sheet allows you to easily share songs to other people, or for yourself to try. You can change the delimiter as well as the split size, and spacing. This will use the current keyboard layout that you have chosen.

No preview yet

Queue

A queue allows you to play songs without having to open or delete a song or file.

Queue.mp4

Theming

You can set the player to light mode/dark mode and change its accent color.

Theming.mp4

About

What are MIDI files?

MIDI files (.mid) is a set of instructions that play various instruments on what are called tracks. You can enable specific tracks that you want it to play. It converts the notes on the track into keyboard inputs for the game. Currently it is tuned to C major.

Can this get me banned?

The short answer is that it's uncertain. Use it at your own risk. Do not play songs that will spam the keyboard, listen to the MIDI file first and make sure to play only one instrument so that the tool doesn't spam keyboard inputs.

Pull Request Process

  1. Do not include the build itself where the project is cleaned using dotnet clean.
  2. Update the README.md with details of changes to the project, new features, and others if applicable.
  3. Increase the version number of the project to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.

New Notes/Keyboard Mappings

The process for adding or adjusting notes and keyboard mappings has a few discrete steps. Below is a friendly checklist along with example snippets to help you get started.

  1. Create or select a game folder

    • Go to AutoMidiPlayer.WPF/Core/Games/ and either open the existing game directory or create a new one with the game's name.
  2. Prepare layout & instruments subfolders

    • In the game folder make sure you have two items:
      • KeyboardLayout.cs – holds any custom key‑assignment maps.
      • Instruments directory – contains one .cs file for each instrument.
    • Look at Heartopia/ or Genshin/ for real examples; the structure is identical.
  3. Add or edit instrument config files

    • Inside Instruments, you can copy and paste an existing config (e.g. Piano.cs) and then adjust fields such as game, name, and the notes list.
    • Specify additional keyboardLayouts if the instrument uses a different mapping.
    public static readonly InstrumentConfig MyNewInstrument = new(
        game: "MyGame",
        name: "Special Harp",
        notes: [ 60, 62, 64, 65, 67 ], // C4,D4,E4,F4,G4
        keyboardLayouts: [ MyGameLayouts.QWERTY ]
    );
  4. Create a keyboard layout (if necessary)

    • Edit KeyboardLayout.cs and add a KeyboardLayoutConfig with the characters that correspond to each note.
    internal static readonly KeyboardLayoutConfig QWERTY = new(
        name: "QWERTY",
        keys: ['q','w','e','r','t','y','u']
    );
  5. Register the game in GameRegistry.cs

    • Add a new GameDefinition entry to the AllGames list so the app knows about your game. For example:
    new GameDefinition(
        id: "MyGame",
        displayName: "My Game Title",
        instrumentGameName: "MyGame",
        imageResourcePath: "pack://application:,,,/Resources/MyGame.png",
        processNames: ["MyGameExe"],
        defaultExeName: "MyGame.exe",
        defaultSearchPaths: [
            @"C:\Program Files\MyGame\MyGame.exe",
        ],
        getLocation: () => Settings.MyGameLocation,
        setLocation: v => Settings.Modify(s => s.MyGameLocation = v),
        getIsActive: () => Settings.ActiveMyGame,
        setIsActive: v => Settings.Modify(s => s.ActiveMyGame = v)
    ),
  6. Update user settings for the game

    • Open AutoMidiPlayer.Data/Properties/Settings.settings and add entries for MyGameLocation and ActiveMyGame (type string and bool respectively). Use the other games as templates.
    • Regenerate the designer file or manually add the corresponding properties in Settings.Designer.cs.

Once these steps are complete you can rebuild the project and your new instruments should appear in the UI under the new game.

I'm planning to expose .json‑based mod support in the future which will allow users to add their own instruments and games without needing to modify and rebuild the app.

Build

If you just want to run the program, there are precompiled binaries in releases.

Requirements

Publish a single binary for Windows

git clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer

dotnet publish AutoMidiPlayer.WPF -r win-x64-c Release --self-contained false -p:PublishSingleFile=true

For other runtimes, visit the RID Catalog and change the runtime value.

Build the project (not necessary if you published)

git clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer

dotnet build

Publish the project using defaults

git clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer

dotnet publish

Special Thanks

License

  • This project is under the MIT license.
  • Originally created by sabihoshi. Modified by Jed556 for multi-game support and modernization.
  • All rights reserved by © miHoYo Co., Ltd., © XD Inc., © thatgamecompany, Inc., and © Roblox Corporation. This project is not affiliated nor endorsed by miHoYo, XD, thatgamecompany, or Roblox. Genshin Impact™, Heartopia™, Sky: Children of the Light™, Roblox™, and other properties belong to their respective owners.
  • This project uses third-party libraries or other resources that may be distributed under different licenses.

Note

I don't have knowledge about music theory, if you find any issues with note mappings or transpositions, please open an issue or PR. Thank you! 💖