Song INI Generator/Editor

FOF discussion only. Do NOT post help questions here!
This topic is 14 years and 1 week old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Song INI Generator/Editor

Postby DataC5155 » Sun May 08, 2011 6:13 pm

OLD POST

Updated link in later post
Last edited by DataC5155 on Sun May 15, 2011 6:58 pm, edited 9 times in total.
Derp
User avatar
slashfan7964
Member
Posts: 5182
Joined: June 13th, 2009
Location: FoF-FF Retirement Home
Reputation: 8
Contact:

Re: Song INI Generator/Editor

Postby slashfan7964 » Sun May 08, 2011 6:34 pm

Wrong forum bro.
Image

My Song Thread
Current Songs: 98
Secret Project in the Works! Check this signature for active updates!
My second band, Tetanus with Metallicaholic666 is recording a demo tape. Full album to follow.
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Sun May 08, 2011 6:36 pm

only one that wasnt locked, bro :)

I tried to post in the tools section with the other INI editors, but its locked
User avatar
tibiazak
Member
Posts: 2798
Joined: November 24th, 2006
Reputation: 0
Contact:

Re: Song INI Generator/Editor

Postby tibiazak » Sun May 08, 2011 7:46 pm

Topic moved.
Welcome to an internet message board, where every answer comes with a free side of sarcasm or criticism. Enjoy your stay.
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Mon May 09, 2011 12:36 am

I tried that...unfortunately, some of the midi's seem to have empty instruments or something. Ive located 3 strings (PART GUITAR, PART BASS, and PART DRUMS), and most of the time they are a
reliable way to tell--but songs which I know are guitar only show up as having a bass part as well. After opening the midi by hand in notepad, I realized that it wasnt my code which was causing
the problem. The PART BASS really is in those midi files, even though no part actually exists.

Although I can search for those 3 strings, I dont know how to 'read' a midi properly--I might then be able to check the length of each instrument in the midi. But I was really hoping for an easier way :)
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Thu May 12, 2011 1:44 am

OLD POST

New link in later post
Last edited by DataC5155 on Sun May 15, 2011 6:57 pm, edited 1 time in total.
Jpop fanatic
raynebc
Moderator
Posts: 5693
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 131

Re: Song INI Generator/Editor

Postby raynebc » Thu May 12, 2011 4:00 am

I threw together an application for you by re-using code from my MIDI parsing library:
http://www.sendspace.com/file/s2uk0m

Basically, all you have to do is have your program call diffquery.exe and pass the MIDI file's path as an argument. The program will read all tracks and will return a program completion code that indicates which instrument tracks had MIDI notes in them. Just use some bit wise logic in your program (ie. if(returnvalue & 2) {bass track is populated}). The track values are:
1 Guitar
2 Bass
4 Guitar coop
8 Rhythm
16 Drums (this program will accept either "PART DRUM" or "PART DRUMS" as the drum track)
32 Vocals
64 Keys

If none of the above tracks have any notes, the wrong number of parameters are given or the file given isn't determined to be a MIDI file, a value of 0 is returned. The return code is additive, so for a MIDI that has guitar and bass notes, diffquery would return 3 (1+2). I've included a batch file to demonstrate how to use it (diffquery.exe name of MIDI file). Make sure that you pass the name of the MIDI file with quotation marks just in case the MIDI file ends up having white spaces in it (ie. diffquery.exe "My MIDI file.mid"). You can run the batch file to test the program on the included MIDI files, one of each just has a note for a single track and one has a note in every track:
test.bat wrote:Detection for guitar 1
.
Detection for bass 2
.
Detection for guitar coop 4
.
Detection for rhythm 8
.
Detection for drums 16
.
Detection for vocals 32
.
Detection for keys 64
.
Detection for all of the above 127
.
Press any key to continue . . .


Source code and 32 bit console executable is included, feel free to clean the code up as you like and use it directly in your program, or just call the executable with your program if you can capture the return value.
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Thu May 12, 2011 3:05 pm

Thank you! :) I have not tried using it yet, but I will give it a try later tonight.

UPDATE: The parsing code doesnt seem to work properly--maybe it does with normal midi.
But even trying to substitue FOF song .mid files for you samples, the instruments
were not properly detecting: A song which I know is drums only showed up as
returnvalue 23, and the code says it should return 16. Another guitar only song
returns 0, and should return 1. I guess the program will have to stay as it is :(
I do appreciate the help though :)
Guitar Charts
User avatar
Jordan9232
Member
Posts: 258
Joined: February 3rd, 2010
Location: Prince Edward Island, Canada
Reputation: 15
Contact:

