ScoreHero
Home | Forum | Wiki
Inbox [ Login ]Inbox [ Login ]
SearchSearch MemberlistMemberlist
ProfileProfile Log inLog in
GH6/GH5/BH .NOTE File Format
Goto page Previous  1, 2, 3, 4, 5, 6, 7
 
Post new topic   Reply to topic    ScoreHero Forum Index -> Software
View previous topic :: View next topic  
Author Message
codemann8  





Joined: 10 Apr 2007
Posts: 1048
Location: Oshkosh, WI

PostPosted: Thu Jun 21, 2012 8:01 pm    Post subject: Reply with quote

raynebc wrote:
I've been stuck trying to parse practice sections from QB files. I'm able to load the section names and their checksums, but I don't know where or how the timestamps are stored for them. Can anybody shed some light on this? Thanks in advance.

This isn't a QB topic but I'll try to help anyways. Try searching the QB for the checksum, you may need to switch endianness...you should be able to find it
_________________
Frets and Fireworks GH:A Expert Tourney Winner
AAA-2 Season 5 Overall Points Champ & Playoff Runner-Up!!!
My FCs



Back to top
View user's profile Wiki User Page Send private message Send e-mail Visit poster's website XBL Gamertag: codemann8 PSN Name: codemann8
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Thu Jun 21, 2012 10:21 pm    Post subject: Reply with quote

I sort of hijacked this thread with questions about the QB format a while ago. I figured it was the most relevant thread, but I can open a separate thread if you would prefer. Or a mod could split it into two threads from where I changed the topic back on the first page.

Forging on ahead though, here's what I find when I dissect the PAK file for "Hotel California":

Code:
I found the section names easily, as they are stored identically as with NOTE format files:
section name = "Chorus 1"   checksum = 0x0C658976
section name = "Chorus 2"   checksum = 0x2748DAB5
section name = "Intro"   checksum = 0x085B59C2
section name = "Intro Solo"   checksum = 0x67DBFDEF
section name = "Outro"   checksum = 0x249404F8
section name = "Solo A"   checksum = 0xD8953790
section name = "Solo B"   checksum = 0xF3B86453
section name = "Solo C"   checksum = 0xEAA35512
section name = "Solo D"   checksum = 0xA5E2C3D5
section name = "Solo E"   checksum = 0xBCF9F294
section name = "Verse 1A"   checksum = 0x6BAF9FF7
section name = "Verse 1B"   checksum = 0x4082CC34
section name = "Verse 2A"   checksum = 0x791A3019
section name = "Verse 2B"   checksum = 0x523763DA
section name = "Verse 3A"   checksum = 0xC1A6577C
section name = "Verse 3B"   checksum = 0xEA8B04BF

Elsewhere in the file is where I found references to some of the above checksums.  Raw data is as follows:
00 00 00 00 00 00 01 5C (QB file size)
1C 08 02 04 10 04 08 0C 0C 08 02 04 14 02 04 0C 10 10 0C 00 (QB Magic number)
00 20 1C 00 (Start of section?)
9A FF 95 DA (Section name checksum?)
6C 4F 3A FF (File name checksum?)
08 5B 59 C2 (The checksum of the "Intro" section)
00 00 00 00 ???
00 20 1C 00 (Start of section?)
BD 83 17 17 (Section name checksum?)
6C 4F 3A FF (File name checksum?)
67 DB FD EF (The checksum of the "Intro Solo" section)
00 00 00 00 ???
00 20 1C 00 (Start of section?)
34 B1 2A 2F (Section name checksum?)
6C 4F 3A FF (File name checksum?)
6B AF 9F F7 (The checksum of the "Verse 1A" section)
00 00 00 00 ???
00 20 1C 00 (Start of section?)
56 08 AF DE (Section name checksum?)
6C 4F 3A FF (File name checksum?)
40 82 CC 34 (The checksum of the "Verse 1B" section)
00 00 00 00 ???
...


Most of this seemed to make sense, except I still don't know where the timestamps are being kept. I couldn't find the unknown checksums among the Hotel California guitar marker checksums from the DBG file
Quote:
0xdf5530a4 hotelcalifornia_guitar_markers_text_dcaa21df
0x9ba311fb hotelcalifornia_guitar_markers_text_42ceb47c
0x1488b26c hotelcalifornia_guitar_markers_text_3284a978
0xba5a436b hotelcalifornia_guitar_markers_text_ab8df8c2
0xaaf804db hotelcalifornia_guitar_markers_text_abad1149
0x6b11b59a hotelcalifornia_guitar_markers_text_35c984ea
0xaf2f05a7 hotelcalifornia_guitar_markers_text_c85c2953
0x9aff95da hotelcalifornia_guitar_markers_text_e5fa3adf
0xc45626d9 hotelcalifornia_guitar_markers_text_45a37065
0xbd831717 hotelcalifornia_guitar_markers_text_e0ecf5eb
0x3eb9d962 hotelcalifornia_guitar_markers_text_eda21fe1
0x439319c5 hotelcalifornia_guitar_markers
0x34b12a2f hotelcalifornia_guitar_markers_text_19a9fabb
0x86dbcc3d hotelcalifornia_guitar_markers_text_b296c983
0x6e68aca3 hotelcalifornia_guitar_markers_text_2b9f9839
0x72dfae11 hotelcalifornia_guitar_markers_text_515578e9
0x5608afde hotelcalifornia_guitar_markers_text_80a0ab01


