Post by David on Jul 16, 2011 20:18:18 GMT
This thread if for technical discussion of future Advancements to the MIDI Standard and song.ini used by the game.
I'll try and keep a record of the details for future reference and expansion.
Advancements Checklist:
song.ini Advancements:
Dance Mode Standard:
Sysex Message Format:
Split Audio File Format
Real Keys MIDI Format
MIDI Profile Values:
XBOX 360 Mustang Pro Guitar Technical Information:
I'll try and keep a record of the details for future reference and expansion.
Advancements Checklist:
{<Expand>}
Open Bass - PS EOF
Slider Notes - PS EOF
Pro Slides - PS EOF
Chord Names - PS EOF
5 Lane Drums - PS EOF
Dance Mode - PS EOF
High Hat Positions - PS EOF
Rimshots - PS EOF
Drum Velocities - PS EOF
Open Bass - PS EOF
Slider Notes - PS EOF
Pro Slides - PS EOF
Chord Names - PS EOF
5 Lane Drums - PS EOF
Dance Mode - PS EOF
High Hat Positions - PS EOF
Rimshots - PS EOF
Drum Velocities - PS EOF
song.ini Advancements:
{<Expand>}
video_loop - If true background video will loop
rating - Song Rating Value ( integer )
star_power_note - Defines SP Phrase Note ( integer )
five_lane_drums - Indicates Basic Drums Are 5 Lane ( true / false )
drum_fallback_blue - Sets 5 to 4 Lane Drums Fallback Note ( true / false )
real_keys_lane_count_right - RH Keys Range ( integer )
real_keys_lane_count_left - LH Keys Range ( integer )
real_guitar_tuning - Guitar Tuning ( 0 0 0 0 0 0 "Standard tuning" )
real_bass_tuning - Bass Tuning ( 0 0 0 0 0 0 "Standard tuning" )
hopo_frequency - Ticks threshold for auto HOPO generation ( integer )
track - The track number from an album ( integer )
Sysex Features:
sysex_slider - Systex Slider ( true / false )
sysex_pro_slide - Systex Pro Slides ( true / false )
sysex_high_hat_ctrl - Systex High Hat Positions ( true / false )
sysex_rimshot - Systex Snare Rimshots ( true / false )
sysex_open_bass - Systex Open Strum ( true / false )
Freestyle SFX Types:
kit_type - Drums
guitar_type - Guitar
bass_type - Bass
keys_type - Keys
Difficulty Tags:
diff_keys - Normal Keys Difficulty
diff_drums_real - Real Drums Difficulty
diff_bass_real - Real Bass Difficulty
diff_guitar_real - Real Guitar Difficulty
diff_keys_real - Real Keys Difficulty
diff_vocals_harm - Harmony Vocals Difficulty
diff_dance - Dance Difficulty
diff_drums_real_ps - Real Drums Difficulty
diff_keys_real_ps - Real Keys Difficulty
diff_guitar_coop - Guitar Co-op Difficulty
diff_rhythm - Guitar Rhythm Difficulty
video_loop - If true background video will loop
rating - Song Rating Value ( integer )
star_power_note - Defines SP Phrase Note ( integer )
five_lane_drums - Indicates Basic Drums Are 5 Lane ( true / false )
drum_fallback_blue - Sets 5 to 4 Lane Drums Fallback Note ( true / false )
real_keys_lane_count_right - RH Keys Range ( integer )
real_keys_lane_count_left - LH Keys Range ( integer )
real_guitar_tuning - Guitar Tuning ( 0 0 0 0 0 0 "Standard tuning" )
real_bass_tuning - Bass Tuning ( 0 0 0 0 0 0 "Standard tuning" )
hopo_frequency - Ticks threshold for auto HOPO generation ( integer )
track - The track number from an album ( integer )
Sysex Features:
sysex_slider - Systex Slider ( true / false )
sysex_pro_slide - Systex Pro Slides ( true / false )
sysex_high_hat_ctrl - Systex High Hat Positions ( true / false )
sysex_rimshot - Systex Snare Rimshots ( true / false )
sysex_open_bass - Systex Open Strum ( true / false )
Freestyle SFX Types:
kit_type - Drums
guitar_type - Guitar
bass_type - Bass
keys_type - Keys
Difficulty Tags:
diff_keys - Normal Keys Difficulty
diff_drums_real - Real Drums Difficulty
diff_bass_real - Real Bass Difficulty
diff_guitar_real - Real Guitar Difficulty
diff_keys_real - Real Keys Difficulty
diff_vocals_harm - Harmony Vocals Difficulty
diff_dance - Dance Difficulty
diff_drums_real_ps - Real Drums Difficulty
diff_keys_real_ps - Real Keys Difficulty
diff_guitar_coop - Guitar Co-op Difficulty
diff_rhythm - Guitar Rhythm Difficulty
Dance Mode Standard:
{<Expand>}
Track Name: PART DANCE
Skill sections seperated by a single octave begining at a octave lower than the legacy charts to allow for All 5 Stepmania Difficulties
SKILLS:
Beginner 48-59
Easy 60-71
Medium 72-83
Hard 84-95
Challenge 96-107
Notes relative to skill base:
Lane 1 0 LEFT
Lane 2 1 DOWN
Lane 3 2 UP
Lane 4 3 RIGHT
Lane 5 4
Lane 6 5
Lane 7 6
Lane 8 7
Lane 9 8
Lane 10 9
Example:
Medium Lane 3 (UP) Note would be Note 74.
Hold Notes represented like RB sustains. (note that extended sustains are used often)
Channel Numbers For Notes:
0 Normal Note
1 Mine
2 Lift
3 Roll
Velocities:
127 Normal Note
Track Name: PART DANCE
Skill sections seperated by a single octave begining at a octave lower than the legacy charts to allow for All 5 Stepmania Difficulties
SKILLS:
Beginner 48-59
Easy 60-71
Medium 72-83
Hard 84-95
Challenge 96-107
Notes relative to skill base:
Lane 1 0 LEFT
Lane 2 1 DOWN
Lane 3 2 UP
Lane 4 3 RIGHT
Lane 5 4
Lane 6 5
Lane 7 6
Lane 8 7
Lane 9 8
Lane 10 9
Example:
Medium Lane 3 (UP) Note would be Note 74.
Hold Notes represented like RB sustains. (note that extended sustains are used often)
Channel Numbers For Notes:
0 Normal Note
1 Mine
2 Lift
3 Roll
Velocities:
127 Normal Note
Sysex Message Format:
{<Expand>}
Message Format:
0xF0 (MIDI identifier for Sysex)
Variable length value (This message is 8 bytes long at present)
3 bytes: 'P','S','\0'
1 byte: (Message ID: 0 = phrase)
1 byte: (Difficulty ID: 0 = Easy, 1 = Medium, 2 = Hard, 3 = Expert, 255 = All)
1 byte: (Phrase ID: 1 = Open strum bass)
1 byte: (Phrase status: 0 = Phrase stop, 1 = Phrase start)
1 byte: 0xF7 data byte ("End of Sysex")
Phrase ID's
1 - Open Strum Bass - Converts Green Notes To Open
2 - Pro guitar slide up - Converts Notes To Slide Up
3 - Pro guitar slide down - Converts Notes To Slide Down
4 - Slider / Tapable Notes - All Notes To Slider
5 - High Hat Open - Converts Yellow Cymbals To Open
6 - High Hat Pedal - Converts Yellow Cymbals To Foot Pedal
7 - Snare Rimshot - Converts Red Notes To Rimshots
8 - High Hat Sizzle - Converts Yellow Cymbals To Sizzle
9 - Palm Muted - Converts All Notes To Palm Muted
10 - Vibrato - Converts All Notes To Vibrato
11 - Pro Guitar Harmonic - Guitar Harmonic Note *
12 - Pro Guitar Pinch Harmonic - Guitar Pitch Harmonic Note *
13 - Pro Guitar Bend - Guitar Bend Note *
14 - Pro Guitar Accent - Guitar Accent Note *
15 - Pro Guitar Pop - Guitar Pop Note *
16 - Pro Guitar Slap - Guitar Slap Note*
17 - Yellow Tom + Cymbal - Duplicates Yellow Note to both Cymbal and Tom *
18 - Blue Tom + Cymbal - Duplicates Blue Note to both Cymbal and Tom *
19 - Green Tom + Cymbal - Duplicates Green Note to both Cymbal and Tom *
* Currently Only Supported By EOF and not Phase Shift
Message Format:
0xF0 (MIDI identifier for Sysex)
Variable length value (This message is 8 bytes long at present)
3 bytes: 'P','S','\0'
1 byte: (Message ID: 0 = phrase)
1 byte: (Difficulty ID: 0 = Easy, 1 = Medium, 2 = Hard, 3 = Expert, 255 = All)
1 byte: (Phrase ID: 1 = Open strum bass)
1 byte: (Phrase status: 0 = Phrase stop, 1 = Phrase start)
1 byte: 0xF7 data byte ("End of Sysex")
Phrase ID's
1 - Open Strum Bass - Converts Green Notes To Open
2 - Pro guitar slide up - Converts Notes To Slide Up
3 - Pro guitar slide down - Converts Notes To Slide Down
4 - Slider / Tapable Notes - All Notes To Slider
5 - High Hat Open - Converts Yellow Cymbals To Open
6 - High Hat Pedal - Converts Yellow Cymbals To Foot Pedal
7 - Snare Rimshot - Converts Red Notes To Rimshots
8 - High Hat Sizzle - Converts Yellow Cymbals To Sizzle
9 - Palm Muted - Converts All Notes To Palm Muted
10 - Vibrato - Converts All Notes To Vibrato
11 - Pro Guitar Harmonic - Guitar Harmonic Note *
12 - Pro Guitar Pinch Harmonic - Guitar Pitch Harmonic Note *
13 - Pro Guitar Bend - Guitar Bend Note *
14 - Pro Guitar Accent - Guitar Accent Note *
15 - Pro Guitar Pop - Guitar Pop Note *
16 - Pro Guitar Slap - Guitar Slap Note*
17 - Yellow Tom + Cymbal - Duplicates Yellow Note to both Cymbal and Tom *
18 - Blue Tom + Cymbal - Duplicates Blue Note to both Cymbal and Tom *
19 - Green Tom + Cymbal - Duplicates Green Note to both Cymbal and Tom *
* Currently Only Supported By EOF and not Phase Shift
Split Audio File Format
{<Expand>}
These are all self explanatory:
drums.ogg - Full Drum Mix
rhythm.ogg - Bass Guitar / Rhythm Guitar
guitar.ogg - Guitar / Coop Guitar
keys.ogg - Keys
vocals.ogg - Normal Vocal Mix
song.ogg - All Other Song Audio
crowd.ogg - Crowd Audio
VOCALS
To correctly support harmony vocals we need to allow for seperate audio and as such:
vocals_1.ogg - Lead Vocals
vocals_2.ogg - Backing Vocals
DRUMS
If the game detects all 4 split drum audio tracks in the song folder then it will assume it's using the Guitar Hero Method.
If it only detects 3 then it will assume it's using the Rockband Method.
I will add some song.ini tags to overide this at some point but for now this should do fine unless someone has any objections.
NOTE: If there are not any split audio tracks found it will revert back to drums.ogg
Guitar Hero Method
drums_1.ogg - Kick Drum
drums_2.ogg - Snare Drum
drums_3.ogg - Cymbals
drums_4.ogg - Toms
Rockband Method
drums_1.ogg - Kick Drum
drums_2.ogg - Snare Drum
drums_3.ogg - Toms and Cymbals
I would reccomend that you include vocals.ogg and drums.ogg even if you have split Drum and Vocal audio. This will allow for backwards compatibility for FOF and also allow the option to disable the split audio if you so choose.
These are all self explanatory:
drums.ogg - Full Drum Mix
rhythm.ogg - Bass Guitar / Rhythm Guitar
guitar.ogg - Guitar / Coop Guitar
keys.ogg - Keys
vocals.ogg - Normal Vocal Mix
song.ogg - All Other Song Audio
crowd.ogg - Crowd Audio
VOCALS
To correctly support harmony vocals we need to allow for seperate audio and as such:
vocals_1.ogg - Lead Vocals
vocals_2.ogg - Backing Vocals
DRUMS
If the game detects all 4 split drum audio tracks in the song folder then it will assume it's using the Guitar Hero Method.
If it only detects 3 then it will assume it's using the Rockband Method.
I will add some song.ini tags to overide this at some point but for now this should do fine unless someone has any objections.
NOTE: If there are not any split audio tracks found it will revert back to drums.ogg
Guitar Hero Method
drums_1.ogg - Kick Drum
drums_2.ogg - Snare Drum
drums_3.ogg - Cymbals
drums_4.ogg - Toms
Rockband Method
drums_1.ogg - Kick Drum
drums_2.ogg - Snare Drum
drums_3.ogg - Toms and Cymbals
I would reccomend that you include vocals.ogg and drums.ogg even if you have split Drum and Vocal audio. This will allow for backwards compatibility for FOF and also allow the option to disable the split audio if you so choose.
Real Keys MIDI Format
{<Expand>}In general it will use the RB method with a few additions.
MIDI TRACK NAMES
Expert = PART REAL_KEYS_PS_X
Hard = PART REAL_KEYS_PS_H
Medium = PART REAL_KEYS_PS_M
Easy = PART REAL_KEYS_PS_E
NOTE POSITIONS
Notes will range 88 keys from A1 ( note 21 ) to C9 ( note 108 ).
Right Hand notes will be marked with channel 0.
Left Hand notes will be marked with channel 1.
SHIFT MARKERS
The RB system uses the first octave to set the base note of the display.
However, we need the ability to set both left and right hand markers along with the octave.
Instead of this we will use C1 ( note 12 ) for the Left Hand and C#1 ( note 13 ) for the Right Hand. Then Velocity of either marker will define the note directly ( 21-108 ).
LANE COUNT
Phase Shift will allow the charter to define the number of lanes which work well for the song. The Shift Markers will be tailored for the specified Lane Count. Though Phase Shift will allow for "player specific" Lane Counts, it will only let the player choose a Lane Count which is greater than or equal to that defined by the charter.
Even though the Lane Count value can be whatever the charter wants, it would be advisable that charters try and keep to the following counts:
13 - This is 1 octave with 2 C notes.
18 - This is the RB count and is the max hand span on a piano.
25 - This is 2 octave swith 3 C notes.
This value will be defined in the song.ini as follows:
real_keys_lane_count_left = x
real_keys_lane_count_right = x
Please Note:
It is best to keep Lane Shifting to a minimum! If by adding a couple of extra lanes it reduces the amount of shifts, it would be advisable to break the above standards. However, you also want to chart with the least Lanes possible. Striking a good ballance between these 2 values will be very important to the charts playability.
MIDI TRACK NAMES
Expert = PART REAL_KEYS_PS_X
Hard = PART REAL_KEYS_PS_H
Medium = PART REAL_KEYS_PS_M
Easy = PART REAL_KEYS_PS_E
NOTE POSITIONS
Notes will range 88 keys from A1 ( note 21 ) to C9 ( note 108 ).
Right Hand notes will be marked with channel 0.
Left Hand notes will be marked with channel 1.
SHIFT MARKERS
The RB system uses the first octave to set the base note of the display.
However, we need the ability to set both left and right hand markers along with the octave.
Instead of this we will use C1 ( note 12 ) for the Left Hand and C#1 ( note 13 ) for the Right Hand. Then Velocity of either marker will define the note directly ( 21-108 ).
LANE COUNT
Phase Shift will allow the charter to define the number of lanes which work well for the song. The Shift Markers will be tailored for the specified Lane Count. Though Phase Shift will allow for "player specific" Lane Counts, it will only let the player choose a Lane Count which is greater than or equal to that defined by the charter.
Even though the Lane Count value can be whatever the charter wants, it would be advisable that charters try and keep to the following counts:
13 - This is 1 octave with 2 C notes.
18 - This is the RB count and is the max hand span on a piano.
25 - This is 2 octave swith 3 C notes.
This value will be defined in the song.ini as follows:
real_keys_lane_count_left = x
real_keys_lane_count_right = x
Please Note:
It is best to keep Lane Shifting to a minimum! If by adding a couple of extra lanes it reduces the amount of shifts, it would be advisable to break the above standards. However, you also want to chart with the least Lanes possible. Striking a good ballance between these 2 values will be very important to the charts playability.
MIDI Profile Values:
{<Expand>}
MAIN NODES
DEVICE - Main Container
NAME - Profile Name
DESCRIPTION - Profile Description
TYPE - Instrument Type
BUTTONS - Container for MIDI Binds
METHOD - Special Instrument Characteristics/Overrides
TYPES
0 DRUMS
1 GUITAR
2 GAMEPAD
3 KEYBOARD
4 PIANO
5 DRUMS REAL
6 GUITAR REAL
7 DANCE PAD
METHODS
0 MANUAL (Default)
1 PIANO (Standard Midi Keyboard With Pitch Wheel Bound To Whammy)
2 GUITAR SYSEX (RB Pro Guitar Using Sysex)
3 DRUMS (CC#4 HiHat Ctrl)
4 GUITAR MIDI (Standard MIDI Guitar)
5 GUITAR LEGACY (Pitch Wheel Bound To Whammy)
BUTTONS
< Button ID > MIDI Note Number , MIDI Channel Number , Cutoff Filter </ Button ID >
BUTTON ID'S
RED - Red Button/Snare
YELLOW - Yellow Button/Generic Hi-Hat
YELLOW_C - Hi-Hat Closed
YELLOW_O - Hi-Hat Open
YELLOW_P - Hi-Hat Foot Pedal
YELLOW_S - Hi-Hat Sizzle
YELLOW_TOM - Yellow Tom
BLUE - Generic Blue/Ride Cymbal
BLUE_TOM - Blue Tom
GREEN - Generic Green/Crash Cymbal
GREEN_TOM - Green Tom
ORANGE - Generic Orange/Crash Cymbal
BASS - Bass Pedal
RIM - Rimshot
UP - Navigate Up
DOWN - Navigate Down
LEFT - Navigate Left
RIGHT - Navigate Right
BACK - Back Button
START - Start Button
MAIN NODES
DEVICE - Main Container
NAME - Profile Name
DESCRIPTION - Profile Description
TYPE - Instrument Type
BUTTONS - Container for MIDI Binds
METHOD - Special Instrument Characteristics/Overrides
TYPES
0 DRUMS
1 GUITAR
2 GAMEPAD
3 KEYBOARD
4 PIANO
5 DRUMS REAL
6 GUITAR REAL
7 DANCE PAD
METHODS
0 MANUAL (Default)
1 PIANO (Standard Midi Keyboard With Pitch Wheel Bound To Whammy)
2 GUITAR SYSEX (RB Pro Guitar Using Sysex)
3 DRUMS (CC#4 HiHat Ctrl)
4 GUITAR MIDI (Standard MIDI Guitar)
5 GUITAR LEGACY (Pitch Wheel Bound To Whammy)
BUTTONS
< Button ID > MIDI Note Number , MIDI Channel Number , Cutoff Filter </ Button ID >
BUTTON ID'S
RED - Red Button/Snare
YELLOW - Yellow Button/Generic Hi-Hat
YELLOW_C - Hi-Hat Closed
YELLOW_O - Hi-Hat Open
YELLOW_P - Hi-Hat Foot Pedal
YELLOW_S - Hi-Hat Sizzle
YELLOW_TOM - Yellow Tom
BLUE - Generic Blue/Ride Cymbal
BLUE_TOM - Blue Tom
GREEN - Generic Green/Crash Cymbal
GREEN_TOM - Green Tom
ORANGE - Generic Orange/Crash Cymbal
BASS - Bass Pedal
RIM - Rimshot
UP - Navigate Up
DOWN - Navigate Down
LEFT - Navigate Left
RIGHT - Navigate Right
BACK - Back Button
START - Start Button
XBOX 360 Mustang Pro Guitar Technical Information:
{<Expand>}
Summery
The Fret and String signals are compressed into 6 Axis represented by the standard XBOX controller layout below.
The Trigger buttons are problematic as windows drivers merge them into a single axis which destroys the data when both are active.
As such X Input seems to be the only way without special drivers to get the correct data from this guitar.
The Data is arranged as follows:
Frets:
e = ( ( HIBYTE( Left Thumb X ) & 124 ) >> 2 );
B = ( LOBYTE( Left Thumb X ) >> 5 ) + ( ( HIBYTE( Left Thumb X ) & 3 ) << 3 );
G = ( LOBYTE( Left Thumb X ) & 31 );
D = ( ( Right Trigger & 252 ) >> 2 );
A = ( Left Trigger >> 5 ) + ( ( Right Trigger & 3 ) << 3 );
E = ( Left Trigger & 31 );
Strings:
e = ( HIBYTE( Right Thumb Y ) & 127 );
B = ( LOBYTE( Right Thumb Y ) & 127 );
G = ( HIBYTE( Right Thumb X ) & 127 );
D = ( LOBYTE( Right Thumb X ) & 127 );
A = ( HIBYTE( Left Thumb Y ) & 127 );
E = ( LOBYTE( Left Thumb Y ) & 127 );
Coloured Buttons:
Green = ( LOBYTE( Left Thumb Y ) & 128 );
Red = ( HIBYTE( Left Thumb Y ) & 128 );
Yellow = ( LOBYTE( Right Thumb X ) & 128 );
Blue = ( HIBYTE( Right Thumb X ) & 128 );
Orange = ( LOBYTE( Right Thumb Y ) & 128 );
I have found no Tilt data but XInput does report a packet change when the guitar is tilted.
Summery
The Fret and String signals are compressed into 6 Axis represented by the standard XBOX controller layout below.
The Trigger buttons are problematic as windows drivers merge them into a single axis which destroys the data when both are active.
As such X Input seems to be the only way without special drivers to get the correct data from this guitar.
The Data is arranged as follows:
Xinput Axis | Data Size | Fret Data | Strings | Buttons |
Right Thumb Y | 2 Bytes | e and B | Orange | |
Right Thumb X | 2 Bytes | G and D | Yellow and Blue | |
Left Thumb Y | 2 Bytes | A and E | Green and Red | |
Left Thumb X | 2 Bytes | e, B and G | ||
Right Trigger | 1 Byte | D and A | ||
Left Trigger | 1 Byte | A and E |
Frets:
e = ( ( HIBYTE( Left Thumb X ) & 124 ) >> 2 );
B = ( LOBYTE( Left Thumb X ) >> 5 ) + ( ( HIBYTE( Left Thumb X ) & 3 ) << 3 );
G = ( LOBYTE( Left Thumb X ) & 31 );
D = ( ( Right Trigger & 252 ) >> 2 );
A = ( Left Trigger >> 5 ) + ( ( Right Trigger & 3 ) << 3 );
E = ( Left Trigger & 31 );
Strings:
e = ( HIBYTE( Right Thumb Y ) & 127 );
B = ( LOBYTE( Right Thumb Y ) & 127 );
G = ( HIBYTE( Right Thumb X ) & 127 );
D = ( LOBYTE( Right Thumb X ) & 127 );
A = ( HIBYTE( Left Thumb Y ) & 127 );
E = ( LOBYTE( Left Thumb Y ) & 127 );
Coloured Buttons:
Green = ( LOBYTE( Left Thumb Y ) & 128 );
Red = ( HIBYTE( Left Thumb Y ) & 128 );
Yellow = ( LOBYTE( Right Thumb X ) & 128 );
Blue = ( HIBYTE( Right Thumb X ) & 128 );
Orange = ( LOBYTE( Right Thumb Y ) & 128 );
I have found no Tilt data but XInput does report a packet change when the guitar is tilted.