Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e63fdb4
WE'RE REWRITING THIS
UnsignedArduino May 24, 2026
cba1cba
Port over music.ts and pxtmusic.d.ts to Python
UnsignedArduino May 25, 2026
0c6ba1b
Oops accidentally used lowerCamelCase instead of snake_case
UnsignedArduino May 25, 2026
eb19c44
Encode and decode from bare hex buffers.
UnsignedArduino May 25, 2026
6615c03
Parse timeline for instrument data
UnsignedArduino May 26, 2026
dfd7a19
Prescan each track for the first meta midi_port to set the default
UnsignedArduino May 26, 2026
d1b14e3
Merge commit 'dfd7a19' into general-midi
UnsignedArduino May 27, 2026
0a46e02
After prescan each track, parse for note events
UnsignedArduino May 27, 2026
e371a85
Search for instruments used in song, create and load instrument param…
UnsignedArduino May 29, 2026
aeeac29
Update README
UnsignedArduino May 29, 2026
4c08491
Update instrument_params_2.yaml with GM2 drum notes, assemble song wi…
UnsignedArduino May 30, 2026
07b5559
Update instrument_params_2.yaml with GM2 drum notes, start preprocess…
UnsignedArduino May 31, 2026
9e64800
Resolve overlapping chords into distinct tracks
UnsignedArduino May 31, 2026
472a6c0
Add timeline checks to validate song structure before conversion
UnsignedArduino May 31, 2026
a2781be
SOMETHING WORKS
UnsignedArduino May 31, 2026
0a86594
Don't do offset in convert_midi_to_song
UnsignedArduino May 31, 2026
da32149
Adjust octave offset range and correct note mapping for MakeCode Arcade
UnsignedArduino May 31, 2026
b0a2628
Can write to file for output now
UnsignedArduino May 31, 2026
b0a5c89
Refactor to Python packages
UnsignedArduino Jun 1, 2026
9eddc0d
Add blank instrument parameters template YAML file
UnsignedArduino Jun 1, 2026
851f0a7
Overlapping chords don't need to be split into new tracks
UnsignedArduino Jun 1, 2026
e034a29
Add testing options to help speed up instrument parameter development…
UnsignedArduino Jun 5, 2026
516d1bd
Can generate melodic samples to easily listen to a bunch of instrumen…
UnsignedArduino Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,3 @@

A Python tool to convert a MIDI file to a MakeCode Arcade song! (Work in
progress)

Some bug squashing may be needed but otherwise this tool is complete.

Web version will be available soon in a different repo.

## Install

1. Download and install Python.
2. Clone this repo.
3. Install all the requirements in [`requirements.txt`](requirements.txt)

> You may need to edit commands listed in this repo to use `py` or `python3` if
> `python` doesn't work.

## Usage

Run [`src/main.py`](src/main.py) at the root of the repository in the terminal.
(It is a CLI app)

### Example commands

To convert the MIDI file `Never_Gonna_Give_You_Up.mid` and print the Arcade
song to standard output with the default track "dog", no divisor, (divisor of
1), and no character break.

```commandline
python src/main.py -i "Never_Gonna_Give_You_Up.mid"
```

To convert the MIDI file at the absolute path
`E:\Arcade MIDI to Song\testing\Friend_Like_Me_Disneys_Aladdin.mid` and
write the output to `Friend_Like_Me_Disneys_Aladdin song.ts` in the current
directory with the "computer" track, a divisor of 2, a character break of 512,
and with debug messages on.

```commandline
python src/main.py -i "E:\Arcade MIDI to Song\testing\Friend_Like_Me_Disneys_Aladdin.mid" -o "Friend_Like_Me_Disneys_Aladdin song.ts" -d 2 -t computer -b 512 --debug
```

### Help text

```commandline
usage: ArcadeMIDItoSong [-h] --input INPUT [--output OUTPUT] [--track TRACK]
[--divisor DIVISOR] [--break CHAR_BREAK] [--debug]

A program to convert MIDI files to the Arcade song format.

options:
-h, --help show this help message and exit
--input INPUT, -i INPUT
Input MIDI file
--output OUTPUT, -o OUTPUT
Output text file path, otherwise we will output to
standard output.
--track TRACK, -t TRACK
A track to use, which changes the instrument.
Available tracks include ['dog', 'duck', 'cat',
'fish', 'car', 'computer', 'burger', 'cherry',
'lemon']. (You can also use indices 0-8) Defaults to
'dog'.
--divisor DIVISOR, -d DIVISOR
A divisor to reduce the number of measures used. A
higher integer means a longer song can fit in the
maximum of 255 measures of a song, but with less
precision. Must be greater than or equal to 1, and
defaults to 1 for no division.
--break CHAR_BREAK, -b CHAR_BREAK
Break the hex string after so many characters.
Defaults to 0 for no breaking.
--debug Include debug messages. Defaults to info and greater
severity messages only.
```
Loading