This Python script simulates keyboard inputs based on MIDI file data to your Undawn game.
If you enjoy my work and would like to support me, you can buy me a coffee on Ko-fi!
- Plays MIDI files by simulating keyboard inputs.
- Allows pitch modulation of the MIDI notes.
- Provides a file dialog for easy MIDI file selection if not provided via command-line arguments.
- Uses colored terminal output for better readability.
The following Python libraries are required:
mido
for handling MIDI files.pyautogui
for simulating keyboard inputs.colorama
for colored terminal output.easygui
for file selection dialogs.
-
Clone this repository or download the script.
git clone https://github.com/drastraea/Undawn-Piano-Auto-.git
-
Navigate to the project directory.
cd Undawn-Piano-Auto
-
Install the required dependencies.
pip install -r requirements.txt
Run the script with the path to the MIDI file as a command-line argument:
python udpiano.py --file path/to/your/midi/file.mid --pitch 2
If the --file
argument is not provided, a file dialog will appear to select the MIDI file.
--file
: Path to the MIDI file to play.--pitch
: Integer value to add as pitch modulation. Default is0
.
python udpiano.py --file example.mid --pitch 2
This command plays the example.mid
file with a pitch modulation of 2
.