Page 1 of 8

The SM2ITG Converter - v2.1 WITH SIMFILE ANALYZER RELEASED!

PostPosted: Wed Feb 13, 2008 4:08 am
by Frosty555
SM2ITG v2.1 is here! Now a complete rewrite in VB.NET!

Download the latest version here

* NOTE: YOU MUST RUN AS ADMINISTRATOR IN VISTA FOR IT TO WORK!!

ImageImage

ImageImage

Image

Hi all,

Our making-simfiles-r21-ready worries are over! I wrote a tool that does ALL of the conversion necessary to make a stepmania simfile R21-ready. It does quite a lot of stuff all automatically. The newest version of SM2ITG is now a complete, packaged rewrite of the software. It supports all the features of the old version plus a LOT of really neat new ones. You can still download the old version if you look at the tiny text, but this version is way better ;)

Features of SM2ITG v2

SM2ITG can do all of the following automatically to your simfiles to make them ready for the arcade:

1) Convert music to OGG format, with the correct bitrate / sample rate that the machine expects
2) Amplify the music to 100% volume (or any volume level of your choice)
3) Amplify the quiet parts of the song extra, making the whole simfile at the same volume
4) Compress the OGG the appropriate amount to make it just under 5 megs, so it will work on your key
5) If necessary, make the ogg MONO instead of STEREO. This cuts the size in half and makes really super long songs sound a LOT better
6) Applies the OGG Length Patch to the simfile
7) Converts all images to PNG format, and renames them and resizes them to the right format
8) Identifies the banner/background/cdtitle and properly links it in the SM file - taking care of case-sensitivity which matters on the ITG cabinets
9) Automatic banner generator - to create banners for simfiles that are missing graphics. Completely customizable with background and font/color
10) Automatically convert from DWI to SM format
11) Copies the transliterated song name/artist/subtitle and uses that - since arcade machines can't handle romanized characters (japanese characters)
12) Strip out the BGChanges or CDTitles from songs
13) Alters the offset of the song to compensate for song conversion - stops your simfiles from being offsync at the arcade!
14) Adds blank "lights-cabinet" steps to the simfile, to prevent the cabinet lights from flashing and giving everyone seizures on expert steps

It also has the ability to analyze simfiles and generate reports showing graphically exactly the difficulty and speed of the simfile. You can see the BPM changes, STOPs, note speed, ratio of quarter/eighth/sixteenth/thirtysecond notes, and lots more useful information.

Finally, it also comes with presets that pick the appropriate options depending on what you want to do (make you simfile R21 ready, make it Arcade Hacking ready, or just convert banners for Stepmania!)

You can convert multiple simfiles at a time, or convert entire song folders. There is also drag and drop support for Explorer. Just drag song folders into the app and it will convert them.

You can also save simfiles directly to your USB card for playing at the arcade.

HOW TO INSTALL

Download the latest version here


1) Run the installer, and install the program anywhere you like
2) Doubleclick the icon on your desktop to launch the program
3) Drag simfiles into the window, and select your options / destination. The rest is pretty intuitive.


-- REVISION HISTORY --

v2.0a
Released Aug 5 2008
- Changed default normalization parameters. Slight audio clipping was occuring.

v2.0
Released Aug 2 2008

-- KNOWN BUGS --

*) When converting a DWI to SM, a box pops up saying "1 file converted!" and conversion stops until I click OK!
REASON: DWITOSM.EXE, by CuriousTiger, pops this up every time it converts anything, by design.
RESOLUTION: SM2ITG will push through the messagebox after ten seconds of waiting. So sit tight and it WILL continue to convert. Or, just click OK to make it go faster.

*) The audio is a bit distorted or clipped - it's too loud or doesn't sound right
REASON: Certain songs don't sound good with the "dynamic range compression" filter turned on.
RESOLUTION: Disable the "boost volume of quiet parts" option, and reduce the percentage in the "Amplify music to XXX % volume" option.

*) Background movies and BGAnimation.ini files inside my simfile don't get copied over!
REASON: SM2ITG doesn't consider these files to be important parts of the simfile
RESOLUTION: BGChanges and BGAnimations that do not use In The Groove's normal fading / background moviesie features are not supported. You will need to copy those files over yourself.

*) I'm using Vista and I get an error "FAILED! Trouble converting music!"
REASON: Vista sucks.
REAL REASON: Vista sucks and doesn't let the program launch other processes, like OGGENC.EXE that converts the music.
RESOLUTION: Run the program as an administrator, and disable UAC in Vista.



-------------------------

This is what the tool does all automatically:

1) Converts the MP3 to an OGG file
2) Compresses the OGG the appropriate amount to make it just under 5 megs. Long songs get compressed more. Short songs get better quality!
3) If necessary, it makes the OGG file MONO instead of STEREO. This cuts half the size off the OGG file with a minimal hit to the quality. At the arcade you don't notice that it's the same stuff coming out of both speakers ;). This happens when the song exceeds about 3 minutes in length. It REALLY beats lowering the quality all the way the heck down.
4) Normalizes the OGG's volume to 100%, intelligently avoiding anomolous "spikes" in the song. <-- so you don't go to the arcade and find your song is too quiet!
3) Applies the OGG Length Patch to the OGG file
4) Converts DWI files to SM files
5) Replaces ".MP3" with ".OGG" in the SM file
6) Removes any mention of banner or background graphics from the SM (this speeds up loading on ITG)
7) Offsets the song by 0.044 to fix sync issues with OGG vs MP3, OR by any customizable amount you like just by editing C:\SM2ITG\offsetsmfile.txt
8) Copies only the necessary files (the .SM and the .OGG) to a new "ITGREADY" folder. So your original simfile is left intact and untouched

It can be executed right from the explorer right-click menu, simply by right clicking on a folder and picking "Make Simfile ITG Ready".

Or you can use the little gui I made.

Or you can run it raw from the command line.

The only caveat is you must install it in C:\SM2ITG. Nowhere else will work because the various BATCH files require that all the tools are in that folder.

Here's the link to download it:
http://www.kleincs.com/files/sm2itg.zip


-- KNOWN BUGS --

*) Folders with unicode characters in the folder or file name fail
REASON: Batch scripts do not recognize unicode strings in their parameters, so calling a batch file with a unicode folder fails
RESOLUTION: You will need to rename your folders and file to not have unicode characters. It's good practice for R21-ready simfiles anyway

*) Simfiles with extremely long file names fail
REASON: Batch scripts have a limit of 255 characters for their parameters. Your path + file name of the OGG or SM file can't exceed this
RESOLUTION: This is a problem with batch scripts... you will need to keep your simfile file names down in size.

*) Some ogg file simfiles do not decode properly. You get an error saying "read_pcmwav() failed, only 256 bytes read instead of 65535".
REASON: The older version of the converter used piping and redirection, which is flaky in DOS.
RESOLUTION: Redownload SM2ITG 1.2 or greater and the problem will go away. I changed it to not use redirection or piping

*) When converting a DWI file, a message box pops up saying the conversion was successful and I have to click OK before anything else happens.
REASON: DWITOSM.EXE pops this up when it converts.
RESOLUTION: You can't get around this. You will have to click OK. You should use StepMania to convert DWI files to SM anyway.



-- REVISION 1.5 --
- Automatically converts DWI files to SM files using CuriousTiger's DWITOSM.EXE tool

-- REVISION 1.4 --
- Queue system implemented (only 5 translate at a time)
- OGG files and MP3 files are offset differently (offsetsmfileogg.txt and offsetsmfile.txt)
- Controllable end-of-program behavior (endofprogrambehavior.txt)

-- REVISION 1.3 --
- Fixed bug where steps were cut off the end of the SM file (file getting truncated)
- Fixed bug when certain OGG files returned errors while normalizing

-- REVISION 1.2 --
- Added support for removing graphics references from the SM file
- Added support for changing the offset of the SM based on number in C:\SM2ITG\offsetsmfile.txt
- Added feature to explorer right-click menu to open the GUI instead of just converting

-- REVISION 1.1 --
- Fixed bug involving paths that have spaces in them
- Added support to decode OGG files as well as MP3 files
- Added support to skip the ogg length patch, skip normalizing, and skip touching any ogg file that already exists. Use the little GUI to get at these features.

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 12:32 pm
by Exrave
Gordon I love you, thank you so much!

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 12:38 pm
by Pickles
This sounds pretty sweet. It might get me making simfiles myself too!

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 12:42 pm
by Exrave
I'm probably retarded or something, but nothing's working for me. Everything runs fine, I'm quite sure I'm running what needs to be run. But alot of errors come up when the encoding begins to make my MP3 --> OGG. Also, does this tool support "ITG-ifying" an already-OGG'd song, that's just too big in size and unpatched?

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 1:35 pm
by InspectorKen
*downloads* :D

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 2:08 pm
by Frosty555
Ex-RaVe wrote:Also, does this tool support "ITG-ifying" an already-OGG'd song, that's just too big in size and unpatched?


No not at the moment. It will halt if you give it a folder that doesn't have any MP3s in it. It's because it actually converts it to a wav file before doing any of that fancy stuff ;)

But it's something I could add. Can you send me what your errors were?


