Posted By
|
Message
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
1st October, 2013 at 01/10/2013 00:40:15 -
Is it possible to use a Guitar Hero chart (.mid or .chart) in MMF2 in such a way to read all the desired information from it?
Maltar Draco, I do PC gaming.
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
1st October, 2013 at 01/10/2013 00:56:01 -
No
n/a
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
1st October, 2013 at 01/10/2013 02:13:19 -
Currently there isn't an extension that I know of that can do this in an automated fashion.
You can either write your own extension to do this. Use Clickteam's extension SDK, and find another library online that can read those charts.
Or you could use a binary extension of the equivalent to read in the date and extract what you need using MMF, but that might be a little more difficult, and it'll certainly have more overhead.
Depending on what you wish to do with the information will determine whether or not it's worth it to you. I would venture to guess that it isn't.
n/a
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
3rd November, 2013 at 03/11/2013 00:50:15 -
Okay, So I have a had a much better look a guitar hero's .chart file format and it turns out that it's entirely text based and can be edited in textpad or even notepad. Anything I have placed in '' is used to help explain the format.
[Song]{
Name = "Song Name"
Artist = "Band Name"
Charter = "Maltar Draco"
Offset = 0
Resolution = 192
Player2 = rhythm 'this can be rhythm or bass'
Difficulty = 1 'any value from 1 up to 11 seems to work'
PreviewStart = 0.00
PreviewEnd = 0.00
Genre = "Rock" 'this can be rock, metal, black metal, punk, acid rock or alternaltive'
MediaType = "cd" 'this can be cd, vinyl or cassettte'
MusicStream = "Band.ogg"
GuitarStream = "Lead.ogg"
BassStream = "Rhythm.ogg"
}
This tells us a lot of important information about the song such as what music files it uses, it's name and best of all, it's resolution which is your 'clock ticks per 1/4 note' and your offset which determines how many ticks before the fret commands appear. I believe resolution should be kept at 192 because it allows for both 1/24 and 1/32 notes but with a certain degree of inaccuracy from the players.
From this point on, ticks determine everything. when the tick counter reaches # it will run the command it has been given, where everything will be '# = X', with # being the tick to do run the command on and X to be the command to run.
[SyncTrack]
{
0 = B 120000
0 = TS 4
}
This next piece of information tells us the starting beats per minute to 3 decimal places, in this case it simply says 120BPM and the gives us the time signature, it is always X/4, where X is the value defined, so the value being 4 means 4/4 and it being 6 means 6/4.
[Events]
{
0 = E "section Intro"
0 = E "section Verse_1a"
0 = E "section Verse_1b"
0 = E "section Chorus"
0 = E "section Bridge"
0 = E "section Solo"
0 = E "section Verse_2"
0 = E "section Chorus_2"
0 = E "section Ending"
0 = E "end"
}
Guitar Hero requires events, firstly to define individual sections of the song that you can play on practice mode on full speed or slower and secondly to define when the song ends.
Guitar Hero has four different game modes. (single-player, face-off, pro face-off and coop) Coop is best game mode!
Three different types of note charts. (single-player, coop guitar/lead and coop bass/rhythm)
And four difficulties. (easy, medium, hard and expert)
This gives us twelve different fret charts to note with coop only using the 'Double' ones and every other game mode using the 'Single' ones.
[EasySingle]
[EasyDoubleGuitar]
[EasyDoubleBass]
[MediumSingle]
[MediumDoubleGuitar]
[MediumDoubleBass]
[HardSingle]
[HardDoubleGuitar]
[HardDoubleBass]
[ExpertSingle]
[ExpertDoubleGuitar]
[ExpertDoubleBass]
These areas code two things or three things for the 'Single' ones, you need to code notes, star power sections and face-off sections for 'Single' charts.
{
0 = N 4 768
0 = N 2 768
768 = N 2 384
768 = N 0 384
1152 = N 3 384
1152 = N 1 384
}
In this case we just coded in some fifth chords for the player, players love fifth chords. N indicates that it is a note, the first # indicates it's fret, 0 = green, 1 = red, 2 = yellow, 3 = blue and 4 = orange and the second # indicates it's length, the first one is 768 which is four times that of the resolution meaning that is a 1/1 note and the other two are 1/2 notes.
Also if a single note is 96 or further away from the previous note, that is a 1/8 note or slower, it must be strummed but if the single note is closer than a 96, like for instance a 48, that is a 1/16 it can be played by simply tapping the fret instead, that is how Guitar Hero works! The notes previously demonstrated were chords and cannot be tapepd regaurdless of how close they are. http://guitarhero.wikia.com/wiki/Hammer_Ons_and_Pull_Offs
{
0 = S 0 1728
1728 = S 1 1600
3392 = S 2 1536
}
Lastly in the same sections, instead of just notes, we need some additional data. This is the same format as before but with 'S' instead of 'N' and the first # codes for the data of the section, 0 = player 1 will play this section in face-off mode, 1 = player 2 will paly this section in face-off mode and 2 = indicates that these notes are filled with star power. http://guitarhero.wikia.com/wiki/Star_Power
Okay, so that's exactly how the .chart file format works, now how do I use it in MMF2?
Edited by Maltar Draco
Maltar Draco, I do PC gaming.
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
3rd November, 2013 at 03/11/2013 00:59:10 -
Looks similar to XML. You might be able to read it with the XML extension.
IF that doesn't work you can load the text into MMF using the "edit field" object and then parse it yourself. The "string parser 2" object would be good for this.
Also it depends on what info you want to use and how you want to store it.
n/a
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
3rd November, 2013 at 03/11/2013 01:24:18 -
Originally Posted by -UrbanMonk- Looks similar to XML. You might be able to read it with the XML extension.
Actually XML goes like this.
<object>
<thingy>
stuff
</thingy>
</object>
But what we have looks like this.
[Object]{
thingy = stuff
}
And coincidentally ini looks like tihs.
[Object]
thingy = stuff
However ini wouldn't work because it cannot comprehend multiple entries for the same field making chords completely impossible.
Edited by Maltar Draco
Maltar Draco, I do PC gaming.
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
3rd November, 2013 at 03/11/2013 02:16:34 -
Actually you could use the ini object to read it, but first you'd need to load it into MMF and make some modifications to it first.
I think the String Parser 2 object allows file loading, but you can use the Edit Field object if it doesn't.
First load the file into the String Parser 2 object and then:
-Use the replace feature to replace "{" and "}" with ""
-Use the replace feature to replace " = " with "="
-Use the replace feature to replace " " with "|"
Now save the file as "temp" somewhere and load it with the ini object.
You should be able to load fields such as "Name" with it the normal way,
but to load chords, and fields with more than one entry you'll need to load them into the string parser then separate the elements by using a delimiter, which in this case happens to be "|"
Read the String Parser 2's documentation if you need help with it. It's well written.
EDIT: You might also want to strip out TABs and quote marks to make it easier to read.
Edited by UrbanMonk
n/a
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
8th November, 2013 at 08/11/2013 17:43:57 -
I tried loading it into the INI++ 1.5 object and it intentionally erased all the chords, the very instant it was loaded. I have a backup though so nothing lost.
If I could just simply separate the contents of each individual group into a different list object, then I could read each of them individually and that would make huge progress.
Edited by Maltar Draco
Maltar Draco, I do PC gaming.
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
8th November, 2013 at 08/11/2013 19:28:48 -
Use the regular ini object.
INI++ works differently and more aggressively ensures that the file it's given matches the ini standard which the files you have don't.
Like I said. Load it into the String Parser 2 object first then perform those string replacements and save it under the name "temp" again before loading it as an ini.
n/a
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
12th November, 2013 at 12/11/2013 19:32:25 -
String Parser is certainly able to load strings but it has no ability to token them and return the results in any object that uses text and yes I used the correct delimiters.
Maltar Draco, I do PC gaming.
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
12th November, 2013 at 12/11/2013 22:14:24 -
If in doubt, just parse it manually with a couple nested fastloops...
n/a
|
The_Antisony At least I'm not Circy
Registered 01/07/2002
Points 1341
|
13th November, 2013 at 13/11/2013 02:17:49 -
Nevermind String Parser 2. Use String Tokenizer instead. Set " " as your token, then when loading lines from the INI that have more than one bit of data, toss it through string tokenizer and you should be able to pull the last x-number of elements that appear. If there's three settings you need to import, the first couple of elements in each line are going to be the line title and equals sign.
In a line like this:
3392 = S 2 1536
You'll only need the last three elements. When you run it through string tokenizer, you'll get a result of 5 elements. You'll only need the last three. See what I'm sayin'?
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
13th November, 2013 at 13/11/2013 02:44:29 -
Are you using the right object Maltar?
The String Parser 2 object certainly has those features. I use them all the time.
If you send me a .gh file I can make an example for you.
n/a
|
Maltar Draco
Registered 22/08/2013 19:25:19
Points 215
|
13th November, 2013 at 13/11/2013 20:19:09 -
Interestingly enough, I did try String Tokeniser immediately after String Parser failed and while it does the job a little slowly, I still need to spread the data from the different groups into different lists.
The reason I want to do it like this is because you only ever have two note tracks going on in the game, it's a two player game so you need to ignore a large portion of data because you are not using it this time.
For example: Both players could be playing on easy and therefore the contents of [EasyDoubleGuitar] would be used for Player1's note track and the contents of [EasyDoubleBass] would be used for Player2's note track but Player2 might wanna play on medium and would therefore instead need the data from [MediumDoubleBass], or Player1 might be palying alone and would need the data from [EasySingle] etc, etc, etc...
In short: There are different groups, some of which I want to the game use and some I don't want to the game use this time round.
What I want: Get only the full contents of a single group into a text-based object. From that point on, I can quickly parse and use the data from that.
Edited by Maltar Draco
Maltar Draco, I do PC gaming.
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
13th November, 2013 at 13/11/2013 20:52:05 -
The sting replacement method I gave earlier should be plenty fast. You're essentially compressing the data file by removing unnecessary characters before reading it.
Send me a file and I write you an example.
n/a
|
|
|