AGSC (File Format): Difference between revisions

Jump to navigation Jump to search
imported>Jackoalan
imported>Jackoalan
Line 966: Line 966:


The Project properties chunk contains values for the sounds, including priority, polyphony, volume, etc.
The Project properties chunk contains values for the sounds, including priority, polyphony, volume, etc.
Structurally, the Project is the root of the Audio Group tree, defining one or more ''Song Groups'' or ''SFX Groups''


{|class="wikitable"
{|class="wikitable"
Line 974: Line 976:
| 0x0
| 0x0
| 4
| 4
| '''Proj chunk size'''
| '''Group end offset''' (points to next group in project)
|-
|-
| 0x2
| 0x2
| 2
| 2
| {{unknown|'''Unknown'''}}
| '''Group ID'''
|-
|-
| 0x4
| 0x4
| 2
| 2
| '''Group ID'''; 0 for SongGroup (for use with [[CSNG (File Format)|CSNG]]), 1 for SFXGroup.
| '''Group Type'''; 0 for SongGroup (for use with [[CSNG (File Format)|CSNG]]), 1 for SFXGroup.
|-
|-
| 0x8
| 0x8
Line 998: Line 1,000:
| 0x14
| 0x14
| 4
| 4
| '''Keymaps table offset'''
| '''Keymaps table offset''' (SongGroup)
|-
|-
| 0x18
| 0x18
| 4
| 4
| '''Layers table offset'''
| '''Layers table offset''' (SongGroup)
|-
|-
| 0x1C
| 0x1C
| 4
| 4
| '''SoundMacro Settings Table offset'''
| '''Normal page table''' (SongGroup) / '''SFX table offset''' (SFXGroup)
|-
|-
| 0x20
| 0x20
| 4
| 4
| '''Unknown Table D offset''' ''(usually 0, indicating table is not present)''
| '''Drum page table offset''' (SongGroup)
|-
|-
| 0x24
| 0x24
| 4
| 4
| '''Unknown Table E offset''' ''(usually 0, indicating table is not present)''
| '''MIDI Setup table offset''' (SongGroup)
|-
|-
| 0x20
| 0x20
| colspan=2 {{unknown|End of proj header}}
| colspan=2 {{unknown|End of group header}}
|}
|}


Line 1,026: Line 1,028:
This is a table of shorts; there's no count value, so it's terminated with a value of 0xFFFF. It's a list of SoundMacro IDs present in the file. Occasionally there's gaps in the list; these gaps are signified by the top bit, 0x8000, being set on the size value preceding the gap.
This is a table of shorts; there's no count value, so it's terminated with a value of 0xFFFF. It's a list of SoundMacro IDs present in the file. Occasionally there's gaps in the list; these gaps are signified by the top bit, 0x8000, being set on the size value preceding the gap.


==== Sample ID Table ====
==== Sample ID / Keymap / Layer Tables ====
 
These function the same way as the SoundMacro ID table, but indexes other types of entities instead.
 
==== Normal / Drum Page Entry ====
 
Used to map [https://www.midi.org/specifications/item/gm-level-1-sound-set General MIDI program numbers] (instruments)
to sound entities (macros, keymaps, layers)
 
{|class="wikitable"
! Offset
! Size
! Description
|-
| 0x0
| 2
| '''ObjectID'''
|-
| 0x2
| 1
| '''Priority'''; voices are limited, so priority is used to play more important sounds over others
|-
| 0x3
| 1
| '''Max number of voices'''
|-
| 0x4
| 1
| '''GM Program Number'''
|-
| 0x5
| 1
| '''Padding'''
|}


This functions the same way as the SoundMacro ID table, but it contains a list sample IDs instead.
==== SFX Entry ====


==== SoundMacro Settings ====
Used to map auto-generated <code>#define</code> IDs (used by game code) to sound entities (macros, keymaps, layers)


This table begins with a 16-bit count value, then 16 bits of padding. Each entry in the table is 10 bytes.
This table begins with a 16-bit count value, then 16 bits of padding. Each entry in the table is 10 bytes.
Line 1,041: Line 1,076:
| 0x0
| 0x0
| 2
| 2
| '''ID'''; referenced in [[EVNT]]
| '''DefineID'''; referenced by game code
|-
|-
| 0x2
| 0x2
| 2
| 2
| '''SoundMacro ID'''
| '''ObjectID'''
|-
|-
| 0x4
| 0x4
| 1
| 1
| '''Max number of voices'''
| '''Priority'''; voices are limited, so priority is used to play more important sounds over others
|-
|-
| 0x5
| 0x5
| 1
| 1
| '''Priority'''; voices are limited, so priority is used to play more important sounds over others
| '''Max number of voices'''
|-
|-
| 0x6
| 0x6
Line 1,067: Line 1,102:
| '''Definite Key'''; The default pitch (usually 0x3C00... the second byte may possibly be the MIDI channel)
| '''Definite Key'''; The default pitch (usually 0x3C00... the second byte may possibly be the MIDI channel)
|}
|}
==== MIDI Setup Entry ====
Table of fixed-length tables to map all 16 MIDI channels to program numbers
(in-turn resolving to sound entities via the page table).
Multiple MIDI Setups may be created to support Song data requiring totally different
banks of instruments.
Each MIDI Setup starts with a u32 '''MIDI-Setup-ID''', followed by 16 entries of the following table (one for each channel):
{|class="wikitable"
! Offset
! Size
! Description
|-
| 0x0
| 1
| '''Program Number'''
|-
| 0x1
| 1
| '''Volume'''
|-
| 0x2
| 1
| '''Panning'''
|-
| 0x3
| 1
| '''Reverb'''
|-
| 0x4
| 1
| '''Chorus'''
|}
MIDI setups continue until the ''group end offset'' is reached.


=== Sample ===
=== Sample ===
Anonymous user

Navigation menu