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.
Slideshow.mp4
- 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
- Download the program and then run, no need for installation.
- Open a .mid file by pressing the open file button at the top left.
- Enable the tracks that you want to be played back.
- Press play and it will automatically switch to the target game window.
- 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.
- 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
- 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
- Play multiple tracks of a MIDI file simultaneously
- Turn on/off tracks in realtime
Tracks.mp4
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
A queue allows you to play songs without having to open or delete a song or file.
Queue.mp4
You can set the player to light mode/dark mode and change its accent color.
Theming.mp4
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.
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.
- For Genshin Impact, here is miHoYo's response to using 3rd party tools.
- For Heartopia, here is their Official Discord message about using 3rd party tools.
- For Sky, see their policy on third-party apps.
- For Roblox, refer to their third-party services Terms of Use.
- Do not include the build itself where the project is cleaned using
dotnet clean. - Update the README.md with details of changes to the project, new features, and others if applicable.
- Increase the version number of the project to the new version that this Pull Request would represent. The versioning scheme we use is SemVer.
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.
-
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.
- Go to
-
Prepare layout & instruments subfolders
- In the game folder make sure you have two items:
KeyboardLayout.cs– holds any custom key‑assignment maps.Instrumentsdirectory – contains one.csfile for each instrument.
- Look at
Heartopia/orGenshin/for real examples; the structure is identical.
- In the game folder make sure you have two items:
-
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 asgame,name, and thenoteslist. - Specify additional
keyboardLayoutsif 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 ] );
- Inside
-
Create a keyboard layout (if necessary)
- Edit
KeyboardLayout.csand add aKeyboardLayoutConfigwith the characters that correspond to each note.
internal static readonly KeyboardLayoutConfig QWERTY = new( name: "QWERTY", keys: ['q','w','e','r','t','y','u'] );
- Edit
-
Register the game in
GameRegistry.cs- Add a new
GameDefinitionentry to theAllGameslist 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) ),
- Add a new
-
Update user settings for the game
- Open
AutoMidiPlayer.Data/Properties/Settings.settingsand add entries forMyGameLocationandActiveMyGame(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.
- Open
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.
If you just want to run the program, there are precompiled binaries in releases.
git clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer
dotnet publish AutoMidiPlayer.WPF -r win-x64-c Release --self-contained false -p:PublishSingleFile=trueFor other runtimes, visit the RID Catalog and change the runtime value.
git clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer
dotnet buildgit clone https://github.com/Jed556/AutoMidiPlayer.git
cd AutoMidiPlayer
dotnet publish- This project is inspired by and built on top of sabihoshi/GenshinLyreMidiPlayer v4.0.5. Huge thanks for the original work!
- ianespana/ShawzinBot - Original inspiration for the concept
~GenshinLyreMidiPlayer - yoroshikun/flutter_genshin_lyre_player - Ideas for history and fluent design
~GenshinLyreMidiPlayer - Lantua - Music theory guidance (octaves, transposition, keys, scales)
~GenshinLyreMidiPlayer
- 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! 💖
