May I suggest a different format for storing your songs? I'd use something like this:
HEADER
Dword - MAGIC NUMBER (Used to verify this is a note file)
Byte - Notes Per Second
Word - Blank Notes Before First Note
Dword - Song Length In Seconds
Dword - Number Of Notes In Song
Dword - Offset In File To Song Guitar
Track
Dword - Offset In File To Song Bass Guitar
Track
Dword - Offset In File To Song (Vocals, Other Instruments)
Track
Number Of Notes In Song
Individual Notes Follow Directly After Header
INDIVIDUAL NOTE
Byte - Note Mask (Bit
0 = Green, Bit
1 = Red, Bit
2 = Yellow, Bit
3 = Blue, Bit
4 = Orange, Bit
5 = Start Star Power Group, Bit
6 = End Star Power Group, Bit
7 = Hammer On)
Byte - Note Length (If larger than zero (or one) this is a LONG NOTE - it takes up an extra few note spaces).
Word - Offset After Note (How many note spaces until the next note?)
TRACK
Memblock - Sound Data
Add in different settings for difficulty.
Also - If you'd like - I'm working on a custom GH song right now, it's about 55% done. If you'd like I could contribute it to this project. It's a very difficult song though - like Through the Fire and Flames. But it'd actually be legal to use.
EDIT
About the note mask, you can use this code to check if a specific note or setting is used:
`These constants should be defined at the top of your source code
#constant NOTE_MASK_GREEN 1
#constant NOTE_MASK_RED 2
#constant NOTE_MASK_YELLOW 4
#constant NOTE_MASK_BLUE 8
#constant NOTE_MASK_ORANGE 16
#constant NOTE_MASK_START_STAR_POWER 32
#constant NOTE_MASK_END_STAR_POWER 64
#constant NOTE_MASK_HAMMER_ON 128
remstart
To check if a particular note-mask setting is held down (Such as the red note) do this (assuming noteMask is a byte representing the note mask you wish to read from, and setting is the particular note mask value you want to check):
settingIsTrue = noteMask && setting
For example:
settingIsTrue = noteMask && NOTE_MASK_RED
Or:
settingIsTrue = (noteMask && NOTE_MASK_GREEN) and (noteMask && NOTE_MASK_RED)
You can create note masks by ORing or ADDing them together, for example:
noteMask = NOTE_MASK_GREEN || NOTE_MASK_YELLOW || NOTE_MASK_ORANGE
Or:
noteMask = NOTE_MASK_BLUE + NOTE_MASK_START_STAR_POWER + NOTE_MASK_HAMMER_ON
remend
Cheers,
-naota
I'm not a dictator to those that do stuff for me by will. Only those who don't.