Edit: Elsewhere yet in the file, I found references to the checksums that were mentioned in the references to the section name strings:
Code:
00 01 1A 00 (Alternate 2D array section header?)
7D 30 DF 01 ???
9A FF 95 DA (Checksum given above for "Intro" section)
00 00 00 00 ???
00 00 01 00 ???
00 01 54 38 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 71 EB ???
00 01 54 48 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
BD 83 17 17 (Checksum given above for "Intro Solo" section)
00 00 00 00 ???
00 00 01 00 ???
00 01 54 60 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 D7 12 ???
00 01 54 70 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
34 B1 2A 2F (Checksum given above for "Verse 1A" section)
...
Back to top
View user's profile Send private message
codemann8  





Joined: 10 Apr 2007
Posts: 1048
Location: Oshkosh, WI

PostPosted: Fri Jun 22, 2012 8:13 pm    Post subject: Reply with quote

raynebc wrote:
Edit: Elsewhere yet in the file, I found references to the checksums that were mentioned in the references to the section name strings:
Code:
00 01 1A 00 (Alternate 2D array section header?)
7D 30 DF 01 ???
9A FF 95 DA (Checksum given above for "Intro" section)
00 00 00 00 ???
00 00 01 00 ???
00 01 54 38 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 71 EB ???
00 01 54 48 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
BD 83 17 17 (Checksum given above for "Intro Solo" section)
00 00 00 00 ???
00 00 01 00 ???
00 01 54 60 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 D7 12 ???
00 01 54 70 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
34 B1 2A 2F (Checksum given above for "Verse 1A" section)
...


0x71EB should be the ms offset of the "Intro Solo" Section...you're missing the part of the file that shows the ms offset for the "Intro" Section...which is 0xC97

I think that is what you should need

Edit: I'll re-post and fill in some of the ???'s (in bold EditEdit: "doesnt work in code sections, the [ b ] 's are there"):

Code:
[b]00 00 01 00 (Start of first entry)
00 01 54 10
00 01 01 00
90 6B 67 BA
00 00 0C 97 (OFFSET ms of Intro)
00 01 54 20[/b]
00 01 1A 00 (Alternate 2D array section header?)
7D 30 DF 01 ???
9A FF 95 DA (Checksum given above for "Intro" section)
00 00 00 00 ???
00 00 01 00 [b](Start of second record)[/b]
00 01 54 38 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 71 EB [b](OFFSET ms of Intro Solo)[/b]
00 01 54 48 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
BD 83 17 17 (Checksum given above for "Intro Solo" section)
00 00 00 00 ???
00 00 01 00 ???
00 01 54 60 ???
00 01 01 00 ???
90 6B 67 BA ???
00 00 D7 12 ???
00 01 54 70 ???
00 01 1A 00 (Alternate 2D array section header)
7D 30 DF 01 ???
34 B1 2A 2F (Checksum given above for "Verse 1A" section)
...

_________________
Frets and Fireworks GH:A Expert Tourney Winner
AAA-2 Season 5 Overall Points Champ & Playoff Runner-Up!!!
My FCs



Back to top
View user's profile Wiki User Page Send private message Send e-mail Visit poster's website XBL Gamertag: codemann8 PSN Name: codemann8
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Fri Jun 22, 2012 8:26 pm    Post subject: Reply with quote

Is there a description for these fields written up someplace? I suppose I could make do by finding each section's checksum, rewinding to make sure the 2D array header is there, and then rewinding to grab the timestamp. Thanks again for your help! Hopefully now I can implement this logic and forget this ugly QB format ever existed.
Back to top
View user's profile Send private message
codemann8  





Joined: 10 Apr 2007
Posts: 1048
Location: Oshkosh, WI

PostPosted: Sat Jun 23, 2012 11:25 pm    Post subject: Reply with quote