[[[[edit]]]] - the converter now supports this.



-- EDIT --

I figured out your problem JD! There were missing doublequotes around one of the lines. This meant paths that had spaces (such as "C:\Program Files\Stepmania") would fail.

Fixed now! :) plz redownload

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 4:24 pm
by Mazrim
This is an amazing idea and I have plenty of files to try it on. Thanks a ton man!

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 5:11 pm
by Frosty555
v1.1 is here! Added some new features!

First off, the bug involving paths with spaces in them is fixed.

Because you asked for it JD ;) you can now use it on simfiles that have OGG files already there. You can even specify to not touch the ogg file, e.g. don't decode/normalize/reencode it, it'll just apply the timing patch. BUT to do that you need to use the gui. It will always decode-normalize-reencode-forceittobe5mb if you run it from explorer. I think that makes more sense anyhow ;)

There's also options to skip normalizing and skip the ogg length patch if you so desire. Those features are available from the GUI as well.

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 6:58 pm
by Rich!
This program is f8cking cool :D

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Wed Feb 13, 2008 11:22 pm
by Exrave
This is damn amazing Gordon, mad props to you :)

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Thu Feb 14, 2008 6:02 am
by Aves
damn, just happens to be the day before I was going to release MY simfile converter program :(

lol, good job man, this is awesome

if you were looking for possible things to implement in future versions... maybe a USB 'manager' for the GUI:
searches for an attached drive with an ITG folder, then makes a list of all your R21 files, both from your ITGREADY folder and your USB, with checkboxes next to them. A song has a checkmark if it's on your USB. Then you can check/uncheck songs, then click an Update button to update the contents of your USB drive.

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Thu Feb 14, 2008 11:25 pm
by Frosty555
Yeah I've got a few directions I'm thinking of going with this. One was to have it automatically strip out the BG info from the simfile, and maybe even alter the offset of the simfile (I find all of my songs I bring to the arcade have to be resynced by about 0.05 seconds to be onbeat).

Or, I got a hold of the Stepmania 3.95 source code, and I'm looking at ripping it out so that it can convert a DWI automatically into an SM for you! The Stepmania source code is pretty well laid out, the dwi opening and sm saving code is nice and modular. I just might be able to do it ;)

And a full fledged manager would definately be pretty cool... although the simfile manager for your usb key really would be separate from the converter. They'd have to be two separate appliations.

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Fri Feb 15, 2008 1:12 am
by Aves
Frosty555 wrote:And a full fledged manager would definately be pretty cool... although the simfile manager for your usb key really would be separate from the converter. They'd have to be two separate appliations.


I figured it would be a separate pane in the gui... ya it's completely unrelated code-wise, but it would be cool if you could just transfer files over directly as soon as you've finished converting. On the other hand, you'd need to open the converter every time you wanted to use the manager, unless there was a standalone option too. Oh, and once you're integrating stuff into the windows shell, maybe a "Send To Songs Folder" option that lets you send a folder directly to the songs folder on your USB. Anyway, just throwing ideas out there...

I downloaded the SM source at some point too, there's really a lot of potentially cool things to do, I just don't have the free time at the moment, hehe

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Sat Feb 16, 2008 11:30 pm
by Frosty555
Revision 1.2 is here!
New features:
- Removes all references of graphics from the SM file
- Changes the offset of the SM file based on a number in C:\SM2ITG\offsetsmfile.txt. By default it is 0.044
- Adds a comment to the SM file that says it was offsetted by SM2ITG. This way it'll pop up a warning if you try to convert an already-converted simfile.
- Run REGISTEREXPLOREREXTENSIONS.REG again, there's a new menu item in the context menu that will open the GUI instead of just running immediately!
- Both of those options can be turned off via the GUI if you want, or via a command line parameter.


And I figured something out!

When you convert an MP3 to an OGG (by any means, not just with my converter ;)), there's a bit of a phenomenon that happens. The OGG file doesn't necessarily line up perfectly with the MP3! So the OGG file might actually have 0.025 seconds of blank space at the beginning, or might have been truncated by a tenth of a second. This is no big deal normally, but in Stepmania, it can screw up the sync of the song. This is why songs are brought to the arcade and are offsync. It isn't the dedicab's fault, it's the conversion from MP3 to OGG!

So I figured out what the "offset" for my particular decoder/encoder is. You have to increase the offset in the SM file by about 0.044s That has been worked that into the latest revision.

Re: The SM2ITG Converter! Anyone interested?

PostPosted: Sun Feb 17, 2008 2:33 pm
by Tono
Oh my god, downloading and trying this out today. Time to scour stepmania again for paddable files :D :D