Docs/Audio

From Sunshine Wiki
Jump to navigation Jump to search

Adding New Music Entries[edit | edit source]

TODO: 1fix music if quiet 2yoshi drums? 3check for any other issues

1. Add your sequence(s) to sequence.arc. Make sure to keep note of the size of your BMS and the offset it is found at.

2. Open the AAF and search "BARC". At 0x0598FC update the amount of sequences (31 = 49, original is 30 = 48)

AAFadd1.1.png

3. Scroll down to the end of the BARC header and create new entries. Each entry is 0x20 long, and can simply be created by copying another entry (no renaming required). The 4 bytes above blue is the size of the BMS, the 4 bytes above yellow is the offset in sequence.arc

AAFadd2.1.png

4. At the beginning of the AAF there is section data that you will have to update based on your edits to the BARC header. Highlighted is the BARC header size, and in the blue box is offsets to other sections in the AAF that need to be updated to accomodate the changes.

AAFadd3.png

5. At 0x177, update the number of sequences.

AAFadd4.png

You should now have new music.

Messing with Audio Banks (flaaffy)[edit | edit source]

Step 1. Extract Wave Table

The Wave System Table contains information of the AW audio banks and are stored inside the AAF. You will need to extract them in order to edit Sunshine's banks.

Table 0: Boot-up Sounds

Table 1: Sound Effects

Table 2: Instrument Samples

mareep -errand charge -extract-wsys -init-data-file [AAF FILE] -output [OUTPUT] -target [WSYS ID]


Step 2. Dump

Use the command below to convert the WSYS to XML and dump the audio banks, which will be in waves

mareep -errand whap -bank-dir [PATH TO "BANKS"] -input [WSYS FILE] be -output [OUTPUT] xml


Step 3. Edit

Now that you have extracted the contents it is time to edit the sounds/table. The info inside the WSYS goes: ID | FILE | AUDIO FORMAT | SOUND RATE | KEY | LOOP START | LOOP END. The last 3 are not important when simply doing basic edits. You can use the wave command to convert WAV audio to Sunshine's format if you wish to add new sounds. When adding/moving sounds, make sure to not use the same ID as an existing sound and name the RAW files correctly and are in waves. wScene_16.aw is the global instrument bank, so if you wish for a sample to be used in all scenes it's best to put it in there.


Step 4. Repack

Once you're done with edits, convert the XML to WSYS and repack the audio banks

mareep -errand whap -bank-dir [PATH TO "BANKS"] -input [XML FILE] xml -output [OUTPUT] be


Step 5. Finish

Now replace the WSYS in the AAF

mareep -errand charge -replace-wsys -init-data-file [AAF FILE] -input [WSYS FILE] -target [WSYS ID]


Audio Resources[edit | edit source]

Audio Banks[edit | edit source]

Bank What?
w1stLoad_0 Boot-up Sounds
w2ndLoad_0 Sound Effects
wScene_0 Global (Old) (UNUSED)
wScene_1 Delfino Plaza
wScene_2 Bianco Hills
wScene_3 Gelato Beach
wScene_4 Pinna Park/Beach
wScene_5 Noki Depths
wScene_6 Pianta Village
wScene_7 Sirena Beach
wScene_8 Ricco Harbor
wScene_9 Boss Demo (UNUSED)
wScene_10 File Select
wScene_11 Boss (???)
wScene_12 Secret Course
wScene_13 Hotel/Casino Delfino
wScene_14 Noki Bay
wScene_15 Corona Mountain
wScene_16 Global
wScene_17 Mecha-Bowser
wScene_18 Delfino Airstrip
wScene_19 Episode Select (???)
wScene_20 Sky & Sea
wScene_21 Bowser


BMS Instrument Bank[edit | edit source]

Sunshine's music is mostly sequenced, meaning that the game reads instructions to play sounds at a certain speed and pitch when called. These sounds are the instruments of the game, which are stored in banks; giving them a number will specify which instrument sound you want. Each song can only load one bank, so knowing which instruments can be used together is important. Below are the different instrument banks, with the instrument type and corresponding value to get that instrument

Instruments[edit | edit source]

Number Instrument (Bank 0) Instrument (Bank 1)
0 Piano Ocarina
1 Electric Grand Piano Marimba/Kalimba?
2 none Unknown
3 none Kalimba
4 none Cuica
5 Electric Piano 2 Drum
6 none Drop
7 none Kick
8 Clavinet Hard Steel Guitar
9 none none
10 Glockenspiel none
11 none none
12 none none
13 Marimba none
14 none none
15 none none
16 none none
17 none none
18 Rock Organ none
19 none none
20 none
21 none
22 Accordion
23 none
24 none
25 Acoustic Guitar (Plaza)
26 Hard Steel Guitar
27 Electric Clean Guitar
28 Overdriven Guitar
29 Muted Guitar Pluck
30 none
31 none
32 Nylon String Guitar
33 Acoustic Bass
34 Fretless Bass
35 none
36 none
37 none
38 none
39 Synth Bass 2
40 none
41 none
42 none
43 String Ensemble 1
44 none
45 none
46 Pizzicato Strings
47 Acoustic Bass?
48 none
49 Synth String 2
50 none
51 none
52 none
53 none
54 none
55 String Ensemble 1?
56 none
57 none
58 none
59 none
60 Trombone
61 none
62 none
63 none
64 none
65 none
66 none
67 none
68 Alto Saxophone
69 Oboe
70 none
71 English Horn
72 Clarinet
73 none
74 Flute
75 none
76 none
77 none
78 none
79 Whistle
80 none
81 none
82 none
83 none
84 none
85 none
86 none
87 none
88 none
89 none
90 Bongo?
91 Bass + Lead Synth Pad
92 New Age Synth Pad
93 Poly-Synth Pad
94 Halo Synth Pad
95 Base Drum?
96 none
97 none
98 none
99 none
100 Shadow Mario Synth
101 Demo Music
102 Dulcimer
103 none
104 none
105 none
106 none
107 none
108 none
109 none
110 none
111 none
112 none
113 none
114 Electric Harpsichord?
115 Steel Drums
116 Acapella Lead
117 Acapella Base
118 Acapella Snap
119 Trumpet?
120 Yoshi Bongos
121 Brass Section
122 Base Drum
123 Drum?
124 Mario Voice
125 Tambourine
126 Bianco Drums
127 Wave Sounds
128 none
129 none
228 Missing Obj?
229 Drum Kit?
230 Drum Kit?
231 Missing Obj?
232 Missing Obj?
233 Missing Obj?