10-1-2016, 03:33 AM | #1 |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Help with creating MIDI to Stepfile converter
I've had an idea for this for quite a while but haven't done anything with it. However, I've recently been working on a separate project, which involves the MIDI format. The converter would hopefully be in Python (3), or if Python's limited bit-manipulation causes issues, in Go.
Help from someone with knowledge of the Stepmania Stepfile format would be immensely helpful. TL;DR If you're interested in helping, PM me, with your experience and we can talk there. If this goes ahead, I'll post a link to the GitHub repo UPDATE GitHub Repo: github.com/MicroTransactionsMatterToo/midi2sm Commit Log ANOTHER UPDATE Well, I've decided to use Golang, it's just easier for parsing file Many Thanks, MicroTransactionsMatterToo Last edited by EyeofEternity; 10-1-2016 at 05:29 PM.. Reason: Added commit log |
10-1-2016, 03:54 AM | #2 |
Owlbears Rock!
Join Date: Mar 2012
Location: The coldest place in hell
Age: 33
Posts: 2,492
|
Re: Help with creating MIDI to Stepfile converter
Are you Arch0wl?
|
10-1-2016, 03:54 AM | #3 | |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
Quote:
Last edited by EyeofEternity; 10-1-2016 at 04:21 AM.. Reason: Added quote |
|
10-1-2016, 04:48 AM | #4 |
I don't get no respect
Join Date: Jun 2006
Age: 32
Posts: 1,332
|
Re: Help with creating MIDI to Stepfile converter
How far do you want this converter to go? Do you want it to create actual playable steps? That's probably a bad idea, because you won't like the product.
Do you want it to create a template for you to make stepmania files? Great, but why re-write the serviceable editor already built in? Does stepmania even support midi? I think your first step might just be to convert the midi to mp3. Start with reading a .sm file, go read a guide that covers a couple of basics on stepping to see what all the different values are for. Probably a big hurdle would be figuring out BPMs. Or at least doing it automagically. |
10-1-2016, 04:53 AM | #5 | |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
Quote:
MIDI is a pretty ideal file type for stepfiles, in essence, every note in a MIDI file is like a hold in StepMania. To convert decently, one would ignore the Note-Off messages, and then keep all the Note-On ones. The timings are also present in the MIDI file, as well as the BPM. To keep the track tidy, you'd use only one track in the file, then split the 127 available notes into quarters, corresponding to the positions of notes in StepMania. In the event that there are 2 notes at the same time, then create a pair of notes, or triplet e.t.c. as needed I would go into more detail, but it's still an early concept and I haven't fleshed everything out Last edited by EyeofEternity; 10-1-2016 at 04:55 AM.. Reason: Added stuff |
|
10-1-2016, 05:13 AM | #6 |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
Just in case people aren't aware, MIDI is NOT an audio format like MP3. Instead it's a record of when notes are played, how hard keys are pressed, as well as many other factors. This allows for far easier conversion of MIDI to other formats. If you need more info, check the Wikipedia article
Sent from my iPhone using Tapatalk |
10-1-2016, 05:24 AM | #7 |
I don't get no respect
Join Date: Jun 2006
Age: 32
Posts: 1,332
|
Re: Help with creating MIDI to Stepfile converter
Sounds like it should be "simple" to do. You just need to write the top half of the .sm, then deal with the notes themselves. And make sure that Stepmania can handle the audio. Here's a few pointers.
Code:
#TITLE:The Snowy Blue Mountains; ### Should be able to maybe get this stuff from metadata?? #SUBTITLE:Kirby Super Star (1996); #ARTIST:Jun Ishikawa; #TITLETRANSLIT:; #SUBTITLETRANSLIT:; #ARTISTTRANSLIT:; #CREDIT:; #BANNER:snowbluebn.png; ### Graphics #BACKGROUND:snowblueBG.png; #LYRICSPATH:; #CDTITLE:trutitle.png; #MUSIC:118_-_the_snowy_blue_mountains.mp3; #OFFSET:-0.309; ### Where the steps start in relation to the music. Kind of backwards... #SAMPLESTART:35.738; ### Preview music start #SAMPLELENGTH:11.600; ### Preview music length #SELECTABLE:YES; ### Don't change this!!!!!!!!!!! #BPMS:0.000=175.700; #STOPS:; #BGCHANGES:; //---------------dance-single - ---------------- #NOTES: dance-single: : Hard: ###Diffuculty 11: ###Difficulty meter. How many "feet" you set it to 1.000,1.000,1.000,0.586,1.000: ###Groove meter. I forget which is for which, the 0.586 will be for freeze though. I think this is done automatically by Stepmania. 0001 0010 1000 0100 0011 ### 1 for a tap, eg. 0011 for ^> jump. 1000 for a < arrow 1000 0100 ### 2 for the start of a freeze, 3 for the end of a freeze 0010 0001 ### M for a mine 0010 0100 0010 1001 0100 0010 1000 ### Number of lines is the largest division of beats in the measure. 16 lines = 16th notes. , ### Start of a new measure 0010 0100 1000 0100 0011 1000 0100 0010 0001 0100 0010 1000 0101 0010 1000 0100 , 0001 0010 1000 0100 1001 0010 1000 0100 0001 0010 0100 1000 0101 0010 0100 1000 , 0001 0100 0010 1000 0011 0100 0010 1000 0011 0000 0010 0000 0001 0010 0100 1000 , 0010 0000 ### 0000 to skip an increment based on the number of lines in the measure. Eg, have "clap clap clap-clap clap" as "1000 0000 1000 0000 1000 1000 1000 0000" 0010 0100 1001 0000 1000 0100 0010 0000 0010 0100 1002 0000 0103 0000 , 1000 0000 1000 0010 0101 0000 0010 1000 0010 0000 0001 0000 2100 0000 3001 0000 , 0010 0000 0010 0100 1001 0000 0001 0100 0010 0000 1000 0100 1002 0000 0103 0000 , 1000 1000 0100 0100 1010 0010 0001 0010 1100 0000 1001 0000 1200 0010 0301 0000 , 0001 0000 0000 0001 1001 0000 0010 0100 1000 0000 0001 0000 0120 0000 1030 0000 , 0100 0000 0100 0010 1001 0000 0100 0010 0100 1000 0100 0010 0102 0000 1003 0000 , 0100 0000 0100 0010 1001 0000 1000 0100 1000 0010 1000 0010 0101 0000 0100 0000 , 0010 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0100 0000 0000 0000 1010 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 2000 3000 0000 0000 0000 0000 0000 0000 0002 0003 0000 0000 0000 0000 0000 0000 2000 3000 0000 0000 0000 0000 0000 0000 0002 0003 0000 0000 0000 0000 0000 0000 , 0010 0000 0010 0100 1001 0000 1000 0100 0010 0000 0010 0100 0012 0000 1003 0000 , 0100 0000 0000 0010 1001 0000 0001 0010 0100 0000 0001 0000 2010 0000 3001 0000 , 0010 0000 0010 0100 1001 0000 1000 0100 0010 0000 1000 0100 0012 0000 1003 0000 , 0010 0000 0000 0100 0001 0000 0010 1000 0110 0000 0011 0000 1010 0100 1000 0000 , 0010 0000 0000 0010 0110 0000 0010 1000 0100 0000 0001 0000 1020 0000 0130 0000 , 1000 0000 1000 0100 0011 0000 0100 1000 0010 1000 0100 0010 1002 0000 1003 0000 , 0100 0000 0100 0010 1001 0000 0010 1000 0100 0001 1000 0010 0101 0000 1000 0000 , 0010 0000 0100 1000 0110 0000 0001 0000 0020 0000 1000 0000 0031 0100 1000 1000 , 0102 0000 0000 0000 1003 0000 0100 1000 0010 0000 0001 0000 0110 0000 1000 0000 , 0100 0010 0101 1000 0010 0000 1001 0000 , 0020 0000 0000 0000 0100 0000 1030 0100 0010 0000 0001 0000 1010 0000 0100 0000 , 1000 0010 1001 0100 0010 0000 0101 0010 , 1200 0000 0000 0000 0011 0000 0000 0000 1000 0000 0000 0000 0011 0000 0000 0300 , 0201 0000 0000 0000 0011 0300 0110 0001 1000 0000 0010 0000 0001 0010 0100 1000 , 0010 0000 0010 0100 1001 0000 1000 0100 0010 0000 0010 1000 0102 0000 1003 0000 , 0100 0000 0100 0010 1001 0000 0001 0010 0100 0000 0001 0000 2010 0000 3001 0000 , 0010 0000 0010 0100 1001 0000 1000 0100 0010 0000 0100 0010 1002 0000 0013 0000 , 0100 0000 0000 0010 0101 0000 0010 1000 0010 0000 0001 0000 2010 0100 3001 0000 , 0100 0000 0000 0100 0101 0000 0010 1000 0100 0000 0001 0000 0120 0000 1030 0000 , 0100 0000 0100 0010 1001 0000 0010 0100 1000 0100 0010 1000 0101 0000 1000 0000 , 0100 0000 0100 0010 1001 0000 0010 0100 1000 0100 0010 1000 0101 0000 0100 0000 , 0010 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 1000 0000 0000 0000 0101 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0000 0000 0000 0000 2000 3000 0000 0000 0000 0000 0000 0000 0002 0003 0000 0000 0000 0000 0000 0000 2000 3000 0000 0000 0000 0000 0000 0000 0002 0003 0000 0000 0000 0000 0000 0000 , 0010 0000 0010 0100 1001 0000 1000 0100 0010 0000 0010 0100 1002 0000 0103 0000 , 0010 0000 0010 0100 1001 0000 0001 0010 0100 0000 0010 0000 2001 0000 3100 0000 , 0010 0000 0010 0100 1010 0000 1000 0100 0010 0000 0100 0010 1002 0000 0013 0000 , 0100 0000 1000 0010 0101 0000 0010 0100 1010 0000 0011 0000 1010 0000 0000 0000 ; Last edited by trumaestro; 10-1-2016 at 05:34 AM.. |
10-1-2016, 05:28 AM | #8 | |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
Quote:
Thanks for the pointers, should be a great help |
|
10-1-2016, 10:07 AM | #9 |
Confirmed Heartbreaker
Join Date: Jul 2012
Age: 35
Posts: 5,859
|
Re: Help with creating MIDI to Stepfile converter
This would be awesome for stepping classical files. Just have every note be on a single column rather than actually trying to make a file out of it. This would make syncing hella easier so I'm all for it
__________________
|
10-1-2016, 10:17 AM | #10 |
longing
Join Date: Dec 2007
Location: Ontario, Canada
Posts: 2,680
|
Re: Help with creating MIDI to Stepfile converter
I've always wanted to do this with regular MP3s by applying a fast fourier transform to them and mapping steps based on pitch lol, this seems alot easier with MIDIs
People have been doing this in guitar hero for a while - mainly, I think they chart the song first and then convert the notes to a midi, like https://youtu.be/IVydDB5qebM?t=58s this for example.. the other way should be theoretically possible though. I'd probably start by figuring out a way to group clusters of notes together, for example a key or whatnot, and figure out how certain types of notes transpose to the arrow keys.. obviously with piano or whatnot you have far more keys than 4, so it is much harder to transcribe.. To be honest I've already looked into this a bit, I personally use midis to help while stepping files so I can generally base the notes, I think an automatic conversion would be possible, I'd love to help.. I've had an idea where someone can auto generate types of files like jumpstream at a certain bpm for practice, and it would auto gen the steps then create a midi for the song.. |
10-1-2016, 10:56 AM | #11 | |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
Quote:
Thanks for the insight, it's greatly appreciated. If you'd like to help out, the GitHub repo is in the first post |
|
10-11-2016, 07:12 AM | #12 |
FFR Player
Join Date: Aug 2016
Posts: 2
|
Re: Help with creating MIDI to Stepfile converter
There is a similar project for osu!mania maps (Automap-chan in Github by dudehacker)
It attempts to make playable maps, but it doesn't do very well with only 4 keys (works better for 7 keys or more usually). |
10-11-2016, 08:32 AM | #13 |
Confirmed Heartbreaker
Join Date: Jul 2012
Age: 35
Posts: 5,859
|
Re: Help with creating MIDI to Stepfile converter
Don't make this auto step just make it produce a skeleton and you're good
__________________
|
10-11-2016, 07:34 PM | #14 |
longing
Join Date: Dec 2007
Location: Ontario, Canada
Posts: 2,680
|
Re: Help with creating MIDI to Stepfile converter
Fuk it bro make it auto step, Frankenstein stepper lolz we can work out the flaws later, that's always worked in the past
|
10-12-2016, 03:41 AM | #15 |
FFR Player
Join Date: Jan 2014
Posts: 8
|
Re: Help with creating MIDI to Stepfile converter
The thing about MIDI is that it gives you every key press already, along with the BPM and timings.
Sent from my iPhone using Tapatalk |
10-12-2016, 05:16 AM | #16 |
Confirmed Heartbreaker
Join Date: Jul 2012
Age: 35
Posts: 5,859
|
Re: Help with creating MIDI to Stepfile converter
Yeah that's why I say just have it make the skeleton. All notes left arrows and that way all we have to do is put the arrows where we want them. I take it you've never had to sync a file before
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|