raynebc wrote:
Is there a description for these fields written up someplace? I suppose I could make do by finding each section's checksum, rewinding to make sure the 2D array header is there, and then rewinding to grab the timestamp. Thanks again for your help! Hopefully now I can implement this logic and forget this ugly QB format ever existed.
I don't believe so...I think the hardest thing for you is that you're trying to parse the PAK, not the QB...QB's are heavy with storing offsets to various information, when you use the PAK, you lose the ability to easily find information.
_________________
Frets and Fireworks GH:A Expert Tourney Winner
AAA-2 Season 5 Overall Points Champ & Playoff Runner-Up!!!
My FCs



Back to top
View user's profile Wiki User Page Send private message Send e-mail Visit poster's website XBL Gamertag: codemann8 PSN Name: codemann8
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Sun Jun 24, 2012 12:51 am    Post subject: Reply with quote

That's not really a very big limitation, since the PAK file has everything nice and contained. As long as the format is known, I can parse it as formally as necessary to load it all properly. The way I have to parse some things are more hacky than others, but it works.
Back to top
View user's profile Send private message
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Wed Sep 26, 2012 6:52 pm    Post subject: Reply with quote

codemann8 wrote:
raynebc wrote:
Out of a set of 4 files I have, that and "No More Mr. Nice Guy" have 36 byte vox words entries. "Only Happy When it Rains" defines a fretbar size of 0 bytes (I don't know why it does this). "Dancin' with Myself" defines a vox note size of 256 bytes.

I'll be examine a document that describes the GHWT format next. Are there any other GH format variants I need to look into?

That is odd, if you find any method for the madness in the variation of these files I'll be able to update this tech doc accordingly.


I just came to find that I was running into this problem because the "vocals" section checksum of 0xE8E6ADCB could appear several times in the NOTE file, but the one with the needed data is the one where the vox note size of 7 is given as the 2nd (or sometimes the 3rd, for some reason) dword after that checksum. I just added a loop to check each instance of the checksum until the expected vox note size was read. It solved the issue I was having.
Back to top
View user's profile Send private message
nonisen  





Joined: 16 Jul 2009
Posts: 8

PostPosted: Sun May 05, 2019 12:05 pm    Post subject: .note -> .chart converter Reply with quote

I am working on this .note to .chart converter and I am almost done.
It supports all notes, difficulties, TAPS, SP, Forced notes.
I just need to figure out how to convert ms time to tick time and back.
If anyone knows how this could be achieved, please PM me. :)

Tool download is on my Discord: https://discord.gg/nMBGfgD
Back to top
View user's profile Send private message
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Sun May 05, 2019 5:02 pm    Post subject: Reply with quote

Here's a post about the approach I take:
https://www.fretsonfire.org/forums/viewtopic.php?p=353102#p353102
Back to top
View user's profile Send private message
nonisen  





Joined: 16 Jul 2009
Posts: 8

PostPosted: Mon May 06, 2019 8:20 am    Post subject: Reply with quote

raynebc wrote:
Here's a post about the approach I take:
https://www.fretsonfire.org/forums/viewtopic.php?p=353102#p353102


Thank you!
That is very useful :)

]For doing the reverse [.note -> .chart] in other words [ms -> tick], a guy on youtube called Buldy said this:
Code:

Tick [the note position in .chart] = (BPM * Resolution * time [in miliseconds]) / 60 000.
Moonscraper (and feedBack) take into account three decimal places of BPM value.
And yes, you need to keep track of what BPM you are currently on.


And here is a method that seems to work pretty well for me at the moment:

Code:
Convert current resolution to 192.
divide all the timestamps by (res / 192)




bpm * resolution = bpmres
125,786 * 192 = 24150,912

minute / bpmres = minbpmres
60000 / 24150,912 = X [ 2,484378229691699 ]

( this is for getting ms-time )
ticks * minbpmres = ms
ticks * 2,484378229691699 = 3814 [ms]

( this is for getting tick-time )
ms / minbpmres = tick
3814 / 2,484378229691699 = tick [ 1535,1929728 ]

tick rounded to closest divideable by 192.



Just posting it here to keep it backed up for people who need to do it in the future on their own projects :)

Adding a couple tags for easy google search results below:

how to convert tick to ms
how to convert ms to tick
guitar hero ms to tick
guitar hero tick to ms
chart to note
note to chart
GH3 to GH5
GH5 to GH3
Back to top
View user's profile Send private message
raynebc  





Joined: 16 Jun 2008
Posts: 992

PostPosted: Fri Jun 21, 2019 7:13 pm    Post subject: Reply with quote

After some testing, it seems like the unknown extra byte in the 9 byte variant of note definitions defines ghost status (for drum tracks in Warriors of Rock).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ScoreHero Forum Index -> Software All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7
Page 7 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Copyright © 2006-2024 ScoreHero, LLC
Terms of Use | Privacy Policy


Powered by phpBB