#Corekeeper Midi file to in-game instrument macro script

1 messages · Page 1 of 1 (latest)

tall pulsar
#

I've started on a small programming project that takes any midi file and converts it into an AutoHotKey file that can be run to automatically play the song in-game!
Here's the github repo link for anyone who wants to try out the very basic version that I have going right now: https://github.com/LeGAT45/corekeeper_midi_to_instrument
This github page and the script itself will become much better in the future, and a features wishlist can be seen on the github read.me

I would recommend only giving it single instrument tracks for the time being, however, I will be adding functionality to handle these types of songs in the near future. There are some sample midis that mostly work and sample ahks included in the repo.

Here's a clip of some of the songs I've converted into a macro already:
https://medal.tv/games/core-keeper/clips/jY7LYhGM1kyxXzDG7?invite=cr-MSx1ZjEsMjcyMzgzODcy

Let me know if y'all are interested in getting your hands on a music player like this for corekeeper! Or if you have any feedback. I've very aware of the issues with the parsing right now, and I'm working towards perfecting the project.

And definitely let me know if you find any good midis to use.

tall pulsar
#

You can now separate tracks and the program will transpose notes for you, making songs sound much better and fuller

tall pulsar
#

rush e but in corekeeper ^^^^^^

tall pulsar
#

Also, you're able to just download the AutoHotKey scripts I have catalogged, and download the autohotkey program of course, and then simply play them in your corekeeper world! No need to download python or the script or any of that if you're not interested in making your own songs.

tall pulsar
tall pulsar
rancid yacht
#

cool proof of concept @tall pulsar
first problem i ran into was how were prioritizing getting notes closest to the midi input pitch rather than the song structure
for example, when playing the below rendered example, youd preferably want to have all notes spread across the keyboard except 1
but rn everything gets smashed down to the bottom octave

a solution could be finding a weighted average of the input (taking into account how often notes appear and their duration)
then centering that around 60 (the middle of our keyboard)
this will also transpose the song to a new key

rancid yacht
tall pulsar
#

The other ways that I saw people doing transposition was doing like a linear scaling of all of the notes so everything fits within the core keeper limited range

#

But that caused everything to sound very off, because it doesn’t preserve key chords

#

So I think a perfect solution would have to identify chords and group them together, linearly scaling them when necessary

#

But I was struggling to get that code to work

#

I’m not musically talented or educated so this kind of stuff is hard for me

tall pulsar
rancid yacht
#

hmmm maybe multiply total duration by some constant too so we can adjust it

rancid yacht
tall pulsar
#

the idea I tried before was to scale it down to match the corekeeper range, based on a central note, and then it would round the note to the nearest actual note if it was a decimal.

#

but it sounded worse than the solution I have implemented right now

#

and after doing some research, I think I would have to identify chords and specific key parts of the song and scale each chord / key part independently

#

in order for the shrinking of the note range (linear scaling) to actually work properly

#

I'm going to mess around with improving the transposition algorithm after I finish the graphical interface that I'm making for this project

rancid yacht
#

compressed to hell and back so i can post on discord

#

lots of precision issues rn from the conversion
heres the midi if you wanna test it (made with fl studio)

tall pulsar
#

ooo that sounds very clean

#

so did you make the song specifically in the note range of coreekeepr, or take an existing song and transpose the notes?

rancid yacht
rancid yacht
rancid yacht
#

how goes progress

tall pulsar
#

had some school stuff I had to get done

#

but rn I have the basic UI for selecting midi files, generating the macro file, and all the behind the scenes work for storing metadata (like number of instruments, notes per instrument, name of instrument, length of track, percentage of notes that have been transposed, etc.) done

#

so I just need to finish the selecting and viewing of those macros / metadata, and a run button for the script that you select

#

and then I can move onto the part of the project I'm really excited about, which is the guitar hero song game that I want to implement into this! Where instead of just macro'ing the songs, it will have an overlay pop up above the corekeeper keyboard with all the notes flying by

#

so you know when to press them

#

so people could learn these songs themselves!

rancid yacht
#

:o will the guitar hero overlay run on a macro as well?
or will it be part of corekeepers ui

#

also any songs youd like to have in particular?

tall pulsar
#

I still need to work out the specifics, but I've done something before in the past where I can spawn a window that you can't click on or interact with, but will still appear above corekeeper

#

that is the plan at least

#

basically just an overlay

tall pulsar
#

so I can rick roll my friends in my world anytime I want

rancid yacht
#

lol nice

tall pulsar
#

if I get this guitar hero mode working, it would also mean that people wouldn't have to go download autohotkey, a second, which would be nice for some people

#

and I'm also sure a lot of people don't want to have a script play the song for them, and they actually want to play it themselves

#

so it should get a ton more people interested in the project if I get it working!

rancid yacht