Re: Song INI Generator/Editor

Postby Jordan9232 » Fri May 13, 2011 9:18 pm

This program is very useful and a lot easier to work with. Thank you for this!
Image
Jpop fanatic
raynebc
Moderator
Posts: 5693
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 131

Re: Song INI Generator/Editor

Postby raynebc » Sat May 14, 2011 1:15 am

DataC5155 wrote:UPDATE: The parsing code doesnt seem to work properly--maybe it does with normal midi.
But even trying to substitue FOF song .mid files for you samples, the instruments
were not properly detecting: A song which I know is drums only showed up as
returnvalue 23, and the code says it should return 16. Another guitar only song
returns 0, and should return 1. I guess the program will have to stay as it is :(
I do appreciate the help though :)


It works on all the FoF format MIDIs I posted with the example, along with every chart of mine that I've tested. The only thing I immediately know could be an issue is if you use it on incorrectly created chart MIDIs that don't have correct track names (ie. very old charts didn't always have the guitar track named "PART GUITAR"). Feel free to send me the MIDIs you're referring to and I can verify whether it's a problem with diffquery or with the MIDI itself.
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Sat May 14, 2011 5:56 am

OLD POST
Last edited by DataC5155 on Sun May 15, 2011 6:59 pm, edited 1 time in total.
Jpop fanatic
raynebc
Moderator
Posts: 5693
Joined: April 20th, 2008
Location: Megumi Island
Reputation: 131

Re: Song INI Generator/Editor

Postby raynebc » Sat May 14, 2011 4:59 pm

After checking that MIDI, I can confirm it was a chart problem. That MIDI has dummy notes (ie. as created by the chart->MIDI converters when people have used Feedback to chart with, a chord of five notes at the beginning of each difficulty of unused instrument tracks) in PART GUITAR, PART BASS and PART GUITAR COOP. If you open the MIDI in a chart editor like EOF, you'll see what I mean. Diffquery was still working as designed and giving correct results, but I have altered it to not count notes at the absolute beginning of the chart. This would prevent the four dummy notes (one per difficulty) in PART GUITAR, PART BASS and PART GUITAR COOP from counting. Here's the updated program:
http://www.sendspace.com/file/kg0dj3
DataC5155
Member
Posts: 14
Joined: April 15th, 2010
Reputation: 0

Re: Song INI Generator/Editor

Postby DataC5155 » Sat May 14, 2011 11:20 pm

raynebc wrote:After checking that MIDI, I can confirm it was a chart problem. That MIDI has dummy notes (ie. as created by the chart->MIDI converters when people have used Feedback to chart with, a chord of five notes at the beginning of each difficulty of unused instrument tracks) in PART GUITAR, PART BASS and PART GUITAR COOP. If you open the MIDI in a chart editor like EOF, you'll see what I mean. Diffquery was still working as designed and giving correct results, but I have altered it to not count notes at the absolute beginning of the chart. This would prevent the four dummy notes (one per difficulty) in PART GUITAR, PART BASS and PART GUITAR COOP from counting. Here's the updated program:
http://www.sendspace.com/file/kg0dj3


outstanding, my friend! Thank you. This should be exactly what I needed. Im still looking for a midi that I tested with the last version of your program which reported 0 for a guitar only...now I cant find that midi.

Im going to see if I can get it to work from inside MY program. I will let you know.

-- Edit: Sun May 15, 2011 5:56 pm --

OK. So, thanks to raynebc, I now how the instrument detection working perfectly. However, it does make the install a little sticky.

Basically, you have 2 choices (Please Read and Choose carefully):

Download this file, unzip it and run the program. http://www.mediafire.com/?kuuxzml5750r3m7

Download these 2 files, run the installer, find the location where windows
put the program, then unzip the other file to that location. http://www.mediafire.com/?1ybx5427nwen59l , http://www.mediafire.com/?tl3meof3w30wj95

Either way, the 3 support files must be in the same folder with the application.

I have moved a few things around and expanded areas...I think it looks/works better this way.

Thanks, and enjoy!

Screenshot, v 1.1
Image

Return to “General FOF Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests