Reverse MIDI Files tool

FOF discussion only. Do NOT post help questions here!
This topic is 7 years and 2 months old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
Gamemaster1379
Member
Posts: 14
Joined: July 9th, 2008
Location: Midwest
Reputation: 0
Contact:

Reverse MIDI Files tool

Postby Gamemaster1379 » Sat Jul 04, 2009 5:53 pm

I've searched ALL around the internet and have come up unsuccessful in finding a tool to reverse MIDI files. Why do I have the intent to do this? For boredom's sake, I would like to try a few songs backwards. I've already succeeded in flipping the audio...but now my next step is flipping the MIDI file...So far, I've only found ONE tool that can accomplish what I want, MusicMirror, but it's a shareware tool that demands I pay $40 or I can't save. :( Can somebody give me a hand here?
aka drumbilical
User avatar
italianstal1ion
Member
Posts: 1342
Joined: July 28th, 2007
Location: Behind a drum set
Reputation: 57
Contact:

Re: Reverse MIDI Files tool

Postby italianstal1ion » Sat Jul 04, 2009 5:59 pm

What tool did you use to flip the audio files? It should be able to do .mid somehow as well.
Also, if MusicMirror has an export MIDI option, you don't need to save it.

Kind of a cool idea, I'd like to try it out too.
Index of all Drum Topics on the Forum in one convenient place
Image
Image Image
Image Image
Image Image
Drum Project 7 Released!
Drum Project 8 Released!
Drum project 9 Released!!
Image My personal topic.
Can't get enough?

Spoiler:Image Feedback + EOF Pro Notation
Image Albelgim collaboration
If you appreciate my work and would like to see more, a donation would certainly motivate me! Thank you.
Image

FoFiX Dev/Mod Squad
User avatar
jstump91
Member
Posts: 837
Joined: September 21st, 2008
Location: Baltimore, MD (US)
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby jstump91 » Sat Jul 04, 2009 6:18 pm

Reversing a MIDI isn't like reversing an audio file; there are a few extra hurdles to jump. (For example, the raw sequence of musical events stored in a MIDI file won't make sense if directly reversed, as "end" events will come before "start" events [a note is represented as separate "start" and "end" events], but that can be worked around by flipping them.)

The end of a MIDI is not as well-defined as the end of the audio, so a reversed MIDI will more than likely need some resynchronization with the reversed audio.

It probably wouldn't be too difficult for someone on here to write a program to do the reversing.
jstump91, a.k.a. john.stumpo, a.k.a. stump
jstump.com | stump's blog | FoFiX development | My own code
Can't find a Windows build of the Python module you need? Try my mediafire!
Don't say "Python can't do [insert task here]." Python can do anything with the right modules - said modules may just not have been written yet.
"Python - why settle for snake oil when you can have the whole snake?" --Mark Jackson
Did you search before you posted? Did you read the rules for the subforum you are posting in?
Gamemaster1379
Member
Posts: 14
Joined: July 9th, 2008
Location: Midwest
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby Gamemaster1379 » Sat Jul 04, 2009 7:29 pm

jstump91 wrote:Reversing a MIDI isn't like reversing an audio file; there are a few extra hurdles to jump. (For example, the raw sequence of musical events stored in a MIDI file won't make sense if directly reversed, as "end" events will come before "start" events [a note is represented as separate "start" and "end" events], but that can be worked around by flipping them.)

The end of a MIDI is not as well-defined as the end of the audio, so a reversed MIDI will more than likely need some resynchronization with the reversed audio.

It probably wouldn't be too difficult for someone on here to write a program to do the reversing.

Damn. What a pity. Well, I'd write it myself, but unfortunately, due to the poor area I live in, there's no educational areas that can afford computers past 2001 it seems. :glare: So, no good computers, no good tech classes, no programming skills.
FoFiX Dev/Mod Squad
User avatar
jstump91
Member
Posts: 837
Joined: September 21st, 2008
Location: Baltimore, MD (US)
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby jstump91 » Sat Jul 04, 2009 9:25 pm

This idea was so intriguing to me that I wrote a reversing tool in Python.
http://svn.jstump.com/r/fof-midi-revers ... rseMidi.py (edit: the URL I originally gave was a 404)
svn checkout: svn://svn.jstump.com/r/fof-midi-reverser/trunk or the same with http://.

(It uses the MXM Python MIDI package, which is also what FoF(iX) uses to manipulate MIDI files. I committed a copy of it along with the script, or you can cut-and-paste the midi folder from the FoF(iX) source code.)

As a demo, I used that tool to reverse the notes-unedited.mid of Chop Suey from MrFaust's RB2 rips. Make a copy of that folder somewhere, add "delay = 2750" to the song.ini (this number will depend on the specific MIDI, since, as I said before, the "end" of a MIDI isn't very well defined), reverse the oggs, and overwrite notes-unedited.mid with:
http://www.mediafire.com/?jtm02tnjeoy
jstump91, a.k.a. john.stumpo, a.k.a. stump
jstump.com | stump's blog | FoFiX development | My own code
Can't find a Windows build of the Python module you need? Try my mediafire!
Don't say "Python can't do [insert task here]." Python can do anything with the right modules - said modules may just not have been written yet.
"Python - why settle for snake oil when you can have the whole snake?" --Mark Jackson
Did you search before you posted? Did you read the rules for the subforum you are posting in?
Gamemaster1379
Member
Posts: 14
Joined: July 9th, 2008
Location: Midwest
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby Gamemaster1379 » Sun Jul 05, 2009 11:11 pm

Awesome, I'll have to try it out...but pity that it can't be applied to the midi itself without need of the song.ini, I could then use it on RB2's new hack, RawkSD. :P
Jpop fanatic
raynebc
Moderator
Posts: 5671
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 111

Re: Reverse MIDI Files tool

Postby raynebc » Sun Jul 05, 2009 11:35 pm

Gamemaster1379 wrote:but pity that it can't be applied to the midi itself without need of the song.ini

For custom songs, song.ini is the only thing that defines the start of the chart relative to the start of the audio, so it's the only way it's possible without altering the chart to contain the leading silence explicitly.
FoFiX Dev/Mod Squad
User avatar
jstump91
Member
Posts: 837
Joined: September 21st, 2008
Location: Baltimore, MD (US)
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby jstump91 » Mon Jul 06, 2009 11:25 pm

The tool only touches the notes.mid file. The song.ini edit is just to resync the notes with the song, since (as I have said many times) the end of a MIDI file is not as well defined as the end of an Ogg Vorbis stream, and so the ends rarely align perfectly with one another.

I may upgrade the tool to properly preserve some details of the MIDI that FoF doesn't use, as during testing I actually used it on some MIDIs that are actually intended to be listened to, with interesting results.
jstump91, a.k.a. john.stumpo, a.k.a. stump
jstump.com | stump's blog | FoFiX development | My own code
Can't find a Windows build of the Python module you need? Try my mediafire!
Don't say "Python can't do [insert task here]." Python can do anything with the right modules - said modules may just not have been written yet.
"Python - why settle for snake oil when you can have the whole snake?" --Mark Jackson
Did you search before you posted? Did you read the rules for the subforum you are posting in?
User avatar
Tormann71
Member
Posts: 2162
Joined: January 16th, 2009
Location: Akron
Reputation: 0
Contact:

Re: Reverse MIDI Files tool

Postby Tormann71 » Tue Jul 07, 2009 12:39 am

This could actually come in handy for me. I'm charting a song right now by a band that has another song based off the song I'm charting, backwards. (that sounds really confusing)
This could possibly make it easier to chart the other song.
guentermidi
Member
Posts: 1
Joined: January 5th, 2017
Reputation: 0

Re: Reverse MIDI Files tool

Postby guentermidi » Thu Jan 05, 2017 7:25 am

Gamemaster1379 wrote:I've searched ALL around the internet and have come up unsuccessful in finding a tool to reverse MIDI files. Why do I have the intent to do this? For boredom's sake, I would like to try a few songs backwards. I've already succeeded in flipping the audio...but now my next step is flipping the MIDI file...So far, I've only found ONE tool that can accomplish what I want, MusicMirror, but it's a shareware tool that demands I pay $40 or I can't save. :( Can somebody give me a hand here?


A bit late but I know a software that can do this : GNMIDI tools for Windows (http://www.gnmidi.com/handbook/english/reversesong.htm).
To prove that it really reverses your midi song you should try to reverse the result and check if it really plays the song again.
Ruler of Chatrooms
User avatar
nobby76
Member
Posts: 3982
Joined: August 29th, 2006
Location: Just off the coast of Saturn
Reputation: 21

Re: Reverse MIDI Files tool

Postby nobby76 » Thu Jan 12, 2017 1:30 pm

guentermidi wrote:A bit late but I know a software that can do this : GNMIDI tools for Windows

A bit late.. Dude you woke up a post like 8 years later. and these days there are loads of audio programs that can do this sort of thing.
Image
LONG LIVE THE NOOBS, THEY WILL OVER THROW US WITH THERE VASTLY SUPERIOR STUPIDITY.
Check out the Tutorial Making songs without having to fret a single note And come check out the IRC Chatroom
Still Alive
wolferacing
Moderator
Posts: 1852
Joined: July 25th, 2007
Location: USA
Reputation: 27
Contact:

Re: Reverse MIDI Files tool

Postby wolferacing » Thu Jan 12, 2017 5:12 pm

Judging by his username, I actually think he is spamming his own program. But I guess I'll leave the post because it might be helpful to somebody?
Last edited by wolferacing on Thu Jan 12, 2017 5:12 pm, edited 1 time in total.

Return to “General FOF Discussion”

Who is online

Users browsing this forum: No registered users and 27 guests